function fDelete(){
	$$('.fDelete').each(function(el,index){
		el.addEvent('click', function(e){
			e = new Event(e);
			if( !confirm(el.title ? el.title : 'Etes vous sûr de vouloir supprimer cet élément ?')){
				e.stop();
			}
		});
	});
}
function del( Obj ) {
	var label = ( Obj.title ) ? Obj.title : 'Etes vous sûr de vouloir supprimer cet élément ?';
	return confirm( label );	
}

function popup( href, name, h, l ) {
	var hauteur = Math.round( ( screen.availHeight - h ) / 2 );
	var largeur = Math.round( ( screen.availWidth - l ) / 2 );
	var popup = window.open( href, name, 'toolbar=0,location=0,directories=0,status=0, scrollbars=1,resizable=1,menubar=0,top='+hauteur+',left='+largeur+',width='+l+',height='+h);
	popup.focus();
	return false;	
}

function initMenuHori(){
	if ($('menuhori'))
	new mooMenu($('menuhori'));
}
	
function initMenuVert(){
	if($('menu'))
		new jAccordion($('menu'), '.togglers', '.elements');
}

function fInitSlideshow(){
	var data = ['illustr-1.png','illustr-2.png','illustr-3.png','illustr-4.png'];
	if ($('my_slideshow'))
		 var myShow = new Slideshow('my_slideshow', data, {  duration: 1500, hu: 'images/illustr/header' }); 
		 // duration: [1500, 3000]
}

function fInit(){
	fDelete();
	initMenuVert();
	fInitSlideshow();
}

window.addEvent('domready', fInit);


