var podpora=0;
if(document.getElementsByTagName&&document.createElement && RegExp && document.childNodes){podpora=1}else{podpora=0}
var agt = navigator.userAgent.toLowerCase();if(agt.indexOf("netscape")!=-1){podpora=0};if(agt.indexOf('mac')!=-1){podpora=0};

var activateMenu = function(){
var ie=0;
	var navroot = document.getElementById("menu");	
     //navroot.className="jsmenu"; 
	if(document.all && document.getElementById("menu").currentStyle){ie=1;}
	if(window.opera){ie=0;}

	var lis=navroot.getElementsByTagName("LI");  
	for(var i=0; i<lis.length; i++){
		if(lis[i].className=="akt"){lis[i].setAttribute("id","aktpol")}
		if(lis[i].lastChild.tagName){
			if(lis[i].lastChild.tagName=="UL"){//ma syny
				lis[i].className="nrzb norozb2";lis[i].onmouseover=function() {if (ie==1) { this.lastChild.className="zobrazeny";}this.className="rzb rozb2";}
				lis[i].onmouseout=function() {if (ie==1) {  this.lastChild.className="skryty";}if(this.className=="rzb rozb2"){this.className="nrzb norozb2";}}
			}
        }
		else{//nema syny
		lis[i].className="nrzb norozb";
			if(!lis[i].lastChild.tagName){//jde-li o text neuzavreny v tagu
				lis[i].onmouseover=function() {this.className="rzb rozb";}
				lis[i].onmouseout=function() {if(this.className=="rzb rozb"){this.className="nrzb norozb";}}
			}
		}
	}
}

function init(){ 
	if(podpora==1){
   		activateMenu();
	}
    else{
 		var links = new Array(); 
		links=document.getElementsByTagName("link"); 
		for (i=0; i<links.length; i++){ 
  			if ((links[i].getAttribute("rel").indexOf("stylesheet")!=-1) && (links[i].getAttribute("title"))) { 
                if(links[i].getAttribute("title")=="rozbalovaci menu"){links[i].disabled=true;}
            }
  		}
   }
}
