/*

highlight text 

div#s1 li.active a {             
	background-color: #e8eff6;
	display: block;
}
 
div#s1 li.active li a {
color: #00539b;

}


*/

/*
÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷
Select current page link in list

Author :  Dave Agius

styleClassName  : name of page to select
navbarID 		: name of element that contains the list to change. Note can be div or UL	

÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ 


window.onload = function(){
		
		SetCurrentPageLink();
		
	}*/
function menu_main(){
	var navbarID = "s1"					// set to the ID of your nav list
	var styleClassName = "current"		// set to the name of your 'current' class in css
	
	var vPageName = GetPageName();												// grab the filename of this page
	var aLinks = document.getElementById(navbarID).getElementsByTagName("a");  // collect all link tags into a list

	for(var n=0; n < aLinks.length; n++){										// trawl tag list
		var vHref = aLinks[n].href;												// grab the href filename from the tag	
		vHref = vHref.substr(vHref.lastIndexOf("/")+1);							// parse out the page name from the filename
		vHref = vHref.split(".")[0];											// remove file suffix	

		if(vPageName == vHref){													// find a match
			var vCurrNode = aLinks[n];											// store the match
			vCurrNode.className=styleClassName;									// change the style of the tag
		}
	}
}


function GetPageName(){
	var vPageURLObj =  document.location;
	var vPageURL = vPageURLObj.toString();
	var vPageFileName = vPageURL.substr(vPageURL.lastIndexOf("/")+1);
	vPageFileName = vPageFileName.split(".")[0];//remove file suffix
	return(vPageFileName);
}
