function validateForm() 
{
 var f_valid=true
 with (document.form_online)
 {
  if(!terms.checked){
	  f_valid=false
      alert("You have not accepted our terms and conditions. Please indicate that you accept our terms and conditions.");
      terms.focus()
  }
	 
  if (name.value=="" && f_valid)
  {
    f_valid=false
    alert("You have not entered your name . Please enter your name.")
    name.focus()
  }
  
   if (phone.value=="" && f_valid)
  {
    f_valid=false
    alert("You have not entered your phone number. Please enter your phone number.")
    phone.focus()
  }
  
  var foundAt = f_email.value.indexOf("@",0)
  if (foundAt < 1 && f_valid)
  {
    f_valid = false
    alert ("You have not entered your email address.Please enter a valid email address.")
    f_email.focus()
  }
  
  if (f_valid==true)  submit();
 }
}