// JavaScript Document

/* THE FOLLOWING JAVASCRIPT CODE COPYRIGHT OUTCROP GROUP & OUTCROP INTERACTIVE 2004 */
function navOn(){

var url=location.toString(); 	/*Turns URL into a string*/

	if(url.search("agenda") != -1){			/*searches the url string for a match*/ 
		document.getElementById("agenda").className = "on";
	}
	else if(url.search("partners") != -1){			/*searches the url string for a match*/ 
		document.getElementById("partners").className = "on";
	}
	else if(url.search("contact_us") != -1){			/*searches the url string for a match*/ 
		document.getElementById("contact_us").className = "on";
	}
	else if(url.search("facilities") != -1){			/*searches the url string for a match*/ 
		document.getElementById("facilities").className = "on";
	}
	else if(url.search("tourism") != -1){			/*searches the url string for a match*/ 
		document.getElementById("tourism").className = "on";
	}
	else if(url.search("links") != -1){			/*searches the url string for a match*/ 
		document.getElementById("links").className = "on";
	}
	else if(url.search("sponsors") != -1){			/*searches the url string for a match*/ 
		document.getElementById("sponsors").className = "on";
	}
	else if(url.search("index-e.shtml") != -1){			/*searches the url string for a match*/ 
		document.getElementById("home").className = "on";
		document.getElementById("subHome").style.display = "block";
	}
	else if(url.search("index-f.shtml") != -1){			/*searches the url string for a match*/ 
		document.getElementById("home").className = "on";
		document.getElementById("subHome").style.display = "block";
	}
	else if(url.search("messages") != -1){			/*searches the url string for a match*/ 
		document.getElementById("home").className = "on";
		document.getElementById("subHome").style.display = "block";
	}
	else if(url.search("naws_i") != -1){			/*searches the url string for a match*/ 
		document.getElementById("naws_i").className = "on";
		document.getElementById("subNawsI").style.display = "block";
	}
	else if(url.search("news_releases") != -1){			/*searches the url string for a match*/ 
		document.getElementById("news_releases").className = "on";
	}
	else if(url.search("media") != -1){			/*searches the url string for a match*/ 
		document.getElementById("media").className = "on";
	}
	else if(url.search("policy_papers") != -1){			/*searches the url string for a match*/ 
		document.getElementById("policy_papers").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;
  } 