document.onmousemove = updateTooltip;

function boxOver(id,changeColor) {
	if (changeColor) {
		document.getElementById(id).style.borderColor = "#660000";
		document.getElementById(id).style.background = "#EEEEEE";
	}
	showTooltip(id + "_tooltip");
}
function boxOut(id,changeColor) {
	if (changeColor) {	
		document.getElementById(id).style.borderColor = "#666666"
		document.getElementById(id).style.background = "#FFFFFF";;
	}	
	hideTooltip(id + "_tooltip");
}
function showTooltip(id) {
  	wmtt = document.getElementById(id);
  	if (wmtt != null) {
		wmtt.style.display = "block"
	}
}
function hideTooltip() {
  	if (wmtt != null) {
		wmtt.style.display = "none";
	}
}
function updateTooltip(e) {
	if (wmtt != null && wmtt.style.display == 'block') {
    		x = (e.pageX ? e.pageX : window.event.x) + wmtt.offsetParent.scrollLeft - wmtt.offsetParent.offsetLeft;
    		y = (e.pageY ? e.pageY : window.event.y) + wmtt.offsetParent.scrollTop - wmtt.offsetParent.offsetTop;
    		wmtt.style.left = (x + 20) + "px";
    		wmtt.style.top   = (y + 20) + "px";
  	}
}
