<!--

// field validator
function isFilled(passedVal) {
	if (passedVal == "") {
		return false
	}
	return true
}

// email validator	
function validEmail2(email2) {	
	invalidChars = " /:,;"
		
	if (email2 == "yourname@youremail.com") {	// cannot equal "yourname@youremail.com"
		return false
	}
	
	for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
		badChar = invalidChars.charAt(i)
		if (email2.indexOf(badChar,0) > -1) {
			return false
		}	
	}
	atPos = email2.indexOf("@",1)	// there must be one "@" symbol
	if (atPos == -1) {
		return false
	}
	if (email2.indexOf("@",atPos+1) > -1) {	// and only "@" symbol
		return false
	}
	
	periodPos = email2.indexOf(".",atPos)	// and at least one "." after the "@"
	if (periodPos == -1) {
		return false
	}
	if (periodPos+3 > email2.length) {	//  must be at least 2 characters after the "."
		return false
	}
	return true
}

function submitIt2(myForm) {
	
	if (!isFilled(myForm.fname.value)) {
		alert("No first name entered. Please review your entry for errors and try again.")
		myForm.fname.focus()
		myForm.fname.select()
		return false
	}
	
	if (!isFilled(myForm.lname.value)) {
		alert("No last name entered. Please review your entry for errors and try again.")
		myForm.lname.focus()
		myForm.lname.select()
		return false
	}

	if (!isFilled(myForm.email2.value)) {
		alert("No e-mail entered.  Please review your entry for errors and try again.")
		myForm.email2.focus()
		myForm.email2.select()
		return false
	}	
	
	// email validator
	if (isFilled(myForm.email2.value)){
		if (!validEmail2(myForm.email2.value)) {
			alert("The e-mail address you provided is not valid.  Please review your entry for errors and try again.")
			myForm.email2.focus()
			myForm.email2.select()
			return false
		}
	}
		
	// Everything checks out, return true
	return true
}
	
-->