// By Marlon A. Griffith
// multiple validations
function verify(formInfo){
	// window.alert('Course 1 is ' + formInfo.course1.value);
	var course1 = formInfo.course1.value;
	var firstName = formInfo.firstName.value;
	var surName = formInfo.surName.value;
	var address = formInfo.address.value;
	var city = formInfo.city.value;
	var prov = formInfo.province.value;
	var country = formInfo.country.value;
	var postalCode = formInfo.postalCode.value;
	var hmPhone = formInfo.hmPhone.value;
	var readPol = formInfo.readPol.checked;

	if( !isEmpty( course1 ) && (course1 != "none") )
	{
		// keep going
	} else	{
		window.alert("You must select at least one course.");
		return false;
	}

	if( isEmpty( firstName ) )
	{
		window.alert("First name entry is missing.");
		return false;
	}

	if( isEmpty( surName ) )
	{
		window.alert("Last name entry is missing.");
		return false;
	}

	if( isEmpty( address ) )
	{
		window.alert("Your street address is missing.");
		return false;
	}

	if( isEmpty( city ) )
	{
		window.alert("Your city is missing.");
		return false;
	}

	if( isEmpty( prov ) )
	{
		window.alert("Your province or state is missing.");
		return false;
	}

	if( isEmpty( country ) )
	{
		window.alert("Your country is missing.");
		return false;
	}

	if( isEmpty( postalCode ) )
	{
		window.alert("Your postal code is missing.");
		return false;
	}

	if( !isCanPhoneNo( hmPhone ) )
	{
		window.alert("Your telephone is missing or incorrect.");
		return false;
	}

	if( readPol )
	{
		window.alert("Thank you! We will contact you for details soon.\n\n" +
		"Please don't forget to send your deposit to confirm your space in the course.");
		return true;
	}
	else
	{
		window.alert("You must read the Policies and Procedures\n" +
		"before registering for a course.");
		return false;
	}
}