var rubrique_courant = '';
var compteur;
var compteurtxt;
var chemin = '../';
var pageOK = false;

function rollon(rubrique) {
  if (pageOK) {
    lockmenu();
    if (rubrique != rubrique_courant) {
      if (rubrique_courant != '') effaceroll();
      rubrique_courant = rubrique;
      document.getElementById('menu'+rubrique).style.visibility = 'visible';
    }
  }
}

function effaceroll() {
  if (pageOK) {
    var rb = rubrique_courant;
    if (!rb) return;
    document.getElementById('menu'+rb).style.visibility = 'hidden';
    rubrique_courant = '';
  }
}

function rolloff(niveau) {
  compteur = setTimeout("effaceroll()",1000);
}

function lockmenu() {
  clearTimeout(compteur);
}

function rollOnUnite(unite){
  Unite = document.getElementById(unite);
  Zoom = document.getElementById('zoom_'+unite);
  Unite.style.backgroundColor = '#ffffff';
  Unite.style.color = '#000000';
  Zoom.style.display = 'block';
}

function rollOffUnite(unite){
  Unite = document.getElementById(unite);
  Zoom = document.getElementById('zoom_'+unite);
  Unite.style.backgroundColor = '#37eafb';
  Unite.style.color = '#ffffff';
  Zoom.style.display = 'none';
}

function leFlash(fichier,largeur,hauteur) {
  var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
  + 'width="'+largeur+'" height="'+hauteur+'" '
  + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
  + '<param name="movie" value="'+fichier+'" /><param name="quality" value="high" />'
  + '<embed src="'+fichier+'" quality="high" '
  + 'width="'+largeur+'" height="'+hauteur+'" name="viewerPDF" '
  + 'play="true"'
  + 'loop="false"'
  + 'quality="high"'
  + 'allowScriptAccess="sameDomain"'
  + 'type="application/x-shockwave-flash"'
  + 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
  + '<\/embed>'
  + '<\/object>';
  document.write(oeTags);   // intégrer le clip Flash
}

function maintxton() {
  clearTimeout(compteurtxt);
  if (document.getElementById('mainrolltxt')) {
    document.getElementById('mainrolltxt').style.display='block';
  }
}

function maintxtoff() {
  compteurtxt = setTimeout("effacemaintxt()",1000);
}

function effacemaintxt() {
  if (document.getElementById('mainrolltxt')) {
    document.getElementById('mainrolltxt').style.display='none';
  }
}

