function validate() {
    getFromFirstName  = document.ContactForm.FirstName.value;
	getFromLastName  = document.ContactForm.LastName.value;
    getFromEmail = document.ContactForm.EMail.value;
    
    var pattern = /\s*\w+@[^\.]+\.[^\.]+(\.[^\.])*\s*/;
    legalChars = "~0123456789.-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_@+";
    errorMsg = "";

    if (getFromName.length < 2)  errorMsg += "\nName must be at least 2 characters";
    if (getFromEmail.length < 7) errorMsg += "\nE-Mail address must be at least 7 characters";
    //Validate Email against pattern match
    if (getFromEmail != "") {
	if(!pattern.test(getFromEmail)) {
	    errorMsg += "\nInvalid E-Mail Address."
	}
    }
    //This enhances the previous EMail check. This checks for legal values and returns illegal values
    if (getFromEmail != "" && getFromEmail.length > 1) {
	for(x=0; x < getFromEmail.length; x++) {
	    if (legalChars.indexOf(getFromEmail.substring(x,x+1)) < 0)
		errorMsg += "\n" + "Illegal character '"+getFromEmail.substring(x,x+1)+"' at position " +(x+1)+ " in E-Mail Address.";
	}
    }
    //FINAL CHECK FOR ERROR MESSAGES
    if (errorMsg.length > 0) {
	errorMsg = "The following errors must be corrected before submitting this form: \n" + errorMsg
	alert (errorMsg);
	return false;
    }
return true;
}
