	function checkForm(theForm) {
		if (! theForm) {
			alert("No form passed.");
			return false;
		}

		for (var i = 0; i < theForm.length; i++) {
			var theField = theForm[i];
			for (var j = 0; j < requiredFields.length; j++) {
				if (requiredFields[j] == theField.name) {
					if (theField.value == null || theField.value == "") {
						alert("One or more required fields are not completed.  Please fill in the required information (*) and try again.");
						return false;
					}
				}
			}
		}

		if (theForm.submitter_work_phone) {
			var new_phone = theForm.submitter_work_phone.value.replace(/[\(\)\.\-\ a-zA-Z]/g, '');

			if (isNaN(new_phone)) {
				alert("The submitter work phone number contains illegal characters.");
				return false;
			}
			theForm.submitter_work_phone.value = new_phone;
		}

		if (theForm.contact_phone) {
			var new_phone = theForm.contact_phone.value.replace(/[\(\)\.\-\ a-zA-Z]/g, '');

			if (isNaN(new_phone)) {
				alert("The contact phone number contains illegal characters.");
				return false;
			}
			theForm.contact_phone.value = new_phone;
		}

		if (theForm.submitter_work_email) {
			if ( ! /^[a-z0-9!$'*+\-_]+(\.[a-z0-9!$'*+\-_]+)*@([a-z0-9]+(-+[a-z0-9]+)*\.)+([a-z]{2}|aero|arpa|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|travel)$/.test(theForm.submitter_work_email.value)) {
				alert("The submitter work email address is not a valid format.");
				return false;
			}
		}

		if (theForm.contact_email) {
			if ( ! /^[a-z0-9!$'*+\-_]+(\.[a-z0-9!$'*+\-_]+)*@([a-z0-9]+(-+[a-z0-9]+)*\.)+([a-z]{2}|aero|arpa|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|travel)$/.test(theForm.contact_email.value)) {
				alert("The contact email address is not a valid format.");
				return false;
			}
		}

                if (theForm.phone) {
                        var new_phone = theForm.phone.value.replace(/[\(\)\.\-\ a-zA-Z]/g, '');

                        if (isNaN(new_phone)) {
                                alert("The phone number contains illegal characters.");
                                return false;
                        }
                        if (new_phone.length < 10) {
                                alert("The phone number you entered is incorrect. Ten digits are required.");
                                return false;
                        }
                        theForm.phone.value = new_phone;
                }

                if (theForm.email) {
                        if ( ! /^[a-z0-9!$'*+\-_]+(\.[a-z0-9!$'*+\-_]+)*@([a-z0-9]+(-+[a-z0-9]+)*\.)+([a-z]{2}|aero|arpa|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|travel)$/.test(theForm.email.value.toLowerCase())) {
                                alert("The email address is not a valid format.");
                                return false;
                        }
                }

                if (theForm.zip) {
                        var new_zip = theForm.zip.value.replace(/[\- a-zA-Z]/g, '');

                        if (isNaN(new_zip)) {
                                alert("The ZIP contains illegal characters.");
                                return false;
                        }
                        if (! (new_zip.length == 5 || new_zip.length == 9)) {
                                alert("The ZIP is the wrong length.  ZIP must be either 5 or 9 digits.");
                                return false;
                        }
                        theForm.zip.value = new_zip;
                }

		if (theForm.country) {
			if (theForm.country.value != "US") {
				alert("Sorry. We are only accepting inquiries from the United States at this time.");
				return false;
			}
		}

		return true;
	}

