var currentInfo;

function doInfo(e)
{	
	var newInfo;
	
	//kludge to make IE comply to DOM2
	if (is_ie)
	{
		e = event;
		e.currentTarget = event.srcElement;
	}
	
	newInfo = document.getElementById("I_" + e.currentTarget.id);
	
	if (newInfo != currentInfo)
	{
		hideInfo();
		currentInfo = newInfo;
	}
	
	if (currentInfo != null)
	{
		currentInfo.style.top = e.clientY + 15 + document.body.scrollTop;
		currentInfo.style.left = e.clientX + 15 + document.body.scrollLeft;
		currentInfo.style.visibility = "visible";
	}
}

function hideInfo()
{
	if (currentInfo != null)
		currentInfo.style.visibility = "hidden";
}

function registerSubInfoEvents(subs)
{
	var i;
	
	for (i=1; i<=subs; i++)
	{
		document.getElementById("sub" + i).onmousemove = doInfo;
		document.getElementById("sub" + i).onmouseout = hideInfo;
	}
}