/*****************************************************
* e-mail validation
*****************************************************/
function resetform() {
	document.forms[0].elements[1]=="";
}

function submitForms() {
	if (isEmail() && isFname() && isLname())
		if (confirm("\n You are about to submit your information.                  \n\n     OK to Continue or CANCEL to abort.")) {
			return true;
		}
		else {
			alert("\n You have chosen to cancel your submission.                ");
		return false
	}
	else 
		return false;
}

function isEmail() {
	if (document.forms[0].elements[1].value == "") {
		alert ("\n The E-Mail field cannot be blank.               \n\n Please enter your E-Mail address.")
		document.forms[0].elements[1].focus();
		return false;
	}

	if (document.forms[0].elements[1].value.indexOf ('@',0) == -1 ||
		document.forms[0].elements[1].value.indexOf ('.',0) == -1) {
		alert ("\n You have entered an invalid E-Mail address.                  \n\n Please re-enter your E-Mail address correctly.")
	    document.forms[0].elements[1].select();
	    document.forms[0].elements[1].focus();
	    return false;
	}
	return true;
}

function isFname() {
	if (document.forms[0].elements[2].value == "") {
		alert ("\n The First Name field cannot be blank.                   \n\n         Please enter your First Name.")
		document.forms[0].elements[2].focus();
		return false;
	}
	return true;
}

function isLname() {
	if (document.forms[0].elements[3].value == "") {
		alert ("\n The Last Name field cannot be blank.                   \n\n         Please enter your Last Name.")
		document.forms[0].elements[3].focus();
		return false;
	}
	return true;
}
/**********************************
End of e-mail validation
**********************************/


