window.addEvent('domready', function() {
	var status = {
		'true': 'open',
		'false': 'close'
	};
	
	//-vertical

	var slideEquipe = new Fx.Slide('equipe');
	slideEquipe.hide();
	
	$('toggle_equipe').addEvent('toto', function(e){
		e.stop();
		slideEquipe.toggle();
		//RecusrsiveCheck(slideExpertise,slideClients);
	});

	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	slideEquipe.addEvent('complete', function() {
		$('vertical_status').set('html', status[slideEquipe.open]);
	});
	
	var slideExpertise = new Fx.Slide('expertise');
	slideExpertise.hide();
	
	$('toggle_expertise').addEvent('toto', function(e){
		e.stop();
		slideExpertise.toggle();
		//RecusrsiveCheck(slideEquipe,slideClients);
	});

	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	slideExpertise.addEvent('complete', function() {
		$('vertical_status').set('html', status[slideExpertise.open]);
	});
	
	var slideClients = new Fx.Slide('clients');
	slideClients.hide();
	
	$('toggle_clients').addEvent('toto', function(e){
		e.stop();
		slideClients.toggle();
		//RecusrsiveCheck(slideEquipe,slideExpertise);
	});

	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	slideClients.addEvent('complete', function() {
		$('vertical_status').set('html', status[slideClients.open]);
	});
	
	//////////////////////////////////////////////////////////////////////////////
	
	var slideArchives = new Fx.Slide('sarchives');
	slideArchives.hide();
	
	$('toggle_archives').addEvent('click', function(e){
		e.stop();
		slideArchives.toggle();
	});

	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	slideArchives.addEvent('complete', function() {
		$('vertical_status').set('html', status[slideArchives.open]);
	});
	
	
	var slideemploi = new Fx.Slide('emploi');
	slideemploi.hide();
	
	$('toggle_emploi').addEvent('click', function(e){
		e.stop();
		slideemploi.toggle();
	});

	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	slideemploi.addEvent('complete', function() {
		$('vertical_status').set('html', status[slideemploi.open]);
	});
	
	
	var slideliensici = new Fx.Slide('lienici');
	slideliensici.hide();
	
	$('toggle_lienici').addEvent('click', function(e){
		e.stop();
		slideliensici.toggle();
	});

	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	slideliensici.addEvent('complete', function() {
		$('vertical_status').set('html', status[slideliensici.open]);
	});
	
	var slideliensailleurs = new Fx.Slide('lienailleurs');
	slideliensailleurs.hide();
	
	$('toggle_lienailleurs').addEvent('click', function(e){
		e.stop();
		slideliensailleurs.toggle();
	});

	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	slideliensailleurs.addEvent('complete', function() {
		$('vertical_status').set('html', status[slideliensailleurs.open]);
	});

});

function activeMenu(arg){
	
	if(arg == 16) {
	var Slide = new Fx.Slide('equipe', {mode: 'vertical'}).slideIn();
	}
	if(arg == 19) {
		var Slide = new Fx.Slide('expertise', {mode: 'vertical'}).slideIn();
	
	}
	if(arg == 21) {
		var Slide = new Fx.Slide('clients', {mode: 'vertical'}).slideIn();
	
	}

	};
/*
function RecusrsiveCheck(arg,arg2){
	arg.slideOut();
	arg2.slideOut();
};
*/