/*
initializeDropDownMenuHandlers = function() 
{
	root = document.getElementById('topnav');

	// install handlers that add and remove an additional CSS class 'over'
	// when the mouse hovers in and out of the menu items
	for (i = 0; i < root.childNodes.length; ++i) {
		node = root.childNodes[i];
		
		if ( node.nodeName == "LI" || node.nodeName == "li" ) 
		{
			node.onmouseover = function() { this.className = "over"; }
			node.onmouseout  = function() { this.className = this.className.replace("over", "");  }
		}
	}
}


if (document.all) // IE only
{
	// the window may already have a registered load-event so the handler is
	// attached as an additional listener

	// attachEvent() is IE specific, in DOM2 it would be addEventListener('load', ...)
	window.attachEvent('onload', initializeDropDownMenuHandlers);
}
*/


initializeDropDownMenuHandlers = function() 
{
	root = document.getElementById('topnav');

	for (i = 0; i < root.childNodes.length; ++i) {
		node = root.childNodes[i];

		if ( node.nodeName == "LI" || node.nodeName == "li" ) 
		{
			node.onmouseover = function() { for (j = 0; j < root.childNodes.length; ++j) { if( root.childNodes[j].nodeName == "LI" || root.childNodes[j].nodeName == "li" ) root.childNodes[j].className = root.childNodes[j].className.replace(/\s?over\s?/g, ""); } this.className += " over"; };
			node.onmouseout  = function() { var e = this; setTimeout(function() { e.className = e.className.replace(/\s?over\s?/g, ""); }, 4000 ) };
		}
	}
}


if (document.all) // IE only
	window.attachEvent('onload', initializeDropDownMenuHandlers);
else
	window.addEventListener('load', initializeDropDownMenuHandlers, false);

