<!--
function validate() {
    var formPOST = document.formPOST;
	var errors = "";
	var notEmpty = String("The following fields cannot be empty:\n"); // this string is 38 characters long
	var unsafe = String("We cannot accept these characters: (<> / \ ' = ; --). Please correct the following fields:\n"); // this string is 91 characters long

	// get form data
	var name = Trim(formPOST.txtName.value);
	var title = Trim(formPOST.txtTitle.value);
	var company = Trim(formPOST.txtCompany.value);
	var contact = Trim(formPOST.selContact.options[formPOST.selContact.selectedIndex].text);
	var email = Trim(formPOST.txtEmail.value);
	var phone = Trim(formPOST.txtPhone.value);
	var subject = Trim(formPOST.selSubject.options[formPOST.selSubject.selectedIndex].text);
    var comments = Trim(formPOST.txtComments.value);

    // test for empty, required inputs 
	if (name.length == 0)
		notEmpty += "\tName\n";
	if (email.length == 0)
		notEmpty += "\tEmail\n";
	if (phone.length == 0)
		notEmpty += "\tPhone\n";
	if (formPOST.selSubject.selectedIndex == 0)
		notEmpty += "\tSubject\n";
	if (comments.length == 0)
		notEmpty += "\tComments\n";

    // test for illegal characters in input
	if (!safetyTest(name))
		unsafe += "- Name\n";
	if (!safetyTest(title))
		unsafe += "- Title\n";
	if (!safetyTest(company))
		unsafe += "- Company\n";
	if (!safetyTest(phone))
		unsafe += "- Phone\n";
	if (!safetyTest(email))
		unsafe += "- Email\n";
	if (!safetyTest(comments))
		unsafe += "- Comments\n";

    // compile test results
	if (notEmpty.length > 38)
		errors += notEmpty;
	if (unsafe.length > 91)
		errors += unsafe;
	if ((email.length > 0) && (!checkEmail(email)))
		errors += "Email Address is invalid.\n"

	// display error message
	if (errors.length > 0) {
		window.alert("Errors: \n------------------------------------------\n" + errors);
		return false;
	}
	else {
        // inform user ...
	    var subject = Trim(formPOST.selSubject.options[formPOST.selSubject.selectedIndex].text);
	    var msg = "Thank you for your feedback regarding \"" + subject + "\".";
	    msg += "\n\nIt has been forwarded to our support team.";
	    alert(msg);

        // ... and continue to submit the form
	    formPOST.idxSubject.value = Trim(formPOST.selSubject.options[formPOST.selSubject.selectedIndex].value);

        // ... and continue to submit the form
	    return true;
    }
}
//-->
