<!-- 
function CheckForm() {

if (document.reg.parentFname.value=='') {
	alert('Please enter your first name!');
	document.reg.parentFname.focus();
	return;
	}

if (document.reg.parentLname.value=='') {
	alert('Please enter your last name!');
	document.reg.parentLname.focus();
	return;
	}

if (document.reg.parentPhone.value=='') {
	alert('Please enter your phone number!');
	document.reg.parentPhone.focus();
	return;
	}

var regexObj = /^\(?([2-9][0-8][0-9])\)?[-. ]?([2-9][0-9]{2})[-. ]?([0-9]{4})$/;
if (regexObj.test(document.reg.parentPhone.value)) {
    document.reg.parentPhone.value = document.reg.parentPhone.value.replace(regexObj, "$1-$2-$3");
	} else {    // Invalid phone number
	alert('Please check the phone number you entered! '+document.reg.parentPhone.value);
	document.reg.parentPhone.focus();
	return;
	}

if (document.reg.parentPhone.value.length==10) {
	document.reg.parentPhone.value=document.reg.parentPhone.value.substr(0,3)+'-'+document.reg.parentPhone.value.substr(3,3)+'-'+document.reg.parentPhone.value.substr(6);
	}

var regexObj = /^\(?([2-9][0-8][0-9])\)?[-. ]?([2-9][0-9]{2})[-. ]?([0-9]{4})$/;
if (document.reg.altParentPhone.value!=''){
		if(regexObj.test(document.reg.altParentPhone.value)) {
		document.reg.altParentPhone.value = document.reg.altParentPhone.value.replace(regexObj, "$1-$2-$3");
		} else {    // Invalid phone number
		alert('Please check the alternate phone number you entered!"'+document.reg.altParentPhone.value+'"');
		document.reg.altParentPhone.focus();
		return;
		}
	}

if (document.reg.altParentPhone.value.length==10) {
	document.reg.altParentPhone.value=document.reg.altParentPhone.value.substr(0,3)+'-'+document.reg.altParentPhone.value.substr(3,3)+'-'+document.reg.altParentPhone.value.substr(6);
	}

if (document.reg.parentAddress.value=='') {
	alert('Please enter your address!');
	document.reg.parentAddress.focus();
	return;
	}

if (document.reg.parentCity.value=='') {
	alert('Please enter the name of the city you reside in!');
	document.reg.parentCity.focus();
	return;
	}

if (document.reg.parentPostal.value=='') {
	alert('Please enter your postal code!');
	document.reg.parentPostal.focus();
	return;
	}

var pat =/^\D{1}\d{1}\D{1}\ ?\d{1}\D{1}\d{1}$/
if (document.reg.parentPostal.value!='' && !pat.test(document.reg.parentPostal.value)){
	alert('Please enter a valid Postal Code!');
	document.reg.parentPostal.focus();
	return;
	}

if (document.reg.parentEmail.value=='') {

if (confirm('Do you really want to leave the e-mail address field blank?')){
	//alert('Since you did not enter an e-mail address,\nplease make sure you write down your User ID and Password\nand keep them in a safe place!');
	}

else {document.reg.parentEmail.focus();return}
	}
         
var pat =/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
if (document.reg.parentEmail.value!='' && !pat.test(document.reg.parentEmail.value)){
	alert('Please enter a valid E-mail address!');
	document.reg.parentEmail.focus();
	return;
	}


if (document.reg.altParentEmail.value!='' && !pat.test(document.reg.altParentEmail.value)){
	alert('Please enter a valid Second E-mail address!');
	document.reg.altParentEmail.focus();
	return;
	}

/*
if (document.reg.altContact.value=='') {
	alert('Please enter the name of an alternate person to contact in case you are unreachable...');
	document.reg.altContact.focus();
	return;
	}
*/

var pat =/\d{3,12}/;
if (document.reg.altContact.value!='' && document.reg.altContactPhone.value=='') {
	alert('Please enter the phone number of your alternate contact!');
	document.reg.altContactPhone.focus();
	return;
	}

	var regexObj = /^\(?([2-9][0-8][0-9])\)?[-. ]?([2-9][0-9]{2})[-. ]?([0-9]{4})$/;
	if (document.reg.altContactPhone.value!=''){
		if(regexObj.test(document.reg.altContactPhone.value)) {
		document.reg.altContactPhone.value = document.reg.altContactPhone.value.replace(regexObj, "$1-$2-$3");
		} else {    // Invalid phone number
		alert('Please check the alternate contact phone number you entered!');
		document.reg.altContactPhone.focus();
		return;
		}
	}
	

	if (document.reg.altContactPhone.value.length==10) {
	document.reg.altContactPhone.value=document.reg.altContactPhone.value.substr(0,3)+'-'+document.reg.altContactPhone.value.substr(3,3)+'-'+document.reg.altContactPhone.value.substr(6);
	}

var pat =/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
if (document.reg.altContactEmail.value!='' && !pat.test(document.reg.altContactEmail.value)){
	alert('Please enter a valid Alternate Contact E-mail address!');
	document.reg.altContactEmail.focus();
	return;
	}

if (document.reg.coach[0].checked==false && document.reg.coach[1].checked==false) {
	alert('Please let us know if you are willing to help with coaching.');
	document.reg.coach.focus();
	return;
	}

if (document.reg.executive[0].checked==false && document.reg.executive[1].checked==false) {
	alert('Please let us know if you are willing to volunteer for the executive.');
	document.reg.executive.focus();
	return;
	}

if (document.reg.sponsor[0].checked==false && document.reg.sponsor[1].checked==false) {
	alert('Please let us know if you are willing to help with Sponsorship.');
	document.reg.sponsor.focus();
	return;
	}

if (document.reg.howDidYouLearn.value=='') {
	alert('Please let us know how your learned about the Durham East Softball Association.');
	document.reg.howDidYouLearn.focus();
	return;
	}

if (document.reg.howDidYouLearn2.value=='' && document.reg.howDidYouLearn.value=='Friend') {
	alert('Please let us know who told you about Durham East Softball Association.');
	document.reg.howDidYouLearn2.focus();
	return;
	}

if (document.reg.howDidYouLearn2.value=='' && document.reg.howDidYouLearn.value=='Other') {
	alert('Please let us know how you learned about Durham East Softball Association.');
	document.reg.howDidYouLearn2.focus();
	return;
	}

if (document.reg.PFname.value=='') {
	alert("Please enter the player's first name!");
	document.reg.PFname.focus();
	return;
	}

if (document.reg.PLname.value=='') {
	alert("Please enter the player's last name!");
	document.reg.PLname.focus();
	return;
	}

var pat =/\d{8}/;
if (!pat.test(document.reg.bday.value)) {
	alert('Please enter a valid birth date!');
	document.reg.bday.focus();
	return;
	}

if (document.reg.division.value=='') {
	alert("You must select the division your child will play in!");
	document.reg.division.focus();
	return;
	}

if (document.reg.shirtsize.value=='') {
	alert("You must select a shirt size for your child!");
	document.reg.shirtsize.focus();
	return;
	}

if (document.reg.releasewaiver.checked==false) {
	alert("You must agree to the D.E.S.A. waiver in order to register to play!");
	document.reg.releasewaiver.focus();
	return;
	}

document.reg.submit();
}

// -->