function formular_kontrola()  {
	if(document.getElementById("email").value=="")  {
    document.getElementById("email").style.borderColor="red";  
	  alert("Prosím, zadejte email.");
	  document.getElementById("email").focus();
	  return false;
	}
	  
  if(!email_kontrola(document.getElementById("email").value))  {
    document.getElementById("email").style.borderColor="red";
    alert("Nemáte správně vyplněnou emailovou adresu.");
    document.getElementById("email").focus();
    return false;
  }
	  
  return true;     
}

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