function duleinfo(vstup){
  get1=document.getElementById("dulinfo_1");
  get2=document.getElementById("dulinfo_2");
  get3=document.getElementById("dulinfo_3");
  get4=document.getElementById("dulinfo_4");
  get5=document.getElementById("dulinfo_5");
  xstav='none';
    
  
  if(stav=="block"){stav="none";} else{stav="block";};
  if(vstup=="a"){
  get1.style.display=stav;
  get2.style.display=xstav;
  get3.style.display=xstav;
  get4.style.display=xstav;
  get5.style.display=xstav;
  };
  if(vstup=="b"){
  get1.style.display=xstav;
  get2.style.display=stav;
  get3.style.display=xstav;
  get4.style.display=xstav;
  get5.style.display=xstav;
  };
  if(vstup=="c"){
  get1.style.display=xstav;
  get2.style.display=xstav;
  get3.style.display=stav;
  get4.style.display=xstav;
  get5.style.display=xstav;
  };
  if(vstup=="d"){
  get1.style.display=xstav;
  get2.style.display=xstav;
  get3.style.display=xstav;
  get4.style.display=stav;
  get5.style.display=xstav;
  };
  if(vstup=="e"){
  get1.style.display=xstav;
  get2.style.display=xstav;
  get3.style.display=xstav;
  get4.style.display=xstav;
  get5.style.display=stav;
  };
  if(vstup=="vsechno"){
  document.getElementById("dulinfo_1").style.display="none";
  document.getElementById("dulinfo_2").style.display="none";
  document.getElementById("dulinfo_3").style.display="none";
  document.getElementById("dulinfo_4").style.display="none";
  document.getElementById("dulinfo_5").style.display="none";
  };
};
stav='block';

/*----------------------------------------------------------------------------*/

function dvere(){
  if(document.formular.pozice_cislo_1.value=="11.Vchodové dveře") {document.getElementById("a").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("a").style.visibility="hidden";}
  if(document.formular.pozice_cislo_2.value=="11.Vchodové dveře") {document.getElementById("b").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("b").style.visibility="hidden";}
  if(document.formular.pozice_cislo_3.value=="11.Vchodové dveře") {document.getElementById("c").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("c").style.visibility="hidden";}
  if(document.formular.pozice_cislo_4.value=="11.Vchodové dveře") {document.getElementById("d").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("d").style.visibility="hidden";}
  if(document.formular.pozice_cislo_5.value=="11.Vchodové dveře") {document.getElementById("e").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("e").style.visibility="hidden";}
  if(document.formular.pozice_cislo_6.value=="11.Vchodové dveře") {document.getElementById("f").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("f").style.visibility="hidden";}
  if(document.formular.pozice_cislo_7.value=="11.Vchodové dveře") {document.getElementById("g").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("g").style.visibility="hidden";}
  if(document.formular.pozice_cislo_8.value=="11.Vchodové dveře") {document.getElementById("h").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("h").style.visibility="hidden";}
  if(document.formular.pozice_cislo_9.value=="11.Vchodové dveře") {document.getElementById("i").style.visibility="visible"; document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("i").style.visibility="hidden";}
  if(document.formular.pozice_cislo_10.value=="11.Vchodové dveře") {document.getElementById("j").style.visibility="visible";document.getElementById("dverenadpis").style.visibility="visible";} else{document.getElementById("j").style.visibility="hidden";}
}

/*----------------------------------------------------------------------------*/

function pr(akce){
  if(akce=="plast"){
    document.getElementById("barva-hlinik").style.display="none";
    document.getElementById("barva-plast").style.display="block"; 
  };
  if(akce=="hlinik"){
    document.getElementById("barva-hlinik").style.display="block";
    document.getElementById("barva-plast").style.display="none"; 
  };
akce="";
} 
 

/*----------------------------------------------------------------------------*/

function zkontroluj(formular)
{

if((document.formular.jmeno.value=="") || (document.formular.adresa.value=="") || (document.formular.telefon.value=="") || (document.formular.email.value!=="") || (document.formular.kod.value!=="10")){
	if (formular.jmeno.value=="")
    {
        alert("Jméno je povinná položka!");
        formular.jmeno.focus();
        return false;
    }
	if (formular.adresa.value=="")
    {
        alert("Adresa je povinná položka!!");
        formular.adresa.focus();
        return false;
    } 
	if (formular.telefon.value=="")
    {
        alert("Telefon je povinná položka!!");
        formular.telefon.focus();
        return false;
    }
    
  re = new RegExp("^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,4}$");
  if (!re.test(formular.email.value))
        {
            alert("Zadaná adresa nemá správný tvar elektronické pošty!");
            formular.email.focus();
            return false;
    } 
  if (formular.kod.value !== "10"){
    alert("Nesprávny potvrzovací kód!");
    formular.kod.focus();
    return false;   
  }

    }else 
        return true;
        
  
}
