function popup(page,largeur,hauteur){
	var top  = (screen.height-hauteur)/2;
	var left = (screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur);
}

sfHover = function() {
var sfEls = $("menu").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
	sfEls[i].onmouseover=function() {
		this.className+=" sfhover";
	}
	sfEls[i].onmouseout=function() {
		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
	}
}
}
if (window.attachEvent && $("menu")) window.attachEvent("onload", sfHover);

/* DOUBLE LISTE */

function TransfertListe(origine, destination){	
	if(origine.options.selectedIndex<0) return false;
	for(i=destination.length-1;i>=0;i--) if (destination.options[i].value == origine.options[origine.options.selectedIndex].value){alert('Déjà présent.'); return false;}
	var move = new Option(origine.options[origine.options.selectedIndex].text, origine.options[origine.options.selectedIndex].value);
	destination.options[destination.length]=move;
	origine.options[origine.options.selectedIndex]=null;
}

function CheckAll(name, form){
	var liste = document.forms[form].liste2;
	for (i=0;i<liste.length;i++){liste.options[i].selected = true;}
	document.forms[form].liste2.name = name + "[]";
}

function loadAccordions() {
	var Accordion = new accordion('menu', {
		classNames : {
			toggle       : 'section',
			toggleActive : 'section_active',
			content      : 'rubriques'
		},
		direction : 'vertical'
		//,onEvent : 'mouseover'
	});
	//Accordion.activate($$('#menu .section')[0]);
}	

Event.observe(window, 'load', loadAccordions, false);
