/**
 * @author Germano
 */
function votar(){
	ret = false;
    $$('input[id^=VotoOpcaoId]').each(function(ele){
        if (ele.checked) {
			ret= true;
		}		
    })
	if(ret==false){
		alert("Escolha uma opção.");
	}else{
		$('EnqueteVotarForm').set('send',{
			method:'post',
			noCache:'true',
			encoding: 'ISO-8859-1',
			onRequest: function(){
				$('EnqueteVotarForm').empty();
				styles = new Hash({
					"margin":"30px 0 45px 30px"
				});				
				buildLoad('EnqueteVotarForm',styles);
			},
			onSuccess:function(resp){				
				$('EnqueteVotarForm').set('html',resp);
			}
		});
		$('EnqueteVotarForm').send();
	}			
}
function visualizar(id){	
	var myHTMLRequest = new Request.HTML({
		url:$('EnqueteVotarForm').action+"/"+id,
		update:	'EnqueteVotarForm',
		onRequest: function(){
			$('EnqueteVotarForm').empty();
			styles = new Hash({
				"margin":"30px 0 45px 30px"
			});				
			buildLoad('EnqueteVotarForm',styles);
		}	
	}).get();
}
