  
  function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  /*
  window.alert( 'Width = ' + myWidth );
  window.alert( 'Height = ' + myHeight );
  */
  return Array(myWidth,myHeight);
}
  function resizeImg(){
    tab=alertSize();
    //alert(tab)
    //calcul de la nouvelle taille de l'image
    tab[0]=(tab[0]<902)?902:tab[0];
    /*
    heightmax=(document.getElementById('blockcentral')==null)?620:1000;
    alert(document.getElementById('content').clientHeight);
    */
    heightmax=document.getElementById('content').clientHeight+40;
    if(tab[1]<heightmax){
      tab[1]=heightmax;
      coeff=tab[1]/hauteurimg;
    }else{
      coeff=tab[0]/largeurimg;
    }
    /*tab[0]=(tab[0]<902)?902:tab[0];*/
    coeff=tab[0]/largeurimg;
    if(hauteurimg*coeff>tab[1]){
      document.getElementById('imgfond').width=tab[0];
      document.getElementById('imgfond').height=(hauteurimg*coeff);
    }else{
      document.getElementById('imgfond').width=(largeurimg*coeff);
      document.getElementById('imgfond').height=tab[1];
    }
    document.getElementById('fond').style.width=tab[0]+"px";
    document.getElementById('fond').style.height=tab[1]+"px";
  }
  function startimg(){
    resizeImg();
    document.getElementById('fond').style.display="block";
  }
 
 	
 onload=startimg;

  onresize=resizeImg
  
  function precharge(uri){
    tmpimg=new Image();
    tmpimg.src=uri;
    return tmpimg;
  }
  //img fr
  pack_on=precharge('img/pack_on.gif');
  pack_off=precharge('img/pack.gif');
  sac_on=precharge('img/sac_on.gif');
  sac_off=precharge('img/sac.gif');
  voile_on=precharge('img/voile_on.gif');
  voile_off=precharge('img/voile.gif');
  wingsuit_on=precharge('img/wingsuit_on.gif');
  wingsuit_off=precharge('img/wingsuit.gif');
  accessoires_on=precharge('img/accessoires_on.gif');
  accessoires_off=precharge('img/accessoires.gif');
  base_on=precharge('img/base_on.gif');
  base_off=precharge('img/base.gif');
  
  //img en
   packen_on=precharge('img/packen_on.gif');
  packen_off=precharge('img/packen.gif');
  sacen_on=precharge('img/sacen_on.gif');
  sacen_off=precharge('img/sacen.gif');
  voileen_on=precharge('img/voileen_on.gif');
  voileen_off=precharge('img/voileen.gif');
  wingsuiten_on=precharge('img/wingsuiten_on.gif');
  wingsuiten_off=precharge('img/wingsuiten.gif');
  accessoiresen_on=precharge('img/accessoiresen_on.gif');
  accessoiresen_off=precharge('img/accessoiresen.gif');

  
  function roll(img,type){
    document.getElementById(img).src=eval(img+"_"+type).src
  }
  var lastindice=null;
  function openclosemenu(indice){
    document.getElementById('lien'+indice).className="open";
    document.getElementById('menu'+indice).style.display="block";
	
    if(lastindice!=null){
      document.getElementById('lien'+lastindice).className="";
      document.getElementById('menu'+lastindice).style.display="none";
    }
    lastindice=indice;
  }
