// JavaScript Document

function validateBuddy(theForm)
{
	if (theForm.first_name.value.length == 0)
	{
		alert("Please enter a value in the 'First Name' field."); 
		theForm.first_name.focus();
		return false; 
	}
	
	if (theForm.last_name.value.length == 0)
	{
		alert("Please enter a value in the 'Last Name' field."); 
		theForm.last_name.focus();
		return false; 
	}
	
	if (theForm.age.value.length == 0)
	{
		alert("Please enter a value in the 'Age' field."); 
		theForm.age.focus();
		return false; 
	}

	if (theForm.address.value.length == 0)
	{
		alert("Please enter a value in the 'Address' field."); 
		theForm.address.focus();
		return false; 
	}
	
	if (theForm.city.value.length == 0)
	{
		alert("Please enter a value in the 'City' field."); 
		theForm.city.focus();
		return false; 
	}
	
	if (theForm.state.selectedIndex < 2)
	{
		alert("Please select from the 'State' field."); 
		theForm.state.focus();
		return false; 
	}
	
	if (theForm.zip_code.value.length < 5)
	{
		alert("Please enter a valid zip code in the 'Zip Code' field."); 
		theForm.zip_code.focus();
		return false; 
	}
	
	if (theForm.phone.value.length < 7)
	{
		alert("Please enter a valid phone number in the 'Phone' field."); 
		theForm.phone.focus();
		return false; 
	}
	
	if (theForm.school.value.length == 0)
	{
		alert("Please enter a value in the 'School' field."); 
		theForm.school.focus();
		return false; 
	}
	
	if (theForm.email.value.length == 0 || theForm.email.value.indexOf("@") == -1 || theForm.email.value.indexOf(".") == -1)
	{
		alert("Please enter a valid email address in the 'E-mail Address' field."); 
		theForm.email.focus();
		return false; 
	}

	if (theForm.park.selectedIndex < 2)
	{
		alert("Please select from the 'League Location' field."); 
		theForm.park.focus();
		return false; 
	}

}

