function check_email(form) {
	var ea = form.ea;
	if (ea.value == "") {
		alert("Please enter an email address.");
		ea.focus();
		return false;
	} else if (!isValidEmailAddress(ea.value)) {
		alert("Please enter a valid email address.");
		ea.focus();
		return false;
	}
	return true;
}
function isValidEmailAddress(addr) {
	index1 = addr.indexOf("@");
	if (index1 <= 0) {
		return false;
	}
	index2 = addr.indexOf(".", index1);
	if (index2 < index1) {
		return false;
	}
	
	//must be at least a period and 2 characters at the end
	if (index2 == addr.length-1 || index2 == addr.length-2) {
		return false;
	}
	return true;
}
