
function initSubNav(){
	if (document.getElementById){
	//turns current subnav item on except on homepage
		if (!document.getElementById('bodyhome')){
			var subnav = document.getElementById('subNav');  	//finds subnav element
			var subnavas = subnav.getElementsByTagName('a'); 	//finds all anchors within subnav
			for (var a=0; a<subnavas.length; a++){		//cycles through each link
				var currenthref=String(subnavas[a].href);	//assigns current link href to a string
				var currentloc=String(document.location);	//assigns current document url to a string
			
				//if the current link href matches the document url the anchor is given a class
				if (unescape(currenthref)==unescape(currentloc)){
					subnavas[a].className="hi";
				}
			}
	  	}
	}
}


function pop(url){   
     var winFeatures="toolbar=no, status=yes, menubar=no, location=no, scrollbars=nno, resizable=yes, height=453, width=576";
    
     newWin = window.open(url, "newWin", winFeatures);
     newWin.focus();
}

function popV(url){   
     var winFeatures="toolbar=no, status=yes, menubar=no, location=no, scrollbars=nno, resizable=yes, height=576, width=407";
    
     newWin = window.open(url, "newWin", winFeatures);
     newWin.focus();
}


window.onload = initSubNav;