function validatemaincontactform() 
{
  var sError = "";

  if ($("#ctl00_cph_right_contactus_firstname").val().trim().length == 0 || $("#ctl00_cph_right_contactus_firstname").val() == "* First Name")
    sError += "\r\n - Your first name is a required field.";
  
  if ($("#ctl00_cph_right_contactus_lastname").val().trim().length == 0 || $("#ctl00_cph_right_contactus_lastname").val() == "* Last Name")
    sError += "\r\n - Your last name is a required field.";

  if (!$("#ctl00_cph_right_contactus_email").val().trim().isEmail())
    sError += "\r\n - Email address is a required field.";

  if ($("#ctl00_cph_right_contactus_phone").val().trim().length == 0 || $("#ctl00_cph_right_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_right_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();
  }
}

