//User interactive Ratings functions
function updateUserContentRating(party_id, content_id, rating_num){
document.getElementById('fav_ratings'+content_id).innerHTML="<div style=\"width: 70px; height:11px; text-align: center; vertical-align: middle;\"><img src=\"http://attblueroom.com/global/assets/common/scanner.gif\" style=\"display:block; margin: auto; position: relative; top: 1px;\"></div>";
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
xmlHttp.onreadystatechange=function() { 
		updateUserContentRatingStateChanged(party_id, content_id);
    }
xmlHttp.open("POST","http://attblueroom.com/favorites/updateUserContentRating.php?party_id="+party_id+"&content_id="+content_id+"&rating_num="+rating_num,true);
xmlHttp.send(null);
}

function updateUserContentRatingStateChanged(party_id, content_id) { 
	if (xmlHttp.readyState==4){ 
		displayUserContentRating(party_id, content_id);
	}
}


function addUserContentRating(party_id, content_id, rating_num){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
xmlHttp.onreadystatechange=function() { 
		addUserContentRatingStateChanged(party_id, content_id);
	}
xmlHttp.open("POST","http://attblueroom.com/favorites/addUserContentRating.php?party_id="+party_id+"&content_id="+content_id+"&rating_num="+rating_num,true);
xmlHttp.send(null);
}

function addUserContentRatingStateChanged(party_id, content_id) { 
	if (xmlHttp.readyState==4){ 
		displayUserContentRating(party_id, content_id);
	}
}


function displayUserContentRating(party_id, content_id){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
xmlHttp.onreadystatechange=function() { 
		displayUserContentRatingStateChanged(content_id);
    }
xmlHttp.open("POST","http://attblueroom.com/favorites/displayUserContentRating.php?party_id="+party_id+"&content_id="+content_id,true);
xmlHttp.send(null);
}

function displayUserContentRatingStateChanged(content_id) { 
	if (xmlHttp.readyState==4){ 
		document.getElementById('fav_ratings'+content_id).innerHTML=xmlHttp.responseText;
	}
}