 var table = "974";  // šířka hlavní tabulky//  detekce prohlížeče  var bName = navigator.appName; var FF = (bName == "Netscape"); // Firefox var IE = (bName == "Microsoft Internet Explorer"); var Op = (bName == "Opera"); var opera = Op;function prejdi(url) {	//window.self.location.href = url;	//top.location.href = url; 	window.location.replace(url);}var oldClass = "";function MenuOver(TD, state) {	if ( state == true )	{		oldClass = TD.className;		TD.className = oldClass + " over";	}	else	{		TD.className = oldClass;		oldClass = "";		return true;	}} function hledal(hodn) { document.cookie = "hledal=" + hodn; } function uprav(hodn) { document.cookie = "uprav=" + hodn; } function chcu(hodn) {  document.cookie = "chcu=" + hodn; }/*   =====================  Hledání  =====================   */function kursor() {    var f = null;    f = document.getElementById("hledej_form");    f.hledej.focus();       }text = 'Hledání ...';hledani = function() {  var frm = document.getElementById('hledej_form');  //var ser = document.getElementById('prejdi');  var wrd = document.getElementById('pole');  var h = document.getElementsByTagName('span');  //wrd.value = ser.title;  frm.onsubmit=function() {    if(this.pole.value==text||this.pole.value=='') {      alert('TBS Telnice: pro hledání je nutné zadat nějaký text');      this.pole.focus();      return false;    }  }  wrd.onfocus=function() {if(this.value==text){this.value=''};}  wrd.onblur=function() {if(this.value==''){this.value=text};}  for (var i=0;i<h.length;i++) {     if (h[i].className=='noscript') {h[i].className = 'yank';}  }}/* IE hover fix */sfHover = function() {  var sfEls = document.getElementById('hledej_ul').getElementsByTagName('LI');  for (var i=0; i<sfEls.length; i++) {    sfEls[i].onmouseover=function() {      this.className+=(this.className.length>0? " ": "") + "sfhover";    }    sfEls[i].onmouseout=function() {      this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");    }  }}// accessibility scriptmcAccessible = function() {  var mcEls = document.getElementById('hledej_ul').getElementsByTagName('A');  for (var i=0; i<mcEls.length; i++) {    mcEls[i].onfocus=function() {      this.className+=(this.className.length>0? " ": "") + "sffocus"; //a:focus      this.parentNode.className+=(this.parentNode.className.length>0? " ": "") + "sfhover"; //li < a:focus      if(this.parentNode.parentNode.parentNode.nodeName == 'LI') {        this.parentNode.parentNode.parentNode.className+=(this.parentNode.parentNode.parentNode.className.length>0? " ": "") + "sfhover"; //li < ul < li < a:focus      }    }    mcEls[i].onblur=function() {      this.className=this.className.replace(new RegExp("( ?|^)sffocus\\b"), "");      this.parentNode.className=this.parentNode.className.replace(new RegExp("( ?|^)sfhover\\b"), "");      if(this.parentNode.parentNode.parentNode.nodeName == 'LI') {        this.parentNode.parentNode.parentNode.className=this.parentNode.parentNode.parentNode.className.replace(new RegExp("( ?|^)sfhover\\b"), "");      }    }  }  hledani();}/*   =====================  konec hledání  =====================   */// event listenerif(window.addEventListener) window.addEventListener('load', mcAccessible, false); // gecko, safari, konqueror and standardelse if(document.addEventListener) document.addEventListener('load', mcAccessible, false); // opera 7else if(window.attachEvent) { // win/ie  window.attachEvent('onload', sfHover);  window.attachEvent('onload', mcAccessible);} else { // mac, ie5  if(typeof window.onload == 'function') {    var existing = onload;    window.onload = function() {      existing();      sfHover();      mcAccessible();    }  } else {    window.onload = function() {      sfHover();      mcAccessible();    }  }}/*    Ivo Urbánek © 2009    */
