var news_counter=3;

function next_news(numb){
	if(numb==3){
		next_ind = 1;
	}
	else{
		next_ind = numb+1;
	}
	new Effect.Parallel([new Effect.Move('news_'+numb, {sync: true, y: -120, mode: 'absolute'}), new Effect.Opacity('news_'+numb, {sync: true, from: 1, to: 0}) ], {duration: 1});
	document.getElementById('news_'+next_ind).style.top="120px";
	new Effect.Parallel([new Effect.Move('news_'+next_ind, {sync: true, y: 0, mode: 'absolute'}), new Effect.Opacity('news_'+next_ind, {sync: true, from: 0, to: 1}) ], {duration: 1});
	
	if(news_counter==3){
		news_counter = 1;
	}
	else{
		news_counter++;
	}
	
	return false;
}

var new_products_counter=3;
var nb_new_products=0;

function next_new_product(numb){
	if(numb==nb_new_products){
		next_ind = 1;
	}
	else{
		next_ind = numb+1;
	}
	new Effect.Parallel([new Effect.Move('new_product_'+numb, {sync: true, y: -120, mode: 'absolute'}), new Effect.Opacity('new_product_'+numb, {sync: true, from: 1, to: 0}) ], {duration: 1});
	document.getElementById('new_product_'+next_ind).style.top="120px";
	new Effect.Parallel([new Effect.Move('new_product_'+next_ind, {sync: true, y: 0, mode: 'absolute'}), new Effect.Opacity('new_product_'+next_ind, {sync: true, from: 0, to: 1}) ], {duration: 1});
	
	if(new_products_counter==nb_new_products){
		new_products_counter = 1;
	}
	else{
		new_products_counter++;
	}
	
	return false;
}
