


wmtt = null;
var x, y;
document.onmousemove = updateWMTT;
function updateWMTT(e){
	x = (!e) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (!e) ? window.event.y + document.body.scrollTop: e.pageY;
	
	if(typeof document.body.scrollLeft=='number'){
		w = document.body.scrollLeft + document.body.clientWidth;
		h = document.body.scrollTop + document.body.clientHeight;
	}
	else if(typeof window.pageYOffset=='number'){
		w = window.pageXOffset+window.innerWidth;
		h = window.pageYOffset+window.innerHeight;
	}
	t = y + 20;
	l = x + 20;
	
	if(wmtt){
		if(t + wmtt.offsetHeight > h) wmtt.style.top = y - 10 - wmtt.offsetHeight + 'px';
		else wmtt.style.top = t + "px"; 
		if(l + wmtt.offsetWidth > w) wmtt.style.left = w - 10 - wmtt.offsetWidth+'px';
		else wmtt.style.left = l + "px";
	}
}

function showWMTT(id){
	wmtt = document.getElementById(id);
	wmtt.style.display = "block";
}
function hideWMTT(){
	wmtt.style.display = "none";
} 




