function dotaz1(){
okno=window.confirm("Opravdu si přejete smazat zakazníka?");
if(okno) return true;
else {
return false;
}
}


function dotaz2(){
okno=window.confirm("Opravdu si přejete smazat uživatele?");
if(okno) return true;
else return false;
}

function dotaz3(){
okno=window.confirm("Opravdu si přejete smazat zboží?");
if(okno) return true;
else return false;
}

function dotaz4(){
okno=window.confirm("Opravdu si přejete smazat druh?");
if(okno) return true;
else return false;
}


function presmeruj(x)  {
window.location.href = x;
}

function showHide ()
{ 
var style1 = document.getElementById("firma1").style


if (style1.display == "none") {
style1.display = "block";
}
else {
style1.display = "none";

}
}

function showHide2 ()
{ 
var style1 = document.getElementById("faq").style
var style2 = document.getElementById("f").style


if (style1.display == "none") {
style1.display = "block";
style2.display = "block";

}
else {
style1.display = "none";
style2.display = "none";

}
}

function showHide3()
{ 
var style1 = document.getElementById("heslo1").style
var style2 = document.getElementById("heslo2").style


if (style1.display == "none") {
style1.display = "block";
style2.display = "block";

}
else {
style1.display = "none";
style2.display = "none";

}
}

function odesli(x)  {
  document.getElementById(x).submit();
}

function pridej_zbozi()
{

        if (document.zbozi_pridat_form.cz_odruda.value=='')
    {
        alert('Zboží musí mít zadán název!');
        document.zbozi_pridat_form.cz_odruda.focus();
        return false;
    }
	
      else
        return true;
}



function pridej_druh()
{

        if (document.druh_pridat_form.cz_nazev.value=='')
    {
        alert('Druh musí mít zadán název!');
        document.druh_pridat_form.cz_nazev.focus();
        return false;
    }
	
      else
        return true;
}

function edituj_druh()
{

        if (document.druh_edit_form.cz_nazev.value=='')
    {
        alert('Druh musí mít zadán název!');
        document.druh_edit_form.cz_nazev.focus();
        return false;
    }
	
      else
        return true;
}

function edituj_zbozi()
{

        if (document.zbozi_edit_form.cz_odruda.value=='')
    {
        alert('Zboží musí mít zadán název!');
        document.zbozi_edit_form.cz_odruda.focus();
        return false;
    }
	
      else
        return true;
}
