function Form_Validator(theForm)
{
  if (theForm.Jmeno.value == "")
  {
    alert("Jméno musí být...");
    theForm.Jmeno.focus();
    return (false);
  }
  else if (theForm.Jmeno.value.length < 2)
  {
    alert("Jméno musí mít nejméně 2 znaky");
    theForm.Jmeno.focus();
    return (false);
  }

  if (theForm.Prijmeni.value == "")
  {
    alert("Příjmení musí být...");
    theForm.Prijmeni.focus();
    return (false);
  }
  else if (theForm.Prijmeni.value.length < 2)
  {
    alert("Příjmení musí mít nejméně 2 znaky");
    theForm.Prijmeni.focus();
    return (false);
  }

  if (theForm.Bydliste.value == "")
  {
    alert("Bydliště musí být...");
    theForm.Bydliste.focus();
    return (false);
  }
  else if (theForm.Bydliste.value.length < 2)
  {
    alert("Bydliště musí mít nejméně 2 znaky");
    theForm.Bydliste.focus();
    return (false);
  }

  if (theForm.Telefon.value == "")
  {
    alert("Telefon musí být...");
    theForm.Telefon.focus();
    return (false);
  }
  else
  {
	if (window.RegExp)
	  {
	    re = new RegExp("^[\+]?[0-9 ]*[0-9]+$");
	    if (!re.test(theForm.Telefon.value))
	    {
	    	alert("Špatně zadaný telefon!");
	    	theForm.Telefon.focus();
	    	return (false);
	    }
	  }
	}

  if (theForm.Email.value == "")
  {
    alert("E-mail musí být...");
    theForm.Email.focus();
    return (false);
  }
  else
  {
	if (window.RegExp)
	  {
	    re = new RegExp("^([^@][_0-9a-z\.\-]+@[^.][_0-9a-z\.\-]+\.[_0-9a-z\.\-]*[0-9a-z\-]{2,})?$");
	    if (!re.test(theForm.Email.value))
	    {
	    	alert("Špatně zadaný e-mail!");
	    	theForm.Email.focus();
	    	return (false);
	    }
	  }
	}

  if (theForm.DruhVycviku.value == "")
  {
    alert("Druh výcviku musí být...");
    theForm.DruhVycviku.focus();
    return (false);
  }

  return (true);
}
