function ajaxRatings(strURL,a,id,spn) 
{
    var xmlHttpReq = false;
    var self = this;
    if (window.XMLHttpRequest) 
	{
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
	{
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() 
	{
        if (self.xmlHttpReq.readyState == 4)
		{
            updateRatings(self.xmlHttpReq.responseText,spn);
			alert("Thank you for your rating!");
        }
	 }
    self.xmlHttpReq.send(queryRatings(a,id));
}
function queryRatings(a,id)
{
	var qstr;
	//var rats = document.getElementById(a).value;
	qstr ='ratings=' +escape(id)+"|"+escape(a);
	return qstr;

}
function updateRatings(str,spn)
{
	document.getElementById(spn).innerHTML = str;
}

