/* ====================================================
Menu Current page highlight
==================================================== */

function ShowcurrentPage() {  

if (!document.getElementsByTagName)
{
alert("element by name doesn't exist");
return;
}

var anchors = document.getElementsByTagName("a");  
var thisPage = location.href;  


for (var i=0; i<anchors.length; i++) 
{   
	var anchor = anchors[i];  
	

	theHREF = anchor.getAttribute("href");  
	thisREL = anchor.getAttribute("rel");
	thisREV = anchor.getAttribute("rev");
	
	var Hstr = theHREF;
	var thisHREF = Hstr.replace(/ /gi, "%20");
	
	var location_page = location.protocol + "//" + location.hostname + thisHREF;
	

	if((thisREV && thisHREF == thisPage && thisREL == "leftmenu") || (thisREV && location_page == thisPage && thisREL == "leftmenu"))
	{ 
	var str = thisREV;
	var parentID = str.replace(/child/i, "menu");
	
	document.getElementById(parentID).className ="current";
	anchors.item(i).className ="current";
	document.getElementById(thisREV).style.display = "block";
	return;  
	}  
	else
	{
		//alert("NO MATCH: "+location_page);
	}
}  

}  
ShowcurrentPage();








