﻿function checkWholeForm(rfq) {    var why = "";    why += checkemail(rfq.email.value);    why += isEmpty1(rfq.customername.value);    why += isEmpty2(rfq.customercontact.value);    why += isEmpty3(rfq.phone1.value);    why += isEmpty4(rfq.phone3.value);         if (why != "") {       alert(why);       return false;    }return true;}// customer namefunction isEmpty1(strng) {var error = "";  if (strng.length == 0) {     error = "Please provide your name.\n"  }return error;     }// customer contact namefunction isEmpty2(strng) {var error = "";  if (strng.length == 0) {     error = "Please provide a customer contact name.\n"  }return error;     }// phone number - area codefunction isEmpty3(strng) {var error = "";  if (strng.length == 0) {     error = "Please provide area code.\n"  }return error;     }// phone number - box2function isEmpty4(strng) {var error = "";  if (strng.length == 0) {     error = "Please provide a phone number.\n"  }return error;     }// email checkfunction checkemail (strng) {var error="";if (strng == "") {   error = "Please enter a 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;    }
