function validateForm() 
{
 var okSoFar=true
 with (document.contact)
 {
	  
  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 (thesubject.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter the subject")
    thesubject.focus()
  }
  
  if (themessage.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your message")
    themessage.focus()
  }
  
  if (okSoFar==true)  submit();
 }
}


