
	function show_help_hint(id, obj_id)
	{
		var obj = document.getElementById(obj_id);
		var hint_style = document.getElementById(id).style;
		var pos = getXY(obj);
		var pos_x_fix = -5;
		var pos_y_fix = -30;
		if (IE) {				
			pos_x_fix = -5;
			pos_y_fix = -35;
		}
		hint_style.left = (pos.x - pos_x_fix) + "px";
		hint_style.top = (pos.y - obj.offsetHeight - pos_y_fix) + "px";
		hint_style.display = "block";
	}
	
	var Rating = 
	{
		
		actionsPath : "/common/actions/rating.php",

		Rate : function(object_kind, object_id, rate) 
		{
			var vars = "action=rate&objectkind="+ object_kind +"&objectid=" + object_id + "&rate=" + rate;
			try {
				sendXmlHttpRequest("post", this.actionsPath, vars, function(jsHttp) 
				{
					eval("var json = " + jsHttp.responseText);
					if (json.Message.Type == "info") 
					{
						if (json.Result == true) 
						{
							document.getElementById("rating_votescount").innerHTML = json.VotesCount;
							document.getElementById("rating_value").innerHTML = json.Avg;
							//document.getElementById("rating_controls").innerHTML = "<br>";
							document.getElementById("rating_controls").style.display = "none";
						}
					} else {
						alert(json.Message.Type + ":\n" + json.Message.Text);
					}
				});
			} catch (e) {
				alert(e);
			}
		}
		
	}
