<!--
//
// ##################################################################
// ##################################################################
// ## $id: tooltip.js,06.05.2007,14:09,charts-arena$               ##
// ##                                                              ##
// ## @fileinfo   : tooltip.js                                     ##
// ## @Version    : 1.0.0                                          ##
// ## @starttime  : 06.05.2007, 14:09                              ##
// ## @updatetime : -                                              ##
// ## @written by : tomtaz <tomtaz@gmx-topmail.de>                 ##
// ## @project    : TTsBoard 3 Lite Beta                           ##
// ##                                                              ##
// ## Discruption : ToolTip Javascript File                        ##
// ##                                                              ##
// ##                                                              ##
// ## NOTE        : This is a JS File                              ##
// ##                                                              ##
// ##                                                              ##
// ## Copyright   : Full Copyright (c) 2007 by Tomtaz              ##
// ##               for more Details read license.pdf              ##
// ##################################################################
// ##################################################################
//
wmtt              = null;
var browserWidth  = null;
var tooltipw      = 200;

document.onmousemove = UpdateToolTip;

function UpdateToolTip(e)
{
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (wmtt != null)
	{
		if ( ! tooltipw )
		{
			alert ('No Widths sets for Tooltip');
			return false;
		}
		
		browserWidth  = self.innerWidth;
		
		if ( ! browserWidth )
		{
			if ( document.compatMode && document.compatMode == 'BackCompat' )
			{
				browserWidth  = document.body.clientWidth;
			}
			else if ( document.compatMode && document.compatMode == 'CSS1Compat' )
			{
				browserWidth  = document.documentElement.clientWidth;
			}
		}
		browserWidth = ( browserWidth - (tooltipw + 30) );
		
		if ( x  < browserWidth )
			wmtt.style.left = ( x + 10 ) + 'px';
		else
			wmtt.style.left = ( x - tooltipw - 10 ) + 'px';
		
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function ShowToolTip(id)
{
	wmtt = document.getElementById(id);
	wmtt.style.display = "block";
}

function HideToolTip()
{
	wmtt.style.display = "none";
}
//-->