// JavaScript Document

function CheckForm(theform)
{
	var test=true;
	
	if (theform.parent_first_name.value.length <=1)
	{
		alert("Please enter your first name.");
		theform.parent_first_name.focus();
		return false;
	}

	if (theform.parent_last_name.value.length <=1)
	{
		alert("Please enter your last name.");
		theform.parent_last_name.focus();
		return false;
	}

	if (theform.parent_address.value.length <=2)
	{
		alert("Please enter your address.");
		theform.parent_address.focus();
		return false;
	}

	if (theform.parent_city.value.length <=2)
	{
		alert("Please enter your city.");
		theform.parent_city.focus();
		return false;
	}
	
	if (theform.parent_postal.value.length <=2)
	{
		alert("Please enter your postal code.");
		theform.parent_postal.focus();
		return false;
	}
	

	if (theform.parent_home_phone.value.length <=7)
	{
		alert("Please enter your home phone number (please include area code). i.e. 604-555-1234");
		theform.parent_home_phone.focus();
		return false;
	}

	if (theform.parent_best_time_to_contact.value.length <=2)
	{
		alert("Please enter the best time for us to contact you. i.e. evenings, mornings");
		theform.parent_best_time_to_contact.focus();
		return false;
	}
	
	if (theform.parent_email.value.length < 4)
	{
		alert("Please enter your email address.");
		theform.parent_email.focus();
		return false;
	}
	
	if (theform.parent_email.value.indexOf("@") == -1)
	{
		alert("Please enter a valid email address.")
	 	theform.parent_email.focus();
		return false;
	}

	
	if (theform.child_care_required_medical[theform.childcarerequiredmedical.selectedIndex].value == 1)
	{
		if (theform.child_care_required_medical_description.value.length <=2)
		{
			alert("Please enter the medical reason for child care.");
			theform.child_care_required_medical_description.focus();
			return false;
		}
	
	}
	if (theform.household_is_english[theform.householdisenglish.selectedIndex].value == 0)
	{
		if (theform.household_other_languages.value.length <=2)
		{
			alert("Please list the languages spoken in your home.");
			theform.household_other_languages.focus();
			return false;
		}
	
	}

	
	if (theform.terms.checked == 0)
	{
		alert("Please check that you have read the Terms and Conditions.");
		theform.terms.focus();
		return false;
	}
	
	
	return true;
}
