﻿//onsubmit="return checkWholeForm(process);" - Place into formfunction checkWholeForm(process) {    var why = "";    why += checkemail(process.email.value);    why += isEmpty1(process.name.value);    why += isEmpty2(process.telephone.value);        why += isEmpty3(process.state.value);    if (why != "") {       alert(why);       return false;    }return true;}// Name Checkfunction isEmpty1(strng) {var error = "";  if (strng.length == 0) {     error = "Please provide us with your name\n"  }return error;     }// Telephone Checkfunction isEmpty2(strng) {var error = "";  if (strng.length == 0) {     error = "Please enter you telephone number.\n"  }return error;     }// State Checkfunction isEmpty3(strng) {var error = "";  if (strng.length == 0) {     error = "Please enter a state\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;    }