function zobraz_podmenu(id) {
    what = document.getElementById(id);
    if(what.parentNode.firstChild.className == 'aktivni'){
        what.parentNode.firstChild.className = '';
    }
    else {
        what.parentNode.firstChild.className = 'aktivni';
    }
  if (what.style.display=='none') {
    what.style.display='';
  } else {
    what.style.display='none';
  }
}

function menu_zobrazeni(){
    list_ul = document.getElementsByTagName('ul');

    for(ind = 0; list_ul.length > ind; ind++){
        if(list_ul[ind].className == 'hlavni_menu'){
            node_hlavni_menu = list_ul[ind];
            break;
        }
    }

    list_ul_li = node_hlavni_menu.childNodes;
    for(ind = 0; list_ul_li.length > ind; ind++){
        list_ul_li_ul = list_ul_li[ind].childNodes;
        if(list_ul_li[ind].className == 'aktivni'){
            for(ind_2 = 0; list_ul_li_ul.length > ind_2; ind_2++){
                if(list_ul_li_ul[ind_2].nodeName == 'UL')list_ul_li_ul[ind_2].style.display = 'block';
            }
        }
        else {
            for(ind_2 = 0; list_ul_li_ul.length > ind_2; ind_2++){
                if(list_ul_li_ul[ind_2].nodeName == 'UL')list_ul_li_ul[ind_2].style.display = 'none';
            }
        }
    }

}

function Control_form_hlaseni_zavad(f) {
 with(f) {
  if (typ.value == 'vyberte') {
      alert("Vyberte typ závady!");
	     typ.focus();
      return false;
	 }
	 if (typ.value == '') {
      alert("Vyberte typ závady!");
	     typ.focus();
      return false;
	 }
	 if (ulice.value == '') {
      alert("Napište ulici, ve které se závada nachází!");
	     ulice.focus();
      return false;
	 }
  if (popis.value == '') {
      alert("Napište stručný popis závady!");
  	   popis.focus();
      return false;
	 }
  if (jmeno.value == '') {
      alert("Napište Vaše jméno a příjmení!");
    	 jmeno.focus();
      return false;
	 }
	 if (telefon.value == '') {
      alert("Napište Váš telefon!");
	     telefon.focus();
      return false;
	 }
 }
 return confirm('Opravdu již odeslat hlášení o závadě?');
}

function Control_form_objednavka_sluzeb(f) {
 with(f) {
  if (nazev_firmy.value == '') {
      alert("Napište název firmy!");
	     nazev_firmy.focus();
      return false;
	 }
	 if (sidlo_firmy.value == '') {
      alert("Napište sídlo firmy!");
	     sidlo_firmy.focus();
      return false;
	 }
	 if (email.value == '') {
      alert("Napište kontaktní e-mail!");
	     email.focus();
      return false;
	 }
	 if (telefon.value == '') {
      alert("Napište kontaktní telefon!");
	     telefon.focus();
      return false;
	 }
	 if (ico.value == '') {
      alert("Napište IČO!");
	     ico.focus();
      return false;
	 }
	 if (stanoviste.value == '') {
      alert("Napište Stanoviště odvozu!");
	     stanoviste.focus();
      return false;
	 }
	 if (ks_120.value == '' && ks_240.value == '' && ks_1100.value == '' && ks_2500.value == '' && ks_5000.value == '') {
      alert("Napište počet kusů alespoň u jednoho druhu nádoby!");
	     ks_120.focus();
      return false;
	 }
	 if (cetnost.value == '') {
      alert("Napište četnost svozu!");
	     cetnost.focus();
      return false;
	 }
 }
 return confirm('Opravdu již odeslat objednávku?');
}
function Control_form_objednavka_ostatni(f) {
 with(f) {
  if (nazev_firmy.value == '') {
      alert("Napište název firmy!");
	     nazev_firmy.focus();
      return false;
	 }
	 if (sidlo_firmy.value == '') {
      alert("Napište sídlo firmy!");
	     sidlo_firmy.focus();
      return false;
	 }
	 if (email.value == '') {
      alert("Napište kontaktní e-mail!");
	     email.focus();
      return false;
	 }
	 if (telefon.value == '') {
      alert("Napište kontaktní telefon!");
	     telefon.focus();
      return false;
	 }
	 if (ico.value == '') {
      alert("Napište IČO!");
	     ico.focus();
      return false;
	 }
	 if (popis.value == '') {
      alert("Popište službu, kterou požadujete!");
	     popis.focus();
      return false;
	 }
 }
 return confirm('Opravdu již odeslat objednávku?');
}
var paginaAttuale='http://vyvoj.winet.cz/tsmo.cz/';
function addToBookmarks(){

var ua=navigator.userAgent;

if (window.opera){

//Opera 6+

document.getElementById("bm_OP").style.display="inline";

}else if (document.all && ua.indexOf("Mac")==-1){

//Internet Explorer 5+

if(document.getElementById) document.getElementById("bm_IE").style.display="inline";

else document.all.bm_DISABLED.style.display="inline";

}else if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")){

//Netscape 6+, Mozilla, Firefox

document.getElementById("bm_MZ").style.display="inline";

}else if( ua.indexOf("Mac")!=-1 && (document.all || ua.indexOf("Safari")!=-1) ){

//Internet Explorer MAC, Safari, altri

document.getElementById("bm_DISABLED").style.display="inline";

}//
}
function disabledBookmarks(){

var ua=navigator.userAgent;

if(document.all)alert("Per aggiungere questa pagina ai preferiti usa [APPLE] + [D]")

else if (ua.indexOf("Safari")!=-1)alert("Per aggiungere questa pagina ai preferiti usa [APPLE] + [D]\noppure trascina il link sulla barra dei preferiti")

else alert("Il browser consente questa funzione.\nUsa il menu del browser.\n\nSorry! Your browser doesn't support this function.")

}