function validateForm(oElement) {
	var valid = HO.Validation;
	var baseClientID = 'BaseMaster_cphBody_';
	
	var formElements = new Array();
	formElements[0] = new valid.formElementsToValidate(baseClientID + 'txtEmailAddr', "You must enter an email address");
	formElements[1] = new valid.formElementsToValidate(baseClientID + 'txtUserName', "You must enter a User Name");
	formElements[2] = new valid.formElementsToValidate(baseClientID + 'txtPassword', "You must enter a Password");
	formElements[3] = new valid.formElementsToValidate(baseClientID + 'txtConfirmPassword', "You must confirm Password");

	var msg = valid.submitValidation(formElements);
	
	msg += valid.compareValidator(
				$(baseClientID + "txtPassword"),
				$(baseClientID + "txtPasswordConfirm"), 
				'Please verify Passwords are the same.')

	msg += valid.submitAddressValidation(
				$(baseClientID + 'txtAddress1'),
				$(baseClientID + 'txtAddress2'),
				$(baseClientID + 'txtCity'),
				$(baseClientID + 'ddlState'),
				$(baseClientID + 'txtPostalCode'))

	if (msg != "") {
		alert(msg);
		valid.setFocusFirstField();
		return false;
	} else {
		return true;
	}
}

/******************
add onLoad events
*******************/
Event.observe(window, 'load', function() {if (window.setFocus) window.setFocus();});

function setFocus() {
	if (document.forms.length > 0) {
		if ($("MainMaster_cphMain_txtFirstName") != null) {
			$("MainMaster_cphMain_txtFirstName").focus();
		}
	}
}

