var xmlHttp
var qid

function vote_for_quote(quote_id, num)
{ 
	qid = quote_id;
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="vote_handler.php"
url=url+"?quote_id="+quote_id+"&num="+num
url=url+"&sid="+Math.random()
//alert(url);
//xmlHttp.onreadystatechange=stateChanged(quote_id)
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

//function stateChanged(quote_id) 
function stateChanged() 
{ 
//	alert(xmlHttp.readyState);
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
document.getElementById("Thanks_"+qid).innerHTML=xmlHttp.responseText 
// document.getElementById("Thanks_"+quote_id).value=xmlHttp.responseText 
// alert(xmlHttp.responseText);
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}