/*
 Author: Gregor Wegberg
 Date: 26.7.2006
 Page: WCL - Intranet
 
 Description:
   With all the functions in this JavaScript file you can use the Tooltip-Fuctionality
*/

actualLayer = null;

document.onmousemove = updatePosition;

function updatePosition(eventObject) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : eventObject.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : eventObject.pageY;
	if (actualLayer != null) {
		actualLayer.style.left = (x + 20) + "px";
		actualLayer.style.top = (y + 20) + "px";
	}
}

function showTooltip(id) {
	actualLayer = document.getElementById(id);
	actualLayer.style.display = "block"
}

function hideTooltip() {
	actualLayer.style.display = "none";
}

