function setRateFilm(film_id, rate)
	{
	if (film_id && rate)
		{
		req.onreadystatechange = function()
			{
			if (req.readyState == 4)
				{
				if (req.responseJS._return)
					{
					jQuery('#ratefilm'+film_id).html(req.responseJS._return);
					jQuery('#ratebutton_l'+film_id).html('<img src="http://img.properm.ru/dez/spacer.gif" width="24" alt="">');					
					jQuery('#ratebutton_r'+film_id).html('<img src="http://img.properm.ru/dez/spacer.gif" width="24" alt="">');					
					jQuery('#film_rate_type'+film_id).addClass(req.responseJS.style)
					}
				}
			}
	
		req.open('POST', '/mod/afisha/ajax_rate_film.php', true);
		req.send({film_id: film_id, rate: rate});		
		}
	}
	
function setRatePlace(place_id, rate)
	{
	if (place_id && rate)
		{
		req.onreadystatechange = function()
			{
			if (req.readyState == 4)
				{
				if (req.responseJS._return)
					{
					jQuery('#rateplace'+place_id).html(req.responseJS._return);
					jQuery('#ratebutton_l'+place_id).html('<img src="http://img.properm.ru/dez/spacer.gif" width="24" alt="">');					
					jQuery('#ratebutton_r'+place_id).html('<img src="http://img.properm.ru/dez/spacer.gif" width="24" alt="">');					
					jQuery('#place_rate_type'+place_id).addClass(req.responseJS.style)
					}
				}
			}
	
		req.open('POST', '/mod/afisha/ajax_rate_place.php', true);
		req.send({place_id: place_id, rate: rate});		
		}
	}	
	
function setRateEvent(event_id, rate)
	{
	if (event_id && rate)
		{
		req.onreadystatechange = function()
			{
			if (req.readyState == 4)
				{
				if (req.responseJS._return)
					{
					jQuery('#rateevent'+event_id).html(req.responseJS._return);
					jQuery('#ratebutton_l'+event_id).html('<img src="http://img.properm.ru/dez/spacer.gif" width="24" alt="">');					
					jQuery('#ratebutton_r'+event_id).html('<img src="http://img.properm.ru/dez/spacer.gif" width="24" alt="">');					
					jQuery('#event_rate_type'+event_id).addClass(req.responseJS.style)
					}
				}
			}
	
		req.open('POST', '/mod/afisha/ajax_rate_event.php', true);
		req.send({event_id: event_id, rate: rate});		
		}
	}	