
var found;
function loadMenu() {
	var a = window.location.protocol + "//" + window.location.hostname + window.location.pathname ;
		
	$('mainmenu').childElements().each(
		function(s) {
			var e = s.down("ul");
			found = false;
			if(a == s.firstDescendant().href) {
				found = true;
			}
			if(e) {
				e.childElements().each(
					function(n) {
						if(a == n.firstDescendant().href) {
							n.firstDescendant().addClassName("subactive");
							found = true;						
						}						
					}
				);
				
			} 
			
			if(!found) { if(e) e.addClassName("closed"); }			
			else s.firstDescendant().addClassName("active");

		}																			 
	);

}