DOM= document.getElementById ;
IE4= document.all && !document.getElementById ;
var oldSousRub="";
var oldLienFocus = "";
function displayMenu(nomlayer,lien_focus,classe,classe_init) {
	if(lien_focus){lien_focus.blur();}
	if(oldSousRub==nomlayer){nomlayer="";}
	if (IE4) {
		if (oldSousRub!="") {document.all[oldSousRub].style.display="none";}
		oldSousRub = nomlayer;
		if (nomlayer!="") {document.all[nomlayer].style.display="block";}
	}
	if(DOM){
		if (oldSousRub!="") {
			document.getElementById(oldSousRub).style.display="none";
			if(oldLienFocus!=''){oldLienFocus.attributes['class'].nodeValue=oldClasse;}
			else{lien_focus.attributes['class'].nodeValue=classe;}
		}
		if (nomlayer!="") {
			document.getElementById(nomlayer).style.display="block";
			if(lien_focus){lien_focus.attributes['class'].nodeValue=classe_init;}
		}
		oldSousRub=nomlayer;
		oldLienFocus = lien_focus;
		oldClasse = classe;
	}
}

function popup(theURL,winName,features) { //v2.0
  fen=window.open(theURL,winName,features);
  fen.focus();
}
function clicMenu(id) { 
  if (DOM){ var lediv = document.getElementById(id);}
  if (IE4){ var lediv = document.all[id];}
  if (lediv.style.display == "none"){
    lediv.style.display = "";
  } else {
    lediv.style.display = "none";
  }   
}
function fermer_pop(){
	if(window.fen){
		fen.close();
	}else{
		return false;		
	}
}
function display_style(classe,elemt){
	elemt.attributes['class'].nodeValue=classe;//alert(classe);
}
function actu_select(cible,source) {
	for(i=cible.length-1;i>=0;i--){
 		cible.options[i]=null;
	}
	for(i=0;i<source.length;i++){
		cible.options[i] = new Option(source.options[i].text,source.options[i].value)
	}
}
function popCentre (pFichier, pNom, pLargeur, pHauteur, pFeature){
	var posX = (screen.width / 2) - (pLargeur / 2);
	var posY = (screen.height / 2) - (pHauteur / 2);
	if(pFeature!=''){pFeature=','+pFeature;}
	fen=window.open(pFichier,pNom,"width = " + pLargeur + ", height = " + pHauteur + ", left = " + posX + ", top = " + posY + pFeature);
	fen.focus();
}