
function highlightMenu() {	          		 		  
	var as = document.getElementsByTagName('a');
	var url = window.location.href;	  		 
	for ( i = 0; i < as.length; i++ ) {
	var link = as[i]+'[\s\S]*';
	var re = new RegExp(link);
		if (re.test(url)) {		    	 
			as[i].style.fontWeight = 'bold';
		}
	}
}



function detectSafari() { 
if (navigator.appVersion.indexOf("Safari") != -1) 
   document.body.className += " safari"; 
} 
function ff(){
	if((navigator.userAgent.indexOf('Mac')!= -1) && (navigator.userAgent.indexOf('Firefox')!= -1))
	{
		document.body.className += " firefox"; 
	}
}
if (window.addEventListener){
	window.addEventListener("load", ff, false);
	window.addEventListener("load", detectSafari, false);
}


function initPage()
{
	var nav = document.getElementById("nav");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{
			nodes[i].onmouseover = function () 
			{
				if (this.className.indexOf("hover") == -1)
				{
					this.className += " hover";
				}
			}
			nodes[i].onmouseout = function ()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}
if (window.attachEvent && !window.opera)
	window.attachEvent("onload", initPage);


function switchText(obj) {
	if(obj.innerHTML == 'Close') {	obj.innerHTML = 'More &hellip;'; }
	else { obj.innerHTML = 'Close'; }
}