tHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" thover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" thover\\b"), "");
		}
	}
}

tHoverHead = function() {
	var sfEls = document.getElementById("headnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" thover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" thover\\b"), "");
		}
	}
}

tHoverFoot = function() {
	var sfEls = document.getElementById("footnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" thover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" thover\\b"), "");
		}
	}
}

tHoverSub = function() {
	var sfEls = document.getElementById("subnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" thover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" thover\\b"), "");
		}
	}
}
//New function added to support different menu ids
function thover(id) {
	var sfEls = document.getElementById(id);
	if(sfEls!='' && sfEls!=false && sfEls!=undefined){
		sfEls = document.getElementById(id).getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" thover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" thover\\b"), "");
			}
		}
	}
}
