function phover(){
  if (!document.getElementById) return

  var p = document.getElementsByTagName('p');
  for(var i = 0; i < p.length; i++){
   p[i].onmouseover = function(){
    this.className = 'hover';
   }
   p[i].onmouseout  = function(){
    this.className = '';
   }
  }
}

function clear_box(hodnota){
	document.forms[0].email.value=hodnota;
}

function validate_reg(formular)
{
	if (formular.email.value=="")
	{
		alert("Musíte zadat email");
		formular.email.focus();
		return false;
	}
	else if (window.RegExp)
	{
		re = new RegExp("^[^@]+@[^.]+\..+$");
		if (!re.test(formular.email.value))
		{
			alert("Zadaný email není platný");
			formular.email.focus();
			return false;
		}
	}
	else
	return true;
}

function Menu(n)
{
if (document.getElementById("menu_skryte_"+n).style.display=="none") {
  document.getElementById("menu_skryte_"+n).style.display="block";
  document.getElementById("obr_"+n).src="./obrazky/kuzdas_11.gif";}
else {
  document.getElementById("menu_skryte_"+n).style.display="none";
  document.getElementById("obr_"+n).src="./obrazky/kuzdas_10.gif";};
}

function Zobraz_Menu(){
document.getElementById("menu").style.visibility="visible";
document.getElementById("leftcol").style.visibility="visible";
}

function Kontrola()
{
   if (document.dotaznik.jmeno.value == "")
   {
      document.dotaznik.jmeno.focus();
      alert ("Nezadali jste váše jméno");
      return false;
   }
   if (document.dotaznik.prijmeni.value == "")
   {
      document.dotaznik.prijmeni.focus();
      alert ("Nezadali jste váše příjmení");
      return false;
   }   
   if (document.dotaznik.telefon.value == "")
   {
      document.dotaznik.telefon.focus();
      alert ("Nezadali jste váš telefón");
      return false;
   }   
   if (document.dotaznik.kod.value != "7795")
   {
      document.dotaznik.kod.focus();
      alert ("Byl špatně opsán kód z obrázku");
      return false;
   }     
}

function Kontrola2()
{
   if (document.formular.jmeno.value == "")
   {
      document.formular.jmeno.focus();
      alert ("Nezadali jste Vaše jméno a příjmení");
      return false;
   }
   if (document.formular.adresa.value == "")
   {
      document.formular.adresa.focus();
      alert ("Nezadali jste Vaši adresu");
      return false;
   }
   if (document.formular.telefon.value == "")
   {
      document.formular.telefon.focus();
      alert ("Nezadali jste Váš telefon");
      return false;
   }
   if (document.formular.dotaz.value == "")
   {
      document.formular.dotaz.focus();
      alert ("Nezadali jste text dotazu či komentáře");
      return false;
   }
   if (document.formular.mail_odesilatele.value == "")
   {
      document.formular.mail_odesilatele.focus();
      alert ("Nezadali jste váš e-mail");
      return false;
   }
   if (document.formular.mail_odesilatele.value.indexOf("@") == -1)
   {
      document.formular.mail_odesilatele.focus();
      alert ("Chybný formát e-mailu");
      return false;
   }
   if (document.formular.kod.value != "7795")
   {
      document.formular.kod.focus();
      alert ("Byl špatně opsán kód z obrázku");
      return false;
   }      
}


