function IsB() {
    agent  = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns    = ((agent.indexOf('mozilla')   !=   -1) && 
                 ((agent.indexOf('spoofer')   ==   -1) && 
                  (agent.indexOf('compatible') ==  -1)));
    this.ns4   = (this.ns && (this.major      ==    4));
    this.ns6   = (this.ns && (this.major      >=    5));
    this.ie    = (agent.indexOf("msie")       !=   -1);
    this.ie3   = (this.ie && (this.major      < 4	));
    this.ie4   = (this.ie && (this.major      ==    4) && 
                 (agent.indexOf("msie 5.0")   ==   -1));
    this.ie5   = (this.ie && (this.major      ==    4) && 
                 (agent.indexOf("msie 5.0")   !=   -1));
    this.ie55  = (this.ie && (this.major      ==    4) && 
                 (agent.indexOf("msie 5.5")   !=   -1));
    this.ie6   = (this.ie && (agent.indexOf("msie 6.0")!=-1) );
}
var is = new IsB();

var layerRef;
var styleSwitch;

function whatis(){

	if (is.ie5|| is.ie55|| is.ie6|| is.ns6){
		return 'new';
	} else if(is.ie4){
	
		return 'ieold';
	} else if(is.ns4) {

		return 'nsold';
	}
}

function init(){
	if (whatis() == 'new') {
		layerRef="document.getElementById";
		styleSwitch=".style";
	}else if(whatis() == 'ieold'){
		layerRef="document.all";
	    styleSwitch=".style";
	}else{
		layerRef="document.layers";
	    styleSwitch="";
	}
}

function notNN(){
	if (is.ie5|| is.ie55|| is.ie6|| is.ie4){
		return true;
	}else{
		return false;
	}
}


var canSwitch = false;
if (parseInt(navigator.appVersion) >= 5 && navigator.appName != "Opera" || navigator.userAgent.indexOf("MSIE") != -1) {
    canSwitch = true;
}

plus = new Image();     plus.src = "../images/menu/plus.gif";
minus = new Image();    minus.src = "../images/menu/minus.gif";

function hide(kat){
if(canSwitch){
  var podmenu;
  podmenu = document.getElementById(kat);
  if(podmenu && podmenu.style) podmenu.style.display = 'none';
  eval("document.pic"+kat+".src=plus.src");
}
}

var podmenu;
function show(kat){
//if(canSwitch){
  podmenu = document.getElementById(kat);
  var visible = podmenu.style.display!='none';
  if(visible){
      //eval("document.pic"+kat+".src=plus.src");
      document.getElementById("pic"+kat).src=plus.src;
      podmenu.style.display='none';
      //alert(eval("document.pic"+kat+".src"));
	  //eval("document.pic"+kat+".src=plus.src");
  }else{
      //eval("document.pic"+kat+".src=minus.src");
      document.getElementById("pic"+kat).src=minus.src;
      podmenu.style.display='block';
	  //eval("document.pic"+kat+".src=minus.src");
  }
//}
//return false;
}

blik= new Image(); blik.src = "../images/menu/blik.gif";
blikOff= new Image(); blikOff.src = "../images/menu/blank.gif";

function switchIm(ktery) {
  if (eval("document.pic"+ktery+".src")!=blik.src) eval("document.pic"+ktery+".src=blik.src");
  else	eval("document.pic"+ktery+".src=blikOff.src");
}

function sekce(ktera) {
  document.menu.sekce.value=ktera;
  document.menu.submit();
}

function opw(x,y,imag) {
self.focus();
sc="";
if (x > 610) sc="scrollbars";
window.open(imag,'', sc+',left='+Math.round((screen.availWidth-x)/2)+',top='+Math.round((screen.availHeight-y)/2)+',width='+x+',height='+(y+17));
return;
}

//************************************změna barvy podkladu***********************************
 function bg_on(prvek,barva) {
    prvek.style.cursor='hand';
    prvek.style.backgroundColor=barva;
 }
 function bg_off(prvek,barva) {
    prvek.style.backgroundColor=barva;
 }

 function css_on(prvek,styl) {
    prvek.style.cursor='hand';
    prvek.className=styl;
 }

var kde='';
var ba='';
var btim;
function bliky(prvek,barva) {
    if (kde!='') kde.style.backgroundColor='';
    clearInterval(btim);
    kde=eval(prvek);
    ba=barva;
    btim=setInterval(blikym,500);
}
function blikym() {
    if (kde.style.backgroundColor=='') kde.style.backgroundColor=ba;
    else kde.style.backgroundColor='';	
}