 function getXMLHTTPRequest() {
var req
try {
  req= new XMLHttpRequest();
} catch(err1) {
  try {
  req = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (err2) {
    try {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (err3) {
      req = false;
    }
  }
}
return req;
}
var http= getXMLHTTPRequest();
function getvotepost(postid,sesid)
{
var url = "wp-content/themes/default/getaddvote.php?postid="+postid+"&sesid="+sesid;
   myRand = parseInt(Math.random()*999999999999999);
  var modurl = url;
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse;
  http.send(null);
	
	}

  function useHttpResponse()
{
	if(http.readyState==4){
	if(http.status==200){
	var timeValue=http.responseText;
	document.getElementById('response').innerHTML=timeValue;
	}
	}
	else{
	document.getElementById('response').innerHTML="<p style='vertical-align:middle;'><center><img src='wp-content/themes/default/images/indicator.gif' align='middle' /></center></p>";
	
	}
}

 

