function do_rating(var_story_id, var_user_id, var_nb_stars, color)
{
 if (var_user_id == -1)
 {
   //alert("Vous devez etre logge pour pouvoir voter!");
   Modalbox.show("cat.php?id=5&redir=1", {title: "You must log in to vote", width: 500});
   return;
 }

/*
var url = '/proxy?url=' + encodeURIComponent('http://www.google.com/search?q=Prototype');
// notice the use of a proxy to circumvent the Same Origin Policy.

new Ajax.Request(url, {
  method: 'get',
  onSuccess: function(transport) {
    var notice = $('notice');
    if (transport.responseText.match(/href="http:\/\/prototypejs.org/))
      notice.update('Yeah! You are in the Top 10!').setStyle({ background: '#dfd' });
    else
      notice.update('Damn! You are beyond #10...').setStyle({ background: '#fdd' });
  }
});
*/
  new Ajax.Request('includes/scripts/ajax_do_rating.php?story_id='+var_story_id+'&user_id='+var_user_id+'&nb_stars='+var_nb_stars+'&color='+color,
  {
    method:'get',
    onSuccess: function(transport){
      var response = transport.responseText || "no response text";
//      alert("Success! \n\n" + response);
      var_stars_div = "star_rating_div_"+var_story_id;
      $(var_stars_div).innerHTML = response;
    },
    onFailure: function(){ alert('Something went wrong...') }
  });
}