sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	//var sfUls = document.getElementById("nav").getElementsByTagName("UL");
	/*for (var q=0; q<sfUls.length; q++) {
		sfUls[q].onmouseover=function() {
			
			this.className+=" sfhover";
		}
		sfUls[q].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
		
	}*/
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			//var parent = this.parentNode;
			var child = this.childNodes;
			var total = this.childNodes.length;
			window.status = "";
			for(var n=0; n<total; n++){
				window.status += child[n].nodeName;
				
				if(child[n].nodeName == "UL"){
					window.status += "set UL";
					
					//this.childNodes[n].className = this.childNodes[n].className.replace(new RegExp(" sfhover\\b"), "");
					child[n].className = "sfhover";	
					break;
				}
			}
			//parent.className +=" sfhover";
			//this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			
			var child = this.childNodes;
			var total = this.childNodes.length;
			for(var n=0; n<total; n++){
				if(child[n].tagName == "UL"){
					window.status += "unset";
					child[n].className = "";
					break;
					//this.childNode[n].className = this.childNode[n].className.replace(new RegExp("amhover\\b"), "");
				}
			}
			//var parent = this.parentNode;
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			//parent.className = parent.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	try{
	var sfEls2 = document.getElementById("quicklinks").getElementsByTagName("LI");
	for (var i=0; i<sfEls2.length; i++) {
		sfEls2[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls2[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	}catch(e){
		//do nothing	
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function gotoSermon() {
  var x=document.getElementById("sermonLists")
  if(x.selectedIndex==0) y=1;
  if(x.selectedIndex==1) window.location="/resources/messages/series/";
  if(x.selectedIndex==2) window.location="/resources/messages/category/";
  if(x.selectedIndex==3) window.location="/resources/messages/date/";
  if(x.selectedIndex==4) window.location="/resources/messages/speaker/";
}