function showMenu(etat,menu) { 
  if ( etat=='1' ) {
    
    if ( document.getElementById('actif') ) {
      document.getElementById('actif').style.backgroundImage="url(./images/mgauche.png)";
      document.getElementById('actif').style.backgroundPosition="0% -33px";
      
    }

    if ( document.getElementById(menu) ) {
      document.getElementById(menu).style.backgroundImage="url(./images/mdroite.png)";
      document.getElementById(menu).style.backgroundPosition="100% -33px";
      document.getElementById(menu).style.color="#ffffff";

    }
  }
}

function hideMenu(etat,menu) {
  if ( etat=='1' ) {
    
    if ( document.getElementById('actif') ) {
      document.getElementById('actif').style.backgroundImage="url(./images/mgauche.png)";
      document.getElementById('actif').style.backgroundPosition="0% 0px";
    }

    if ( document.getElementById(menu) ) {
      document.getElementById(menu).style.backgroundImage="url(./images/mdroite.png)";
      document.getElementById(menu).style.backgroundPosition="100% 0px";
      document.getElementById(menu).style.color="#633a11";

    }
  }
}


function largeur_fenetre()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

function hauteur_fenetre()
{
 if (window.innerHeight) return window.innerHeight  ;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}


function reconstruction()
{
 if (largeur != largeur_fenetre() || hauteur != hauteur_fenetre())
 window.history.go(0);
}

/*initialiser la surveillance de Netscape*/
if(!window.largeur && window.innerWidth)
  {
   window.onresize = reconstruction;
   largeur = largeur_fenetre();
   hauteur = hauteur_fenetre();
  }
  

function Agrandissement(){
window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}

//if (navigator.userAgent.indexOf("Firefox")!=-1)
//Agrandissement();

function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rev") == "lien_externe") 
     anchor.target = "_blank"; 
 } 
} 
