sfHover = function() {
	var ieNavs = document.getElementsByTagName('ul');
	for(i=0; i<ieNavs.length; i++) {
		var ul = ieNavs[i];
		if(ul.className == "nav")
			setHover(ul);
	}
}
function setHover(nav) {
	var ieULs = nav.getElementsByTagName('ul');
	if (navigator.appVersion.substr(22,3)!="5.0") {
		/** IE script to cover <select> elements with <iframe>s **/
		for (j=0; j<ieULs.length; j++) {
			ieULs[j].innerHTML = ('<iframe src="about:blank" scrolling="no" frameborder="0" style="filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);"></iframe>' + ieULs[j].innerHTML);
			var ieMat = ieULs[j].firstChild;
			ieMat.style.width=ieULs[j].offsetWidth+"px";
			ieMat.style.height=ieULs[j].offsetHeight+"px";
			ieULs[j].style.zIndex="101";
		}
		/** IE script to change class on mouseover **/
		var ieLIs = nav.getElementsByTagName('li');
		for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
			// Does this LI have children?
			if (ieLIs[i].getElementsByTagName("UL").length>0){
				ieLIs[i].className+=" sfnode";
				ieLIs[i].onmouseover=function() {this.className+=" sfhover";}
				ieLIs[i].onmouseout=function() {this.className=this.className.replace(' sfhover', '');}
			}
		}
	} else {
		// IE 5.0 doesn't support iframes so hide the select statements on hover and show on mouse out.
		/** IE script to change class on mouseover **/
		var ieLIs = document.getElementById('nav').getElementsByTagName('li');
		for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
			ieLIs[i].onmouseover=function() {this.className+=" sfhover";hideSelects();}
			ieLIs[i].onmouseout=function() {this.className=this.className.replace(' sfhover', '');showSelects()}
		}
	}
}
function hideSelects(){
	var oSelects=document.getElementsByTagName("select");
	for(var i=0;i<oSelects.length;i++)
		oSelects[i].className+=" hide";
}
function showSelects(){
	var oSelects=document.getElementsByTagName("select");
	for(var i=0;i<oSelects.length;i++)
		oSelects[i].className=oSelects[i].className.replace(" hide","");
}

if (window.attachEvent) window.attachEvent('onload', sfHover);

