//Display widt
var boxWidth = 250;

//Add tooltip message box and its cover
document.write("<span class='drgrbg' id='msgBox' style='display:none;z-index=1602;width:250px;PADDING-TOP:2px;PADDING-BOTTOM:2px;PADDING-RIGHT:2px;PADDING-LEFT:2px;BORDER:1px solid #333333; background-color:#e1e1e1; position:absolute; text-align:justify;'><div id='msgBoxInner' class='notbold' onclick='hideHoverInfo();'>&nbsp;</div><div align=right style='color:#fc3103; text-decoration:underline; font-size:11px;'><a href='JavaScript:hideHoverInfo()' style='color:#fc3103; text-decoration:underline; font-size:11px;'>Close [X]</a></div></span>");
	
//catch objects
var	activeMsgBox= document.getElementById("msgBox");
var innerMsgBox = document.getElementById("msgBoxInner");

//show more custom message box
function showHoverInfo(message,width,left,top,hideOnClick)
{
	if (message == null || message.length == 0)
		return;
	
	innerMsgBox.innerHTML = message;
	if (hideOnClick)
	{
		innerMsgBox.setAttribute("onclick","");
	}
	
	if (width != null)
	{
		activeMsgBox.style.width = boxWidth = width;
	}
	//alert("mY: " + mY);
	//alert("scrollTop: " + document.body.scrollTop);
	//prepare message box
	activeMsgBox.style.position = "absolute";
	activeMsgBox.style.left		= (left != null ? left : (document.body.clientWidth < (mX + boxWidth + 20) ? mX-boxWidth : mX));
	activeMsgBox.style.top		= (top != null ? top : mY + 5);
	activeMsgBox.style.display	= "block";
}

//hide message box & its cover
function hideHoverInfo()
{
	activeMsgBox.style.display	= "none";
}