
var O="";
function showTip(text,me) {
  O=me;
  O.onmousemove=updateTip;	
  document.getElementById('tooltip').innerHTML= '<table align="center" width="100%" style="position:relative;" cellspacing="0" cellpadding="0" border="0"><tr height="4" valign="bottom"><td width="197" style="background-image:url(images/ttTop.png); background-position:bottom; background-repeat:no-repeat; line-height:1px;" colspan="3">&nbsp;</td></tr><tr height="23"><td align="right" width="22" style="background-image:url(images/ttLeft.png); background-position:right; background-repeat:no-repeat; line-height:1px;">&nbsp;</td><td align="left" style="background-image:url(images/ttBG.png); background-repeat:repeat;" rowspan="2"><p align="center" style="position:relative; margin:3px; width:150px;">'+text+'</p></td><td align="left" rowspan="2" width="4" style="background-image:url(images/ttRight.png); background-repeat:repeat-y; background-position:left;">&nbsp;</td></tr><tr valign="top" height="*"><td align="right" width="22" style="background-image:url(images/ttLeftB.png); background-repeat:repeat-y; background-position:right; line-height:1px;">&nbsp;</td></tr><tr valign="top" height="7"><td colspan="3" align="center" width="197" style="background-image:url(images/ttBottom.png); background-repeat:no-repeat; background-position:top; line-height:1px;">&nbsp;</td></tr></table>';
  document.getElementById('tooltip').style.display="block";
  changeOpac(90, 'tooltip')

  if ((250 + Number(xMousePos)) > xMousePosMax) {
	  document.getElementById('tooltip').style.left = Number(xMousePosMax-240)+"px";
	  document.getElementById('tooltip').style.top = Number(yMousePos+5)+"px";
  } else {
	  document.getElementById('tooltip').style.left = Number(xMousePos+12)+"px";
	  document.getElementById('tooltip').style.top = Number(yMousePos-24)+"px";
  }
}

function updateTip() {
  if ((250 + Number(xMousePos)) > xMousePosMax) {
	  document.getElementById('tooltip').style.left = Number(xMousePosMax-240)+"px";
	  document.getElementById('tooltip').style.top = Number(yMousePos+5)+"px";
  } else {
	  document.getElementById('tooltip').style.left = Number(xMousePos+12)+"px";
	  document.getElementById('tooltip').style.top = Number(yMousePos-24)+"px";
  }
}

function hideTip(me) {
	if (O == me) {
		O = "";
		setTimeout("tipHider('"+me+"');",50);
	}
}

function tipHider() {
	if (O=="") {
		document.getElementById('tooltip').style.display="none";
	}
}