var flag_reward = 0;
var show_el_param = '';
var show_el_t_param = '';
var counter_popup = 0;

function show_from_center(el_t,el, x_start, x_end, y_start, y_end, width_end, height_end, delay){
	if ( flag_reward == 0 ) {
		flag_reward = 1;
		show_el_param = el;
		show_el_t_param = el_t;
				
		$(el_t).css({
			"height":2+"em",
			"left":"50%",
			width:2+'em'
		});
		
		counter_popup++;
		if(!delay)
			delay = 300;


		// $(el).css({
		// 	width:x+"px",
		// 	'margin-left':'-'+x/2+'px'
		// });
		
		if (!$.browser.msie) {
			/* негативно повлияло на прозрачность, пришлось удалить12:18 30.06.2008 */
			/*|| ($.browser.msie && $.browser.version >= 7)*/
			$(el).css({
				'opacity':'0.01',
				'display':'block'
			});
			
			y = $(el).height();
			//x = $(el).width();
			$(el).css({'opacity':'1.0'});
			$(el).hide();
		}else{
			y = $(el).height();
			$(el).hide();
		}
		var y_em = $(el_t).height()/2;
		var y_el_offset = 5 * y_em;

		$(el_t).css({
			"width": 2+"px",
			"top": y_start+"px",
			"height": 2+"px",
			'border': '0px solid red',
			left: x_start
		});
		
		$(el_t).show();
		
		$(el_t).animate({ 
			width: width_end + "px",
			height: height_end + "px",
			top: y_end + "px",
			'left': x_end + 'px'
		}, delay);

		setTimeout("show_from_center_param();",delay + 60);
	}
};

function show_from_center_param(){
	$(show_el_param).show();
	$(show_el_t_param).hide();
	flag_reward = 0;
	
};
