<!--
/* 
Netscape 4, Ice, Escape, Omniweb 4.2- 
    if( document.layers ) 

Explorer 4+, Opera 6+, iCab, Ice, Omniweb 4.2- 
    if( document.all ) 	

Mozilla, Explorer 5+, Opera 5+, Konqueror, Safari, iCab, Ice, OmniWeb 4.5 
    if( document.getElementById ) 
*/
var divLayer = 'tooltip';
var mouseX   = 0;
var mouseY   = 0;

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( name ) 
{
	if( document.layers ) 
	{
		
		return ( document.layers[name] );
	}

	if( document.all ) 
	{
		var block = eval( 'document.all.' + name + '.style' );
		
		return ( block );
	}
	
	if( document.getElementById ) 
	{
	    return document.getElementById( name ).style;
	}
}

function ShowToolTip(divLayer) 
{
	var tip = GetHandle( divLayer );
	
	tip.left = mouseX;
	tip.top  = mouseY + 20;
	
	if( document.layers )
	{
		if (mouseX + 300 > window.innerWidth) { tip.left = window.innerWidth - 350; }
		tip.visibility = "show";
	}
	else if( document.all )
	{
		if (mouseX + 300 > document.body.clientWidth) { tip.left = document.body.clientWidth - 350; }
		tip.visibility = "visible";
	}
	else if( document.getElementById )
	{
		if (mouseX + 300 > document.body.clientWidth) { tip.left = document.body.clientWidth - 350; }
	    tip.visibility = "visible";
	}
}

function HideToolTip(divLayer)
{
	var tip = GetHandle( divLayer );
	
	if( document.layers )
	{
		tip.visibility = "hide";
	}
	else if( document.all )
	{
		tip.visibility = "hidden";
	}
	else if( document.getElementById )
	{
	    tip.visibility = "hidden";
	}
}

// -->
