/* IE doesnt support :hover psuedo classes, 
 * so we create a javascript function to attach 
 * sfHover class to <li> elements
 * (Ivan Manolov 20060330)
 */

var clearExp = new RegExp(" sfhover\\b");

/* this doesn't work. Blah 
function clearNavs(arr,excludeObj) {
	for(var i=0;i<arr.length;i++)
	{
		if(arr[i] != excludeObj)
			arr[i].className = arr[i].className.replace(clearExp);
	}
}
*/

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			// clearNavs(sfEls,this);
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(clearExp, "");
/*
			var me = this;
			setTimeout( function() { me.className=me.className.replace(clearExp, ""); }, 500);
*/
		}
	}
}

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

leftnavHover = function() {
	var sfEls = document.getElementById("mainleftnav").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(clearExp, "");
			/*
			var me = this;
			setTimeout( function() { me.className=me.className.replace(clearExp, ""); }, 500);
			*/
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", leftnavHover);