function validateForm() 
{
 var okSoFar=true
 with (document.phpformmailer)
 {
 if (nume.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Ai uitat sa scrii numele.")
    thesubject.focus()
  }  
  if (prenume.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Ai uitat sa scrii prenumele.")
    thesubject.focus()
  } 
  if (data_nasterii.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Ai uitat sa scrii data nasterii.")
    thesubject.focus()
  } 
  if (nr_buletin.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Ai uitat sa scrii seria si numarul buletinului.")
    thesubject.focus()
  }   
  
	if (nr_tel.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Ai uitat sa scrii numarul de telefon.")
    thesubject.focus()
  }   
  
  if (ocupatie.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Ai uitat sa scrii cu ce te ocupi.")
    thesubject.focus()
  }   
  
  if (domiciliu.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Ai uitat sa scrii unde domiciliezi.")
    thesubject.focus()
  }
  var foundAt = email.value.indexOf("@",0)
  if (foundAt < 1 && okSoFar)
  {
    okSoFar = false
    alert ("Scrie o adresa de e-mail corecta.")
    email.focus()
  }
  var e1 = email.value
  var e2 = email2.value
  if (!(e1==e2) && okSoFar)
  {
    okSoFar = false
    alert ("Adresele de e-mail nu corespund.")
    email.focus()
  }
  
  if (okSoFar==true)  
  {
   block_spam_bots.value=4*3;//spam bots currently can not read JavaScript, if could then they'd fail the maths!
   submit();                  // do check for updatea often at:  www.TheDemoSite.co.uk 
  } 
 }
}
