/* First check if we are using IE if so change class name of any LI with nothere class
   and add mouse events.
*/
var agt=navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();
var is_minor = parseFloat(appVer);
var is_major = parseInt(is_minor);
var is_mac = (agt.indexOf("mac")!=-1);
var iePos  = appVer.indexOf('msie');
var is_opera = (agt.indexOf("opera") != -1);

if (is_opera)
	iePos = -1;

if (iePos !=-1) {
	 if(is_mac) {
			 var iePos = agt.indexOf('msie');
			 is_minor = parseFloat(agt.substring(iePos+5,agt.indexOf(';',iePos)));
	 }
	 else is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
	 is_major = parseInt(is_minor);
}

if ((iePos !=-1) && (is_minor == 6)) {
	sfHover = function() {
		var sfEls = document.getElementById("mainMenu").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			
			if (sfEls[i].className == "nothere")
			{
				sfEls[i].onmouseout=function() {
					this.className=this.className.replace(new RegExp("sfhover\\b"), "nothere");
				}
			}
			else
			{
				if (sfEls[i].className == "here")
				{
					sfEls[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp("sfhover\\b"), "here");
					}
				}
			}

			sfEls[i].onmouseover=function() {
				//alert(this.className);
				if ((this.className == "nothere")||(this.className == "here"))
				{
					this.className ="sfhover";
				}
			}
			
			
		}
		
		if (document.getElementById("sideMenu") != null) {

			var sfEls = document.getElementById("sideMenu").getElementsByTagName("LI");
			
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover=function() {
					this.className+=" sfsideHover";
				}
				sfEls[i].onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfsideHover\\b"), "");
				}
			}
		}
	}
	
	if (window.attachEvent) 
		window.attachEvent("onload", sfHover);
	else
	{
		if (document.all&&document.getElementById)
			window.onload=sfHover;
	}
	

}