// JavaScript Document
<!--
function checkForm(form) {
form.form_from.value = document.referrer

if (form.first_name.value == "") {
		alert("Please enter your first name.")
	return false
	}
if (form.last_name.value == "") {
			alert("Please enter your last name.")
	return false
	}
if (form.email.value == "") {
			alert("Please enter your email address.")
	return false
	}
if (form.employees.selectedIndex < 1) {
			alert("Please select the number of employees at your location.")
	return false
	}
if (form.organization.value == "") {
			alert("Please enter the name of your company or organization.")
	return false
	}
if (form.address1.value == "") {
			alert("Please enter your mailing address.")
	return false
	}
if (form.city.value == "") {
			alert("Please enter the name of your city.")
	return false
	}
if (form.zip.value == "") {
			alert("Please enter your zip or postal code.  If you do not have a postal code, please enter xxx.")
	return false
	}
if (form.zip.value.length < 3) {
alert("Zip/Postal Code must have at least three digits.  If you do not have a postal code, please enter XXX.")
	return false
	}
if (form.country.selectedIndex == 40) {
	if (form.state.selectedIndex < 52) {
		alert ("Please select the appropriate Canadian province.")
	return false
	}
}

	if (form.state.selectedIndex < 52 && form.state.selectedIndex > 0) {
		if (form.country.selectedIndex > 1 && form.country.selectedIndex != 228) {
			alert ("If a U.S. state is selected, then the U.S. must be selected as the country.  If you are not in the U.S., please leave the 'State or Province' selection set to '-Please Select-'.  Otherwise please select the U.S. as your country.")
	return false
		}
	}

if (form.country.selectedIndex == 0) {
	if (form.state.selectedIndex < 1) {
		alert ("Please select the appropriate state.")
	return false
	}
}
if (form.country.selectedIndex == 228) {
	if (form.state.selectedIndex < 1) {
		alert ("Please select the appropriate state.")
	return false
	}
}
if (form.country.selectedIndex == 0) {
	if (form.state.selectedIndex > 51) {
		alert ("Please select the appropriate state.")
	return false
	}
}
if (form.country.selectedIndex == 228) {
	if (form.state.selectedIndex > 51) {
		alert ("Please select the appropriate state.")
	return false
	}
}

	if (form.country.selectedIndex == 40) { // CHECK CANADIAN POSTAL CODES
		var checkCanadaCode = 0;
		strlen=form.zip.value.length;
		entry = form.zip.value;
		if(strlen == 7) {
			entry = form.zip.value.substr(0,3) + form.zip.value.substr(4,3);
			form.zip.value = entry
		}

		strlen=entry.length;
		if(strlen!=6) {
			alert("Please enter a valid Canadian postal code. The postal code you entered is not the right length.");
			return false;
		}
		entry=entry.toUpperCase();    // in case of lowercase characters
		// Check for legal characters in string - note index starts at zero
		if('ABCEGHJKLMNPRSTVXY'.indexOf(entry.charAt(0))<0) {checkCanadaCode = 1;}
		if('0123456789'.indexOf(entry.charAt(1))<0) {checkCanadaCode = 1;}
		if('ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(entry.charAt(2))<0) {checkCanadaCode = 1;}
		if('0123456789'.indexOf(entry.charAt(3))<0) {checkCanadaCode = 1;}
		if('ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(entry.charAt(4))<0) {checkCanadaCode = 1;}
		if('0123456789'.indexOf(entry.charAt(5))<0) {checkCanadaCode = 1;}
		if(checkCanadaCode == 1) {
			alert("Please enter a valid Canadian postal code.");
			return false;
		}
	}


/* ===============Beginning Custom section=============== */
if (form.product.value == "") {
			alert("Please enter the product you have a question or comment about.")
	return false
	}
/*  ================== End - Custom Section ===========*/

emailStr = form.email.value
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")

	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) {
  		alert("Email address seems to have an error (check @ and .'s)")
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]

	if (user.match(userPat)==null) {
    	alert("The email username doesn't seem to be valid.")
    	return false
	}

	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
	  	for (var i=1;i<=4;i++) {
	    	if (IPArray[i]>255) {
	        	alert("Email destination IP address is invalid!")
			return false
	    	}
    	}
    	return true
	}

	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
		alert("The email domain name doesn't seem to be valid.")
    	return false
	}

	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if ((domArr[domArr.length-1].indexOf("info") == 0) && (domArr[domArr.length-1].indexOf("coop") == 0)) {
			if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) {
	   			alert("The email address must end in a three-letter domain, or two letter country.")
   				return false
			}
	}

	if (len<2) {
   		var errStr="The email address is missing a hostname!"
   		alert(errStr)
   	return false
	}

return true
}
-->