function validatemaincontactform() 
{
  var sError = "";

  if ($("#ctl00_cph_main_contactus_name").val().trim().length == 0 || $("#ctl00_cph_main_contactus_name").val() == "* name")
    sError += "\r\n - Your name is a required field.";

  if (!$("#ctl00_cph_main_contactus_email").val().trim().isEmail())
    sError += "\r\n - Email address is a required field.";

  if ($("#ctl00_cph_main_contactus_phone").val().trim().length == 0 || $("#ctl00_cph_main_contactus_phone").val() == "* contact-phone")
    sError += "\r\n - Your phone is a required field.";

  if (sError.length > 0)
    alert("The form was not completed correctly:" + sError);
  else {
    $("#ctl00_cph_main_contactus_hdnmaincontact").val("true");
    $("#aspnetForm").submit();
  }
}
function validatecontactform() {
  var sError = "";

  if ($("#ctl00_fullname").val().trim().length == 0 || $("#ctl00_fullname").val() == "* name")
    sError += "\r\n - Your name is a required field.";

  if (!$("#ctl00_email1").val().trim().isEmail())
    sError += "\r\n - Email address is a required field.";

  if ($("#ctl00_email1").val() != $("#ctl00_email2").val())
    sError += "\r\n - Your email address and verification address must be the same.";

  if (sError.length > 0)
    alert("The form was not completed correctly:" + sError);
  else {
    $("#ctl00_contactus_hdnleftcontact").val("true");
    $("#aspnetForm").submit();
  }
}

