
/**
 * Retrieves the position of the mouse cursor in Mozilla and iCab browsers.
 */
function getMousePos(e)
{
	posX = e.pageX;
	posY = e.pageY;
}

/**
 * Retrieves the position of the mouse cursor in Opera. This would also work
 * in IE6 except that IE6 puts itself in "standards compliance" mode when it
 * sees a DOCTYPE, and apparently "standards compliance" means "screw
 * standards, let's eat pie" in Microsoftese. 
 */
function getMousePos_Opera()
{
	posX = document.body.scrollLeft + event.clientX;
	posY = document.body.scrollTop + event.clientY;
}
 
/**
 * Displays an infobox at the location of the mouse cursor.
 *
 * @param source Source element.
 * @param content Content to be displayed in the infobox.
 * @param type Content type. Either "text" or "image".
 */ 
function infoBoxOn(source, content)
{
	var infobox = document.getElementById("infoBox");
	
	infobox.innerHTML = content;
	
	infobox.style.left    = posX + "px";
	infobox.style.top     = posY + "px";
	infobox.style.display = "block";
}

/**
 * Turns the infobox off.
 */
function infoBoxOff()
{
	var infobox = document.getElementById("infoBox");
	
	infobox.style.display = "none";
}




  



  


