Subversion Repositories eFlore/Archives.herbiers

Rev

Rev 2 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 22
1
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
1
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
// +------------------------------------------------------------------------------------------------------+
2
// +------------------------------------------------------------------------------------------------------+
3
// | Javascript version 1.5                                                                               |
3
// | Javascript version 1.5                                                                               |
4
// +------------------------------------------------------------------------------------------------------+
4
// +------------------------------------------------------------------------------------------------------+
5
// | Copyright (C) Tela Botanica (accueil@tela-botanica.org), 2005.                                       |
5
// | Copyright (C) Tela Botanica (accueil@tela-botanica.org), 2005.                                       |
6
// +------------------------------------------------------------------------------------------------------+
6
// +------------------------------------------------------------------------------------------------------+
7
// | This file is part of Herbier.                                                                        |
7
// | This file is part of Herbier.                                                                        |
8
// |                                                                                                      |
8
// |                                                                                                      |
9
// | Foobar is free software; you can redistribute it and/or modify                                       |
9
// | Foobar is free software; you can redistribute it and/or modify                                       |
10
// | it under the terms of the GNU General Public License as published by                                 |
10
// | it under the terms of the GNU General Public License as published by                                 |
11
// | the Free Software Foundation; either version 2 of the License, or                                    |
11
// | the Free Software Foundation; either version 2 of the License, or                                    |
12
// | (at your option) any later version.                                                                  |
12
// | (at your option) any later version.                                                                  |
13
// |                                                                                                      |
13
// |                                                                                                      |
14
// | Foobar is distributed in the hope that it will be useful,                                            |
14
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
16
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | GNU General Public License for more details.                                                         |
17
// | GNU General Public License for more details.                                                         |
18
// |                                                                                                      |
18
// |                                                                                                      |
19
// | You should have received a copy of the GNU General Public License                                    |
19
// | You should have received a copy of the GNU General Public License                                    |
20
// | along with Foobar; if not, write to the Free Software                                                |
20
// | along with Foobar; if not, write to the Free Software                                                |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// +------------------------------------------------------------------------------------------------------+
22
// +------------------------------------------------------------------------------------------------------+
23
// CVS : $Id: hb_ouvrir_fermer.js,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
23
// CVS : $Id: hb_ouvrir_fermer.js,v 1.2 2007-08-27 15:56:50 jp_milcent Exp $
24
/**
24
/**
25
* Script ouvrir-fermer
25
* Script ouvrir-fermer
26
*
26
*
27
* These scripts were originally found on cooltype.com.
27
* These scripts were originally found on cooltype.com.
28
* Modified 01/01/1999 by Tobias Ratschiller for linuxapps.com
28
* Modified 01/01/1999 by Tobias Ratschiller for linuxapps.com
29
* Modified 7th June 2000 by Brian Birtles for Mozilla 5.0
29
* Modified 7th June 2000 by Brian Birtles for Mozilla 5.0
30
* compatibility for phpMyAdmin
30
* compatibility for phpMyAdmin
31
* Rewritten and put in a libray 2nd May 2001 by Loïc Chapeaux
31
* Rewritten and put in a libray 2nd May 2001 by Loïc Chapeaux
32
* Traduit en français et utilisé dans Tela-Botanica fin octobre 2000
32
* Traduit en français et utilisé dans Tela-Botanica fin octobre 2000
33
* par Alexandre Granier et Jean-Pascal Milcent.
33
* par Alexandre Granier et Jean-Pascal Milcent.
34
* Test réussi avec : (Test passed with:)
34
* Test réussi avec : (Test passed with:)
35
* - Mozilla 0.8.1, 0.9.0, 0.9.1, 0.9.2 for Windows (js enabled
35
* - Mozilla 0.8.1, 0.9.0, 0.9.1, 0.9.2 for Windows (js enabled
36
*    & disabled)
36
*    & disabled)
37
* - IE5, 5.01, 5.5 for Windows
37
* - IE5, 5.01, 5.5 for Windows
38
* - Netscape 4.75 for Windows
38
* - Netscape 4.75 for Windows
39
* Test échoué avec : ((crappy DOM implementations) with:)
39
* Test échoué avec : ((crappy DOM implementations) with:)
40
* - Opera 5.02 for windows: 'getElementsByTagName' is unsupported
40
* - Opera 5.02 for windows: 'getElementsByTagName' is unsupported
41
* - Opera 5.10 to 5.12 for windows, Opera 5+ for Linux: 'style.display' can't
41
* - Opera 5.10 to 5.12 for windows, Opera 5+ for Linux: 'style.display' can't
42
*   be changed
42
*   be changed
43
* - Konqueror 2+: 'style.display' can't be changed
43
* - Konqueror 2+: 'style.display' can't be changed
44
*
44
*
45
*@package Herbier
45
*@package Herbier
46
*@subpackage Javascripts
46
*@subpackage Javascripts
47
//Auteur original :
47
//Auteur original :
48
*@author        cooltype.com
48
*@author        cooltype.com
49
//Autres auteurs :
49
//Autres auteurs :
50
*@author        Tobias Ratschiller
50
*@author        Tobias Ratschiller
51
*@author        Brian Birtles
51
*@author        Brian Birtles
52
*@author        Loïc Chapeaux
52
*@author        Loïc Chapeaux
53
*@author        Alexandre Granier
53
*@author        Alexandre Granier
54
*@author        Jean-Pascal Milcent
54
*@author        Jean-Pascal Milcent
55
*@copyright     Tela-Botanica 2000-2005
55
*@copyright     Tela-Botanica 2000-2005
56
*@version       $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
56
*@version       $Revision: 1.2 $ $Date: 2007-08-27 15:56:50 $
57
// +------------------------------------------------------------------------------------------------------+
57
// +------------------------------------------------------------------------------------------------------+
58
*/
58
*/
59
 
59
 
60
// inclusion intempestive
60
// inclusion intempestive
61
/**
61
/**
62
 * Variables et test normalement présent dans le fichier html dans le head entre 
62
 * Variables et test normalement présent dans le fichier html dans le head entre 
63
 * des balises <script></script>
63
 * des balises <script></script>
64
 */
64
 */
65
var isDOM      = (typeof(document.getElementsByTagName) != 'undefined') ? 1 : 0;
65
var isDOM      = (typeof(document.getElementsByTagName) != 'undefined') ? 1 : 0;
66
var isIE4      = ((typeof(document.all) != 'undefined') && (parseInt(navigator.appVersion) >= 4)) ? 1 : 0;
66
var isIE4      = ((typeof(document.all) != 'undefined') && (parseInt(navigator.appVersion) >= 4)) ? 1 : 0;
67
var isNS4      = (typeof(document.layers) != 'undefined') ? 1 : 0;
67
var isNS4      = (typeof(document.layers) != 'undefined') ? 1 : 0;
68
var capable    = (isDOM || isIE4 || isNS4) ? 1 : 0;
68
var capable    = (isDOM || isIE4 || isNS4) ? 1 : 0;
69
// Uggly fix for Konqueror and Opera that are not fully DOM compliant
69
// Uggly fix for Konqueror and Opera that are not fully DOM compliant
70
// Implémentation de la variable 'capable' pour Konqueror et Opera qui 
70
// Implémentation de la variable 'capable' pour Konqueror et Opera qui 
71
// qui ne supporte pas complêtement DOM.
71
// qui ne supporte pas complêtement DOM.
72
if (capable && typeof(navigator.userAgent) != 'undefined') {
72
if (capable && typeof(navigator.userAgent) != 'undefined') {
73
    var browserName = ' ' + navigator.userAgent.toLowerCase();
73
    var browserName = ' ' + navigator.userAgent.toLowerCase();
74
    if (browserName.indexOf('opera') > 0 || browserName.indexOf('konqueror') > 0) {
74
    if (browserName.indexOf('opera') > 0 || browserName.indexOf('konqueror') > 0) {
75
        capable = 0;
75
        capable = 0;
76
    }
76
    }
77
}
77
}
78
var fontFamily = 'arial, geneva, sans-serif';
78
var fontFamily = 'arial, geneva, sans-serif';
79
var isServer   = true;
79
var isServer   = true;
80
var isExpanded   = false;
80
var isExpanded   = false;
81
var imgOpened    = new Image(9,9);
81
var imgOpened    = new Image(9,9);
82
imgOpened.src    = 'client/herbier/presentations/images/fermer.png';
82
imgOpened.src    = 'client/herbier/presentations/images/fermer.png';
83
var imgClosed    = new Image(9,9);
83
var imgClosed    = new Image(9,9);
84
imgClosed.src    = 'client/herbier/presentations/images/ouvrir.png';
84
imgClosed.src    = 'client/herbier/presentations/images/ouvrir.png';
-
 
85
 
-
 
86
/**
-
 
87
 * Pliage des donn?es au d?marrage.
-
 
88
 * (Collapses databases at startup)
-
 
89
 * 
-
 
90
 * @access  public
-
 
91
 */
-
 
92
function toutPlier()
-
 
93
{
-
 
94
  if (!capable || !isServer) {
-
 
95
    return;
-
 
96
  }
-
 
97
  if (isDOM) {
-
 
98
    var tempColl    = document.getElementsByTagName('div');
-
 
99
    var tempCollCnt = tempColl.length;
-
 
100
    for (var i = 0; i < tempCollCnt; i++) {
-
 
101
      if (tempColl[i].id == expandedDb)
-
 
102
        tempColl[i].style.display = 'inline';
-
 
103
      else if (tempColl[i].className == 'child')
-
 
104
        tempColl[i].style.display = 'none';
-
 
105
    }
-
 
106
  }
-
 
107
}
-
 
108
 
-
 
109
/**
-
 
110
 * D?pliage de toutes les donn?es.
-
 
111
 * 
-
 
112
 * @access  public
-
 
113
 */
-
 
114
function toutDeplier()
-
 
115
{
-
 
116
  if (!capable || !isServer) {
-
 
117
    return;
-
 
118
  }
-
 
119
  if (isDOM) {
-
 
120
    var tempColl    = document.getElementsByTagName('div');
-
 
121
    var tempCollCnt = tempColl.length;
-
 
122
    for (var i = 0; i < tempCollCnt; i++) {
-
 
123
      if (tempColl[i].id == expandedDb)
-
 
124
        tempColl[i].style.display = 'inline';
-
 
125
      else if (tempColl[i].className == 'child')
-
 
126
        tempColl[i].style.display = 'inline';
-
 
127
    }
-
 
128
    // Fin du cas DOM (end of the DOM case)
-
 
129
  }
-
 
130
}
-
 
131
 
-
 
132
/**
-
 
133
 * Affiche une aide sur le Plier/D?plier
-
 
134
 *
-
 
135
 * @access  public
-
 
136
 */
-
 
137
function afficherAide()
-
 
138
{
-
 
139
  with (document) {
-
 
140
    if (isDOM) {
-
 
141
      var aide = 	'<p>Cliquer sur le symbole <img src="'+imgClosed.src+'"/> pour afficher les <strong>informations complémentaires</strong>.<p />'+
-
 
142
					'<p>Vous pouvez aussi utiliser les liens ci-dessous pour controler l\'affichage de l\'ensemble des informations :<p />'+
-
 
143
					'<p><a href="#" onclick="toutPlier(); return false;">Tout plier</a> | <a href="#" onclick="toutDeplier(); return false;">Tout d&eacute;plier</a>'+
-
 
144
					'</p>';
-
 
145
      write(aide);
-
 
146
    }
-
 
147
  }
85
 
148
}
86
 
149
 
87
/**
150
/**
88
 *Recharge le 'frame' si la fenêtre est redimensionée sous Netscape4+.
151
 *Recharge le 'frame' si la fenêtre est redimensionée sous Netscape4+.
89
 *(Do reloads the frame if the window has been resized under Netscape4+) 
152
 *(Do reloads the frame if the window has been resized under Netscape4+) 
90
 * 
153
 * 
91
 *@access  privée (private)
154
 *@access  privée (private)
92
 */
155
 */
93
function reDo() 
156
function reDo() 
94
{
157
{
95
    if (innerWidth != origWidth || innerHeight != origHeight)
158
    if (innerWidth != origWidth || innerHeight != origHeight)
96
        location.reload(true);
159
        location.reload(true);
97
} // fin de la fonction 'reDo()' (end of the 'reDo()' function])
160
} // fin de la fonction 'reDo()' (end of the 'reDo()' function])
98
 
161
 
99
 
162
 
100
/**
163
/**
101
 * Positionnement du redimensionnement pour Netscape4+.
164
 * Positionnement du redimensionnement pour Netscape4+.
102
 * (Positioned element resize bug under NS4+)
165
 * (Positioned element resize bug under NS4+)
103
 *
166
 *
104
 */
167
 */
105
if (isNS4) {
168
if (isNS4) {
106
    var origWidth  = innerWidth;
169
    var origWidth  = innerWidth;
107
    var origHeight = innerHeight;
170
    var origHeight = innerHeight;
108
    onresize       = reDo;
171
    onresize       = reDo;
109
}
172
}
110
 
173
 
111
 
174
 
112
/**
175
/**
113
 * Prend l'id du premier élement de plier-déplier.
176
 * Prend l'id du premier élement de plier-déplier.
114
 * Fonction utilisée pour Netscape seulement.
177
 * Fonction utilisée pour Netscape seulement.
115
 * (Gets the id of the first collapsible room)
178
 * (Gets the id of the first collapsible room)
116
 *
179
 *
117
 * @param  string  le nom de la première pièce du plier-déplier (the name of the first collapsible room)
180
 * @param  string  le nom de la première pièce du plier-déplier (the name of the first collapsible room)
118
 *
181
 *
119
 * @return  integer  le numèro d'index correspondant à cette pièce (the index number corresponding to this room)
182
 * @return  integer  le numèro d'index correspondant à cette pièce (the index number corresponding to this room)
120
 *
183
 *
121
 * @access  public
184
 * @access  public
122
 */
185
 */
123
function nsGetIndex(el) 
186
function nsGetIndex(el) 
124
{
187
{
125
    var ind = null;
188
    var ind = null;
126
    var theLayers = document.layers;
189
    var theLayers = document.layers;
127
    var layersCnt = theLayers.length;
190
    var layersCnt = theLayers.length;
128
    for (var i = 0; i < layersCnt; i++) {
191
    for (var i = 0; i < layersCnt; i++) {
129
        if (theLayers[i].id == el) {
192
        if (theLayers[i].id == el) {
130
            ind = i;
193
            ind = i;
131
            break;
194
            break;
132
        }
195
        }
133
    }
196
    }
134
    return ind;
197
    return ind;
135
} // fin de la fonction 'nsGetIndex()' (end of the 'nsGetIndex()' function)
198
} // fin de la fonction 'nsGetIndex()' (end of the 'nsGetIndex()' function)
136
 
199
 
137
 
200
 
138
/**
201
/**
139
 * Positions des calques sous Netscape4+.
202
 * Positions des calques sous Netscape4+.
140
 * (Positions layers under NS4+)
203
 * (Positions layers under NS4+)
141
 *
204
 *
142
 * @access  public
205
 * @access  public
143
 */
206
 */
144
function nsArrangeList()
207
function nsArrangeList()
145
{
208
{
146
    if (firstInd != null) {
209
    if (firstInd != null) {
147
        var theLayers = document.layers;
210
        var theLayers = document.layers;
148
        var layersCnt = theLayers.length;
211
        var layersCnt = theLayers.length;
149
        var nextY     = theLayers[firstInd].pageY + theLayers[firstInd].document.height;
212
        var nextY     = theLayers[firstInd].pageY + theLayers[firstInd].document.height;
150
        for (var i = firstInd + 1; i < layersCnt; i++) {
213
        for (var i = firstInd + 1; i < layersCnt; i++) {
151
            if (theLayers[i].visibility != 'hide') {
214
            if (theLayers[i].visibility != 'hide') {
152
                theLayers[i].pageY = nextY;
215
                theLayers[i].pageY = nextY;
153
                nextY              += theLayers[i].document.height;
216
                nextY              += theLayers[i].document.height;
154
            }
217
            }
155
        }
218
        }
156
    }
219
    }
157
} // fin de la fonction 'nsArrangeList()' (end of the 'nsArrangeList()' function)
220
} // fin de la fonction 'nsArrangeList()' (end of the 'nsArrangeList()' function)
158
 
221
 
159
 
222
 
160
/**
223
/**
161
 * Déplier les données au démmarage.
224
 * Déplier les données au démmarage.
162
 * Fonction utilisée pour Netscape seulement.
225
 * Fonction utilisée pour Netscape seulement.
163
 * (Expand databases at startup)
226
 * (Expand databases at startup)
164
 *
227
 *
165
 * @access  public
228
 * @access  public
166
 */
229
 */
167
function nsShowAll() 
230
function nsShowAll() 
168
{
231
{
169
    var theLayers = document.layers;
232
    var theLayers = document.layers;
170
    var layersCnt = theLayers.length;
233
    var layersCnt = theLayers.length;
171
    for (i = firstInd; i < layersCnt; i++) {
234
    for (i = firstInd; i < layersCnt; i++) {
172
        theLayers[i].visibility = 'show';
235
        theLayers[i].visibility = 'show';
173
    }
236
    }
174
} // fin de la fonction 'nsShowAll()' (end of the 'nsShowAll()' function)
237
} // fin de la fonction 'nsShowAll()' (end of the 'nsShowAll()' function)
175
 
238
 
176
 
239
 
177
/**
240
/**
178
 * Pliage des données au démarrage.
241
 * Pliage des données au démarrage.
179
 * (Collapses databases at startup)
242
 * (Collapses databases at startup)
180
 * 
243
 * 
181
 * @access  public
244
 * @access  public
182
 */
245
 */
183
function initIt()
246
function initIt()
184
{
247
{
185
    if (!capable || !isServer)
248
    if (!capable || !isServer)
186
       return;
249
       return;
187
       
250
       
188
    if (isDOM) {
251
    if (isDOM) {
189
        var tempColl    = document.getElementsByTagName('DIV');
252
        var tempColl    = document.getElementsByTagName('DIV');
190
        var tempCollCnt = tempColl.length;
253
        var tempCollCnt = tempColl.length;
191
        for (var i = 0; i < tempCollCnt; i++) {
254
        for (var i = 0; i < tempCollCnt; i++) {
192
            if (tempColl[i].id == expandedDb)
255
            if (tempColl[i].id == expandedDb)
193
                tempColl[i].style.display = 'block';
256
                tempColl[i].style.display = 'block';
194
            else if (tempColl[i].className == 'child')
257
            else if (tempColl[i].className == 'child')
195
                tempColl[i].style.display = 'none';
258
                tempColl[i].style.display = 'none';
196
        }
259
        }
197
    } // Fin du cas DOM (end of the DOM case)
260
    } // Fin du cas DOM (end of the DOM case)
198
    else if (isIE4) {
261
    else if (isIE4) {
199
        tempColl        = document.all.tags('DIV');
262
        tempColl        = document.all.tags('DIV');
200
        var tempCollCnt = tempColl.length;
263
        var tempCollCnt = tempColl.length;
201
        for (var i = 0; i < tempCollCnt; i++) {
264
        for (var i = 0; i < tempCollCnt; i++) {
202
            if (tempColl(i).id == expandedDb)
265
            if (tempColl(i).id == expandedDb)
203
                tempColl(i).style.display = 'block';
266
                tempColl(i).style.display = 'block';
204
            else if (tempColl(i).className == 'child')
267
            else if (tempColl(i).className == 'child')
205
                tempColl(i).style.display = 'none';
268
                tempColl(i).style.display = 'none';
206
        }
269
        }
207
    } // Fin du cas IE4 (end of the IE4 case)
270
    } // Fin du cas IE4 (end of the IE4 case)
208
    else if (isNS4) {
271
    else if (isNS4) {
209
        var theLayers  = document.layers;
272
        var theLayers  = document.layers;
210
        var layersCnt  = theLayers.length;
273
        var layersCnt  = theLayers.length;
211
        for (var i = 0; i < layersCnt; i++) {
274
        for (var i = 0; i < layersCnt; i++) {
212
            if (theLayers[i].id == expandedDb)
275
            if (theLayers[i].id == expandedDb)
213
                theLayers[i].visibility   = 'show';
276
                theLayers[i].visibility   = 'show';
214
            else if (theLayers[i].id.indexOf('Child') != -1)
277
            else if (theLayers[i].id.indexOf('Child') != -1)
215
                theLayers[i].visibility   = 'hide';
278
                theLayers[i].visibility   = 'hide';
216
            else
279
            else
217
                theLayers[i].visibility   = 'show';
280
                theLayers[i].visibility   = 'show';
218
        }
281
        }
219
        nsArrangeList();
282
        nsArrangeList();
220
    } // Fin du cas NS4 (end of the NS4 case)
283
    } // Fin du cas NS4 (end of the NS4 case)
221
} // Fin de la fonction 'initIt()' (end of the 'initIt()' function)
284
} // Fin de la fonction 'initIt()' (end of the 'initIt()' function)
222
 
285
 
223
 
286
 
224
/**
287
/**
225
 * Plier/Déplier les données quand l'utilisateur le demande.
288
 * Plier/Déplier les données quand l'utilisateur le demande.
226
 * (Collapses/expands a database when the user require this to be done)
289
 * (Collapses/expands a database when the user require this to be done)
227
 *
290
 *
228
 * @param  string  le nom de l'élément à activer (the  name of the room to act on)
291
 * @param  string  le nom de l'élément à activer (the  name of the room to act on)
229
 * @param  boolean si oui ou non le contenu des données doit être affiché (whether to expand or to collapse the database content)
292
 * @param  boolean si oui ou non le contenu des données doit être affiché (whether to expand or to collapse the database content)
230
 *
293
 *
231
 * @access  public
294
 * @access  public
232
 */
295
 */
233
function expandBase(el, unexpand)
296
function expandBase(el, unexpand)
234
{
297
{
235
    if (!capable)
298
  if (!capable)
236
        return;
299
    return;
237
    
300
  
238
    if (isDOM) {
301
  if (isDOM) {
239
        var whichEl = document.getElementById(el + 'Child');
302
    var whichEl = document.getElementById(el + 'Child');
240
        var whichIm = document.getElementById(el + 'Img');
303
    var whichIm = document.getElementById(el + 'Img');
241
        if (whichEl.style.display == 'none' && whichIm) {
304
    if (whichEl.style.display == 'none' && whichIm) {
242
            whichEl.style.display  = 'block';
305
      whichEl.style.display  = 'inline';
243
            whichIm.src            = imgOpened.src;
306
      whichIm.src            = imgOpened.src;
244
        }
-
 
245
        else if (unexpand) {
-
 
246
            whichEl.style.display  = 'none';
-
 
247
            whichIm.src            = imgClosed.src;
307
      whichIm.alt            = imgOpened.alt;
248
        }
-
 
249
    } // Fin du cas DOM (end of the DOM case)
-
 
250
    else if (isIE4) {
-
 
251
        var whichEl = document.all(el + 'Child');
-
 
252
        var whichIm = document.images.item(el + 'Img');
-
 
253
        if (whichEl.style.display == 'none') {
-
 
254
            whichEl.style.display  = 'block';
-
 
255
            whichIm.src            = imgOpened.src;
308
      whichIm.title          = imgOpened.title;
256
        }
-
 
257
        else if (unexpand) {
309
    } else if (unexpand) {
258
            whichEl.style.display  = 'none';
310
      whichEl.style.display  = 'none';
259
            whichIm.src            = imgClosed.src;
311
      whichIm.src            = imgClosed.src;
260
        }
-
 
261
    } // Fin du cas IE4 (end of the IE4 case)
-
 
262
    else if (isNS4) {
-
 
263
        var whichEl = document.layers[el + 'Child'];
-
 
264
        var whichIm = document.layers[el + 'Parent'].document.images['imEx'];
-
 
265
        if (whichEl.visibility == 'hide') {
-
 
266
            whichEl.visibility  = 'show';
-
 
267
            whichIm.src         = imgOpened.src;
312
      whichIm.alt            = imgClosed.alt;
268
        }
-
 
269
        else if (unexpand) {
-
 
270
            whichEl.visibility  = 'hide';
-
 
271
            whichIm.src         = imgClosed.src;
313
      whichIm.title          = imgClosed.title;
272
        }
-
 
273
        nsArrangeList();
-
 
274
    } // Fin du cas NS4 (end of the NS4 case)
-
 
275
} // fin de la fonction 'expandBase()' (end of the 'expandBase()' function)
-
 
-
 
314
 
-
 
315
    }
-
 
316
  }
276
 
317
}
277
 
318
 
278
/**
319
/**
279
 * Ajout des styles permettant le positionnement des calques.
320
 * Ajout des styles permettant le positionnement des calques.
280
 * Le style display est important pour afficher ou masquer les calques.
321
 * Le style display est important pour afficher ou masquer les calques.
281
 * Les styles child et parent doivent être utilisé pour les div du fichier html.
322
 * Les styles child et parent doivent être utilisé pour les div du fichier html.
282
 * (Add styles for positioned layers)
323
 * (Add styles for positioned layers)
283
 */
324
 */
284
if (capable) {
325
if (capable) {
285
    with (document) {
326
    with (document) {
286
        // Brian Birtles : This is not the ideal method of doing this
327
        // Brian Birtles : This is not the ideal method of doing this
287
        // but under the 7th June '00 Mozilla build (and many before
328
        // but under the 7th June '00 Mozilla build (and many before
288
        // it) Mozilla did not treat text between <style> tags as
329
        // it) Mozilla did not treat text between <style> tags as
289
        // style information unless it was written with the one call
330
        // style information unless it was written with the one call
290
        // to write().
331
        // to write().
291
        if (isDOM) {
332
        if (isDOM) {
292
            var lstyle = '<style type="text/css">'
333
            var lstyle = '<style type="text/css">'
293
                    + 'div {color: #000000;}'
334
                    + 'div {color: #000000;}'
294
                    + '.heada {font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12px}'
335
                    + '.heada {font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12px}'
295
                    + '.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration:none; display: block}'
336
                    + '.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration:none; display: block}'
296
                    + '.child {font-family: ' + fontFamily + '; text-decoration:none; display: none}'
337
                    + '.child {font-family: ' + fontFamily + '; text-decoration:none; display: none}'
297
                    + '.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt;}'
338
                    + '.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt;}'
298
                    + '.tblItem:hover {color: #FF0000; text-decoration: underline}'
339
                    + '.tblItem:hover {color: #FF0000; text-decoration: underline}'
299
                    + '<\/style>';
340
                    + '<\/style>';
300
            write(lstyle);
341
            write(lstyle);
301
        }
342
        }
302
        else {
343
        else {
303
            write('<style type="text/css">');
344
            write('<style type="text/css">');
304
            write('div {color: #000000; }');
345
            write('div {color: #000000; }');
305
            write('.heada {font-family: ' + fontFamily + '; font-size: 10pt}');
346
            write('.heada {font-family: ' + fontFamily + '; font-size: 10pt}');
306
            if (isIE4) {
347
            if (isIE4) {
307
                write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; display: block}');
348
                write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; display: block}');
308
                write('.child {font-family: ' + fontFamily + '; text-decoration: none; display: none}');
349
                write('.child {font-family: ' + fontFamily + '; text-decoration: none; display: none}');
309
                write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt}');
350
                write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt}');
310
                write('.tblItem:hover {color: #FF0000; text-decoration: underline}');
351
                write('.tblItem:hover {color: #FF0000; text-decoration: underline}');
311
            }
352
            }
312
            else {
353
            else {
313
                write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; position: absolute; visibility: hidden}');
354
                write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; position: absolute; visibility: hidden}');
314
                write('.child {font-family: ' + fontFamily + '; position: absolute; visibility: hidden}');
355
                write('.child {font-family: ' + fontFamily + '; position: absolute; visibility: hidden}');
315
                write('.item, .tblItem {color: #333399; text-decoration: none}');
356
                write('.item, .tblItem {color: #333399; text-decoration: none}');
316
            }
357
            }
317
            write('<\/style>');
358
            write('<\/style>');
318
        }
359
        }
319
    }
360
    }
320
}
361
}
321
else {
362
else {
322
    with (document) {
363
    with (document) {
323
        write('<style type="text/css">');
364
        write('<style type="text/css">');
324
        write('div {color: #000000; }');
365
        write('div {color: #000000; }');
325
        write('.heada {font-family: ' + fontFamily + '; font-size: 10pt ; font-weight:bold}');
366
        write('.heada {font-family: ' + fontFamily + '; font-size: 10pt ; font-weight:bold}');
326
        write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none}');
367
        write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none}');
327
        write('.child {font-family: ' + fontFamily + '; text-decoration: none}');
368
        write('.child {font-family: ' + fontFamily + '; text-decoration: none}');
328
        write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none}');
369
        write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none}');
329
        write('.tblItem:hover {color: #FF0000; text-decoration: underline}');
370
        write('.tblItem:hover {color: #FF0000; text-decoration: underline}');
330
        write('<\/style>');
371
        write('<\/style>');
331
    }
372
    }
332
} // Fin de l'ajout des styles (end of adding styles)
373
} // Fin de l'ajout des styles (end of adding styles)
333
 
374
 
334
 
375
 
335
onload = initIt;
376
onload = initIt;
336
 
377
 
337
/**
378
/**
338
 * Test normalement présent dans le fichier html à la fin entre 
379
 * Test normalement présent dans le fichier html à la fin entre 
339
 * des balises <script></script>
380
 * des balises <script></script>
340
 */
381
 */
341
 
382
 
342
if (isNS4) {
383
if (isNS4) {
343
    firstEl  = 'el1Parent';
384
    firstEl  = 'el1Parent';
344
    firstInd = nsGetIndex(firstEl);
385
    firstInd = nsGetIndex(firstEl);
345
    nsShowAll();
386
    nsShowAll();
346
    nsArrangeList();
387
    nsArrangeList();
347
}
388
}
348
expandedDb = '';
389
expandedDb = '';
349
 
390
 
350
/* +--Fin du code ----------------------------------------------------------------------------------------+
391
/* +--Fin du code ----------------------------------------------------------------------------------------+
351
*
392
*
352
* $Log: not supported by cvs2svn $
393
* $Log: not supported by cvs2svn $
-
 
394
* Revision 1.1  2005-11-23 10:32:32  jp_milcent
-
 
395
* Ajout au dépot de l'application Herbiers.
-
 
396
* Elle doit à terme migrer dans eFlore.
-
 
397
*
353
* Revision 1.1  2005/03/08 14:14:47  jpm
398
* Revision 1.1  2005/03/08 14:14:47  jpm
354
* Ajout du fichier javascript permettant d'ouvrir et fermer du html.
399
* Ajout du fichier javascript permettant d'ouvrir et fermer du html.
355
*
400
*
356
*
401
*
357
* +-- Fin du code ----------------------------------------------------------------------------------------+
402
* +-- Fin du code ----------------------------------------------------------------------------------------+
358
*/
403
*/