MENU_AUCUN     = 0; MENU_PROD      = 1; MENU_DOC       = 2; MENU_ETUDE     = 3; MENU_FAQ       = 4; MENU_SAVOIR    = 5; MENU_GLOSSAIRE = 6; MENU_PROD_CLIMASOL   = 7; MENU_PROD_CAPTERRE   = 8; MENU_SAVOIR_CLIMASOL = 9; MENU_SAVOIR_CAPTERRE = 10;  ROLL_OFF  = 0; ROLL_ON   = 1; ROLL_LOCK = 3;  // modify stuff here topmen=54;  leftmen=0; // and only here :)  largeur=166; marge=24;  soumarge=24;  var nboptions=6; var dejaclick=false;  ns4 = (document.layers)? true:false; ie4 = (document.all)? true:false; ver4 = (ns4||ie4);  function reDo() {   window.location.reload(); }  window.onresize = reDo;  /************************************************************** Menu vertical animé 2 niveaux avec des images et du texte ref: men_vert_2niv_anim_img&txt v2.0  (c) Copyright Janvier 2000   Auteur : Jérôme Boudringhin - http://www.reperage.net          jebou@caramail.com  Vous pouvez utiliser ou modifier ce script librement sous réserve de laisser le copyright visible ***************************************************************/  // dénomination des options nom_opt=new Array('<img name="b1" src="../images/menus/menu_prod_off.gif"      width="166" height="23" border="0"><br><img name="fil1" src="../images/menus/filet_off.gif" width="166" height="1" border="0">', 		  '<img name="b2" src="../images/menus/menu_doc_off.gif"       width="166" height="23" border="0"><br><img name="fil2" src="../images/menus/filet_off.gif" width="166" height="1" border="0">', 		  '<img name="b3" src="../images/menus/menu_etude_off.gif"     width="166" height="23" border="0"><br><img name="fil3" src="../images/menus/filet_off.gif" width="166" height="1" border="0">', 		  '<img name="b4" src="../images/menus/menu_faq_off.gif"       width="166" height="23" border="0"><br><img name="fil4" src="../images/menus/filet_off.gif" width="166" height="1" border="0">', 		  '<img name="b5" src="../images/menus/menu_savoir_off.gif"    width="166" height="23" border="0"><br><img name="fil5" src="../images/menus/filet_off.gif" width="166" height="1" border="0">', 		  '<img name="b6" src="../images/menus/menu_glossaire_off.gif" width="166" height="23" border="0"><br><img name="fil6" src="../images/menus/filet_off.gif" width="166" height="1" border="0">'); 		   // liens associés aux options de niveau 1 link_opt=new Array('#prod',                    '../part/documentation.php3',                    '../part/etude.php3',                    '../part/faq.php3',                    '#savoir',                    '../part/glossaire.php3');  // pour premier niveau des menus: 'name' puis debut de liens image - le script rajoute '_on.gif' et '_off.gif' roll_opt=new Array(['b1;../images/menus/menu_prod'],                    ['b2;../images/menus/menu_doc'],                    ['b3;../images/menus/menu_etude'],                    ['b4;../images/menus/menu_faq'],                    ['b5;../images/menus/menu_savoir'],                    ['b6;../images/menus/menu_glossaire'])  //nombre de sous-options [niveau 2] pour chaque option du niveau 1 (dans l'ordre) : nbsouopt= new Array (2,0,0,0,2,0);  //dénomination des sous-options et urls attachées //remplacer les # par les urls de vos liens.  nom_souopt=new Array(['<img name="b7" src="../images/menus/menu_climasol_off.gif" width="166" height="23" border="0"><img name="fil7" src="../images/menus/filet_off.gif" width="166" height="1" border="0">;../part/index.php3', 		      '<img name="b8" src="../images/menus/menu_capterre_off.gif" width="166" height="23" border="0"><img name="fil8" src="../images/menus/filet_off.gif" width="166" height="1" border="0">;../part/prod_capterre.php3'], 		     [''], 		     [''], 		     [''], 		     ['<img name="b9" src="../images/menus/menu_climasol_off.gif" width="166" height="23" border="0"><img name="fil9" src="../images/menus/filet_off.gif" width="166" height="1" border="0">;../part/savoir_climasol.php3', 		      '<img name="b10" src="../images/menus/menu_capterre_off.gif" width="166" height="23" border="0"><img name="fil10" src="../images/menus/filet_off.gif" width="166" height="1" border="0">;../part/savoir_capterre.php3'], 		     ['']);  // pour sous-menus: name puis debut de liens image - le script rajoute '_on.gif' et '_off.gif' roll_soupt=new Array(['b7;../images/menus/menu_climasol','b8;../images/menus/menu_capterre'],                      [''],                      [''],                      [''],                      ['b9;../images/menus/menu_climasol','b10;../images/menus/menu_capterre'],                      ['']);  //----------------------------------------------------------------------------------------------------  var last=111; nbsouopt[last]=0; var ecart; var valeur; max=0; var clipox;   function ouvre() {   if (max<=ecart)   {     for(i=0; i<=nboptions-1; i++)     {       if (i>valeur)       {          var topfin=topmen+(marge*i)+max;         what=eval('opt'+i);         what.couche.top=topfin;        }     }     clipox=marge+max;     what=eval('opt'+valeur);     what.clip(0,largeur,clipox,0);     max+=soumarge;     setTimeout ('ouvre()',30);   }   else   {     max=0;     dejaclick=false;   } }  function referme() {   if (nbsouopt[last]!=0 && max<=ecart)   {     for(i=0; i<=nboptions-1; i++)     {       if (i>last)       {          var topfin=(topmen+(marge*i)+ecart-max)+1;         what=eval('opt'+i);         what.couche.top=topfin;       }     }     what=eval('opt'+last);      what.clip(0,largeur,clipox,0);     clipox-=soumarge;     max+=soumarge;     setTimeout('referme()',30);   }   else   {     max=0;     if(nbsouopt[valeur]!=0 && valeur!=last)     {       ecart=nbsouopt[valeur]*soumarge;       ouvre();       last=valeur;     }     else     {       last=111;       dejaclick=false;     }   } }  function active(num) {   if (dejaclick==false)   {     dejaclick=true;     valeur=num;     referme();   } }  function MakeCouche(nom) {   if (ie4)   {     this.couche=eval(nom+'.style');   }   else if (ns4)   {     this.couche=eval('document.'+nom);   }   this.name=nom;   this.clip=MakeClip;   this.ecrire=Ecrire; }  function Ecrire(what) {   if (ie4)   {     obj=eval(this.name);     obj.innerHTML=what;   }   else if (ns4)   {     this.couche.document.open();     this.couche.document.write(what);     this.couche.document.close();   } }  function MakeClip(h,d,b,g) {   if (ie4)   {     this.couche.clip= 'rect('+h+'px '+d+'px '+b+'px '+g+' px)';   }   else if (ns4)   {     this.couche.clip.top=h;     this.couche.clip.right=d;     this.couche.clip.bottom=b;     this.couche.clip.left=g;   } }  function init_layers() {   opt0=new MakeCouche('option0');   opt1=new MakeCouche('option1');   opt2=new MakeCouche('option2');   opt3=new MakeCouche('option3');   opt4=new MakeCouche('option4');   opt5=new MakeCouche('option5');   for(i=0; i<=nboptions-1; i++)   {     newtop=1+(topmen+marge*i);     what=eval('opt'+i);     what.clip(0,largeur,marge,0);     what.couche.left=leftmen;     what.couche.top=newtop;   } }  /*****************************************************************************************************************/ /*           copyright 1999 Jerome Boudringhin -- jebou@caramail.com -- source : www.reperage.net                */ /*****************************************************************************************************************/  // //  ultra groovy fancy rollover by Mathieu N. Richardoz / LE STUDIO //  var locked  = 0; var locked2 = 0;  function FancyRoll(imgNum, rollState) {   if ((imgNum!=locked)&&(imgNum!=locked2))   {     var suffix = new Array('_off.gif','_on.gif');        var rollSrc=new Array( '../images/menus/menu_prod',                            '../images/menus/menu_doc',                            '../images/menus/menu_etude',                            '../images/menus/menu_faq',                            '../images/menus/menu_savoir',                            '../images/menus/menu_glossaire',                            '../images/menus/menu_climasol',                            '../images/menus/menu_capterre',                            '../images/menus/menu_climasol',                            '../images/menus/menu_capterre' );      var activeBits = new Array();        activeBits[0]  = [];     activeBits[1]  = ['b1','fil0','fil1'];      // gestion du 1er sous-menu ouvert/fermé     if (locked!=1)     { activeBits[2]  = ['b2','fil1','fil2']; }     else     { activeBits[2]  = ['b2','fil2','fil2']; }      activeBits[3]  = ['b3','fil2','fil3'];      if (locked!=5)     { activeBits[4]  = ['b4','fil3','fil4']; }     else     { activeBits[4]  = ['b4','fil4','fil4']; }        activeBits[5]  = ['b5','fil4','fil5'];        // gestion du 2eme sous-menu ouvert/fermé     if (locked!=5)     { activeBits[6]  = ['b6','fil5','fil6']; }     else     { activeBits[6]  = ['b6','fil6','fil6']; }        activeBits[7]  = ['b7','fil7','fil7'];     activeBits[8]  = ['b8','fil7','fil7'];     activeBits[9] = ['b9','fil9','fil9'];     activeBits[10] = ['b10','fil9','fil9'];      eval('document.'+activeBits[imgNum][0]+'.src = rollSrc[(imgNum-1)] + suffix[(rollState%2)];');     eval('document.'+activeBits[imgNum][1]+'.src = \'../images/menus/filet\' + suffix[(rollState%2)];');     eval('document.'+activeBits[imgNum][2]+'.src = \'../images/menus/filet\' + suffix[(rollState%2)];');        if (rollState==ROLL_LOCK)     {        if (locked)       {         if (imgNum<=nboptions)         {           eval('document.'+activeBits[locked][0]+'.src = rollSrc[(locked-1)] + \'_off.gif\';');           eval('document.'+activeBits[locked][1]+'.src = \'../images/menus/filet_off.gif\';');           eval('document.'+activeBits[locked][2]+'.src = \'../images/menus/filet_off.gif\';');           locked  = imgNum;           locked2 = 0;         }         else         {           locked2 = imgNum;         }       }       else       {         locked = imgNum;       }       }   } }  function InitLock(num) {   if (num<=nboptions)  // on locke sur une option de niveau 1   {     FancyRoll(num, ROLL_LOCK);   }   else                 // on locke sur une option de niveau 2   {     if ((num==7)||(num==8))    // sous-menu 1     {       FancyRoll(1,ROLL_LOCK);       active(0);       FancyRoll(num,ROLL_LOCK);     }     if ((num==9)||(num==10))  // sous-menu 2     {       FancyRoll(5,ROLL_LOCK);       active(4);       FancyRoll(num,ROLL_LOCK);     }   } } 