// JavaScript Document


/* THE FOLLOWING JAVASCRIPT CODE COPYRIGHT OUTCROP GROUP & OUTCROP INTERACTIVE 2004 */
function navOn(){

url=location.toString(); 	/*Turns URL into a string*/

	if(url.search("whats_new") != -1){			/*searches the url string for a match*/ 
		document.getElementById("whats_new").className = "on";
	}
	else if(url.search("what_is_hia") != -1){			/*searches the url string for a match*/ 
		document.getElementById("what_is_hia").className = "on";
		document.getElementById("subwhat_is_hia").style.display = "block";
	}
	else if(url.search("our_services") != -1){			/*searches the url string for a match*/ 
		document.getElementById("our_services").className = "on";
	}
	else if(url.search("who_we_are") != -1){			/*searches the url string for a match*/ 
		document.getElementById("who_we_are").className = "on";
	}
	else if(url.search("jobs") != -1){			/*searches the url string for a match*/ 
		document.getElementById("jobs").className = "on";
	}
	else if(url.search("contact_us") != -1){			/*searches the url string for a match*/ 
		document.getElementById("contact_us").className = "on";
	}
	
	
	// SUB NAVIGATION
	
	// What is HIA?
	
	if(url.search("what_is_hia/what_is_health.html") != -1){			/*searches the url string for a match*/ 
		document.getElementById("what_is_health").className = "on";
	}
	else if(url.search("what_is_hia/business_case_health.html") != -1){			/*searches the url string for a match*/ 
		document.getElementById("business_case").className = "on";
	}
	else if(url.search("what_is_hia/hia_eia_sia.html") != -1){			/*searches the url string for a match*/ 
		document.getElementById("hia_eia_sia").className = "on";
	}
	else if(url.search("what_is_hia/comic.html") != -1){			/*searches the url string for a match*/ 
		document.getElementById("comic").className = "on";
	}
	
}


  // this function is needed to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  } 