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

function VotingSubmit() {
	var isValid = votingAnswers.validate();
	if (isValid) {
		document.forms.SB_WizardFormBlockModule.submit = originalSubmitFunction;
		document.forms.SB_WizardFormBlockModule.submit();
	}
}

function votingTabPanelToggle(object, tabLabel) {	
	if (eval(object) != 'undefined') {
		eval(object+'.tooglePage(tabLabel.id);');
	}
	
	modalWindowAutoResize(parent.document.getElementById('blockModuleSettingsFrame'), 
		parent.document.getElementById('blockModuleSettings')
	);
}