/* auteur: patrick premartin */
/* Date de création: 08/08/03 */
/* gestion de l'affichage des cadres du menu */
var temporisation = 0;

function afficher_sous_menu (mnu_a_afficher) {
  sous_menu = element_par_id (mnu_a_afficher);
  if (sous_menu.style.visibility == 'hidden') {
    for (i = 1; i < 7; i++) {
      smnu = element_par_id ('mnu_'+i);
      if (smnu.style.visibility != 'hidden') {
        smnu.style.visibility = 'hidden';
      }
    }
    sous_menu.style.visibility = 'visible';
  }
  if (temporisation == 0) {
    setTimeout ('cacher_tout()', 1000);
  }
  temporisation = 5;
}

function maintenir_menu_ouvert () {
  temporisation = 5;
}

function cacher_tout () {
  if (temporisation > 0) {
    temporisation--;
    setTimeout ('cacher_tout()', 1000);
  } else {
    for (i = 1; i < 7; i++) {
      smnu = element_par_id ('mnu_'+i);
      if (smnu.style.visibility != 'hidden') {
        smnu.style.visibility = 'hidden';
      }
    }
  }
}

function sous_menu_selectionner (cellule) {
  if (ie) {
    cellule.style.fontStyle='italic';
  } else {
    cellule.style.borderStyle='inset';
  }
}

function sous_menu_deselectionner (cellule) {
  if (ie) {
    cellule.style.fontStyle='normal';
  } else {
    cellule.style.borderStyle='none';
  }
}
