<!--
// This function ensures that a user has filled in all of the required fields.
// If they haven't, it returns an error in the form of an alert.
function checkStepOne() {
	var error_string = "";
	var excess_string = "";
	// Check the name field
	if(window.document.step_one.name.value == "") {
		error_string += "I need to know your name.\n\n";
		}
	// Check the address field
	if(window.document.step_one.address.value == "") {
		error_string += "I need to know your home address to ensure that you live within my service area.\n\n";
		}
	// Check the email field
	if(window.document.step_one.email.value == "") {
		error_string += "I need to know your e-mail address.\n\n";
		}
	// Check the phone field
	if(window.document.step_one.phone.value == "") {
		error_string += "I need to know your phone number.\n\n";
		}
	// Check the start field
	if(window.document.step_one.start.value == "") {
		error_string += "I need to know when you're leaving town so I know when to start pet sitting for you.\n\n";
		}
	// Check the end field
	if(window.document.step_one.end.value == "") {
		error_string += "I need to know when you're returning to town so I know when to stop pet sitting for you.\n\n";
		}
	// Check the dogs, cats, and other fields - This checks to make sure they aren't all empty
	if((window.document.step_one.dogs.value == "") && (window.document.step_one.cats.value == "") && (window.document.step_one.other.value == "")) {
		error_string += "I need to know how many of each type of animal you have.\n";
		}
	// Check the dogs, cats, and other fields - This checks to make sure they aren't all zeros
	if((window.document.step_one.dogs.value == "0") && (window.document.step_one.cats.value == "0") && (window.document.step_one.other.value == "0")) {
		error_string += "I need to know how many of each type of animal you have.\n";
		}
	// Check the dogs, cats, and other fields - This checks to make sure there are a reasonable number of animals
	if((window.document.step_one.dogs.value > 10) || (window.document.step_one.cats.value > 10) || (window.document.step_one.other.value > 10)) {
		excess_string += "You have indicated a large number of animals. Please contact me via telephone at 509.455.4339 to discuss your situation and needs.\n";
		}
	if((error_string == "") && (excess_string == "")) {
		return true;
		}
	else {
		if(excess_string != "") {
			alert(excess_string);
			return false;
			}
		else {
			error_string = "One or more required fields have been left blank!\n\n" + error_string;
			alert(error_string);
			return false;
			}
		}
	}
// -->
