wmtt = null;

document.onmousemove = updateWMTT;
var width;
var height;
if (self.innerHeight) // all except Explorer
{
	width = self.innerWidth;
	height = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
// Explorer 6 Strict Mode
{
	width = document.documentElement.clientWidth;
	height = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	width = document.body.clientWidth;
	height = document.body.clientHeight;
}

function updateWMTT(e) {
	x = (document.all) ? window.event.x + document.documentElement.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.documentElement.scrollTop  : e.pageY;
	if (wmtt != null) {
		if (width-x-wmtt.offsetWidth<30)
			x = width-wmtt.offsetWidth-10;

		if (y+wmtt.offsetHeight+20>height)
			y = y-wmtt.offsetHeight;
		else
			y += 20;
		wmtt.style.left = (x ) + "px";
		wmtt.style.top         = (y) + "px";
	}
}

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

function hideWMTT() {
	wmtt.style.display = "none";
}