var xmlHttp


// Ajax to calculate rating
var storeVar="";

function ajaxLogOut()
{
	//alert("HI");
	//alert("userId="+userID);
	//alert("videoID="+videoID);
	//alert("rateValue="+rateValue);
   
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 

var url="ajax_logout.php";
//url=url+"?userID="+userID+"&eBookID="+eBookID+"&rateValue="+rateValue;
//url=url+"&sid="+Math.random();
//alert("url="+url);

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 



function stateChanged() 
{ 
//alert(xmlHttp.responseText);
if (xmlHttp.readyState==4)
{
	//alert(xmlHttp.responseText);
document.getElementById("rating_label_msg").innerHTML=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;
}