function validateForm() 

{

 var okSoFar=true

 with (document.phpformmailer)

 {

    if (name.value=="" && okSoFar)

  {

    okSoFar=false

    alert("Please enter your name.")

    name.focus()

  }
  
  var foundAt = email.value.indexOf("@",0)

  if (foundAt < 1 && okSoFar)

  {

    okSoFar = false

    alert ("Please enter a valid email address.")

    email.focus()

  }


  if (referred.value=="" && okSoFar)

  {

    okSoFar=false

    alert("Please indicate who referred you.")

    referred.focus()

  }

  if (comment.value=="" && okSoFar)

  {

    okSoFar=false

    alert("Come on now, don't play coy, we know you know what gets you on")

    comment.focus()

  }

  if (okSoFar==true)  submit();

 }

}