/************** kontrola malyho formulare v cestine ***********/

function CheckRegForm() {
 chyba = 0;
 hlaska = "";
 with(document.forms.formRegistrace) {
  if (String(login.value).length<6){
   hlaska+="Přihlašovací jméno musí mít alespoň 6 znaků !\n";
   chyba = 1;
  }
  if (String(firma.value).length<1){
   hlaska+="Vyplňte obchodní jméno !\n";
   chyba = 1;
  }
  if (String(kontaktni_osoba.value).length<1){
   hlaska+="Vyplňte kontaktní osobu !\n";
   chyba = 1;
  }  
  if (String(ulice.value).length<1){
   hlaska+="Vyplňte ulici !\n";
   chyba = 1;
  }
  if (String(mesto.value).length<1){
   hlaska+="Vyplňte město !\n";
   chyba = 1;
  }
  if (String(psc.value).length<1){
   hlaska+="Vyplňte PSČ !\n";
   chyba = 1;
  }
  var mejl = (email.value);
  var kontrola_mejl = /^[_a-zA-Z0-9\.\-]+@+[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}$/;
  if (kontrola_mejl.test(mejl) == false)	{
   hlaska += "Vyplňte správně Váš kontaktní e-mail !\n";
   chyba = 1;
  }
  if (String(tel.value).length<1){
   hlaska+="Vyplňte kontaktní telefon !\n";
   chyba = 1;
  }
 }
 if (chyba == 0)
  return true;
 else {
  alert(hlaska);
  return false;
 }
}

