var zobrazena = "prvni";
function zobraz(polozka){
if (document.getElementById){
document.getElementById(zobrazena).style.display = "none"; 
document.getElementById(polozka).style.display = "block"; 
zobrazena = polozka; 
return false; 
}
else {
if(document.stylesheets) document.stylesheets["zalozky"].disabled = true; 
return true; 
} 
}
																				
																				




var puvodni = '';

  function pridej(styl)
  {
    puvodni = document.getElementById('krokPanel').className;
    document.getElementById('krokPanel').className = styl;
  }
				  
  function smaz()
  {
  document.getElementById('krokPanel').className = puvodni;
  }


var Picture;

function openImage(imgSrc, imgName, width, height){

  var sirka = parseInt(width,10) + 17;  
  
  if(parseInt(height,10) > 599){
    height = 620;
  }
  
  if (Picture) {
    Picture.close()
    Picture = null
  }  
 
  Picture = window.open("", "Obrazek", "toolbar=no, location=no, directories=no, status=no, nemubar=no, scrollbars=yes, rezisable=yes, copyhostory=no, width="+ sirka +", height="+ height +", top=50, left=50");

  Picture.document.write("<html>\n<body style=\"margin:0px; padding: 0px;\">\n<title>" + imgName + "</title>");
  Picture.document.write("<a href=\"javascript:close()\"><img src=\"" + imgSrc + "\" alt=\"Zavøít: " + imgName + "\" border=\"0\" /></a>");
  Picture.document.write("<br />");
  Picture.document.write("<div style=\"width:" + width + ";text-align: center;\"><a href=\"javascript:close()\"> Zavøít </a></div>");

  Picture.document.write("\n</body>\n</html>\n");
  Picture.focus();
}



function switchMenu(catNav)
{
 
 var hlavicka = document.getElementsByTagName('head')[0];
 var dataLoader = document.getElementById('scriptLoader');
 
 if(dataLoader) hlavicka.removeChild(dataLoader);

 // vytvorime novy element script
 script = document.createElement('script');
 script.id = 'scriptLoader';
 script.src = catNav;

 // POZOR, DULEZITE!! Skript musime vlozit do stranky 
 // pomoci DOM - appendChild()
 // Ihned po vlozeni prohlizec stahne skript a spusti jej
 x = document.getElementsByTagName('head')[0];
 x.appendChild(script);

 return false;

}

function hideObject(id)
{
	var eHide = document.getElementById(id);
	if (eHide == null) return false;

	eHide.style.visibility='hidden';
	eHide.style.display='none';
}

function showObject(id)
{
	var eShow = document.getElementById(id);
	if (eShow == null) return false;

	eShow.style.visibility='visible';
	eShow.style.display='';
}

function filter(obj)
{
  for(var i=0;i<obj.length;i++)
  {
    if(obj.options[i].selected)
    {
      window.location.href=obj.options[i].value;
    }
  }
}

function vyberVse () {
   elems = document.getElementById('seznam').getElementsByTagName('input');

   for(var i=0;i<elems.length;i++)
   {
     if (elems[i].type=='checkbox') elems[i].checked='checked'; else elems[i].checked=false;
   }
}

sfHover = function() {
	var sfEls = document.getElementById("catNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
