// JavaScript Document
function validateForm() 
{
 var okSoFar=true
 with (document.phpFormMailer)
 {
  var foundAt = email.value.indexOf("@",0)
  
  if (name.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter Your Name.")
    name.focus()
  }
  
  if (number.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter a Number in Party.")
    number.focus()
  }
  
  if (date.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter the date of the Party.")
    date.focus()
  }
    
  if (phone.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter Your Phone Number.")
    phone.focus()
  }
   
  if (foundAt < 1 && okSoFar)
  {
    okSoFar = false
    alert ("Please enter a valid email address.")
    email.focus()
  }

  if (themessage.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter the details for your enquiry.")
    themessage.focus()
  }
  if (okSoFar==true)  submit();
 }
}
