// JavaScript Document
// Floating DIV code for glossary terms
// Ryan Peters

var lastid = 0;
var thetimeout;

delay = 500;  // ms

function showspan (id)
{
	clearTimeout(thetimeout);
	
	if (lastid != id)
		hidelast();

	var span = document.getElementById(id) ;
	var image = document.getElementById('dot' + id) ;
	
	if (image)
		image.src = "../images/glossarylink_red.gif";
	
	if (span)	
		span.style.display = "";

	lastid = id;
		
}

function hidelast()
{
	var span = document.getElementById(lastid) ;
	var image = document.getElementById('dot' + lastid) ;
	
	if (image)
		image.src = "../images/glossarylink.gif";

	if (span)
		span.style.display = "none";
}

function hidelasttimed()
{
	thetimeout = setTimeout("hidelast()",delay);
}
