function goPage(p,b){
	
	if(b == 1) 	{window.open(p);}
	else 		{window.location.href=''+p+'';}

}

function moveItemX(item,x,t){

	item.set('tween', {duration: t});
	item.tween('margin-left', x);
				
}

function newsStart() {
	
	if($('nbNews')) {
	
		var nbNews = $('nbNews').value;
	
		
	
	}

}

newsButton = 1;

function newsMove(i) {
	
	if(i != newsButton) {
	
		var step = (i*274)-274;
		
		moveItemX($('zoneNewsMove'),-step,500);
		
		$('newsButton'+i).className = 'newsPaginationOver';
		
		$('newsButton'+newsButton).className = 'newsPaginationOut';
		
		newsButton = i;
	
	}

}

function newsList() {
	
	$('mainCenterZone2').style.visibility = 'hidden';
	
	$('allNewsContainer'). style.display = 'inline';
	
	new Fx.Morph('newsListContainer', {duration: 0}).start({'opacity': 0});
	
	new Fx.Morph('allNewsContainer', {duration: 350}).start({'height': '550px'});
	
	new Request({
	url: 'news_ajax.php', 
	evalScripts: true,
	onComplete: function(response) {
		    
		$('newsListContainer').set('html', response);
		    
	}}).send();
	
	(function wait() {
	
		$('newsListContainer').style.display = 'inline';
		
		new Fx.Morph('ajaxLoader', {duration: 500}).start({'opacity': [1,0]});
	
	}).delay(700);
	
	(function wait() {
		
		new Fx.Morph('newsListContainer', {duration: 500}).start({'opacity': 1});
	
	}).delay(1200);

}

function closeList() {

	$('newsListContainer').empty();
	
	$('newsListContainer').style.display = 'none';
	
	new Fx.Morph('allNewsContainer', {duration: 350}).start({'height': '0px'});
	
	(function wait() {
	
		$('allNewsContainer').style.display = 'none';
		
		new Fx.Morph('ajaxLoader', {duration: 0}).start({'opacity': 1});
		
		$('mainCenterZone2').style.visibility = 'visible';
	
	}).delay(350);

}







