// JavaScript Document


//Highlight the top navigation link that the user is at for 1st and 2nd level pages
function checklocationtop(url){

	var currURL = "" + url;

	//look for ending in "#" and if present, remove it
	if (currURL.charAt(currURL.length-1)=="#") 
		{
			currURL = currURL.substring(0, currURL.length-1);
			}
	if (currURL.substring(currURL.length-3)=="#go"){
			currURL = currURL.substring(0,currURL.length-3);
		}

	//when a user arrives in a page, it either ends in html or in a "/" if its a default or index page
	if (currURL.charAt(currURL.length-1)=="/") 
		{
			var str = "index.html";
			currURL = currURL.concat(str);
			}
			
			
	//Search collection of links rendered and highlight appropriate link
	for (var i=0; i<document.links.length;i++)
		{			
			var link = document.links[i];
		     
			if(link == currURL){
			  link.style.textDecoration = "none";		
			  link.style.color="#999999";
			  link.href = "#";
			  break;
			} 
		}
	}
