// JavaScript Document
/*function ShowIt()
{
document.body.insertAdjacentHTML('BeforeEnd', '<DIV STYLE="position:absolute; TOP:35px; LEFT:410px" ID="TheTip"> <TABLE BORDER="1" CELLPADDING="3"><TD BGCOLOR="ff00ff">How About This?</TD></TABLE></DIV>');
}
function LoseIt()
{

TheTip.innerHTML = "";
TheTip.outerHTML = "";

}*/
var tempX = 0;
var tempY = 0;
var IE = document.all?true:false;
/*function xstooltip_findPosX(obj) 
{
  var curleft = 0;
  if (obj.offsetParent) 
  {
    while (obj.offsetParent) 
        {
            curleft += obj.offsetLeft
            obj = obj.offsetParent;
        }
    }
    else if (obj.x)
        curleft += obj.x;
    return curleft;
}


function xstooltip_findPosY(obj) 
{
    var curtop = 0;
    if (obj.offsetParent) 
    {
        while (obj.offsetParent) 
        {
            curtop += obj.offsetTop
            obj = obj.offsetParent;
        }
    }
    else if (obj.y)
        curtop += obj.y;
    return curtop;
}*/
function xstooltip_show(tooltipId, parentId, posX, posY,textToWrite,width,Evetype)
{
		//alert(posX);
	it = document.getElementById(tooltipId);
	//alert("it--"+it);
	if(Evetype=='MOUSEMOVE')
	{
		if (!IE) document.captureEvents(Event.MOUSEMOVE);
		//document.getElementById(parentId).onmouseover = getMouseXY;
		document.onmouseover = getMouseXY;
		//getMouseXY();
		//alert(tempX+"-"+tempY );
		it.style.top = tempY-10 ;
		it.style.left = tempX+10;
		
		
		
		var InContent="";
	
		InContent+="<TABLE cellSpacing=0 cellPadding=0 width="+width+" border=0>";
		InContent+="<TD width=0%><img src=\"images/brd_top_left.png\" width=\"16\" height=\"16\" /></TD>";
		InContent+="<TD style=\"BACKGROUND-COLOR: #f9f9f9\" width=\"100%\"></TD>";
		InContent+="<TD width=0%><img src=\"images/brd_top_right.png\" width=\"20\" height=\"16\" /></TD>";
		InContent+="</TR>";
		InContent+="<TR>";
		InContent+="<TD style=\"BACKGROUND-COLOR: #f9f9f9\"></TD>";
		InContent+="<TD style=\"BACKGROUND-COLOR: #f9f9f9;font-size:12px;font-family:verdana;color:#006464\" width=\"100%\">";
		InContent+=textToWrite;
		InContent+="</TD>";
		InContent+="<TD style=\"BACKGROUND-IMAGE: url(images/brd_right.png); BACKGROUND-REPEAT: repeat-y\">";
		InContent+="</TD>";
		InContent+="</TR>";
		InContent+="<TR>";
		InContent+="<TD>";
		InContent+="<IMG src=\"images/brd_bottom_left.png\" border=0>";
		InContent+="</TD>";
		InContent+="<TD style=\"BACKGROUND-IMAGE: url(images/brd_bottom.png); BACKGROUND-REPEAT: repeat-x\">";
		InContent+="</TD>";
		InContent+="</TD>";
		InContent+="<TD>";
		InContent+="<IMG src=\"images/brd_bottom_right.png\" border=0>";
		InContent+="</TD></TR></TABLE>";
		Content =InContent;
	}
	else
	{
		it.style.top =  posY;
		it.style.left = posX;
		
		/*var WinContent="";
	
		WinContent+="<table width="+width+" border=0 cellspacing=0 cellpadding=\"2\" style=\"border:1px solid black;\">";
		WinContent+="<tr>";
		WinContent+="<td width=1% bgcolor=\"#ABABAB\"  style=\"border-bottom:1px solid black;\">&nbsp;</td>";
		WinContent+="<td width=96% bgcolor=\"#ABABAB\"  style=\"border-bottom:1px solid black;\">&nbsp;</td>";
		WinContent+="<td width=2% bgcolor=\"#ABABAB\"  style=\"border-bottom:1px solid black;\"><img onclick=\"xstooltip_hide('window_123');\" src=\"../webadmin/images/close.jpg\" width=16 height=16/></td>";
		WinContent+="<td width=1% bgcolor=\"#ABABAB\"  style=\"border-bottom:1px solid black;\">&nbsp;</td>";
		WinContent+="</tr>";
		WinContent+="<tr>";
		WinContent+="<td bgcolor=\"#ABABAB\">&nbsp;</td>";
		WinContent+="<td colspan=2 style=\"BACKGROUND-COLOR: #ABABAB;\" align=center valign=middle>"+textToWrite+"</td>";
		WinContent+="<td bgcolor=\"#ABABAB\">&nbsp;</td>";
		WinContent+="</tr>";
		WinContent+="<tr>";
		WinContent+="<td bgcolor=\"#ABABAB\" height=5></td>";
		WinContent+="<td colspan=2 bgcolor=\"#ABABAB\" height=5></td>";
		WinContent+="<td bgcolor=\"#ABABAB\" height=5></td>";
		WinContent+="</tr>";
		WinContent+="</table>";
		Content =WinContent;*/
		
		var InContent="";

		InContent+="<TABLE cellSpacing=0 cellPadding=0 width="+width+" border=0>";
		InContent+="<TD width=0%><img src=\"images/brd_top_left.png\" width=\"16\" height=\"16\" /></TD>";
		InContent+="<TD style=\"BACKGROUND-COLOR: #f9f9f9\" width=\"100%\" align=\"right\"><img onclick=\"xstooltip_hide('" + tooltipId + "');\"  src=\"images/close.jpg\" width=\"16\" height=\"16\"/></TD>";
		InContent+="<TD width=0%><img src=\"images/brd_top_right.png\" width=\"20\" height=\"16\" /></TD>";
		InContent+="</TR>";
		InContent+="<TR>";
		InContent+="<TD style=\"BACKGROUND-COLOR: #f9f9f9\"></TD>";
		InContent+="<TD style=\"BACKGROUND-COLOR: #f9f9f9;font-size:12px;font-family:verdana;color:#006464\" width=\"100%\">";
		InContent+=textToWrite;
		InContent+="</TD>";
		InContent+="<TD style=\"BACKGROUND-IMAGE: url(images/brd_right.png); BACKGROUND-REPEAT: repeat-y\">";
		InContent+="</TD>";
		InContent+="</TR>";
		InContent+="<TR>";
		InContent+="<TD>";
		InContent+="<IMG src=\"images/brd_bottom_left.png\" border=0>";
		InContent+="</TD>";
		InContent+="<TD style=\"BACKGROUND-IMAGE: url(images/brd_bottom.png); BACKGROUND-REPEAT: repeat-x\">";
		InContent+="</TD>";
		InContent+="</TD>";
		InContent+="<TD>";
		InContent+="<IMG src=\"images/brd_bottom_right.png\" border=0>";
		InContent+="</TD></TR></TABLE>";
		Content =InContent;
	}
	//alert(Content);
	it.innerHTML=Content ;
	it.style.visibility = 'visible'; 
	//setInterval(xstooltip_show(),100);
}
function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  //document.Show.MouseX.value = tempX
 // document.Show.MouseY.value = tempY
 // return true
}
function xstooltip_hide(id)
{    
	it = document.getElementById(id); 
    it.style.visibility = 'hidden'; 
}

                  
