var wmtt = null;

document.onmousemove = updateWMTT;

function updateWMTT(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) {
		wmtt.style.left = (x + 20) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function showWMTT(id, w) {
	var wmtt = layer('Tip'+id).style;
	if (wmtt)
		wmtt.display = "block";
		if (w > 0) wmtt.width = w*0.75+"ex";
}

function hideWMTT(id) {
	var wmtt = layer('Tip'+id).style;
	if (wmtt) {
		wmtt.display = "none";
	}
}

function layer(id){
	if (document.getElementById) return document.getElementById(id);
	if (document.all) return document.all[id];
	return null;
}
