// Function to get X pos. 
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 to get Y pos.
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 show_div(elem,div_id)
{
	var x=parseInt(xstooltip_findPosX(elem));
	var y=parseInt(xstooltip_findPosY(elem));

	var dv=document.getElementById(div_id);
	dv.style.position="absolute";
	dv.style.top=y-100+"px";
	dv.style.left=x-50+"px";
	dv.style.zIndex=2000;
	dv.style.display="block";
}
function hide_div(div_id)
{
	var dv=document.getElementById(div_id);
	dv.style.display="none";
}
