function addreguservalidate() {
	
	theform = document.addreguser;
	
	theform.firstName.required = true;
	theform.firstName.requiredError = 'The First Name field must be filled in.';
	
	theform.lastName.required = true;
	theform.lastName.requiredError = 'The Last Name field must be filled in.';	
	
	theform.email.required = true;
	theform.email.requiredError = 'You must enter a valid email';
	theform.email.pattern = 'Email';	
	theform.email.patternError = 'Please make sure your email is valid!';
	
	theform.confirm_email.required = true;
	theform.confirm_email.requiredError = 'You must enter a valid confirmation email';
	theform.confirm_email.pattern = 'Email';	
	theform.confirm_email.patternError = 'Please make sure your confirmation email is valid!';
	
	if (theform.email.value != theform.confirm_email.value)	{
		alert ('Please make sure your email address and confirmaiton email address match.');
		return false;
	}
	
	theform.username.required = true;
	theform.username.requiredError = 'The Username field must be filled in.';
	
	theform.password.required = true;
	theform.password.requiredError = 'The Password field must be filled in.';
	/*
	theform.bizName.required = true;
	theform.bizName.requiredError = 'The Company Name field must be filled in.';
	
	theform.bizAddress1.required = true;
	theform.bizAddress1.requiredError = 'The Company Address field must be filled in.';	
	
	theform.bizCity.required = true;
	theform.bizCity.requiredError = 'The Company City field must be filled in.';
	
	theform.bizState.required = true;
	theform.bizState.requiredError = 'The Company State must be selected.';
	
	theform.bizZip.required = true;
	theform.bizZip.requiredError = 'The Company Zip Code field must be filled in.';	
	theform.bizZip.pattern = 'zipcode';	
	theform.bizZip.patternError = 'Please enter a Valid US Zip Code';	
	
	if (theform.bizPhone.value != ''){
	theform.bizPhone.required = true;
	theform.bizPhone.pattern = 'us phone number';
	theform.bizPhone.patternError = 'Please enter a valid phone number (xxx-xxx-xxxx)';
	}
	else {
	theform.bizPhone.required = false;
	theform.bizPhone.pattern = '';
	theform.bizPhone.patternError = '';
	}
	
	if (theform.bizFax.value != ''){
	theform.bizFax.required = true;
	theform.bizFax.pattern = 'us phone number';
	theform.bizFax.patternError = 'Please enter a valid fax number (xxx-xxx-xxxx)';
	}
	else {
	theform.bizFax.required = false;
	theform.bizFax.pattern = '';
	theform.bizFax.patternError = '';
	}	
	*/
	//theform.ReadingYear.required = true;
	//theform.ReadingYear.requiredError = 'A Year must be selected.';
	//theform.ReadingYear.disallowEmptyValue = true;
	//theform.ReadingYear.disallowEmptyValueError = 'A Year must be selected.';

//Here is where we call the getFormErrors function in the form_validation.js script to create the array

	var errors = getFormErrors(theform);
	if (errors.length > 0) {
		var errorMessage = 'The form was not submitted due to the following problem' + ((errors.length > 1) ? 's' : '') + ':\n\n';
		for (var errorIndex = 0; errorIndex < errors.length; errorIndex++) {
			errorMessage += '* ' + errors[errorIndex] + '\n';
		}
		errorMessage += '\nPlease fix ' + ((errors.length > 1) ? 'these' : 'this') + ' problem' + ((errors.length > 1) ? 's' : '') + ' and resubmit the form.';
		alert(errorMessage);
		return false;
	}
	

	/* submit the form once all validation is complete */
	theform.submit();
}


function editreguservalidate() {
	
	theform = document.editreguser;
	
	theform.firstName.required = true;
	theform.firstName.requiredError = 'The First Name field must be filled in.';
	
	theform.lastName.required = true;
	theform.lastName.requiredError = 'The Last Name field must be filled in.';	
	
	theform.email.required = true;
	theform.email.requiredError = 'You must enter a valid email';
	theform.email.pattern = 'Email';	
	theform.email.patternError = 'Please make sure your email is valid!';
	
	theform.username.required = true;
	theform.username.requiredError = 'The Username field must be filled in.';
	
	theform.password.required = true;
	theform.password.requiredError = 'The Password field must be filled in.';
	
	theform.bizName.required = true;
	theform.bizName.requiredError = 'The Company Name field must be filled in.';
	
	theform.bizAddress1.required = true;
	theform.bizAddress1.requiredError = 'The Company Address field must be filled in.';	
	
	theform.bizCity.required = true;
	theform.bizCity.requiredError = 'The Company City field must be filled in.';
	
	theform.bizState.required = true;
	theform.bizState.requiredError = 'The Company State must be selected.';
	
	theform.bizZip.required = true;
	theform.bizZip.requiredError = 'The Company Zip Code field must be filled in.';	
	theform.bizZip.pattern = 'zipcode';	
	theform.bizZip.patternError = 'Please enter a Valid US Zip Code';	
	
	if (theform.bizPhone.value != ''){
	theform.bizPhone.required = true;
	theform.bizPhone.pattern = 'us phone number';
	theform.bizPhone.patternError = 'Please enter a valid phone number (xxx-xxx-xxxx)';
	}
	else {
	theform.bizPhone.required = false;
	theform.bizPhone.pattern = '';
	theform.bizPhone.patternError = '';
	}
	
	if (theform.bizFax.value != ''){
	theform.bizFax.required = true;
	theform.bizFax.pattern = 'us phone number';
	theform.bizFax.patternError = 'Please enter a valid fax number (xxx-xxx-xxxx)';
	}
	else {
	theform.bizFax.required = false;
	theform.bizFax.pattern = '';
	theform.bizFax.patternError = '';
	}	
	
	//theform.ReadingYear.required = true;
	//theform.ReadingYear.requiredError = 'A Year must be selected.';
	//theform.ReadingYear.disallowEmptyValue = true;
	//theform.ReadingYear.disallowEmptyValueError = 'A Year must be selected.';

//Here is where we call the getFormErrors function in the form_validation.js script to create the array

	var errors = getFormErrors(theform);
	if (errors.length > 0) {
		var errorMessage = 'The form was not submitted due to the following problem' + ((errors.length > 1) ? 's' : '') + ':\n\n';
		for (var errorIndex = 0; errorIndex < errors.length; errorIndex++) {
			errorMessage += '* ' + errors[errorIndex] + '\n';
		}
		errorMessage += '\nPlease fix ' + ((errors.length > 1) ? 'these' : 'this') + ' problem' + ((errors.length > 1) ? 's' : '') + ' and resubmit the form.';
		alert(errorMessage);
		return false;
	}
	

	/* submit the form once all validation is complete */
	theform.submit();
}