

	// function for poking a new property value into a DOM element;
	// used here to toggle the visibility of the floating definition "window"
	function setIdProperty( id, property, value )
	{
		var styleObject = document.getElementById( id );
		if (styleObject != null)
		{
			styleObject = styleObject.style;
			styleObject[ property ] = value;
		}
	}

	var timeoutID;

	// function triggered by glossary term mouseover events does the core
	// work of positioning the definition "window" for the particular browser
	// in use and enables its visibility
	function showDiv( domId )
	{
		var theWidth = 0
		var theHeight = 0
		var yOffset = 0
		
		// Try to get the yoffset...
		if (window.pageYOffset)
		{
			yOffset = window.pageYOffset
		}
		else if (document.documentElement && document.documentElement.scrollTop)
		{
			yOffset = document.documentElement.scrollTop
		}
		else if (document.body)
		{
			yOffset = document.body.scrollTop
		}
		
		// Try to get the "inner width" and "inner height"
		if (window.innerWidth)
		{
			theWidth = window.innerWidth
			theHeight = window.innerHeight
		}
		else if (document.documentElement && document.documentElement.clientWidth)
		{
			theWidth = document.documentElement.clientWidth
			theHeight = document.documentElement.clientHeight
		}
		else if (document.body)
		{
			theWidth = document.body.clientWidth
			theHeight = document.body.clientHeight
		}
		
		var left = (theWidth-500)/2 + "px"
		var top = (theHeight-200)/2 + yOffset + "px"
		
		setIdProperty( domId, "left", left )
		setIdProperty( domId, "top", top )	
		
		// timeout delay
		timeoutID = window.setTimeout( 'setIdProperty( "'+ domId + '", "visibility", "visible" );', 500 );
	}

	// handles hiding the definition "window" when the mouse moves off the term
	function hideDiv( domId )
	{
	
		// cancel the dely on the show code
		window.clearTimeout(timeoutID);
		
		setIdProperty( domId, "visibility", "hidden" );
	}



