var divLayer = null;
var mouseX   = 0;
var mouseY   = 0;
var timer= null;

if( document.layers ) 
{
	document.captureEvents( Event.MOUSEMOVE );
}

document.onmousemove = GetCursor; 

function GetCursor( e ) 
{
	if( document.layers ) 
	{
		mouseX = e.pageX;
		mouseY = e.pageY;
	}
	else if( document.all ) 
	{
		mouseX = event.clientX + document.body.scrollLeft;
		mouseY = event.clientY + document.body.scrollTop;
	}
	else if( document.getElementById )
	{
	    mouseX = e.pageX;
		mouseY = e.pageY;
	}
	
	return true;
}

function GetHandle( ele ) 
{
	return ele.style;
}

function ShowToolTip(ele) 
{
	if (divLayer)
	HideToolTip2();
	
	divLayer = ele.parentNode.getElementsByTagName('div')[0];
	
	var tip = GetHandle( divLayer );
	
	tip.left = mouseX;
	tip.top  = mouseY + 20;
	
	if( document.layers )
	{
		tip.visibility = "show";
	}
	else if( document.all )
	{
		tip.visibility = "visible";
	}
	else if( document.getElementById )
	{
	    tip.visibility = "visible";
	}
}

function stopper()
{
	if (timer)
	clearTimeout(timer);
}

function HideToolTip(){
	stopper();
	timer = window.setTimeout('HideToolTip2()',3000);
	}

function HideToolTip2()
{
	var tip = GetHandle( divLayer );
	
	if( document.layers )
	{
		tip.visibility = "hide";
	}
	else if( document.all )
	{
		tip.visibility = "hidden";
	}
	else if( document.getElementById )
	{
	    tip.visibility = "hidden";
	}
}

