function validatemaincontactform() 
{
  var sError = "";

  if ($("#ctl00_contactname").val().trim().length == 0 || $("#ctl00_contactname").val() == "* Name")
    sError += "\r\n - Your name is a required field.";

  if ($("#ctl00_contactphone").val().trim().length == 0 || $("#ctl00_contactphone").val() == "* Contact Phone")
    sError += "\r\n - Your phone is a required field.";

  if (!$("#ctl00_contactemail").val().trim().isEmail())
    sError += "\r\n - Email address is a required field.";

  if (sError.length > 0)
    alert("The form was not completed correctly:" + sError);
  else {
    $("#ctl00_hdn_contactform").val("true");
    $("#aspnetForm").submit();
  }
}
function validatequoteform() {
  var sError = "";

  if ($("#ctl00_quote_name").val().trim().length == 0 || $("#ctl00_quote_name").val() == "* Name")
    sError += "\r\n - Your name is a required field.";

  if ($("#ctl00_quote_address1").val().trim().length == 0 || $("#ctl00_quote_address1").val() == "* Address 1")
    sError += "\r\n - Your address is a required field.";

  if ($("#ctl00_quote_city").val().trim().length == 0 || $("#ctl00_quote_city").val() == "* City")
    sError += "\r\n - Your city is a required field.";

  if ($("#ctl00_quote_phone").val().trim().length == 0 || $("#ctl00_quote_phone").val() == "* Phone Number")
    sError += "\r\n - Your phone number is a required field.";
  
  if (sError.length > 0)
    alert("The form was not completed correctly:" + sError);
  else {
    $("#ctl00_hdn_quotesubmit").val("true");
    alert($("#ctl00_hdn_quotesubmit").val());
    $("#aspnetForm").submit();
  }
}

