{literal}
$admin_nick="Sázení.eu - admin";
function Validate(theForm) {
  for(var i=0; i<theForm.length; i++ ) {
    with(theForm.elements[i]) { 
      if( type=="text" ) {
        if( value.length==0) {
          focus();
          return false; 
        }
      }
    }
  }
  return true;
}

function zkontroluj_forum(theForm)
{
  if (!Validate(theForm)) {
    alert('Vyplň, prosím, potřebné údaje!');
    return false;
  }
  if (theForm.jmeno.value.toLowerCase()==$admin_nick){
    alert('Nejsi oprávněn(a) použít tento nick!');
    return false;
  }
  return true;
}

function zkontroluj_email(adresa)
{
  re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,4}$/;
  return adresa.search(re) == 0;
}

function zkontroluj_formular(theForm)
{
  if (!Validate(theForm)) {
    alert('Vyplň, prosím, potřebné údaje!');
    return false;
  }
  if (!zkontroluj_email(theForm.email.value))
  {
    alert("E-mail adresa není zadána správně!");
    return false;
  }
  return true;  
}

function zkontroluj_psa(theForm)
{
  var chyba=0;
  if (theForm.hlidacipespar.value=="") {
    alert("Nevybral jsi velikost!");
    chyba=1;
  }
  if (!zkontroluj_email(theForm.hlidacipesemail.value))
  {
    alert("E-mail adresa není zadána správně!");
    chyba=1;
  }
  if (!chyba) {
    alert("Hlídací pes byl nastaven.\nJakmile bude požadované tričko skladem, budeme Tě o tom informovat e-mailem.");
    return true;
  }
  else {
    return false;
  }
}
{/literal}