	//the accordion main function, call to the effect object
	function init(){
	

		var section = document.getElementsByClassName('section');
		var sub_section = document.getElementsByClassName('sub_section'); 
		var toggles = document.getElementsByClassName('closed');
		var toggles2 = document.getElementsByClassName('sub_closed');
		
		// accordion closer: no accordion is open in the beginning
		// must be before mooAccordion
		  toggles.each(function(tog, i) {
			tog.onclick = function() {
			  if (tog.className == 'open') {
				myAccordion.clearAndToggle(section[i], i);
				tog.className = 'closed';
				return;
			  }
			  // reset them all then set clicked
			  toggles.each(function(rtog, ri) {toggles[ri].className = 'closed';});
			  tog.className='open';
			};
		  });
		
		toggles2.each(function(tog, i) {
			tog.onclick = function() {
			  if (tog.className == 'sub_open') {
				myAccordion2.clearAndToggle(sub_section[i], i);
				tog.className = 'sub_closed';
				return;
			  }
			  // reset them all then set clicked
			  toggles2.each(function(rtog, ri) {toggles2[ri].className = 'sub_closed';});
			  tog.className='sub_open';
			};
		  });


		//accordion effect
		var myAccordion = new fx.Accordion(toggles, section, {opacity: false, duration: 400}); //outer
		var myAccordion2 = new fx.Accordion(toggles2, sub_section, {opacity: false, duration: 400}); //inner
		

		
		// check hash to see which section is open
		
		function checkHash(){
			var found = false;
			toggles.each(function(h3, i){
				if (window.location.href.indexOf(h3.title) > 0) {
					myAccordion.showThisHideOpen(section[i]);
					toggles[i].className = 'open'; // set the right class for the open section
					found = true;
				}
			});
			
			return found;
		}
		
		function checkHash2(){
			var found = false;
			toggles2.each(function(h4, i){
				if (window.location.href.indexOf(h4.title) > 0) {
					myAccordion2.showThisHideOpen(sub_section[i]);
					toggles2[i].className = 'sub_open'; // set the right class for the open section
					found = true;
				}
			});
			return found;

		}
		
		if (!checkHash()) myAccordion.showThisHideOpen(section[99]); // section 99 is set to be opened 
		if (!checkHash2()) myAccordion2.showThisHideOpen2(sub_section[99]); //if none else is specified (n'existe pas)

	}
	// the slideshow
	// Initialise the effects
	var showhide;
	window.onload = function() {
	 showhide = new fx.Combo('myelementid', {height: false, opacity: true, duration: 300});
	//Load some data when the page load
	//but give general Javascript some time load
	setTimeout("loadit('data.html');", 300);
	}
	//This is the function that you call with the php var (in this case)
	//or any var or url (change the script called in ajax var
	function loadit(fragment_url, loadingID) {
		//Toggle off the layer 
		showhide.toggle();
		//Let some time for the effect to take place 
		//and then call the ajax/httprequest function
		//NOTE HERE that the setTimeout(string, int) need to be 100ms more than in your fx.Combo
		var element = document.getElementById('loading'); 

		setTimeout("getajax(\""+fragment_url+"\");", 500);
	}
	//Ajax httpRequest
	function getajax(fragment_url){
		new ajax(fragment_url, { method: 'get', update: $('load'),
			onComplete: function() {
				//Oncomplete toggle back the layer and voila
				trythis();
			}
		});
	}
	//Let some time for the effect to take place again!!! Short time 100 or so
	function trythis() {
		setTimeout("showhide.toggle();", 200);
		var element = document.getElementById('loading');

	}

	//fifteen minutes

	var min=15;
	var sec=0;
	var zmin;
	var zsec;

	function fifeteen_minutes() {

	sec--;
	if (sec<0) {min--; sec=59;}
	if (min<10 && min>=0) {zmin="0"+min;}
	else {zmin=min;}
	if (sec<10 && sec>=0) {zsec="0"+sec;}
	else {zsec=sec;}

	document.getElementById("still").innerHTML=zmin+':'+zsec;

	if (min==0 && sec==0) {self.close();}
	else {setTimeout("fifeteen_minutes()",1000);}
	}

	//accueil

	function Montrer(Tableau) {
	document.getElementById(Tableau).style.display = 'block';
	}

	function Cacher(Tableau) {
	document.getElementById(Tableau).style.display = 'none';
	}

	function NouvelleFenetre() {
	var Page = "+-.html";
	window.open(Page, "iamnodesigner");
	}

	//pas de problèmes

	function NoError()
	{
	return true;
	}
	window.onerror=NoError;