var nav="";
 if (navigator.appName == 'Netscape') 
   nav="N";
  else //donc avec IE4 
   nav="M";
var menu; 
var pas =5;
var barActif=0;
var barDesactif=-85;


function animehb()// animer 
{
 if (parseInt(menu.top) < posActif) 
    {
    menu.top = parseInt(menu.top) + pas;
    setTimeout('animehb()', 1);
    } 
}

function animebh()// animer 
{
 if (parseInt(menu.top) > posDesactif) 
    {
    menu.top = parseInt(menu.top) - pas;
    setTimeout('animebh()', 1);
    } 
}

function init_pop(n)
{
  for (var i=1;i<6;i++ 
if (nav=="M") document.all['m'+i].style.top=posDesactif;
  else  document.layers['m'+i].top=posDesactif;
 
}

function pop(n)
{
 if (nav=="M") menu=document.all['m'+n].style;
  else  menu=document.layers['m'+n];
 if ((parseInt(menu.top) > posDesactif) && ( parseInt(menu.top)<=posActif))
   animebh();
 if (parseInt(menu.top) == posDesactif)
   init_pop(n);
   animehb();
}

function animegd()// animer barre gauche à droite
{
 if (parseInt(menu.left) < barActif) 
    {
    menu.left = parseInt(menu.left) + pas;
    setTimeout('animegd()', 1);
    } 
}

function animedg()//animer barre droite à gauche
{
 if (parseInt(menu.left) > barDesactif) 
    {
    menu.left = parseInt(menu.left) - pas;
    setTimeout('animedg()', 1);
    } 
}
function bar()
{
 if (nav=="M") menu=document.all['barre'].style;
  else  menu=document.layers['barre'];
 if ((parseInt(menu.left) > barDesactif) && ( parseInt(menu.left)<=barActif))
   animedg();
 if (parseInt(menu.left) == barDesactif)
   animegd();
}