// MENU NAVIGATION CONTROLS
// This is in addition to the CSS hover menu controls

// SuckerFish DOM scripting to add Hover function to non-compliant IE browsers
sfHover_top = function() {
	var sfEls = document.getElementById("menu_nav_top").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

sfHover_left = function() {
	var sfEls = document.getElementById("menu_nav_left").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover_top);
if (window.attachEvent) window.attachEvent("onload", sfHover_left);

// uncomment above to reenable the original SF onload
// below is a redo for all browsers and to enable a settimeout on the menus

function menuHover_top() {
	var sfEls = document.getElementById("menu_nav_top").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			setTimeout(this.className+=" hover",500);
		}
		sfEls[i].onmouseout=function() {
			setTimeout(this.className=this.className.replace(new RegExp(" hover\\b"), "",1000));
		}
	}
}


function menuHover_left() {
	var sfEls = document.getElementById("menu_nav_left").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			setTimeout(this.className+=" hover",500);
		}
		sfEls[i].onmouseout=function() {
			setTimeout(this.className=this.className.replace(new RegExp(" hover\\b"), "",1000));
		}
	}
}

//window.onload = menuHover_top;
//window.onload = menuHover_left;
