/*
showhide.js

This script enables rollover functionality
for the main menu in IE (in standards-compliant
browsers, CSS suffices)

*/

sfHover = function()
{
	// determine whether this is the home page or a regular page and act accordingly
	if (document.getElementById("mainmenu") != null)
	{
		var sfEls = document.getElementById("mainmenu").getElementsByTagName("LI");
	}
	else
	{
		var sfEls = document.getElementById("homemenu").getElementsByTagName("LI");
	}

	for (var i=0; i<sfEls.length; i++)
	{
		sfEls[i].onmouseover=function()
		{
			this.className ="menuitem sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className = "menuitem";
		}
	}
}

// "attachEvent" is an IE-specific method to append an event handler to an element that may already have events attached to it; since this script is specifically used for IE, it's a good fit, and it doesn't interfere with the onload event handler in "weblogo.js"
if (window.attachEvent)
{
	window.attachEvent("onload", sfHover);
}
