<!--
function checkCC()
{
	if (document.order_four.CC_TYPE[4].checked)
	{
		document.order_four.CC_TYPE[0].checked = true;
	}
	return true;
}
function checkCheck()
{
	document.order_four.CC_TYPE[4].checked = true;
	return true;
}
function errorcheckShipping(myform) 
{
	with (myform) 
	{
		if (SHIP_FIRST.value.length < 2)
		{
			alert("Subscriber first name is a required field.");
			return false;
		} 
		if (SHIP_LAST.value.length < 2)
		{
			alert("Subscriber last name is a required field.");
			return false;
		} 
		if (SHIP_ADDRESSONE.value.length < 4)
		{
			alert("Subscriber address is a required field, and must be at least 4 characters long.");
			return false;
		} 	
		if (SHIP_CITY.value.length < 2)
		{
			alert("Subscriber city  is a required field.");
			return false;
		}
		if (SHIP_STATE.value.length < 2)
		{
			alert("Subscriber state is a required field.");
			return false;
		}
		if (SHIP_POSTAL.value.length < 2)
		{
			alert("Subscriber postal code is a required field.");
			return false;
		}				
		for (i=0; i<SHIP_POSTAL.value.length; i++)
		{
			if (!((SHIP_POSTAL.value.charAt(i) >= 0) && (SHIP_POSTAL.value.charAt(i)<=9 )))
			{
				alert("A numeric value is required for postal code.");
				return false;
			}
		}
		if (SHIP_PHONEA.value.length < 3)
		{
			//alert("Subscriber phone is a required field.");
			//return false;
		}				
		if (SHIP_PHONEB.value.length < 3)
		{
			//alert("Subscriber phone is a required field.");
			//return false;
		}				
		if (SHIP_PHONEC.value.length < 4)
		{
			//alert("Subscriber phone is a required field.");
			//return false;
		}				
	}
	return true;
}
function errorcheckBilling(myform) 
{
	with (myform) 
	{
		if (BILL_FIRST.value.length < 2)
		{
			alert("Billing first name is a required field.");
			return false;
		} 
		if (BILL_LAST.value.length < 2)
		{
			alert("Billing last name is a required field.");
			return false;
		} 
		// BILLTO ADDRESS
		if (BILL_ADDRESSONE.value.length < 4)
		{
			alert("Billing address is a required field, and must be at least 4 characters long.");
			return false;
		} 	
		// BILLTO CITY
		if (BILL_CITY.value.length < 2)
		{
			alert("Billing city  is a required field.");
			return false;
		}

		// BILLTO STATE
		if (BILL_STATE.value.length < 2)
		{
			alert("Billing state is a required field.");
			return false;
		}
		// BILLTO POSTAL
		if (BILL_POSTAL.value.length < 2)
		{
			alert("Billing postal code is a required field.");
			return false;
		}						
		for (i=0; i<BILL_POSTAL.value.length; i++)
		{
			if (!((BILL_POSTAL.value.charAt(i) >= 0) && (BILL_POSTAL.value.charAt(i)<=9 )))
			{
				alert("A numeric value is required for postal code.");
				return false;
			}
		}
		if (BILL_PHONEA.value.length < 3)
		{
			alert("Phone is a required field.");
			return false;
		}				
		if (BILL_PHONEB.value.length < 3)
		{
			alert("Phone is a required field.");
			return false;
		}				
		if (BILL_PHONEC.value.length < 4)
		{
			alert("Phone is a required field.");
			return false;
		}				
	}
	return true;
}
function errorcheckBillingEmail(myform) 
{
	with (myform) 
	{
		if (BILL_FIRST.value.length < 2)
		{
			alert("Billing first name is a required field.");
			return false;
		} 
		if (BILL_LAST.value.length < 2)
		{
			alert("Billing last name is a required field.");
			return false;
		} 
		// BILLTO ADDRESS
		if (BILL_ADDRESSONE.value.length < 4)
		{
			alert("Billing address is a required field, and must be at least 4 characters long.");
			return false;
		} 	
		// BILLTO CITY
		if (BILL_CITY.value.length < 2)
		{
			alert("Billing city  is a required field.");
			return false;
		}

		// BILLTO STATE
		if (BILL_STATE.value.length < 2)
		{
			alert("Billing state is a required field.");
			return false;
		}
		// BILLTO POSTAL
		if (BILL_POSTAL.value.length < 2)
		{
			alert("Billing postal code is a required field.");
			return false;
		}						
		for (i=0; i<BILL_POSTAL.value.length; i++)
		{
			if (!((BILL_POSTAL.value.charAt(i) >= 0) && (BILL_POSTAL.value.charAt(i)<=9 )))
			{
				alert("A numeric value is required for postal code.");
				return false;
			}
		}
		if (BILL_PHONEA.value.length < 3)
		{
			alert("Phone is a required field.");
			return false;
		}				
		if (BILL_PHONEB.value.length < 3)
		{
			alert("Phone is a required field.");
			return false;
		}				
		if (BILL_PHONEC.value.length < 4)
		{
			alert("Phone is a required field.");
			return false;
		}				
		if (BILL_EMAIL.value.length < 3)
		{
			alert("Email is a required field.");
			return false;
		}				
		else
		{
			atpos = BILL_EMAIL.value.indexOf("@");
			dotpos = BILL_EMAIL.value.lastIndexOf(".");
			lastpos = BILL_EMAIL.value.length-1;
			if (atpos<1 || dotpos-atpos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
			{
				alert("The E-Mail address you entered does not appear to be valid.");
				return false;
			}
		}
	}
	return true;
}
function errorcheckPayment(myform) 
{
	with (myform) 
	{
		//CC INFO
		//only if not check number
		if (CC_TYPE[4].checked)
		{
			if (CC_CHECK.value.length < 4)
			{
				alert("Check number must be at least 4 characters.");
				return false;
			}
		}
		else
		{
			if (CC_NAME.value.length < 2)
			{
				alert("Credit card name is a required field.");
				return false;
			}
			if (CC_NUMBER.value.length < 15)
			{
				alert("Credit card number does not appear to be valid, and no check number has been entered.");
				return false;
			}
			for (i=0; i<CC_NUMBER.value.length; i++)
			{
				if (!((CC_NUMBER.value.charAt(i) >= 0) && (CC_NUMBER.value.charAt(i)<=9 )))
				{
					alert("A numeric value is required for the credit card number.");
					return false;
				}
			}
			if (CC_MONTH.value == 0)
			{
				alert("Please select a credit card expiration month.");
				return false;
			}						
			if (CC_YEAR.value == 0)
			{
				alert("Please select a credit card expiration year.");
				return false;
			}						
		}
	}
	return true;
}
function doneisdone(myform) 
{
	with (myform) 
	{
		DONE.disabled=true;
		DONE.value='Thanks!';
		return true;
	}
}
function errorcheckGroupInfo(myform) 
{
	with (myform) 
	{
			if (GroupMembers.value == 0)
			{
				alert("Please select a group size.");
				return false;
			}						
			for (i=0; i<yearlygoal.value.length; i++)
			{
				if (!((yearlygoal.value.charAt(i) >= 0) && (yearlygoal.value.charAt(i)<=9 )))
				{
					alert("A numeric value is required for yearly fundraising goal.");
					return false;
				}
			}
	}
	return true
}
function errorcheckParent(myform) 
{
	with (myform) 
	{
		if (parent_first.value.length < 2)
		{
			alert("Parent first name is a required field.");
			return false;
		} 
		if (parent_last.value.length < 2)
		{
			alert("Parent last name is a required field.");
			return false;
		} 
		if (parent_email.value.length < 3)
		{
			alert("Parent email is a required field.");
			return false;
		}				
		else
		{
			atpos = parent_email.value.indexOf("@");
			dotpos = parent_email.value.lastIndexOf(".");
			lastpos = parent_email.value.length-1;
			if (atpos<1 || dotpos-atpos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
			{
				alert("The parent E-Mail address you entered does not appear to be valid.");
				return false;
			}
		}
		if (parent_password.value.length < 2)
		{
			alert("parent password is a required field.");
			return false;
		} 	
		if (parent_password.value != parent_confirm.value)
		{
			alert("parent password and password confirmation do not match.");
			return false;
		}
	}
	return true;
}
function errorcheckStudent(myform) 
{
	with (myform) 
	{
		if (student_first.value.length < 2)
		{
			alert("student first name is a required field.");
			return false;
		} 
		if (student_last.value.length < 2)
		{
			alert("student last name is a required field.");
			return false;
		} 
		if (student_email.value.length < 3)
		{
			alert("student email is a required field.");
			return false;
		}				
		else
		{
			atpos = student_email.value.indexOf("@");
			dotpos = student_email.value.lastIndexOf(".");
			lastpos = student_email.value.length-1;
			if (atpos<1 || dotpos-atpos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
			{
				alert("The student E-Mail address you entered does not appear to be valid.");
				return false;
			}
		}
		if (student_password.value.length < 2)
		{
			alert("student password is a required field.");
			return false;
		} 	
		if (student_password.value != student_confirm.value)
		{
			alert("student password and password confirmation do not match.");
			return false;
		}

	}
	return true;
}
//-->

