function hoverPromo(id)
{
	var top = document.getElementById('top_'+id).style;
	var bottom = document.getElementById('bottom_'+id).style;
	if(top.paddingTop=='3px' || top.paddingTop=='')
	{
		top.paddingTop='0px';
		bottom.marginBottom='0px';
		bottom.marginTop='3px';
	}
	else
	{
		top.paddingTop='3px';
		bottom.marginBottom='3px';
		bottom.marginTop='0px';
	}
}

function swap_fr_banner(to_who,stop)
{
	var front = document.getElementById('ba_fr_fr_img');
	front.src = front.src.replace('_'+current+'_','_'+to_who+'_');
	front.parentNode.href = front.parentNode.href.replace('/counter_front_banner/'+current,'/counter_front_banner/'+to_who)
	current = to_who;
	if(stop)
		loop = false;
}

function start_loop()
{
	loop=true;
  clearTimeout(timer);
	timer = setTimeout('loop_fr_banner()',wait);
}

function stop_loop()
{
	loop=false;
  clearTimeout(timer);
}

function loop_fr_banner()
{
	if(!loop)
		return;

	next = false;
	for(var i =0; i<fronts.length; i++)
	{
		if(fronts[i] == current && i+1<fronts.length)
		{
			next = fronts[i+1];
			break;
		}
	}

	if(!next)
		next = fronts[0];

	swap_fr_banner(next,false);
	start_loop()
}
