
var xmlHttp;

function getVote(int)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 
var url="http://www.sitarah.net/includes/poll_vote.php?"; 
params = "id=" + int + "&vote=" + getSel(); 
params = params+"&sid="+Math.random(); 
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true); 
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.send(params);
 }

function getSel(){
chosen = 0;
if (document.poll){
len = document.poll.vote.length;
for (i = 0; i <len; i++) {
	if (document.poll.vote[i].checked) {
	chosen = document.poll.vote[i].value;
	}
}
}
return chosen;
}
