function validateForm() 
{
 var okSoFar=true
 with (document.phpformmailer)
 {
  if (first_name.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your firstname.")
    first_name.focus()
  }

  if (sure_name.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your surname.")
    sure_name.focus()
  }

if (address.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your address.")
    address.focus()
  }

/*    if (postcode.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your postcode.")
    postcode.focus()
  }
*/
  if (phone.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your phone number.")
    phone.focus()
  }

/*  if (phone2.value!=phone.value && okSoFar)
  {
    okSoFar=false
    alert("Alternative phone number not math.")
    phone2.focus()
  }
*/
  if (email.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your email address.")
    email.focus()
  }
  
  var foundAt = email.value.indexOf("@",0)
  if (foundAt < 1 && okSoFar)
  {
    okSoFar = false
    alert ("Please enter a valid email address.")
    email.focus()
  }

  if (message.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your message.")
    message.focus()
  }
  if (okSoFar==true)  submit();
 }
}
