// JavaScript Document

function validateForm() 
{
 var okSoFar=true
 with (document.phpformmailer)
 {
	 
  if (name.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Por favor ingrese su nombre.")
    name.focus()
  }
	 
	 var foundAt = email.value.indexOf("@",0)
  if (foundAt < 1 && okSoFar)
  {
    okSoFar = false
    alert ("Por favor ingrese un e-mail v\xE1lido")
    email.focus()
  }
	 
if (phone.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Por favor ingrese su n\xFAmero tel\xE9fonico.")
    phone.focus()
  } 
  
  if (themessage.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Por favor ingrese sus comentarios.")
    themessage.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 
  } 
 }
}

