function pollClass() {
	var host;
	return {
		$ : function() {
			host = this;
			return this;
		},
		validate : function(emptyOption) {
			if ($("input[name='polloption']:checked").val() == '') {
				$('#label_poll').update(emptyOption);
			} else {
				genericPrototype(host.urlSavePollData, 'pollReloadCbk', 'post', $('#pollform').serialize());
			}
		},
		urlSendData : null,
		urlSavePollData : null
	}.$();
}


function pollReloadCbk(transport, textStatus) {
	if (textStatus == 'success') {
		response = $.evalJSON(transport);
		if (response.error==1) {
			errorMessageForm(response.msg,'label_poll');
			$('#pollreload').html(response.content);
		} else if(response.error==3){
			errorMessageForm(response.msg,'label_poll');
		}else{
			$('#pollreload').html(response.content);
		}
	} 
}