//Display widt
var boxWidth = 250;

//Add tooltip message box and its cover
document.write("<span  id='msgBox' style='background-color:#ffffff;display:none;z-index=1602;width:250px;PADDING-TOP:2px;PADDING-BOTTOM:2px;PADDING-RIGHT:2px;PADDING-LEFT:2px;BORDER:1px solid #333333'><div id='msgBoxInner' class='notbold' onclick='hideHoverInfo();'>&nbsp;</div><div align=right><a href='JavaScript:hideHoverInfo()' style='font-size:10px;'>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.zIndex = "1000";
	activeMsgBox.style.textAlign = "left";
	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";
}