var xmlhttp=false;
function getVote(int)
{ 
try
 {
   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); /* for IE < 5 */
 }
 catch (e)
 {
    try
    {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (E)
    {
    xmlhttp = false;
    }
 }
 
 /* mozilla & opera */
 if (!xmlhttp && typeof XMLHttpRequest!='undefined')
 {
   xmlhttp = new XMLHttpRequest();
 }
 
 var url="poll_vote.php";
 url=url+"?vote="+int;
 url=url+"&sid="+Math.random();

 xmlhttp.open("GET",url,true);
 xmlhttp.onreadystatechange=function()
 {
    if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
    {
		document.getElementById("poll").innerHTML=xmlhttp.responseText;
    }
 }
 xmlhttp.send(null); /* are sending null because we dont have any data to post */
}





//var xmlhttp;
//
//function getVote(int)
//{ 
//xmlhttp=GetXmlHttpObject();
//if (xmlhttp==null)
//  {
//  alert ("Browser does not support HTTP Request");
//  return;
//  }
//var url="poll_vote.php";
//url=url+"?vote="+int;
//url=url+"&sid="+Math.random();
//xmlhttp.onreadystatechange=stateChanged;
//xmlhttp.open("GET",url,true);
//xmlhttp.send(null); 
//
//}
//
//function stateChanged()
//{
//  if (xmlhttp.readyState==4)
//  {
//  document.getElementById("poll").innerHTML=xmlHttp.responseText;
//
//  }
//}
//
//function GetXmlHttpObject()
//{
//var objXMLHttp=null;
//if (window.XMLHttpRequest)
//  {
//  objXMLHttp=new XMLHttpRequest();
//  }
//else if (window.ActiveXObject)
//  {
//  objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
//  }
//return objXMLHttp;
//} 