function validateForm() 
{
 var okSoFar=true
 with (document.phpformmailer)
 {
  if (!(titlename[0].checked || titlename[1].checked || titlename[2].checked))
  {
    okSoFar=false
    alert("Please enter your title name.")
  }

  if (fullname.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your name.")
    fullname.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 ((tel1.value=="" || tel2.value=="" || tel3.value=="") && okSoFar)
  {
    okSoFar=false
    alert("Please enter your phone.")
    tel1.focus()
  }
   if (req.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your requirement.")
    req.focus()
  }

  if (areas_concern.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your medications Are you sensitive or allergic to")
    areas_concern.focus()
  }

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

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

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