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 popupOrder( Obj ) {
	return popup( Obj.href, 'order', 600, 580 );
}
*/

function initMenu(){	
	var o = Cookie.get('menu') || -1;
	new simpleMenu('#menu li a.toggler', '#menu ul.element', {
	
		onActive: function(toggler, element){
			toggler.setStyle('color', '#A8B316');			
			var o;
			this.elements.each(function(el, i){
				if(el==element){ o = i; }
			}, this);
			Cookie.set('menu', o);
		},
		
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#fff');
		},
		
		show: o.toInt()
	});
}
window.addEvent('load', initMenu);

function popupOrder( Obj ) {
	return popup( Obj.href, 'order', 600, 580 );
}

function popupInvoice( Obj ) {
	return popup( Obj.href, 'invoice', 600, 580 );
}