var tt_x = 0;
var tt_y = 0;

var tt_show = 0;
var tt_active = 0;

document.onmousemove = updateWMTT;

function updateWMTT(e)
{
	tt_x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	tt_y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
}

function showTT(id, new_tt)
{
	if ( new_tt)
	{
		tt_active = 0;
		closeTT();
	}
		
	tt_active = 1;
	tt_show_new = document.getElementById( id);
	
	if ( tt_show != tt_show_new)
	{
		tt_show_new.style.left = (tt_x + 0) + "px";
		tt_show_new.style.top  = (tt_y + 0) + "px";
		tt_show_new.style.display = 'block';
//		tt_show_new.style.backgroundColor = '#D8D8D8';
		
		tt_show = tt_show_new;
	}
}

function hideTT()
{
	tt_active = 0;
	closeTimer = window.setTimeout( "closeTT()", 10);
}

function closeTT()
{
	if( tt_show && tt_active == 0)
	{
		tt_show.style.display = 'none';
		tt_show = 0;
	}
}