// do a few XML http validation checks for fields that
// didn't work with validators before doing a postback
// (This triggers the DOM validators and does some custom
// validation on the Terms of Agreement checkbox)
function handleSignupPageValidation(agreementCheckboxID, agreementCheckboxValidatorID) {

	areErrorsPresent = false;

	// trigger all of the DOM validators on the page
	Page_ClientValidate();

	// are there errors from the validators on the page?		
	if (!Page_IsValid)
	{
		// record that at least on validation error is present
		areErrorsPresent = true;
	}

	// check to make sure that the terms of agreement checkbox has been checked
	var agreementCheckbox = document.getElementById(agreementCheckboxID);
	if (agreementCheckbox.checked != true) {
		
		// if not checked make the validator error for this field visible
		var agreementCheckboxValidator = document.getElementById(agreementCheckboxValidatorID);
		agreementCheckboxValidator.style.visibility = "visible";
		agreementCheckboxValidator.style.display = "block";

		// record that at least on validation error is present
		areErrorsPresent = true;
	}

	// find out if there are errors in the nearest city box
	// if (!isNearestCityValid()) { areErrorsPresent = true; } 
	
	// does one or more validation errors exist on the page
	if (areErrorsPresent) {
	
		var feedbackBarPanel = document.getElementById(feedbackBarPanelID);
		feedbackBarPanel.style.visibility = "visible";
		feedbackBarPanel.style.display = "block";
		
		var oErrorList = document.getElementById(errorListID);
		oErrorList.innerHTML = "You have 1 or more errors in the fields below.<br /><br /> Please read the specific error messages underneath the fields to see what went wrong.";
	
		// return false so that the form doesn't get submitted
		return false;
	}
	// are there no validation errors on the page?
	else {
	
		// return true so that the form gets submitted
		return true;
	}

}