function findPosX(obj)
{
 var curleft = 0;
 if(obj.offsetParent)
 while(1) 
 {
  curleft += obj.offsetLeft;
  if(!obj.offsetParent)break;
  obj = obj.offsetParent;
  }
  else if(obj.x)
  curleft += obj.x;
  return curleft;
}

function findPosY(obj)
{
 var curtop = 0;
 if(obj.offsetParent)
 while(1)
 {
	curtop += obj.offsetTop;
    if(!obj.offsetParent)break;
    obj = obj.offsetParent;
  }
  else if(obj.y)curtop += obj.y;
  return curtop;
}


function fptip(baseobj, tipcontt) {
	var divTag=document.createElement("div");
	divTag.style.position="absolute";
	divTag.id="fpTip";
	divTag.innerHTML='<div style="position:absolute;padding-top:11px;"><table border="0" cellpadding="0" cellspacing="0" style="width:185px;"><tr><td width="4" height="4"><img src="images/pm-tip-topl-curve.gif" width="4" height="4" border="0" alt=""></td><td background="images/pm-tip-top-bg.gif" height="4"><!--  --></td><td width="4" height="4"><img src="images/pm-tip-topr-curve.gif" width="4" height="4" border="0" alt=""></td></tr><tr><td background="images/pm-tip-left-bg.gif" width="4"><!--  --></td><td bgcolor="#FFFFFF" style="padding:5px;" class="smalltxt">'+tipcontt+'</td><td background="images/pm-tip-right-bg.gif" width="4"><!--  --></td></tr><tr><td width="4" height="4"><img src="images/pm-tip-botl-curve.gif" width="4" height="4" border="0" alt=""></td><td background="images/pm-tip-bot-bg.gif" height="4"><!--  --></td><td width="4" height="4"><img src="images/pm-tip-botr-curve.gif" width="4" height="4" border="0" alt=""></td></tr></table></div><div style="position:absolute;padding-left:20px;"><div style="background: url(images/pm-tip-arrow.png) no-repeat !important; background: url(images/pm-tip-arrow.gif) no-repeat; width:13px;height:12px;"><!-- --></div></div>';	
	document.body.appendChild(divTag);	
	divTag.style.left=findPosX(document.getElementById(baseobj))+'px';
	divTag.style.top=(findPosY(document.getElementById(baseobj))+document.getElementById(baseobj).offsetHeight)+divTag.offsetHeight-12+'px';
}

function fptip_close(tipobj) {
	var e=document.getElementById(tipobj);
	if (e) {document.body.removeChild(e);}	
}
