/**
* Function registers events for browsers that do not recognize :hover on LI elements (This is for IE6 mostly)
**/
sfHover = function() {
	var sfEls = document.getElementById("nav").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(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

/**
* Consistent Naming is REQUIRED.  The filenames of over the overstate and the off state need to be the same execpt one has the word "on" and the other "off"
* All LI's need to be surrounded by a span that has a similar ID as the image.
**/
function navMouseOver() {
	var elementId = this.id.split("nav__Span");
	var imageName = document.getElementById("nav__Img"+elementId[1]).src.split("_off");

	document.getElementById("nav__Img"+elementId[1]).src = imageName[0]+"_on"+imageName[1];
}

function navMouseOut() {
	var elementId = this.id.split("nav__Span");
	var imageName = document.getElementById("nav__Img"+elementId[1]).src.split("_on");
	document.getElementById("nav__Img"+elementId[1]).src = imageName[0]+"_off"+imageName[1];
}

function attachNavHovers() {
	for(var i=0; i<=10; i++) {
		if(document.getElementById('nav__Span'+i).className != 'selectedNav') {
			document.getElementById('nav__Span'+i).onmouseover = navMouseOver;
			document.getElementById('nav__Span'+i).onmouseout = navMouseOut;
		}
	}
	
MM_preloadImages('images/nav_home_on.gif','images/nav_the_platform_on.gif','images/nav_business_bene_on.gif','images/nav_tech_capa_on.gif','images/nav_prod_on.gif','images/nav_resources_on.gif','images/nav_solutions_on.gif','images/nav_industry_on.gif','images/nav_partners_on.gif','images/nav_contact_on.gif','nav_map_on.gif','images/nav_sub_hover.jpg')


}
addLoadEvent(attachNavHovers);