tooltip = null;
document.onmousemove = update_tooltip;

function update_tooltip(e)
{
	if (tooltip != null)
	{
		x = (document.all) ? window.event.x + tooltip.offsetParent.scrollLeft : e.pageX;
		y = (document.all) ? window.event.y + tooltip.offsetParent.scrollTop  : e.pageY;
		tooltip.style.left = (x + 20) + "px";
		tooltip.style.top   = (y - 180) + "px";
	}
}

function update_tooltip2(e)
{
	if (tooltip != null)
	{
		x = (document.all) ? window.event.x + tooltip.offsetParent.scrollLeft : e.pageX;
		y = (document.all) ? window.event.y + tooltip.offsetParent.scrollTop  : e.pageY;
		tooltip.style.left = (x + 20) + "px";
		tooltip.style.top   = (y - 40) + "px";
	}
}

function show_tooltip(id)
{
	tooltip = document.getElementById(id);
	tooltip.style.display = "inline";
}

function show_tooltip2(id)
{
	tooltip = document.getElementById(id);
	tooltip.style.display = "inline";
    document.onmousemove = update_tooltip2;
}

function hide_tooltip()
{
	tooltip.style.display = "none";
}
