window.addEvent('domready', function() {

var a=2;
var k=2000;

if (!window.demo_path) window.demo_path = '';
	var demo_path = window.demo_path;
	// --
	//We can use one Request object many times.
	var req1 = new Request.HTML({url:demo_path+'infoRapides/data0.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('horizontal_slide').set('text', '');
			//Inject the new DOM elements into the results div.
			$('horizontal_slide').adopt(html);
	 
			myHorizontalSlide.slideIn();
		 
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('horizontal_slide').set('text', 'pb de serveur.');
			myHorizontalSlide.slideIn();
		}
	});
	var req2 = new Request.HTML({url:demo_path+'infoRapides/data1.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('horizontal_slide').set('text', '');
			//Inject the new DOM elements into the results div.
			$('horizontal_slide').adopt(html);
	 
			myHorizontalSlide.slideIn();
		 
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('horizontal_slide').set('text', 'pb de serveur.');
			myHorizontalSlide.slideIn();
		}
	});
	
	
 


var status = {
		'true': 'open',
		'false': 'close'
	};
	
	//-vertical



	//--horizontal
	var myHorizontalSlide = new Fx.Slide('horizontal_slide', {mode: 'horizontal'});

	 

	myHorizontalSlide.addEvent('complete', function() {
		if(a==1){
				req1.send();
				a=2;
				
		}
				if(a==3){
				req2.send();
				a=0;
			 
		}
	});
	
	// When Horizontal Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	var t;





setInterval(function() {a++;myHorizontalSlide.slideOut();}, 10500);




}); 
 
