function menuUpdate(){
	for (var i=0; i<document.anchors.length; i++){
		if (document.URL.indexOf(document.anchors[i].href)!=-1||document.anchors[i].href==document.URL+"index.html"){
			document.anchors[i].className="active";
			if (document.anchors[i].name=="menuSCP"||document.anchors[i].name=="menuWaste"||document.anchors[i].name=="menuEnergy"||document.anchors[i].name=="menuEco"||document.anchors[i].name=="menuResearch"||document.anchors[i].name=="menuPub"||document.anchors[i].name=="menuRef"){
				document.getElementsByName("menuResearch")[0].className="active";
				document.getElementById("mapsmenu").style.display="none";
				document.getElementById("researchmenu").style.display="block";
			}
			if (document.anchors[i].name=="menuBike"||document.anchors[i].name=="menuSelective"||document.anchors[i].name=="menuMaps"){
				document.getElementsByName("menuMaps")[0].className="active";
				document.getElementById("mapsmenu").style.display="block";
				document.getElementById("researchmenu").style.display="none";
			}
		}
		if (document.anchors[i].name=="en"){
			if (document.URL.indexOf("_en.html")!=-1 || document.URL.indexOf("index.html")!=-1 || document.URL.indexOf("html")==-1){
				document.anchors[i].parentNode.style.display="none";
			}
			else if (document.URL.indexOf("index_hu")!=-1){
				document.anchors[i].href=document.URL.replace("index_hu.html","index.html");
			}
			else {
				document.anchors[i].href=document.URL.replace("_hu.html","_en.html");
			}
		}
		if (document.anchors[i].name=="hu"){
			if (document.URL.indexOf("_hu.html")!=-1){
				document.anchors[i].parentNode.style.display="none";
			}
			else if (document.URL.indexOf("index")!=-1){
				document.anchors[i].href=document.URL.replace("index.html","index_hu.html");
			}
			else if (document.URL.indexOf("html")==-1){
				document.anchors[i].href=document.URL+"index_hu.html";
			}
			else {
				document.anchors[i].href=document.URL.replace("_en.html","_hu.html");
			}
		}
	}
	document.getElementsByName("menuMaps")[0].onmouseover=function(){
		document.getElementById("mapsmenu").style.display="block";
		document.getElementById("researchmenu").style.display="none";
	}
	document.getElementsByName("menuResearch")[0].onmouseover=function(){
		document.getElementById("mapsmenu").style.display="none";
		document.getElementById("researchmenu").style.display="block";
	}
	document.getElementsByName("menuMain")[0].onmouseover=function(){
		document.getElementById("mapsmenu").style.display="none";
		document.getElementById("researchmenu").style.display="none";
	}
	document.getElementsByName("menuFund")[0].onmouseover=function(){
		document.getElementById("mapsmenu").style.display="none";
		document.getElementById("researchmenu").style.display="none";
	}
	document.getElementsByName("menuContact")[0].onmouseover=function(){
		document.getElementById("mapsmenu").style.display="none";
		document.getElementById("researchmenu").style.display="none";
	}
}


