// Fonctions de mise en page avec lib Mootools


window.addEvent('domready', function() {

	

	if ($('intro_contenu_lien'))
	{

		
		var ancre_presente = window.location.href.test('#');
		var url = window.location.href;
		
		// recup de l'index a utiliser
		 var re = new RegExp('#');
		 var m = re.exec(url);
 
		var toggles = $$('.togglers');
		var content = $$('.elements');
		var item_aff = 0; 
 

		 if (m != null) 
		 {
			var longeur_chaine = url.length;
			 item_aff = parseInt(url.substring(m.index+1, m.index+2));

			 if (isNaN(item_aff))
			 {
				 item_aff = 1;
			 }
			 
		
		 }
		 else
		 {
			if (ancre_presente)
				item_aff = 1;				 
		 }
		 
		var AccordionObject = new Accordion(toggles, content, {show: item_aff} );
	}



});

