function validEmail(email) {
			invalidChars = "/:,;"
			if(email == "") {
				return false
			}
			for (i=0; i<invalidChars.length; i++) {
				badChar = invalidChars.charAt(i)
				if (email.indexOf(badChar, 0) > -1) {
					return false
				}
			}
			atPos = email.indexOf("@", 1)
			if(atPos == -1) {
				return false
			}
			if(email.indexOf("@", atPos+1) > -1) {
				return false
			}
			periodPos = email.indexOf(".", atPos)
			if(periodPos == -1) {
				return false
			}
			if (periodPos+3 > email.length) {
				return false
			}
			return true
		}
		
		function submitIt(mailList) {
			
			if (mailList.customerName.value == ""){
				alert("Please enter your name.")
				mailList.customerName.focus()
				mailList.customerName.select()
			return false
			}
		
			contactOption = -1
			for (i=0; i < mailList.contactPref.length; i++) {
				if (mailList.contactPref[i].checked){
					contactOption = i
				}
			}
			if (contactOption == -1){
				alert("Please indicate how you would prefer to be contacted.")
			return false
			}
			if (mailList.contactPref[contactOption].value == "snailMail" && (mailList.street.value=="" || mailList.city.value=="" || mailList.state.value=="" || mailList.zip.value=="") ) {
				alert("You choose to be contacted by ground mail; please complete your mailing address.")
				if (mailList.street.value=="") {
					mailList.street.focus()
					mailList.street.select()
				}
				else if (mailList.city.value=="") {
					mailList.city.focus()
					mailList.city.select()
				}
				else if (mailList.state.value=="") {
					mailList.state.focus()
					mailList.state.select()
				}
				else{
					mailList.zip.focus()
					mailList.zip.select()
				}
			return false
			}
			
			var brochureOption = 0
			for (i=0; i < mailList.wantsCatalog.length; i++) {
				if (mailList.wantsCatalog[i].checked){
					catalogOption = i
				}
			}
			if (mailList.wantsCatalog[catalogOption].value == "yes_Catalog" && (mailList.street.value=="" || mailList.city.value=="" || mailList.state.value=="" || mailList.zip.value=="") ) {
				alert("Please complete your mailing address to receive a catalog.")
				if (mailList.street.value=="") {
					mailList.street.focus()
					mailList.street.select()
				}
				else if (mailList.city.value=="") {
					mailList.city.focus()
					mailList.city.select()
				}
				else if (mailList.state.value=="") {
					mailList.state.focus()
					mailList.state.select()
				}
				else if (mailList.zip.value=="") {
					mailList.zip.focus()
					mailList.zip.select()
				}
				return false
			}
			
			if (mailList.contactPref[contactOption].value == "eMail" && (!validEmail(mailList.email.value)) ){
				alert("You indicated that you prefered to be contacted by e-mail; please provide a valid e-mail address.")
				mailList.email.focus()
				mailList.email.select()
			
			return false
			}
			
		return true
		}