//printable version for IE only
function ieExecWB( intOLEcmd, intOLEparam ) {
	var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
 	if (!intOLEparam || intOLEparam < -1 || intOLEparam > 1 ) {
 		intOLEparam = 1;
 	}
 	WebBrowser1.ExecWB( intOLEcmd, intOLEparam );
 	WebBrowser1.outerHTML = "";
};
function reloadPreviewDiv() {
	var commentString = document.getElementById('comment').value;
	document.getElementById('commentpreview').innerHTML = textile(commentString);
}
function wipoPop(elem, msg, w, xOff, yOff) {
  var ns4 = document.layers;
  var ns6 = document.getElementById&&!document.all;
  var ie4 = document.all;
  var nfo;
  if (ns4) {
	nfo=document.Info;
  }
  else if (ns6) {
	nfo=document.getElementById("Info");
  }
  else if (ie4) {
	nfo=document.all.Info;
  }
  if (!nfo) {
    if (ie4 || ns6) { 
    	nfo = document.createElement('div');
    	nfo.setAttribute('id', 'Info');
    	nfo.innerHTML = '&nbsp;';
    	nfo.style.width= '200px';
    	document.body.appendChild(nfo);
    }
    else {
	return;
    }
  }
  if (ns6 || ie4) {
    nfo = nfo.style;
  }
  if (!elem) {
    nfo.visibility = "hidden";
    nfo.left = 0;
    return;
  }
  if ((!msg) || (msg.length == 0)) {
    return;
  }
  if (!w) {
    w = "200";
  }
  if (!xOff) {
    xOff = 0;
  }
  if (!yOff) {
    yOff = 15;
  }
  if (ns4) {
//	document.captureEvents(Event.MOUSEMOVE);
  }
  else {
	nfo.visibility="visible"
	nfo.display="none"
  }
  var content="<TABLE WIDTH='" + w + "' CELLPADDING=2 CELLSPACING=0 STYLE='border: 1px solid rgb(100,100,100)'" + "BGCOLOR='#eeeeee'><TD>" + msg + "</TD></TABLE>";
  var x = xOff;
  var y = yOff;
  while (elem.offsetParent != null) {
    y += elem.offsetTop;
    x += elem.offsetLeft;
    elem = elem.offsetParent;
  }
  nfo.top = y+"px";
  nfo.left = x+"px";
  self.status = x+","+y;
  if (ns4) {
	nfo.document.write(content);
	nfo.document.close();
	nfo.visibility = "visible"
  }
  if (ns6) {
	document.getElementById("Info").innerHTML = content;
	nfo.display = ''
  }
  if (ie4) {
	document.all("Info").innerHTML = content;
	nfo.display = ''
  }
}
