// JavaScript Document
function validateMe(){
// checks for FIRSTNAME field //
	if(document.regParticipant.RNAME.value == ""){
		alert('Please enter your First Name.');
		document.regParticipant.RNAME.focus();
		return false;
	}	
// check to see if First Name is alpha//
	var alpha=/^[a-zA-Z0-9\s.\-]+$/ //alpha
	if (document.regParticipant.RNAME.value.search(alpha)==-1){ //if match failed
		alert('You have entered an invalid character in your First Name field.');
		document.regParticipant.RNAME.focus();
		return false;
	}
// checks for LASTNAME field //
	if(document.regParticipant.LNAME.value == ""){
		alert('Please enter your Last Name.');
		document.regParticipant.LNAME.focus();
		return false;
	}
// check to see if Last Name is alpha//
	if (document.regParticipant.LNAME.value.search(alpha)==-1){ //if match failed
		alert('You have entered an invalid character in your Last Name field.');
		document.regParticipant.LNAME.focus();
		return false;
	}
// checks for Address field //
	if(document.regParticipant.ADDRESS.value == ""){
		alert('Please enter your Address.');
		document.regParticipant.ADDRESS.focus();
		return false;
	}
// check to see if Address is alpha//
	if (document.regParticipant.ADDRESS.value.search(alpha)==-1){ //if match failed
		alert('You have entered an invalid character in your Address field.');
		document.regParticipant.ADDRESS.focus();
		return false;
	}

// checks for CITY field //
	if(document.regParticipant.CITY.value == ""){
		alert('Please enter your City.');
		document.regParticipant.CITY.focus();
		return false;
	}
// check to see if City is alpha//
	if (document.regParticipant.CITY.value.search(alpha)==-1){ //if match failed
		alert('You have entered an invalid character in your City field.');
		document.regParticipant.CITY.focus();
		return false;
	}

// check for State field //
	if(document.regParticipant.STATE.value == ""){
		alert('Please enter your State.');
		document.regParticipant.STATE.focus();
		return false;
	}
// check to see if State is alpha//
var state=/^(?-i:A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$/ //state
	if (document.regParticipant.STATE.value.search(state)==-1){ //if match failed
		alert('You have entered an invalid character in your State field.');
		document.regParticipant.STATE.focus();
		return false;
	}

// check for Zip Code field //
	if(document.regParticipant.ZIPCODE.value == ""){
		alert('Please enter your Zip Code.');
		document.regParticipant.ZIPCODE.focus();
		return false;
	}
// check to see if Zip Code is 5 digits //
	var zip=/^\d{5}$/ //alpha
	if (document.regParticipant.ZIPCODE.value.search(zip)==-1){ //if match failed
		alert('Please enter a valid Zip code.');
		document.regParticipant.ZIPCODE.focus();
		return false;
	}
// check for Phone field //
	if(document.regParticipant.PHONE.value == ""){
		alert('Please enter your Phone Number.');
		document.regParticipant.PHONE.focus();
		return false;
	}
// check to see if Other Reason is alpha//
	var phone=/((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}/ //alpha
	if (document.regParticipant.PHONE.value.search(phone)==-1){ //if match failed
		alert('Please enter a valid phone number.');
		document.regParticipant.PHONE.focus();
		return false;
	}

// check for EMAIL field //
	if(document.regParticipant.EMAIL.value == ""){
		alert('Please enter your Email Address.');
		document.regParticipant.EMAIL.focus();
		return false;
	}
// check to see if Face Value is Dollar amount//
	var email=/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/ //alpha
	if (document.regParticipant.EMAIL.value.search(email)==-1){ //if match failed
		alert('Please enter a valid Email address.');
		document.regParticipant.EMAIL.focus();
		return false;
	}
}
