function rateDrink(id, rating) {
	new Ajax.Request('/index.php?page=rating', {
			method: 'post',
			parameters: { id: id, rating: rating },
			onSuccess: function(transport) {
				var response = transport.responseText || 'Processing error.';
				$('rating_result').update(response);
			}
	});	
}

function showRating(rating) {
	var x;
	for(x=rating; x>=1; x--) {
		$('rate_'+x).src = "/images/star.png";
	}
	for(x=rating+1; x<=10; x++) {
		$('rate_'+x).src = "/images/nostar.png";
	}	
}