// JavaScript Document

var navy = document.getElementById("nav");
var hop = navy.getElementsByTagName("a");
var gop = window.location.pathname;
var kystr = gop.substr(5,3); //first number is five positions from home, second is length of string
var i=0;
do{
	var xref=hop[i].getAttribute("href",[2]);  // the addition of that 2 forces IE/Win to do what Firefox and Safari do normally.
	var xrefstr = xref.substr(5,3);
	if ((xref == gop)||(xrefstr == kystr)){ //the addition of xrefstr and kyster keeps the black alive in the same directory.
		hop[i].style.color="#000000";
		i=hop.length;
	}
	i++;
}
while(i<hop.length)
// debugging  alert("gop is: "+gop+"\r\n"+"xref is: "+xref+"\r\n"+" URL is: "+document.URL+"\r\n"+" kystr is: "+kystr+"\r\n"+" xrefstr is: "+xrefstr);//


//toggle visibility from Jefferey Zeldman //

function toggle( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "";
  			} else {
  				target.style.display = "none";
  			}
  	}
}
	function dbltoggle(firstname){

	var divs = document.getElementsByTagName("div");
	
	for (var i = 0; i < divs.length; i++) {
			var jackson= divs[i].getAttribute("title");
			if((jackson!=null)&&(jackson!="")) divs[i].style.display = "none";
			if(jackson==firstname)	divs[i].style.display = "";
			
	}//for
	
	//alert("Attribute 0 name is: "+firstname); alert ("Jackson is"+jackson);//
	
} //function dbltoggle()

function authload(){
 var qs = location.search.substr(1).split("?");
  
  if(qs!="")
  var jones= dbltoggle(qs);
  }