<!--
// *************************************************** Form Validation Begins Here ***************************************************
function isNum(passedVal) {
  if (passedVal == "") {
  return false;
  }
		for (i=0; i<passedVal.length; i++) {
	  	if (passedVal.charAt(i) < "0") {
	  	return false;
	  	}
	  	if (passedVal.charAt(i) > "9") {
	  	return false;
	  	}
		}
return true;
}

function isReqNum(inNumField) {
		if (inNumField == "") {
		return true;
		}
	 if (isNum(inNumField)) {
		return true;
	 }
return false;
}

function validatePhone() {
  if (!(document.paypal_form.phone.value.charAt(3) == "-" || document.paypal_form.phone.value.charAt(3) == ".")) {
  return false;
  }
  if (!(document.paypal_form.phone.value.charAt(7) == "-" || document.paypal_form.phone.value.charAt(7) == ".")) {
  return false;
  }
  if (document.paypal_form.phone.value.length != 12) {
  return false;
  }
  if (!isNum(document.paypal_form.phone.value.substring(0,2))) {
  return false;
  }
  if (!isNum(document.paypal_form.phone.value.substring(4,6))) {
  return false;
  }
  if (!isNum(document.paypal_form.phone.value.substring(8,11))) {
  return false;
  }
return true;
}

function validateZip() {
  if (document.paypal_form.zip.value.length < 5) {
  return false;
  }
  if (!isNum(document.paypal_form.zip.value.substring(0,4))) {
  return false;
  }
return true;
}

function checkForm(CurrentForm){
	 if (CurrentForm.FirstName.value == '') {
	  	alert("Please enter your First Name.");
    document.paypal_form.FirstName.focus();
		return false;
  }
	 if (CurrentForm.LastName.value == '') {
	  	alert("Please enter your Last Name.");
    document.paypal_form.LastName.focus();
		return false;
  }
	 if (CurrentForm.Address1.value == '') {
	  	alert("Please enter your Address.");
    document.paypal_form.Address1.focus();
		return false;
  }
	 if (CurrentForm.city.value == '') {
	  	alert("Please enter your City.");
    document.paypal_form.city.focus();
		return false;
  }
	 if (CurrentForm.state.value == '') {
	  	alert("Please enter your State.");
    document.paypal_form.state.focus();
		return false;
  }
	 if (CurrentForm.zip.value == '') {
	  	alert("Please enter your Zip Code.");
    document.paypal_form.zip.focus();
		return false;
  }
	 if (!validateZip()) {
    alert("Please enter your Zip Code in the proper format (##### or #####-####).");
    return false;	
  }
	 if (CurrentForm.phone.value == '') {
	  	alert("Please enter your Daytime Phone Number.");
    document.paypal_form.phone.focus();
		return false;
  }
	 if (!validatePhone()) {
    alert("Please enter your Daytime Phone Number in the proper format (###-###-####).");
    return false;	
  }
  if (CurrentForm.email.value == '') {
	  	alert("Please enter your Email Address.");
    document.paypal_form.email.focus();
		return false;
  }
	 sEmail = CurrentForm.email.value;
  if(sEmail != "" && sEmail.search(/^[\w-_.]*[\w-_.]@[\w].+[\w]+[\w]$/) == -1){
	  	alert("Please enter a VALID Email Address.");
    document.paypal_form.email.focus();
		return false;
	 }
  if (CurrentForm.amount.value == '') {
	  	alert("Please enter your Contribution Amount.");
    document.paypal_form.amount.focus();
		return false;
  }
return true;	
}
//-->