function rate(id, question_id)
{
	var value = document.getElementById("theRating").innerHTML;
	Element.show($("indicator"));
	new Ajax.Request("rating_server.php?action=setRating", {
		parameters: "id=" + id + "&value=" + value + "&question_id=" + question_id,
		onSuccess: function(resp) {
			var response = resp.responseText;
			//var msg = "Thank you for rating! This professional's ratings (out of the db) are: " + response;
			var msg = "<strong>Bedankt voor uw waardering!</strong>";
			Element.update($("confirm"), msg);
			Element.hide($("indicator"));
			Element.hide($("myRating"));
			Element.update($("avgRating"), response);
			new Effect.Highlight("avgRating");
		}
	});
}
