
//Event.observe(window, 'load', loadAccordions, false);
function preload() {
	heavyImage = new Image();
	heavyImage.src = "images/_interface/loader.gif";
}
window.onload = function() {
	preload();
}
function Loader() {
	document.getElementById('loader').innerHTML = '<img src="images/_interface/loader.gif" />';
}
function loadAccordions(num) {
	
	var topAccordion = new accordion('container-selector', {
		classNames : {
			toggle : 'accordion_toggle',
			toggleActive : 'accordion_toggle_active',
			content : 'accordion_content'
		},
		defaultSize : {
			width : 525
		},
		open_accordion : {
			value : num 
		},
		direction : 'vertical'
	});
	
}

function Slide_toogle(id_parent, id, open) {
	if(open == '0') {
		if(Element.visible(id)) { 
			new Effect.BlindUp(id , {duration:0.5} );
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_commentaire_off.jpg);'; 
		} 
		else {
			new Effect.BlindDown(id , {duration:0.5});
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_commentaire_on.jpg);'; 
		}
	}
	else if(open == "1") {
		new Effect.BlindDown(id , {duration:0.5});
		document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_commentaire_on.jpg);'; 
	}
}

function Slide_toogle_interface(id_parent, id, open) {
	if(open == '0') {
		if(Element.visible(id)) { 
			new Effect.BlindUp(id , {duration:0.5} );
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_sinscrire_off.jpg);'; 
		} 
		else {
			new Effect.BlindDown(id , {duration:0.5});
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_sinscrire_on.jpg);'; 
		}
	}
	else if(open == "1") {
		new Effect.BlindDown(id , {duration:0.5});
		document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_sinscrire_on.jpg);'; 
	}
}

function Slide_toogle_connexion(id_parent, id, open) {
	if(open == '0') {
		if(Element.visible(id)) { 
			new Effect.BlindUp(id , {duration:0.5} );
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_connexion_off.jpg);'; 
		} 
		else {
			new Effect.BlindDown(id , {duration:0.5});
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_connexion_on.jpg);'; 
		}
	}
	else if(open == "1") {
		new Effect.BlindDown(id , {duration:0.5});
		document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_connexion_on.jpg);'; 
	}
}

function Slide_toogle_upload(id_parent, id, open) {
	if(open == '0') {
		if(Element.visible(id)) { 
			new Effect.BlindUp(id , {duration:0.5} );
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_upload_off.jpg);'; 
		} 
		else {
			new Effect.BlindDown(id , {duration:0.5});
			document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_upload_on.jpg);'; 
		}
	}
	else if(open == "1") {
		new Effect.BlindDown(id , {duration:0.5});
		document.getElementById(id_parent).style.cssText='background:url(images/_interface/slide_upload_on.jpg);'; 
	}
}
	

