var xmlHttp



function sendComment(text, rating, plays_id, name)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 


var url="send_comment.php"
url=url+"?text="+text
url=url+"&rating="+rating
url=url+"&plays_id="+plays_id
url=url+"&name="+name
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged_comment 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)


}

function stateChanged_comment() 
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("reviewsent").innerHTML=xmlHttp.responseText
 $("div#reviewsent").show("slow");
 } 
}

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;
}
