function starClicked(element, info) {
  var url = '/index.php/rating/rate?id='+element.id+'&rating='+info.rated;
  // notice the use of a proxy to circumvent the Same Origin Policy.

  new Ajax.Request(url, {
    method: 'get',
    onSuccess: function(transport) {
      alert(transport.responseText);
    }
  });
}
