﻿function menuFix() {
    var sfEls = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
        this.className+=(this.className.length>0? " ": "") + "sfhover";
        hideSelectBoxes();
        }
        // event added to keep menu items from disappearing
        sfEls[i].onMouseDown=function() {
        this.className+=(this.className.length>0? " ": "") + "sfhover";
        }
        // event added to keep menu items from disappearing
        sfEls[i].onMouseUp=function() {
        this.className+=(this.className.length>0? " ": "") + "sfhover";
        }
        sfEls[i].onmouseout=function() {
        this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
        showSelectBoxes();
        }
    }
}
//window.onload=menuFix;
//if (window.attachEvent) window.attachEvent('onload', ieHover);
if (document.all) { // Load sfHover only in IE; other browsers don't need it
if (window.attachEvent) window.attachEvent("onload", menuFix);
else window.onload = menuFix; // Mac IE5 needs this
}
/** end **/


var strName = navigator.appName;
var strVer = parseInt(navigator.appVersion);
var IEBrowser = (strName == "Microsoft Internet Explorer" && strVer >= 4);
function hideSelectBoxes()
{
if (IEBrowser)
{
    for (var i=0; i<document.getElementsByTagName("Select").length; i++) 
        {
            o = document.getElementsByTagName("Select");
            if (o[i].style) o[i].style.visibility= 'hidden';
        }
}
}
function showSelectBoxes()
{
if (IEBrowser)
{
    for (var i=0; i<document.getElementsByTagName("Select").length; i++) 
        {
            o = document.getElementsByTagName("Select");
            if (o[i].style) o[i].style.visibility= 'visible';
        }
}
}