[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 var vis = new Array(); 2 3 function MM_findObj(n, d) { //v4.0 4 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 5 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 6 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 7 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 8 if(!x && document.getElementById) x=document.getElementById(n); return x; 9 } 10 11 function swap_couche(couche, rtl) { 12 triangle = MM_findObj('triangle' + couche); 13 if (!(layer = MM_findObj('Layer' + couche))) return; 14 if (vis[couche] == 'hide'){ 15 if (triangle) triangle.src = 'img_pack/deplierbas' + rtl + '.gif'; 16 layer.style.display = 'block'; 17 vis[couche] = 'show'; 18 } else { 19 if (triangle) triangle.src = 'img_pack/deplierhaut' + rtl + '.gif'; 20 layer.style.display = 'none'; 21 vis[couche] = 'hide'; 22 } 23 } 24 function ouvrir_couche(couche, rtl) { 25 triangle = MM_findObj('triangle' + couche); 26 if (!(layer = MM_findObj('Layer' + couche))) return; 27 if (triangle) triangle.src = 'img_pack/deplierbas' + rtl + '.gif'; 28 layer.style.display = 'block'; 29 vis[couche] = 'show'; 30 } 31 function fermer_couche(couche, rtl) { 32 triangle = MM_findObj('triangle' + couche); 33 if (!(layer = MM_findObj('Layer' + couche))) return; 34 if (triangle) triangle.src = 'img_pack/deplierhaut' + rtl + '.gif'; 35 layer.style.display = 'none'; 36 vis[couche] = 'hide'; 37 } 38 function manipuler_couches(action,rtl,first,last) { 39 if (action=='ouvrir') { 40 for (j=first; j<=last; j+=1) { 41 ouvrir_couche(j,rtl); 42 } 43 } else { 44 for (j=first; j<=last; j+=1) { 45 fermer_couche(j,rtl); 46 } 47 } 48 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |