﻿function UpdateAtricleRate( data )
{
	var arr_data = data.split(":");
	if( arr_data[2] != "-1" )
	{
		var average_vote = Math.round( parseFloat(arr_data[0]) * 100 ) / 100;
		var votes = parseInt( arr_data[1] );
		var votes_bg_width = ( average_vote == 0 ? 0 : Math.floor(80 / 5 * average_vote) );
		document.getElementById("ar_show_value").title = "Arverage vote " + average_vote;
		document.getElementById("ar_show_fill").style.width = votes_bg_width + "px";
		document.getElementById("ar_show_info").innerHTML = "(" + votes + " vote" + ( votes > 1 ? "s" : "" ) + ")";
	}
}
