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

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

if(url.search("body-and-soul") != -1){			/*searches the url string for a match*/ 
	document.getElementById("body").className = "on";
	}
	else if(url.search("contact-us") != -1){
	document.getElementById("contact").className = "on";
	}
	else if(url.search("florist-shop") != -1){
	document.getElementById("florist").className = "on";
	}
	else if(url.search("for-the-garden") != -1){
	document.getElementById("garden").className = "on";
	}
	else if(url.search("for-the-home") != -1){
	document.getElementById("for-the-home").className = "on";
	}
	else if(url.search("garden-cafe") != -1){
	document.getElementById("cafe").className = "on";
	}
	else if(url.search("landscaping") != -1){
	document.getElementById("landscaping").className = "on";
	}
	else if(url.search("christmas") != -1){
	document.getElementById("christmas").className = "on";
	}
	else {
	document.getElementById("home").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;
  } 
 