function checkWholeForm(contactquote) {
    var why = "";
    why += isEmpty1(contactquote.name.value);
    why += isEmpty2(contactquote.address1.value);    
    why += isEmpty3(contactquote.city.value);
    why += isEmpty4(contactquote.state.value);
    why += isEmpty5(contactquote.telephone.value);
    why += isEmpty6(contactquote.zip.value);
    why += isEmpty7(contactquote.country.value);
    why += checkEmail(contactquote.email.value);

    if (why != "") {
       alert(why);
       return false;
    }
return true;
}

// name check

function isEmpty1(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please provide your name.\n"
  }
return error;     
}

// address check

function isEmpty2(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please provide your address.\n"
  }
return error;     
}

// city check

function isEmpty3(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please enter your city.\n"
  }
return error;     
}

// state check

function isEmpty4(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please enter your state .\n"
  }
return error;     
}

// telephone Check

function isEmpty5(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please provide your telephone.\n"
  }
return error;     
}

// zip check

function isEmpty6(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please provide your zip.\n"
  }
return error;     
}

// country check

function isEmpty7(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please provide your country.\n"
  }
return error;     
}

// Email Check

function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "Please enter an Email Address.\n";
}

    var emailFilter=/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) { 
       error = "Please enter a valid Email Address.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "This is not a true Email Address.\n";
       }
    }
return error;    
}


