var elementEnCours = null;

function display(key) {
   var displayBlock = document.getElementById("bloc_" + key);
   var currentDisplay = displayBlock.style.display;
   var displayed = (currentDisplay == "block");
   var newDisplay;
   if (displayed) {
      newDisplay="none";
   }
   else {
      newDisplay="block";
   }
   displayBlock.style.display= newDisplay;
  // document.getElementById("current_" + key).style.display=newCurrentValueDisplay;
}


function afficheOnglet(origineEvt) {
var destination = origineEvt.href;
var idx = destination.indexOf("#");
destination = destination.substring(idx+1);
var contenuElement = document.getElementById(destination);
if (contenuElement != elementEnCours) {
cacheOnglets(destination);
origineEvt.className = "RSC_Onglet_Selection";
contenuElement.style.display = "block";
}
}

function cacheOnglets(nomCourant) {
cacheOnglet("RSC_CONTENU_TEXTE", nomCourant);
cacheOnglet("RSC_CONTENU_FICHES", nomCourant);
}

function cacheOnglet(nomOnglet, nomCourant) {
	if (nomOnglet != nomCourant) {
		document.getElementById(nomOnglet).style.display="none";
		document.getElementById(nomOnglet + "_ONGLET").className = "RSC_Onglet";
	}
}


