var myNavSection = "";


/*So hovers work in ie6*/

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);

sfHover = function() {
	var sfEls = document.getElementById("leftNav").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);


/* Top embolding on hover, and dynamically show and hide the navigation*/
function embolding(section) {
		document.getElementById(section).className = " embolding";
}

function removeEmbolding(section) {
		document.getElementById(section).className = " ";
			
}

function checkEmbolding(section) {
		if ((myNavSection == "netsuite" || myNavSection == "staffing" || myNavSection == "webDesign" || myNavSection == "clinicalSystems" || myNavSection == "microsoft" || myNavSection == "dataManagement" || myNavSection == "oracle") && section == "services") {
			}
		else if (myNavSection == "portfolioLeft" && section == "portfolio") {
			}
		else if ((myNavSection == "resources" || myNavSection == "aboutExplore")  && section == "expertise") {
			}
		else if (myNavSection == "contactUsLeft" && section == "contactUs") {
			}
		else {removeEmbolding(section)
			}
}

function showNav(navSection) {
		myNavSection = navSection;

		document.getElementById(navSection).className = " show";
		
		/* Begin Code for top Navigation Embolding*/
		if(navSection == "netsuite" || navSection == "staffing" || navSection == "webDesign" || navSection == "clinicalSystems" || navSection == "microsoft" || navSection == "dataManagement" || navSection == "oracle") {
			embolding("services")
			};
		if(navSection == "portfolioLeft") {
			embolding("portfolio")
			};
		if(navSection == "resources" || navSection == "aboutExplore") {
			embolding("expertise")
			};
		if(navSection == "contactUsLeft") {
			embolding("contactUs")
			};
		leftEmbolding()	
}

function leftEmbolding() {
		/*Begin Code for Left Navigation Embolding*/
		pageURL = window.location;
		
		linkURL = document.getElementById("leftNav").getElementsByTagName("A");
		for(var n in linkURL) {
			var link = linkURL[n].href;
			if(link == pageURL) {
				linkURL[n].parentNode.className += " embold";
				break;
				}
			}

		}
		
		