function SubmitForm() {
  if (CheckFields())
    window.document.persinfo.submit();
}


function CheckFields() {

  var i, bChecked;

  if (window.document.persinfo.ContactNameC.value.length == 0)
  {
    alert("Please enter a value for Name");
    window.document.persinfo.ContactNameC.focus();
    return false;
  }
  
    if (window.document.persinfo.PhoneC.value.length == 0)
  {
    alert("Please enter a value for Phone Number");
    window.document.persinfo.PhoneC.focus();
    return false;
  }
  
    if (window.document.persinfo.Contactby.value.length == 0)
  {
    alert("Please select your phone description.");
    window.document.persinfo.Contactby.focus();
    return false;
  }
  
    if (window.document.persinfo.email.value.length == 0)
  {
    alert("Please enter a value for E-mail");
    window.document.persinfo.email.focus();
    return false;
  }

  //check for @ and . in email address
  
  var at_pos = -1;
  var dot_pos = -1;
  var tmp_pos;
  for (tmp_pos = 0; ((tmp_pos < window.document.persinfo.email.value.length) && (at_pos == -1)); tmp_pos++)
    if (window.document.persinfo.email.value.substr(tmp_pos, 1) == '@')
      at_pos = tmp_pos;
  for (tmp_pos = 0; ((tmp_pos < window.document.persinfo.email.value.length) && (dot_pos == -1)); tmp_pos++)
    if (window.document.persinfo.email.value.substr(tmp_pos, 1) == '.')
      dot_pos = tmp_pos;

  if ((at_pos < 1) || (dot_pos < 0))
  {
    alert("The Email address you entered is not in a valid format. Please re-enter your Email address.");
    window.document.persinfo.email.focus();
    return false;
  }

  return true;
}
// JavaScript Document