originalSubmitFunction = document.forms.SB_WizardFormBlockModule.submit;
document.forms.SB_WizardFormBlockModule.submit = FeedbackPropertiesSubmit;

function FeedbackPropertiesSubmit() {
	if (FeedbackPropertiesValidate()) {
		document.forms.SB_WizardFormBlockModule.submit = originalSubmitFunction;
		document.forms.SB_WizardFormBlockModule.submit();
	}	
}

function FeedbackPropertiesValidate() {
	if (SB_Validator.isEmpty(document.getElementById('caption').value)) {
		alert(SbGetLocaleByKey('FIELD-CAPTION-IS-EMPTY'));
		return false;
	}
	if (SB_Validator.isEmpty(document.getElementById('address').value)) {
		alert(SbGetLocaleByKey('FIELD-ADDRESS-IS-EMPTY'));
		return false;
	}
	if (SB_Validator.isEmpty(document.getElementById('subject').value)) {
		alert(SbGetLocaleByKey('FIELD-SUBJECT-IS-EMPTY'));
		return false;
	}
	if (!SB_Validator.isEmail(document.getElementById('address').value)) {
		alert(SbGetLocaleByKey('FIELD-EMAIL-NOT-VALID'));
		return false;
	}
	return true;
}
