function vote(refid,sez,typevote,httphost){
	$.post('http://'+httphost+'/'+'ajax.vote.php',{r:refid,s:sez,t:typevote}, function(data){
		if(data.result=='ok'){
			$('#boxnrok'+sez+refid).html(data.numvotingok);
			$('#boxnrno'+sez+refid).html(data.numvotingno);
			if(data.voted=='ok'){
				$('#boxvoteok'+sez+refid).html('<a class="activeok">OK</a>');
				$('#boxvoteno'+sez+refid).html('<a class="disabled">NO</a>');
			}
			if(data.voted=='no'){
				$('#boxvoteok'+sez+refid).html('<a class="disabled">OK</a>');
				$('#boxvoteno'+sez+refid).html('<a class="activeno">NO</a>');
			}
		}else{
			alert('hai già votato');
		}
	},'json'
	);
}
