// JavaScript Document


/* THE FOLLOWING JAVASCRIPT CODE COPYRIGHT OUTCROP GROUP & OUTCROP INTERACTIVE 2004 */
url=location.toString(); 	/*Turns URL into a string*/

function navOn(){



	if(url.search("/aboutus/index.shtml") != -1){			
		document.getElementById("about").className = "on";
	}
	else if(url.search("/news/index.shtml") != -1){			
		document.getElementById("news").className = "on";
	}
	else if(url.search("/contactus/index.shtml") != -1){			
		document.getElementById("contactus").className = "on";
		document.getElementById("topNavRight").src = '/i/bg_nav_right_over.gif';
	}
	
	// LEFT NAVIGATION
	
	// What is HIA?
	
	if(url.search("/hearingschedule/index.shtml") != -1){			
		document.getElementById("hearingschedule").className = "on";
	}
	else if(url.search("/faq/index.shtml") != -1){			
		document.getElementById("faq").className = "on";
	}
	else if(url.search("/forms/index.shtml") != -1){			
		document.getElementById("forms").className = "on";
	}
	else if(url.search("/howtoguides/index.shtml") != -1){			
		document.getElementById("howtoguides").className = "on";
	}
	else if(url.search("/paneldecisions/index.shtml") != -1){			
		document.getElementById("paneldecisions").className = "on";
	}
	else if(url.search("/rulesofpracticeandprocedure/index.shtml") != -1){			
		document.getElementById("rulesofpracticeandprocedure").className = "on";
	}
	else if(url.search("/practicedirections/index.shtml") != -1){			
		document.getElementById("practicedirections").className = "on";
	}
	else if(url.search("/policies/index.shtml") != -1){			
		document.getElementById("policies").className = "on";
	}
	else if(url.search("/humanrightsact/index.shtml") != -1){			
		document.getElementById("humanrightsact").className = "on";
	}
	else if(url.search("/annualreports/index.shtml") != -1){			
		document.getElementById("annualreports").className = "on";
	}
	else if(url.search("/lawresearchresources/index.shtml") != -1){			
		document.getElementById("lawresearchresources").className = "on";
	}
	
}

function lastNavOut(){ // This handles the right image of last navigation item when a onmouseout event occurs.
	if(url.search("/contactus/index.shtml") != -1){
		document.getElementById("contactus").className = "on";
		document.getElementById("topNavRight").src = '/i/bg_nav_right_over.gif';
	}
	else{
		document.getElementById("topNavRight").src = '/i/bg_nav_right.gif';
	}
}


  // 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;
  } 
