Tooltip = new Object ();

Tooltip.init = function () {
	Tooltip.elm = document.createElement ("div");
	Tooltip.elm.className = "tooltip";
	document.body.appendChild (Tooltip.elm);
	Tooltip.initialized = true;
}

Tooltip.show = function (event, elm) {
	if (Tooltip.initialized) {
		var stl = Tooltip.elm.style;
		
		Tooltip.elm.innerHTML = "<div>" + elm.alt + "</div>";
		
		stl.left = (event.clientX + 5) + "px";
		stl.top = (event.clientY + 2) + "px";
		stl.visibility = "visible";
	}
}

Tooltip.hide = function () {
	if (Tooltip.initialized) Tooltip.elm.style.visibility = "hidden";
}
	