source: geisa/web/initGeisa_script.jsp @ 670

Last change on this file since 670 was 670, checked in by npipsl, 12 years ago

label sur les graphiques

File size: 130.5 KB
Line 
1<%@ page import="com.ether.Controller" %>
2<%@ page import="com.ether.IsotopeG03" %>
3<%@ page import="com.ether.IsotopeIasiG03" %>
4<%@ page import="com.ether.IsotopeG09" %>
5<%@ page import="com.ether.IsotopeIasiG09" %>
6
7<script type="text/javascript">
8
9
10
11//permet de deselectionner la molecule quand on deselectionne un isotope (toutes les options sauf lst)
12/*function decliquemol( name )
13 {
14
15 var inputs = document.getElementsByTagName( 'input' );
16 var count = inputs.length;
17 for( i = 0; i < count; i++ )
18 {
19 input = inputs.item( i );
20 if( input.type == 'checkbox' && input.id == (name + '-all') && input.checked == true )
21 {
22 input.checked = false;
23 }
24 }
25 } */
26
27
28var InterfaceInit = Class.create( {
29
30            initialize: function()
31            {
32                /** *********** CONTAINERS *********** **/
33                this.containerFormSpectralRangeLower = $( "#spectralRangeLower" );
34                this.containerFormSpectralRangeUpper = $( "#spectralRangeUpper" );
35                this.containerFormIntensityLower = $( "#intensityLower" );
36                this.containerFormIntensityUpper = $( "#intensityUpper" );
37                this.containerFormMeanValue1 = $( "#meanValue1" );
38                this.containerDownload = $( "#downloadContainer" );
39                this.containerLoading = $( "#loading" );
40
41                /** *********** VARIABLE *********** **/
42                //on va chercher les chemin déclaré dans le controller
43                this.pathProcess = "<%=Controller.PATH_PROCESS%>";
44                this.LongPathImages = "<%=Controller.LONG_PATH_IMAGES%>";
45
46                <%--this.pathImg = <%=Controller.PATH_IMAGES%>;--%>
47
48                this.initializeMolecules();
49                this.createForm();
50
51                var downloadButton = new Button( {value:"Download", parent:$( "#downloadContainer" ), id:"button_submit_2", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickDownload, this )} );
52            },
53
54            initializeMolecules: function()
55            {
56                this.arrayGeisa2011 = new Array();
57                this.arrayGeisa2003 = new Array();
58                this.arrayGeisaIasi2011 = new Array();
59                this.arrayGeisaIasi2003 = new Array();
60
61                var molecule = new Object();
62                molecule.id="h2o";
63                molecule.name="H<sub>2</sub>O";
64                molecule.isotopesArray = ["161", "162", "171", "181", "182", "172"];
65                this.arrayGeisa2011.push(molecule);
66                this.arrayGeisa2003.push(molecule);
67                this.arrayGeisaIasi2011.push(molecule);
68                this.arrayGeisaIasi2003.push(molecule);
69
70                var molecule = new Object();
71                molecule.id="co2";
72                molecule.name="CO<sub>2</sub>";
73                molecule.isotopesArray = ["626", "627", "628", "636", "637", "638", "728", "828", "838"];
74                this.arrayGeisa2003.push(molecule);
75                this.arrayGeisa2011.push(molecule);
76                this.arrayGeisaIasi2011.push(molecule);
77                this.arrayGeisaIasi2003.push(molecule);
78
79                var molecule = new Object();
80                molecule.id="o3";
81                molecule.name="O<sub>3</sub>";
82                molecule.isotopesArray = ["666", "668", "686", "667", "676"];
83                this.arrayGeisa2003.push(molecule);
84                this.arrayGeisa2011.push(molecule);
85                this.arrayGeisaIasi2011.push(molecule);
86                this.arrayGeisaIasi2003.push(molecule);
87
88                var molecule = new Object();
89                molecule.id="n2o";
90                molecule.name="N<sub>2</sub>O";
91                molecule.isotopesArray = ["446", "447", "448", "456","458", "546", "548", "556"];
92                this.arrayGeisa2011.push(molecule);
93                this.arrayGeisaIasi2011.push(molecule);
94
95                var molecule = new Object();
96                molecule.id="n2o";
97                molecule.name="N<sub>2</sub>O";
98                molecule.isotopesArray = ["446", "447", "448", "456", "546"];
99                this.arrayGeisa2003.push(molecule);
100                this.arrayGeisaIasi2003.push(molecule);
101
102                var molecule = new Object();
103                molecule.id="co";
104                molecule.name="CO";
105                molecule.isotopesArray = ["26", "36", "28", "27", "38", "37"];
106                this.arrayGeisa2011.push(molecule);
107                this.arrayGeisa2003.push(molecule);
108                this.arrayGeisaIasi2011.push(molecule);
109                this.arrayGeisaIasi2003.push(molecule);
110
111                var molecule = new Object();
112                molecule.id="ch4";
113                molecule.name="CH<sub>4</sub>";
114                molecule.isotopesArray = ["211", "311"];
115                this.arrayGeisa2011.push(molecule);
116                this.arrayGeisa2003.push(molecule);
117
118                var molecule = new Object();
119                molecule.id="ch4";
120                molecule.name="CH<sub>4</sub>";
121                molecule.isotopesArray = ["211", "311", "212", "312"];
122                this.arrayGeisaIasi2011.push(molecule);
123
124                var molecule = new Object();
125                molecule.id="ch4";
126                molecule.name="CH<sub>4</sub>";
127                molecule.isotopesArray = ["211", "311", "212"];
128                this.arrayGeisaIasi2003.push(molecule);
129
130                var molecule = new Object();
131                molecule.id="o2";
132                molecule.name="O<sub>2</sub>";
133                molecule.isotopesArray = ["66", "67", "68"];
134                this.arrayGeisa2011.push(molecule);
135                this.arrayGeisa2003.push(molecule);
136
137                var molecule = new Object();
138                molecule.id="o2";
139                molecule.name="O<sub>2</sub>";
140                molecule.isotopesArray = ["66"];
141                this.arrayGeisaIasi2011.push(molecule);
142                this.arrayGeisaIasi2003.push(molecule);
143
144                var molecule = new Object();
145                molecule.id="no";
146                molecule.name="NO";
147                molecule.isotopesArray = ["46", "48", "56"];
148                this.arrayGeisa2011.push(molecule);
149                this.arrayGeisa2003.push(molecule);
150                this.arrayGeisaIasi2011.push(molecule);
151                this.arrayGeisaIasi2003.push(molecule);
152
153                var molecule = new Object();
154                molecule.id="so2";
155                molecule.name="SO<sub>2</sub>";
156                molecule.isotopesArray = ["626", "646"];
157                this.arrayGeisa2011.push(molecule);
158                this.arrayGeisa2003.push(molecule);
159                this.arrayGeisaIasi2011.push(molecule);
160                this.arrayGeisaIasi2003.push(molecule);
161
162                var molecule = new Object();
163                molecule.id="no2";
164                molecule.name="NO<sub>2</sub>";
165                molecule.isotopesArray = ["646"];
166                this.arrayGeisa2011.push(molecule);
167                this.arrayGeisa2003.push(molecule);
168                this.arrayGeisaIasi2011.push(molecule);
169                this.arrayGeisaIasi2003.push(molecule);
170
171                var molecule = new Object();
172                molecule.id="nh3";
173                molecule.name="NH<sub>3</sub>";
174                molecule.isotopesArray = ["411", "511" ];
175                this.arrayGeisa2011.push(molecule);
176                this.arrayGeisa2003.push(molecule);
177                this.arrayGeisaIasi2011.push(molecule);
178
179                var molecule = new Object();
180                molecule.id="ph3";
181                molecule.name="PH<sub>3</sub>";
182                molecule.isotopesArray = ["131" ];
183                this.arrayGeisa2011.push(molecule);
184                this.arrayGeisa2003.push(molecule);
185
186                var molecule = new Object();
187                molecule.id="hno3";
188                molecule.name="HNO<sub>3</sub>";
189                molecule.isotopesArray = ["146" ];
190                this.arrayGeisa2011.push(molecule);
191                this.arrayGeisa2003.push(molecule);
192                this.arrayGeisaIasi2011.push(molecule);
193                this.arrayGeisaIasi2003.push(molecule);
194
195                var molecule = new Object();
196                molecule.id="oh";
197                molecule.name="OH";
198                molecule.isotopesArray = ["61", "62", "81" ];
199                this.arrayGeisa2011.push(molecule);
200                this.arrayGeisa2003.push(molecule);
201
202                var molecule = new Object();
203                molecule.id="hf";
204                molecule.name="HF";
205                molecule.isotopesArray = ["19" ];
206                this.arrayGeisa2011.push(molecule);
207                this.arrayGeisa2003.push(molecule);
208
209                var molecule = new Object();
210                molecule.id="hcl";
211                molecule.name="HCL";
212                molecule.isotopesArray = ["15", "17" ];
213                this.arrayGeisa2011.push(molecule);
214                this.arrayGeisa2003.push(molecule);
215
216                var molecule = new Object();
217                molecule.id="hbr";
218                molecule.name="HBR";
219                molecule.isotopesArray = ["11", "19" ];
220                this.arrayGeisa2011.push(molecule);
221                this.arrayGeisa2003.push(molecule);
222
223                var molecule = new Object();
224                molecule.id="hi";
225                molecule.name="HI";
226                molecule.isotopesArray = ["17" ];
227                this.arrayGeisa2011.push(molecule);
228                this.arrayGeisa2003.push(molecule);
229
230                var molecule = new Object();
231                molecule.id="clo";
232                molecule.name="ClO";
233                molecule.isotopesArray = ["56", "76" ];
234                this.arrayGeisa2011.push(molecule);
235                this.arrayGeisa2003.push(molecule);
236
237                var molecule = new Object();
238                molecule.id="ocs";
239                molecule.name="OCS";
240                molecule.isotopesArray = ["622", "624", "632", "623", "822", "634"];
241                this.arrayGeisa2011.push(molecule);
242                this.arrayGeisa2003.push(molecule);
243                this.arrayGeisaIasi2011.push(molecule);
244                this.arrayGeisaIasi2003.push(molecule);
245
246                var molecule = new Object();
247                molecule.id="h2co";
248                molecule.name="H<sub>2</sub>CO";
249                molecule.isotopesArray = ["126", "128", "136"];
250                this.arrayGeisa2011.push(molecule);
251                this.arrayGeisa2003.push(molecule);
252
253                var molecule = new Object();
254                molecule.id="h2co";
255                molecule.name="H<sub>2</sub>CO";
256                molecule.isotopesArray = ["126"];
257                this.arrayGeisaIasi2011.push(molecule);
258
259                var molecule = new Object();
260                molecule.id="c2h6";
261                molecule.name="C<sub>2</sub>H<sub>6</sub>";
262                molecule.isotopesArray = ["226", "236"];
263                this.arrayGeisa2011.push(molecule);
264                this.arrayGeisa2003.push(molecule);
265
266                var molecule = new Object();
267                molecule.id="ch3d";
268                molecule.name="CH<sub>3</sub>D";
269                molecule.isotopesArray = ["212", "312"];
270                this.arrayGeisa2011.push(molecule);
271
272                var molecule = new Object();
273                molecule.id="ch3d";
274                molecule.name="CH<sub>3</sub>D";
275                molecule.isotopesArray = ["212"];
276                this.arrayGeisa2003.push(molecule);
277
278                var molecule = new Object();
279                molecule.id="c2h2";
280                molecule.name="C<sub>2</sub>H<sub>2</sub>";
281                molecule.isotopesArray = ["221", "231"];
282                this.arrayGeisa2011.push(molecule);
283                this.arrayGeisa2003.push(molecule);
284                this.arrayGeisaIasi2011.push(molecule);
285                this.arrayGeisaIasi2003.push(molecule);
286
287                var molecule = new Object();
288                molecule.id="c2h4";
289                molecule.name="C<sub>2</sub>H<sub>4</sub>";
290                molecule.isotopesArray = ["211", "311"];
291                this.arrayGeisa2011.push(molecule);
292                this.arrayGeisa2003.push(molecule);
293                this.arrayGeisaIasi2011.push(molecule);
294
295                var molecule = new Object();
296                molecule.id="geh4";
297                molecule.name="GeH<sub>4</sub>";
298                molecule.isotopesArray = ["411"];
299                this.arrayGeisa2011.push(molecule);
300                this.arrayGeisa2003.push(molecule);
301
302                var molecule = new Object();
303                molecule.id="hcn";
304                molecule.name="HCN";
305                molecule.isotopesArray = ["124", "125", "134", "224"];
306                this.arrayGeisa2011.push(molecule);
307                this.arrayGeisaIasi2011.push(molecule);
308
309                var molecule = new Object();
310                molecule.id="hcn";
311                molecule.name="HCN";
312                molecule.isotopesArray = ["124", "125", "134"];
313                this.arrayGeisa2003.push(molecule);
314
315                var molecule = new Object();
316                molecule.id="c3h8";
317                molecule.name="C<sub>3</sub>H<sub>8</sub>";
318                molecule.isotopesArray = ["221"];
319                this.arrayGeisa2011.push(molecule);
320                this.arrayGeisa2003.push(molecule);
321
322                var molecule = new Object();
323                molecule.id="c2n2";
324                molecule.name="C<sub>2</sub>N<sub>2</sub>";
325                molecule.isotopesArray = ["224"];
326                this.arrayGeisa2011.push(molecule);
327                this.arrayGeisa2003.push(molecule);
328
329                var molecule = new Object();
330                molecule.id="c4h2";
331                molecule.name="C<sub>4</sub>H<sub>2</sub>";
332                molecule.isotopesArray = ["211"];
333                this.arrayGeisa2011.push(molecule);
334                this.arrayGeisa2003.push(molecule);
335
336                var molecule = new Object();
337                molecule.id="hc3n";
338                molecule.name="HC<sub>3</sub>N";
339                molecule.isotopesArray = ["124"];
340                this.arrayGeisa2011.push(molecule);
341                this.arrayGeisa2003.push(molecule);
342
343                var molecule = new Object();
344                molecule.id="hocl";
345                molecule.name="HOCl";
346                molecule.isotopesArray = ["165", "167"];
347                this.arrayGeisa2011.push(molecule);
348                this.arrayGeisa2003.push(molecule);
349
350                var molecule = new Object();
351                molecule.id="n2";
352                molecule.name="N<sub>2</sub>";
353                molecule.isotopesArray = ["44"];
354                this.arrayGeisa2011.push(molecule);
355                this.arrayGeisa2003.push(molecule);
356                this.arrayGeisaIasi2011.push(molecule);
357                this.arrayGeisaIasi2003.push(molecule);
358
359                var molecule = new Object();
360                molecule.id="ch3cl";
361                molecule.name="CH<sub>3</sub>Cl";
362                molecule.isotopesArray = ["215", "217"];
363                this.arrayGeisa2011.push(molecule);
364                this.arrayGeisa2003.push(molecule);
365
366                var molecule = new Object();
367                molecule.id="h2o2";
368                molecule.name="H<sub>2</sub>O<sub>2</sub>";
369                molecule.isotopesArray = ["166"];
370                this.arrayGeisa2011.push(molecule);
371                this.arrayGeisa2003.push(molecule);
372
373                var molecule = new Object();
374                molecule.id="h2s";
375                molecule.name="H<sub>2</sub>S";
376                molecule.isotopesArray = ["121", "141", "131"];
377                this.arrayGeisa2011.push(molecule);
378                this.arrayGeisa2003.push(molecule);
379
380                var molecule = new Object();
381                molecule.id="hcooh";
382                molecule.name="HCOOH";
383                molecule.isotopesArray = ["261"];
384                this.arrayGeisa2011.push(molecule);
385                this.arrayGeisa2003.push(molecule);
386                this.arrayGeisaIasi2011.push(molecule);
387
388                var molecule = new Object();
389                molecule.id="cof2";
390                molecule.name="COF<sub>2</sub>";
391                molecule.isotopesArray = ["269"];
392                this.arrayGeisa2011.push(molecule);
393                this.arrayGeisa2003.push(molecule);
394
395                var molecule = new Object();
396                molecule.id="sf6";
397                molecule.name="SF<sub>6</sub>";
398                molecule.isotopesArray = ["29"];
399                this.arrayGeisa2011.push(molecule);
400                this.arrayGeisa2003.push(molecule);
401
402                var molecule = new Object();
403                molecule.id="c3h4";
404                molecule.name="C<sub>3</sub>H<sub>4</sub>";
405                molecule.isotopesArray = ["341"];
406                this.arrayGeisa2011.push(molecule);
407                this.arrayGeisa2003.push(molecule);
408
409                var molecule = new Object();
410                molecule.id="ho2";
411                molecule.name="HO<sub>2</sub>";
412                molecule.isotopesArray = ["166"];
413                this.arrayGeisa2011.push(molecule);
414                this.arrayGeisa2003.push(molecule);
415
416                var molecule = new Object();
417                molecule.id="clono2";
418                molecule.name="ClONO<sub>2</sub>";
419                molecule.isotopesArray = ["564", "764"];
420                this.arrayGeisa2011.push(molecule);
421                this.arrayGeisa2003.push(molecule);
422
423                var molecule = new Object();
424                molecule.id="ch3br";
425                molecule.name="CH<sub>3</sub>Br";
426                molecule.isotopesArray = ["79", "81"];
427                this.arrayGeisa2011.push(molecule);
428
429                var molecule = new Object();
430                molecule.id="ch3oh";
431                molecule.name="CH<sub>3</sub>OH";
432                molecule.isotopesArray = ["216"];
433                this.arrayGeisa2011.push(molecule);
434                this.arrayGeisaIasi2011.push(molecule);
435
436                var molecule = new Object();
437                molecule.id="noplus";
438                molecule.name="NO<sup>+</sup>";
439                molecule.isotopesArray = ["46"];
440                this.arrayGeisa2011.push(molecule);
441
442                var molecule = new Object();
443                molecule.id="hnc";
444                molecule.name="HNC";
445                molecule.isotopesArray = ["142"];
446                this.arrayGeisa2011.push(molecule);
447
448                var molecule = new Object();
449                molecule.id="c6h6";
450                molecule.name="C<sub>6</sub>H<sub>6</sub>";
451                molecule.isotopesArray = ["266"];
452                this.arrayGeisa2011.push(molecule);
453
454                var molecule = new Object();
455                molecule.id="c2hd";
456                molecule.name="C<sub>2</sub>HD";
457                molecule.isotopesArray = ["122"];
458                this.arrayGeisa2011.push(molecule);
459
460                var molecule = new Object();
461                molecule.id="cf4";
462                molecule.name="CF<sub>4</sub>";
463                molecule.isotopesArray = ["291"];
464                this.arrayGeisa2011.push(molecule);
465
466                var molecule = new Object();
467                molecule.id="ch3cn";
468                molecule.name="CH<sub>3</sub>CN";
469                molecule.isotopesArray = ["234"];
470                this.arrayGeisa2011.push(molecule);
471
472
473            },
474
475// CREATES ********************************************************
476            createForm: function()
477            {
478                //Titre de la page
479                var titlePage = document.createTextNode("Graphic vizualisation of the  GEISA  database");
480                document.getElementById("titlePage").appendChild(titlePage);
481
482                // Create menu deroulant  choix de la base
483                var paramDatabase = new Object();
484                paramDatabase.id = "selectDatabase";
485                paramDatabase.parent = $("#database1");
486                this.selectDatabase = new Select( paramDatabase );
487                this.selectDatabase.add( 'GEISA2011', "GEISA 2011", jQuery.proxy(this.onClickSelectDatabase, this), '<%=IsotopeG09.class%>' );
488                this.selectDatabase.add( 'GEISAIASI2011', "GEISA-IASI 2011", jQuery.proxy(this.onClickSelectDatabase, this), '<%=IsotopeIasiG09.class%>' );
489                this.selectDatabase.add( 'GEISA2003', "GEISA 2003", jQuery.proxy(this.onClickSelectDatabase, this), '<%=IsotopeG03.class%>' );
490                this.selectDatabase.add( 'GEISAIASI2003', "GEISA-IASI 2003", jQuery.proxy(this.onClickSelectDatabase, this), '<%=IsotopeIasiG03.class%>' );
491                this.selectDatabase.selectFirst( false );
492                 var bob = this.selectDatabase.getValues();
493
494
495                //création du bloc des molécules
496                this.createMolecules($('#BDD-GEISA2011'), this.arrayGeisa2011, "GEISA2011");
497                this.createMolecules($('#BDD-GEISA2003'), this.arrayGeisa2003, "GEISA2003");
498                this.createMolecules($('#BDD-GEISAIASI2011'), this.arrayGeisaIasi2011, "GEISAIASI2011");
499                this.createMolecules($('#BDD-GEISAIASI2003'), this.arrayGeisaIasi2003, "GEISAIASI2003");
500
501                //bouton selection-deselection toutes les molécules et isotopes
502                this.selectButton = new Button( {value:"Select all isotopologues", parent:$( "#selectAndShow" ), id:"buttonSelect", className: "gray_button", onClick:jQuery.proxy( this.selectAll, this )} );
503                //bouton montrer-cacher les isotopes
504                this.showButton = new Button( {value:"View all isotopologues", parent:$( "#selectAndShow" ), id:"buttonShow", className: "gray_button", onClick:jQuery.proxy( this.viewAll, this )} );
505
506
507
508                //Zone texte  SpectralRange
509                //Titre général (qui changera en fonction de la base geisa choisie)
510                document.getElementById('spectralRangeTitre').innerHTML = "";
511                document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range (0 to 35877.030506 cm<sup>-1</sup>) :";
512
513                //Titre
514                //var titleSpectralRangeLower = document.createTextNode("Upper Bound :");
515               // document.getElementById("spectralRangeLower").appendChild(titleSpectralRangeLower);
516                document.getElementById("spectralRangeLower").innerHTML = "Lower value, cm<sup>-1</sup> : ";
517                //var titleSpectralRangeUpper = document.createTextNode("Upper Bound :");
518               // document.getElementById("spectralRangeUpper").appendChild(titleSpectralRangeUpper);
519                document.getElementById("spectralRangeUpper").innerHTML = "Upper value, cm<sup>-1</sup> : ";
520                document.getElementById("samplingStep").innerHTML = "<br>Sampling step : ";
521                //zone texte  SpectralRangeLower
522                var inputSpectralRangeLower = $( document.createElement( "input" ) );
523                inputSpectralRangeLower.attr( {id:"rangeLower", class:"styleInputs"} );
524                inputSpectralRangeLower.val(0);
525                //pour mettre à jour le menu déroulant des transitions
526                inputSpectralRangeLower.bind( 'blur', this, jQuery.proxy( this.requestTransition, this ));
527                this.containerFormSpectralRangeLower.append( inputSpectralRangeLower );
528                //zone texte   SpectralRangeUpper
529                var inputSpectralRangeUpper = $( document.createElement( "input" ) );
530                inputSpectralRangeUpper.attr( {id:"rangeUpper"} );
531                inputSpectralRangeUpper.val(35877.030506);
532                //pour mettre à jour le menu déroulant des transitions lorsque l'on change la valeur du spectral range
533                inputSpectralRangeUpper.bind( 'blur', this, jQuery.proxy( this.requestTransition, this ));
534                this.containerFormSpectralRangeUpper.append( inputSpectralRangeUpper );
535                //zone texte   Sampling step
536                var inputSamplingStep = $( document.createElement( "input" ) );
537                inputSamplingStep.attr( {id:"sampStep", size:6} );
538                $("#samplingStep").append( inputSamplingStep );
539
540                 //Zone texte Intensity
541                //Titre
542                //var titleIntensityLower = document.createTextNode("Lower Bound :");
543                //document.getElementById("intensityLower").appendChild(titleIntensityLower);
544                //var titleIntensityUpper = document.createTextNode("Upper Bound :");
545                //document.getElementById("intensityUpper").appendChild(titleIntensityUpper);
546                  document.getElementById("intensityLower").innerHTML = "Lower value, cm/mol. : "
547                  document.getElementById("intensityUpper").innerHTML = "Upper value, cm/mol. : "
548
549                //zone texte    IntensityLower
550                var inputIntensityLower = $( document.createElement( "input" ) );
551                inputIntensityLower.attr( {id:"intensityLo", class:"styleInputs"} );
552                inputIntensityLower.val(0);
553                this.containerFormIntensityLower.append( inputIntensityLower );
554                //zone texte    IntensityUpper
555                var inputIntensityUpper = $( document.createElement( "input" ) );
556                inputIntensityUpper.attr( {id:"intensityUp"} );
557                inputIntensityUpper.val(1e-16);
558                this.containerFormIntensityUpper.append( inputIntensityUpper );
559
560
561                // Create menu deroulant  1er choix axe des y
562                //Titre
563                var titleAxeY1 = document.createTextNode("Select parameter (left Y-axis)");
564                document.getElementById("axeY1").appendChild(titleAxeY1);
565                var spaceBr = document.createElement ("br");
566                document.getElementById("axeY1").appendChild(spaceBr);
567                //menu déroulant
568                var paramSelectAxeY1 = new Object();
569                paramSelectAxeY1.id = "selectAxeY1";
570                paramSelectAxeY1.parent = $("#axeY1");
571                this.selectTraceAxeY1 = new Select( paramSelectAxeY1 );
572                this.selectTraceAxeY1.add( 'B', "Intensity", jQuery.proxy(this.onClickSelectTraceAxeY1, this ));
573                this.selectTraceAxeY1.add( 'C', "Air broadening pressure halfwidth", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
574                this.selectTraceAxeY1.add( 'D', "Energy of the lower transition level", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
575                this.selectTraceAxeY1.add( 'F', "Temperature of the air broadening halfwidth ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
576                this.selectTraceAxeY1.add( 'N', "Self broadening pressure halfwidth (HWHM)", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
577                this.selectTraceAxeY1.add( 'O', "Air pressure shift of the line transition", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
578                this.selectTraceAxeY1.add( 'R', "Temperature of the air pressure shift ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
579                this.selectTraceAxeY1.selectFirst( false );
580               //  this.selectTraceAxeY1 = $( document.createElement( "select" ) );
581               // this.selectTraceAxeY1.attr( {id:"selectAxeY1" } );
582                //this.selectTraceAxeY1.css("width", "100px");
583               // this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"B", text:"Intensity"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "B" ])));
584               // this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"C", text:"Air broadening pressure halfwidth"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "C" ])));
585               // this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"D", text:"Energy of the lower transition level"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "D" ])));
586               // this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"F", text:"Temperature of the air broadening halfwidth"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "F" ])));
587               // this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"N", text:"Self broadening pressure halfwidth (HWHM)"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "N" ])));
588               // this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"O", text:"Air pressure shift of the line transition"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "O" ])));
589               // this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"R", text:"Temperature of the air pressure shift"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "R" ])));
590               // $("#axeY1").append(this.selectTraceAxeY1);
591
592
593
594                // Create menu deroulant  type de graphe
595                 //Titre
596                var titleTypeTrace = document.createTextNode("Type of graph");
597                document.getElementById("nbCourbes").appendChild(titleTypeTrace);
598                var spaceBr = document.createElement ("br");
599                document.getElementById("nbCourbes").appendChild(spaceBr);
600                //menu déroulant
601                var paramNbCourbes = new Object();
602                paramNbCourbes.id = "selectNbCourbes";
603                paramNbCourbes.parent = $("#nbCourbes");
604                this.selectNbCourbes = new Select( paramNbCourbes );
605                this.selectNbCourbes.add( 'ca', "One curve for all selection", jQuery.proxy(this.onClickSelectNbCourbes, this ) );
606                this.selectNbCourbes.add( 'cm', "Separated molecules : same graph", jQuery.proxy(this.onClickSelectNbCourbes, this ) );
607                this.selectNbCourbes.add( 'gm', "Separated molecules : different graphs", jQuery.proxy(this.onClickSelectNbCourbes, this ) );
608                this.selectNbCourbes.add( 'gi', "Separated isotopologues : different graphs", jQuery.proxy(this.onClickSelectNbCourbes, this ) );
609                this.selectNbCourbes.add( 'ci', "Separated isotopologues : same graph", jQuery.proxy(this.onClickSelectNbCourbes, this ) );
610                this.selectNbCourbes.selectFirst( false );
611                // this.selectNbCourbes = $( document.createElement( "select" ) );
612                //this.selectNbCourbes.attr( {id:"selectNbCourbes"} );
613               // this.selectNbCourbes.append($( document.createElement( "option" ) ).attr( {value:"ca", text:"One curve for all selection"} ).bind( 'click', jQuery.proxy(this.onClickSelectNbCourbes, [this, "ca" ])));
614                //this.selectNbCourbes.append($( document.createElement( "option" ) ).attr( {value:"cm", text:"One curve for each molecule selected"} ).bind( 'click', jQuery.proxy(this.onClickSelectNbCourbes, [this, "cm" ])));
615                //this.selectNbCourbes.append($( document.createElement( "option" ) ).attr( {value:"ci", text:"One curve for each isotopologue selected"} ).bind( 'click', jQuery.proxy(this.onClickSelectNbCourbes, [this, "ci" ])));
616               // this.selectNbCourbes.append($( document.createElement( "option" ) ).attr( {value:"gm", text:"One graph for each molecule selected"} ).bind( 'click', jQuery.proxy(this.onClickSelectNbCourbes, [this, "gm" ])));
617                //this.selectNbCourbes.append($( document.createElement( "option" ) ).attr( {value:"gi", text:"One graph for each isotopologue selected"} ).bind( 'click', jQuery.proxy(this.onClickSelectNbCourbes, [this, "gi" ])));
618                //$("#nbCourbes").append(this.selectNbCourbes);
619
620
621                // Create menu deroulant  type d'échelle linéaire ou logarithmique  pour le choix y1
622                //Titre
623                var titleScaleY1 = document.createTextNode("Select the type of Scale (if intensity is choosen)");
624                document.getElementById("scaleY1Titre").appendChild(titleScaleY1);
625                //menu déroulant
626                var paramSelectScaleY1 = new Object();
627                paramSelectScaleY1.id = "selectScaleY1";
628                paramSelectScaleY1.parent = $("#scaleY1");
629                this.selectScaleY1 = new Select( paramSelectScaleY1 );
630                this.selectScaleY1.add( 'l', "Linear" );
631                this.selectScaleY1.add( '-log_scale', "Logarithmic" );
632                this.selectScaleY1.selectFirst( false );
633                //this.selectScaleY1 = $( document.createElement( "select" ) );
634               // this.selectScaleY1.attr( {id:"selectScaleY1"} );
635               // var optSelectScaleY1 = $( document.createElement( "option" ) );
636               // optSelectScaleY1.attr( {value:"l", text:"Linear"} );
637               // this.selectScaleY1.append(optSelectScaleY1);
638               // var optSelectScaleY1 = $( document.createElement( "option" ) );
639                //optSelectScaleY1.attr( {value:"-log_scale", text:"Logarithmic"} );
640               // this.selectScaleY1.append(optSelectScaleY1);
641               // $("#scaleY1").append(this.selectScaleY1);
642
643
644                // Create menu deroulant  style de tracer   Y1
645                //Titre
646                var titleTypeTrace = document.createTextNode("Select the type of plot");
647                document.getElementById("typePlotY1").appendChild(titleTypeTrace);
648                var spaceBr = document.createElement ("br");
649                document.getElementById("typePlotY1").appendChild(spaceBr);
650                //menu déroulant
651                var paramSelectTypeTraceY1 = new Object();
652                paramSelectTypeTraceY1.id = "selectTypePlotY1";
653                paramSelectTypeTraceY1.parent = $("#typePlotY1");
654                this.selectTypeTraceY1 = new Select( paramSelectTypeTraceY1 );
655                this.selectTypeTraceY1.add( 'l', "Lines" );
656                this.selectTypeTraceY1.add( 'p', "Dots" );
657                this.selectTypeTraceY1.add( 'i', "Peaks" );
658                this.selectTypeTraceY1.add( 'lp', "Lines and Dots" );
659                this.selectTypeTraceY1.selectFirst( false );
660                //this.selectTypeTraceY1 = $( document.createElement( "select" ) );
661                //this.selectTypeTraceY1.attr( {id:"selectTypePlotY1"} );
662                //this.selectTypeTraceY1.append($( document.createElement( "option" ) ).attr( {value:"l", text:"Lines"} ));
663                //this.selectTypeTraceY1.append($( document.createElement( "option" ) ).attr( {value:"p", text:"Dots"} ));
664                //this.selectTypeTraceY1.append($( document.createElement( "option" ) ).attr( {value:"i", text:"Peaks"} ));
665                //this.selectTypeTraceY1.append($( document.createElement( "option" ) ).attr( {value:"lp", text:"Lines and Dots"} ));
666                //$("#typePlotY1").append(this.selectTypeTraceY1);
667
668
669
670
671                //lien pour montrer ou cacher le bloc "advanced options"
672                var showHide = $(document.createElement("a"));
673                showHide.html("Show advanced options");
674                showHide.attr( {id:"aShowHide", class:"fieldsetGeneralTitle"} );
675                showHide.bind( 'click', this, jQuery.proxy( this.onClickShowAdvancedOptions));
676                $("#showAdvancedOptions").append(showHide);
677
678
679                //titre  menu deroulant  transition upper
680                var titleTransitionUpper = document.createTextNode("Upper state : ");
681                document.getElementById("transitionUpper").appendChild(titleTransitionUpper);
682
683
684                // Create menu deroulant  transition upper
685//                var paramSelectTransitionUpper = new Object();
686//                paramSelectTransitionUpper.id = "transition1";
687//                paramSelectTransitionUpper.parent = $("#transitionUpper");
688//                this.selectTransitionUpper = new Select( paramSelectTransitionUpper );
689//                this.selectTransitionUpper.add( '-1', "Select a molecule" );
690//                this.selectTransitionUpper.selectFirst( false );
691
692                this.selectTransitionUpper = $( document.createElement( "select" ) );
693                this.selectTransitionUpper.attr( {id:"transition1"} );
694                //fonction sur le menu déroulant (des qu'on clique dessus) et non sur chacune des options
695                this.selectTransitionUpper.bind( 'click', jQuery.proxy(this.OnclickVerifTransition, this));
696                var optTransitionUpper = $( document.createElement( "option" ) );
697                optTransitionUpper.attr( {value:"-1", text:"Select a molecule"} );
698                //var  transitionsLower ="000";
699                // opt2.bind( 'click', jQuery.proxy(this.requestTransitionByTransitionLower, [this, transitionsLower ]));
700                this.selectTransitionUpper.append(optTransitionUpper);
701                $("#transitionUpper").append(this.selectTransitionUpper);
702
703
704                //titre  menu deroulant  transition lower
705                var titleTransitionLower = document.createTextNode("Lower state : ");
706                document.getElementById("transitionLower").appendChild(titleTransitionLower);
707
708                // Create menu deroulant  transition lower
709//                var paramSelectTransitionLower = new Object();
710//                paramSelectTransitionLower.id = "transition2";
711//                paramSelectTransitionLower.parent = $("#transitionLower");
712//                this.selectTransitionLower = new Select( paramSelectTransitionLower );
713//                this.selectTransitionLower.add( '-1', "Select a molecule");
714//                this.selectTransitionLower.selectFirst( false );
715                this.selectTransitionLower = $( document.createElement( "select" ) );
716                this.selectTransitionLower.attr( {id:"transition2"} );
717                this.selectTransitionLower.bind( 'click', jQuery.proxy(this.OnclickVerifTransition, this));
718                var optTransitionLower = $( document.createElement( "option" ) );
719                optTransitionLower.attr( {value:"-1", text:"Select a molecule"} );
720                this.selectTransitionLower.append(optTransitionLower);
721                $("#transitionLower").append(this.selectTransitionLower);
722
723                //bouton reset pour les transition
724                var resetButton = new Button( {value:"Reset", parent:$( "#transitionReset" ), id:"buttonReset", className: "gray_button", onClick:jQuery.proxy( this.requestTransition, this )} );
725
726
727//                //menu déroulant  js   en javascript    sans passer par le modele
728//                var select = document.createElement('select');
729//                select.id = "transiEssai";
730//                select.name ="transiEssai";
731//
732//                var opt = document.createElement('option');
733//                opt.setAttribute('value','id1');
734//                var theText = document.createTextNode("id1");
735//                opt.appendChild(theText);
736//                select.appendChild(opt);
737//
738//                var opt = document.createElement('option');
739//                opt.setAttribute('value','id2');
740//                var theText = document.createTextNode("id2");
741//                opt.appendChild(theText);
742//
743//                //opt.onclick=jQuery.proxy(this.requestTransitionByTransitionLower, [this, transitionsLower ]);
744//                    select.appendChild(opt);
745//                    document.getElementById("transitionLower").appendChild(select);
746
747
748                //menu déroulant en jquery    sans passer par le modele
749//                this.select2 = $( document.createElement( "select" ) );
750//                this.select2.attr( {id:"transiEssai2", name:"transiEssai2"} );
751//                var opt2 = $( document.createElement( "option" ) );
752//                opt2.attr( {value:"id3", text:"zzz"} );
753//                //var  transitionsLower ="000";
754//                // opt2.bind( 'click', jQuery.proxy(this.requestTransitionByTransitionLower, [this, transitionsLower ]));
755//                this.select2.append(opt2);
756//                $("#transitionLower").append(this.select2);
757
758
759
760
761                //Zone text Mean Value
762                //Titre
763                var titleMeanValue = document.createTextNode("Step : ");
764                document.getElementById("meanValue1").appendChild(titleMeanValue);
765                //champ input
766                var inputMeanValue = $( document.createElement( "input" ) );
767                inputMeanValue.attr( {id:"meanValue2", size:6} );
768                inputMeanValue.val(0);
769                this.containerFormMeanValue1.append( inputMeanValue );
770                inputMeanValue.bind( 'blur', this, jQuery.proxy( this.onBlurInputMeanValue, this ));
771
772
773                // Create menu deroulant  2eme choix axe des y
774                //Titre
775                var titleAxeY2 = document.createTextNode("Select secondary parameter (right Y-axis)");
776                document.getElementById("axeY2Titre").appendChild(titleAxeY2);
777                //menu déroulant
778                var paramSelectAxeY2 = new Object();
779                paramSelectAxeY2.id = "selectAxeY2";
780                paramSelectAxeY2.parent = $("#axeY2");
781                this.selectTraceAxeY2 = new Select( paramSelectAxeY2 );
782                this.selectTraceAxeY2.add( 'no', "None", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
783                this.selectTraceAxeY2.add( 'B', "Intensity", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
784                this.selectTraceAxeY2.add( 'C', "Air broadening pressure halfwidth", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
785                this.selectTraceAxeY2.add( 'D', "Energy of the lower transition level", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
786                this.selectTraceAxeY2.add( 'F', "Temperature of the air broadening halfwidth ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
787                this.selectTraceAxeY2.add( 'N', "Self broadening pressure halfwidth (HWHM)", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
788                this.selectTraceAxeY2.add( 'O', "Air pressure shift of the line transition", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
789                this.selectTraceAxeY2.add( 'R', "Temperature of the air pressure shift ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
790                this.selectTraceAxeY2.selectFirst( false );
791                //this.selectTraceAxeY2 = $( document.createElement( "select" ) );
792                //this.selectTraceAxeY2.attr( {id:"selectAxeY2"} );
793                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"no", text:"None"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "no" ])));
794                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"B", text:"Intensity"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "B" ])));
795                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"C", text:"Air broadening pressure halfwidth"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "C" ])));
796                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"D", text:"Energy of the lower transition level"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "D" ])));
797                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"F", text:"Temperature of the air broadening halfwidth"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "F" ])));
798                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"N", text:"Self broadening pressure halfwidth (HWHM)"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "N" ])));
799                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"O", text:"Air pressure shift of the line transition"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "O" ])));
800                //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"R", text:"Temperature of the air pressure shift"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "R" ])));
801                //$("#axeY2").append(this.selectTraceAxeY2);
802
803
804                // Create menu deroulant  type d'échelle linéaire ou logarithmique  pour le choix y2
805                //Titre
806                var titleScaleY2 = document.createTextNode("Select the type of Scale (if intensity is choosen)");
807                document.getElementById("scaleY2Titre").appendChild(titleScaleY2);
808                //menu déroulant
809                var paramSelectScaleY2 = new Object();
810                paramSelectScaleY2.id = "SelectScaleY2";
811                paramSelectScaleY2.parent = $("#scaleY2");
812                this.selectScaleY2 = new Select( paramSelectScaleY2 );
813                this.selectScaleY2.add( 'l', "Linear" );
814                this.selectScaleY2.add( '-log_scale2', "Logarithmic" );
815                this.selectScaleY2.selectFirst( false );
816                //est inactif par defaut car selectTraceAxeY2 est positionne a none par defaut
817                document.getElementById("scaleY2Titre").className = "notActiveText";
818                this.selectScaleY2.disable();
819
820
821                //this.selectScaleY2 = $( document.createElement( "select" ) );
822                //this.selectScaleY2.attr( {id:"selectScaleY2"} );
823                //var optSelectScaleY2 = $( document.createElement( "option" ) );
824                //optSelectScaleY2.attr( {value:"l", text:"Linear"} );
825               // this.selectScaleY2.append(optSelectScaleY2);
826               // var optSelectScaleY2 = $( document.createElement( "option" ) );
827               // optSelectScaleY2.attr( {value:"-log_scale2", text:"Logarithmic"} );
828                //this.selectScaleY2.append(optSelectScaleY2);
829                //$("#scaleY2").append(this.selectScaleY2);
830                //est inactif par defaut car selectTraceAxeY2 est positionne a none par defaut
831                //document.getElementById("scaleY2Titre").className = "notActiveText";
832                //document.getElementById("selectScaleY2" ).disabled=true;
833
834
835                // Create menu deroulant  style de tracer       Y2
836                //Titre
837                var titleTypeTrace = document.createTextNode("Select the type of plot");
838                document.getElementById("typePlotY2Titre").appendChild(titleTypeTrace);
839                //menu déroulant
840                var paramSelectTypeTraceY2 = new Object();
841                paramSelectTypeTraceY2.id = "selectTypePlotY2";
842                paramSelectTypeTraceY2.parent = $("#typePlotY2");
843                this.selectTypeTraceY2 = new Select( paramSelectTypeTraceY2 );
844                this.selectTypeTraceY2.add( 'l', "Lines" );
845                this.selectTypeTraceY2.add( 'p', "Dots" );
846                this.selectTypeTraceY2.add( 'i', "Peaks" );
847                this.selectTypeTraceY2.add( 'lp', "Lines and Dots" );
848                this.selectTypeTraceY2.selectFirst( false );
849                //est inactif par defaut car selectTraceAxeY2 est positionne a none par defaut
850                document.getElementById("typePlotY2Titre").className = "notActiveText";
851                this.selectTypeTraceY2.disable();
852                //this.selectTypeTraceY2 = $( document.createElement( "select" ) );
853                //this.selectTypeTraceY2.attr( {id:"selectTypePlotY2"} );
854                //this.selectTypeTraceY2.append($( document.createElement( "option" ) ).attr( {value:"l", text:"Lines"} ));
855                //this.selectTypeTraceY2.append($( document.createElement( "option" ) ).attr( {value:"p", text:"Dots"} ));
856                //this.selectTypeTraceY2.append($( document.createElement( "option" ) ).attr( {value:"i", text:"Peaks"} ));
857                //this.selectTypeTraceY2.append($( document.createElement( "option" ) ).attr( {value:"lp", text:"Lines and Dots"} ));
858                //$("#typePlotY2").append(this.selectTypeTraceY2);
859                //est inactif par defaut car selectTraceAxeY2 est positionne a none par defaut
860               // document.getElementById("typePlotY2Titre").className = "notActiveText";
861               // document.getElementById("selectTypePlotY2" ).disabled=true;
862
863
864
865                //création de l'image d'attente
866                var param = new Object();
867               param.id = "loadingForGraphics";
868               param.parent = this.containerLoading;
869               this.loadingGraphics = new Loading( param );
870              // this.loadingGraphics.display();
871               //this.loadingGraphics.hide();
872
873
874                // var submitButton = new Button( {value:"Submit", parent:$( "#boutonSubmit" ), id:"button_submit_3", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} );
875                var submitButton = new Button( {value:"Submit", parent:$( "#boutonSubmit" ), id:"button_submit_3", className: "positive", onClick:jQuery.proxy( this.onClickSubmit, this )} );
876                 //bouton reset pour toute la page
877                var resetPageButton = new Button( {value:"Reset", parent:$( "#boutonSubmit" ), id:"buttonReset", className: "gray_button", onClick:jQuery.proxy( this.resetPage, this )} );
878
879
880                //this.resetEssai = $( document.createElement( "input" ) );
881                //this.resetEssai.attr( {type:"reset", name:"reset"} );
882                //$("#boutonSubmit").append(this.resetEssai);
883            },
884
885
886
887
888            /**
889             * This method creates the case to check for the moles
890             * create cases à cocher pour les molécules
891             * @param container
892             * @param moleculesArray
893             */
894                //createMolecules: function(container, moleculesArray)
895            createMolecules: function(container, moleculesArray, BddVersion)
896            {
897                var table = $(document.createElement("table"));
898                container.append(table);
899                // var tr = $(document.createElement("tr"));
900                // tr.attr({valign: "top"});
901                // table.append(tr);
902                var i=0;
903                //nombre de molecules par ligne
904                var l=11;
905                //taille du tableau
906                //alert("l" +moleculesArray.length);
907                // parseInt : partie entiÚre
908                // var res =  parseInt(8/3);
909                //alert("res="+res);
910
911                $.each(moleculesArray, jQuery.proxy( function(index, moleculeElement )
912                {
913
914
915                    //this.tr et non var tr pour que tr existe encore à la sortie du if
916                    if ( index == (i*l))
917                    {
918                        //alert(index);
919                        this.tr = $(document.createElement("tr"));
920                        this.tr.attr({valign: "top"});
921                        table.append(this.tr);
922                        i=i+1;
923
924                    }
925                    var td = $(document.createElement("td"));
926                    this.tr.append(td);
927
928                    var span= $(document.createElement("span"));
929                    span.addClass("molecule");
930                    td.append(span);
931
932                    var input = $(document.createElement("input"));
933                    input.attr({type:"checkbox", id:"all-"+moleculeElement.id+"-"+BddVersion});
934                    input.bind( 'click', this, jQuery.proxy( this.cliquetout, [this, moleculeElement.id, BddVersion ] ));
935                    span.append(input);
936
937                    var a = $(document.createElement("a"));
938                    a.html("<b>"+moleculeElement.name+"</b>");
939
940                    a.bind( 'click', this, jQuery.proxy( this.visibilite, [this,"Cache-"+ moleculeElement.id] ));
941                    span.append(a);
942
943                    var div= $(document.createElement("div"));
944                    div.addClass("divViolet");
945                    div.attr({id:"Cache-"+moleculeElement.id, style: "display:none"});
946                    td.append(div);
947
948                    var spanIsotopes= $(document.createElement("span"));
949                    spanIsotopes.addClass("isotope");
950                    spanIsotopes.attr({id:moleculeElement.id+"Isotope"+BddVersion});
951                    div.append(spanIsotopes);
952
953
954                    this.createIsotopes($("#"+moleculeElement.id+"Isotope"+BddVersion), moleculeElement.isotopesArray, moleculeElement.id, BddVersion);
955
956
957                }, this) );
958
959
960            },
961
962            createIsotopes: function(container, isotopesArray, moleculeElement, BddVersion )
963            {
964
965
966                $.each(isotopesArray, jQuery.proxy( function( index, isotopeElement )
967                {
968                    container.append("&nbsp;&nbsp;&nbsp;");
969                    var inputIsotopes = $(document.createElement("input"));
970                    inputIsotopes.attr({type:"checkbox", id:"chk-"+moleculeElement+"_"+isotopeElement+"-"+BddVersion, name:"moles", value:moleculeElement+"_"+isotopeElement});
971                    inputIsotopes.bind( 'click', this, jQuery.proxy( this.cliqueIsotope, [this, moleculeElement+"_"+isotopeElement, moleculeElement, BddVersion ] ));
972                    container.append(inputIsotopes);
973                    container.append(isotopeElement);
974                    var br = $(document.createElement("br"));
975                    container.append(br);
976
977                }, this) );
978            },
979
980            // <table><tr><td>
981            // <span class="molecule"><input type=checkbox id=all-ch3cn-GEISA2011 onclick="cliquetout('this, ch3cn, GEISA2011');">
982            //          <a href="javascript:visibilite('this, Cache-ch3cn');"><B>CH<sub>3</sub>CN</a></B>
983            // </span>
984            // <div class="divViolet" id="Cache-ch3cn" style="display:none;">
985            //          <span class="isotope" id="ch3cnIsotopeGEISA2011">&nbsp;&nbsp;&nbsp;<input type=checkbox id=chk-ch3cn_234-GEISA2011 name=moles value=ch3cn_234 onclick="cliqueIsotope('this, ch3cn_234, GEISA2011');">234<br></span>
986            // </div>
987            // </td></tr></table>
988
989// REQUESTS ********************************************************
990            //récupération de toutes les valeurs choisies par l'utilisateur et transformation de ces valeurs pour les inclure dans la requête fortran
991            requestGeisa: function()
992            {
993                //temps en ms pour obtenir un nom unique de répertoire
994                //this.dateTime = new Date().getTime();
995                var dateTime = new Date().getTime();
996                this.NomRepFileOut = "graph"+dateTime+"/";
997
998//                var verification = this.verifyBob();
999//                if(verification)
1000                // appel ajax
1001
1002                 //sélection du fichier binaire de la base geisa sélectionnée
1003                var paramBase = "";
1004                switch (this.selectDatabase.getValue()) {
1005                    case 'GEISA2003':
1006                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0 -input_format asc -database_name GEISA2003 -database_type gs03 -type_out png";
1007                        break;
1008                    case 'GEISA2011':
1009                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2009_bin -database_name GEISA2011 -database_type gs08 -type_out png";
1010                        break;
1011                    case 'GEISAIASI2003':
1012                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0 -input_format asc -database_name GEISAIASI2003 -database_type gsi03 -type_out png";
1013                        break;
1014                    case 'GEISAIASI2011':
1015                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0 -database_name GEISAIASI2011 -database_type gsi08 -type_out png";
1016                        break;
1017                }
1018
1019
1020                //molécules
1021                //récupération des molécules sélectionnées
1022                var inputs = document.getElementsByTagName( 'input' );
1023                var count = inputs.length;
1024                var isotopesSelectedName ="";
1025              //  alert(this.selectDatabase.getValue());
1026                var i=0;
1027                this.nbIsotopes = 0;
1028                this.nbMolecules = 0;
1029                this.nbGraph = 0;
1030                for( i = 0; i < count; i++ )
1031                {
1032                    var input = inputs.item( i );
1033                    //ne prendre que les isotopes sélectionnés dans la base de données sélectionnée  (rechercher des id du type :  "chk-ch3cn-GEISA-11")
1034                    if( input.type == 'checkbox' && input.checked == true && input.id.indexOf("chk-")!= -1 && input.id.indexOf(this.selectDatabase.getValue())!= -1)
1035                    {
1036                        //nombre d'isotopes sélectionnés
1037                        this.nbIsotopes =  this.nbIsotopes + 1;
1038
1039                        var molN=input.value;
1040                        var molN1=molN.replace("_", ":");
1041                        // exemple : -moleisot h2o:161 -moleisot h2o:162 -moleisot co2:626 -moleisot co2:627 -moleisot o3:666 -moleisot o3:668
1042                        isotopesSelectedName = isotopesSelectedName+"-moleisot "+molN1+" ";
1043                    }
1044                    //récupération du nombre de molécules sélectionnées
1045                    if( input.type == 'checkbox' && input.checked == true && input.id.indexOf("all-")!= -1 && input.id.indexOf(this.selectDatabase.getValue())!= -1)
1046                    {
1047                        //nombre d'isotopes sélectionnés
1048                        this.nbMolecules =  this.nbMolecules + 1;
1049                    }
1050                }
1051
1052
1053                //averti l'utilisateur qu'il faut au moins sélectionner un isotope
1054                if (this.nbIsotopes ==  0) {
1055                    alert("Error : no molecule or isotopoloque was selected");
1056                    return;
1057                }
1058
1059
1060
1061                //sélection du nombre de courbes ou de graphs
1062
1063                var nbCourbes = "";
1064
1065                switch (this.selectNbCourbes.getValue()) {
1066                //sswitch (document.getElementById('selectNbCourbes').options[document.getElementById('selectNbCourbes').selectedIndex].value) {
1067                    case 'cm':
1068                        nbCourbes = "-separate_mol -same_graph ";
1069                        this.nbGraph = 1;
1070                        this.nbCourbe =  this.nbMolecules;
1071                        if (this.nbCourbe > 8) {
1072                            alert("Too much molecules selected to draw one curve for each molecule selected");
1073                            return;
1074                        }
1075                        break;
1076                    case 'ci':
1077                        nbCourbes = "-separate_iso -same_graph ";
1078                        this.nbGraph = 1;
1079                        this.nbCourbe =  this.nbIsotopes;
1080                        if (this.nbCourbe > 8) {
1081                            alert("Too much isotopologues selected to draw one curve for each isotopologues selected");
1082                            return;
1083                        }
1084                        break;
1085                    case 'gm':
1086                        nbCourbes = "-separate_mol ";
1087                        this.nbGraph = this.nbMolecules;
1088                        if (this.nbGraph > 20) {
1089                            alert("Too much molecules selected to draw one graph for each molecules selected");
1090                            return;
1091                        }
1092                        break;
1093                    case 'gi':
1094                        nbCourbes = "-separate_iso ";
1095                        this.nbGraph = this.nbIsotopes;
1096                        if (this.nbGraph > 20) {
1097                            alert("Too much isotopologues selected to draw one graph for each isotopologues selected");
1098                            return;
1099                        }
1100                        break;
1101                    default:
1102                        nbCourbes = "";
1103                        this.nbGraph = 1;
1104                        break;
1105                }
1106
1107
1108                //Spectral range
1109                var rangeLower="-wavenb_min "+$("#rangeLower").val();
1110                var rangeUpper="-wavenb_max "+$("#rangeUpper").val();
1111
1112                //controle des valeurs entrées par l'utilisateur
1113
1114                switch (this.selectDatabase.getValue()) {
1115                    case 'GEISA2003':
1116                        //isNaN = n'est pas un nombre
1117                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506)
1118                        {
1119                            alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506");
1120                            return;
1121                        }
1122
1123                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506)
1124                        {
1125                            alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506");
1126                            return;
1127                        }
1128
1129                        break;
1130                    case 'GEISA2011':
1131                        //isNaN = n'est pas un nombre
1132                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506)
1133                        {
1134                            alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506");
1135                            return;
1136                        }
1137
1138                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506)
1139                        {
1140                            alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506");
1141                            return;
1142                        }
1143                        break;
1144                    case 'GEISAIASI2003':
1145                        //isNaN = n'est pas un nombre
1146                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767)
1147                        {
1148                            alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767");
1149                            return;
1150                        }
1151
1152                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767)
1153                        {
1154                            alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767");
1155                            return;
1156                        }
1157                        break;
1158                    case 'GEISAIASI2011':
1159                        //isNaN = n'est pas un nombre
1160                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767)
1161                        {
1162                            alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767");
1163                            return;
1164                        }
1165
1166                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767)
1167                        {
1168                            alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767");
1169                            return;
1170                        }
1171                        break;
1172                }
1173
1174
1175                if ($("#rangeLower").val() == ""  )
1176                {
1177                    rangeLower="";
1178                }
1179
1180                if ($("#rangeUpper").val() == ""  )
1181                {
1182                    rangeUpper="";
1183                }
1184                if( parseInt($("#rangeLower").val())  > parseInt($("#rangeUpper").val()) )
1185                {
1186                    alert("Error: lower spectral range area is superior to upper spectral range area ");
1187                    return;
1188                }
1189
1190
1191
1192                //Sampling step
1193                if( $("#sampStep").val() > 0 )
1194                {
1195                    var samplingStep="-band "+$("#sampStep").val();
1196                    //calcul du nombre de graphs générés par l'option  Sampling step
1197                    this.nbGraphSamplingStep = (parseFloat($("#rangeUpper").val()) - parseFloat($("#rangeLower").val())) / parseFloat($("#sampStep").val());
1198                    //calcul du nombre de graphs total à tracer   (nbr de graph générés par "type of graph" * nbr de graph généré par "Sampling Step")
1199                       //test pour voir si    "nbGraphSamplingStep" est un entier
1200                       if ((this.nbGraphSamplingStep - parseInt(this.nbGraphSamplingStep)) == 0)
1201                       {
1202                        this.nbGraph=(this.nbGraph)*(this.nbGraphSamplingStep);
1203                       }
1204                       else
1205                       {
1206                        // si  "nbGraphSamplingStep" n'est pas un entier prendre le nbre entier suivant
1207                        this.nbGraph=this.nbGraph*(parseInt(this.nbGraphSamplingStep)+1);
1208                       }
1209                }
1210
1211                if(isNaN($("#sampStep").val()) == true ||   parseInt($("#sampStep").val()) < 0 )
1212                {
1213                    alert("Error: Invalid value for sampling step");
1214                    return;
1215                }
1216
1217                if( $("#sampStep").val() == 0 )
1218                {
1219                    var samplingStep="";
1220                }
1221
1222                //test sur le nombre de graphs générés
1223                if (this.nbGraph > 20)
1224                {
1225                    alert("Too many graphics will be drawn ("+this.nbGraph+"). Please change the value of the sampling step or change the value of the type of graph.");
1226                    return;
1227                }
1228
1229
1230
1231                //Transitions  to do
1232                //exemple de requete avec transition
1233                //./all -filein line_GEISA2009_bin -moleisot h2o:161 -wavenb_min 1 -wavenb_max 1000 -database_name "GEISA2011" -vib_ident_lower '[000]'
1234                //var TransitionUpper ="-vib_ident_upper '[ "+this.selectTransitionUpper.getValue()+" ]'";
1235                var transitionUpper=document.getElementById('transition1').options[document.getElementById('transition1').selectedIndex].value;
1236                //Enlever les espaces blancs
1237               // TransitionUp= TransitionUp.replace(/ /g,"");
1238               //var TransitionUpper ="-vib_ident_upper ["+TransitionUp+"]";
1239                // var transitionUpper = "["+transitionUp+"]";
1240               // alert ("transitionUpper"+transitionUpper);
1241                //certaine transitions ont plusieurs espaces à droite qui ne sont pas conservés   (ex ch4 et C2HD)
1242                //si la longueur de la chaine de caracteres n'est pas 25 on rajoute le nobre d'espace nécessaire pour arriver à 25
1243                var nb=0;
1244                nb=25-transitionUpper.length
1245                if (nb != 0)
1246                {
1247                    for (i = 1; i <= nb; i++) {
1248                       transitionUpper=transitionUpper+" ";
1249                    }
1250                }
1251
1252                //alert("transitionUpper.length"+transitionUpper.length);
1253                //transitionUpper=transitionUpper+" ";
1254                //alert("transitionUpper.length"+transitionUpper.length);
1255
1256                // var TransitionLower ="-vib_ident_lower '[ "+this.selectTransitionLower.getValue()+" ]'";
1257                  var transitionLower=document.getElementById('transition2').options[document.getElementById('transition2').selectedIndex].value;
1258                //  TransitionLo= TransitionLo.replace(/ /g,"");
1259                 // var TransitionLower ="-vib_ident_lower ["+TransitionLo+"]";
1260                //var transitionLower ="["+transitionLo+"]";
1261
1262                //certaine transitions ont plusieurs espaces à droite qui ne sont pas conservés   (ex ch4 et C2HD)
1263                //si la longueur de la chaine de caracteres n'est pas 25 on rajoute le nobre d'espace nécessaire pour arriver à 25
1264                var nb=0;
1265                nb=25-transitionUpper.length
1266                if (nb != 0)
1267                {
1268                    for (i = 1; i <= nb; i++) {
1269                       transitionUpper=transitionUpper+" ";
1270                    }
1271                }
1272
1273                 //pas de transition sélectionnée
1274                // if (( this.selectTransitionUpper.getValue()== -1) ||  (this.selectTransitionUpper.getValue() == "transition" ))
1275                // {
1276                // TransitionUpper ="";
1277                // }
1278                // if (( this.selectTransitionLower.getValue()== -1) ||  (this.selectTransitionLower.getValue() == "transition" ))
1279                // {
1280                // TransitionLower ="";
1281                // }
1282                if (( document.getElementById('transition1').options[document.getElementById('transition1').selectedIndex].value == -1) ||  (document.getElementById('transition1').options[document.getElementById('transition1').selectedIndex].value == "transition" ))
1283                {
1284                    transitionUpper ="no";
1285                }
1286                if (( document.getElementById('transition2').options[document.getElementById('transition2').selectedIndex].value == -1) ||  (document.getElementById('transition2').options[document.getElementById('transition2').selectedIndex].value == "transition" ))
1287                {
1288                    transitionLower ="no";
1289                }
1290
1291                if ( document.getElementById('transition1').options[document.getElementById('transition1').selectedIndex].value == "")
1292                {
1293                    transitionUpper ="noValue";
1294                }
1295
1296                if ( document.getElementById('transition2').options[document.getElementById('transition2').selectedIndex].value == "")
1297                {
1298                    transitionLower ="noValue";
1299                }
1300
1301                 var sel = document.getElementById('transition1');
1302                 var idupper = sel.options[sel.selectedIndex].value;
1303                  //alert("idupper"+idupper);
1304
1305                //Intensity range
1306                var intensityLower="-int_min "+$("#intensityLo").val();
1307                var intensityUpper="-int_max "+$("#intensityUp").val();
1308
1309                //controle des valeurs entrées par l'utilisateur
1310                 if(isNaN($("#intensityLo").val()) == true ||   $("#intensityLo").val() < 0  )
1311                {
1312                    alert("Error: Invalid value for lower intensity range area. The value must be between 0 and 1E-16");
1313                    return;
1314                }
1315                if ($("#intensityLo").val() == ""  )
1316                {
1317                    intensityLower="";
1318                }
1319                if(isNaN($("#intensityUp").val()) == true ||   $("#intensityUp").val() < 0  )
1320                {
1321                    alert("Error: Invalid value for upper intensity range area. The value must be between 0 and 1E-16");
1322                    return;
1323                }
1324                if ($("#intensityUp").val() == ""  )
1325                {
1326                    intensityUpper="";
1327                }
1328
1329                //to do javascript ne sait comparer des exponenciels
1330              // if( $("#intensityLo").val()  > $("#intensityUp").val() )
1331
1332               // {
1333               //     alert("Error: lower intensity range area is superior to upper intensity range area ");
1334               //     return;
1335               // }
1336
1337
1338                //Valeur de mean value
1339                var meanValue = "-step "+$("#meanValue2").val();
1340                //controle des valeurs entrées par l'utilisateur
1341                //Si ce n'est pas un nombre ou si il est négatif  ou si mean value est supérieur ou égal à l'interval spectral
1342                if(isNaN($("#meanValue2").val()) == true ||   $("#meanValue2").val() < 0 ||   $("#meanValue2").val() >= (parseFloat($("#rangeUpper").val()) - parseFloat($("#rangeLower").val())) )
1343                {
1344                    alert("Error: Invalid value for Average calculation area");
1345                    return;
1346                }
1347                //si aucune valeur
1348                if ($("#meanValue2").val() == ""  )
1349                {
1350                    meanValue="";
1351                }
1352
1353                //sélection du premier choix pour l'axe des Y
1354                 var field="-field "+this.selectTraceAxeY1.getValue();
1355                //   var field="-field "+document.getElementById('selectAxeY1').options[document.getElementById('selectAxeY1').selectedIndex].value;
1356
1357
1358
1359
1360                 //sélection du type d'échelle pour le parametre Y1 (il y a une valeur pour ce champ que si logaritmic est choisi et si l'option est activée)
1361                if  (this.selectScaleY1.getValue() == '-log_scale' && this.selectScaleY1.isDisable == false)
1362                {
1363                    var logScale = this.selectScaleY1.getValue();
1364                }
1365                else
1366                {
1367                    var logScale = ""
1368                }
1369               // if  (document.getElementById('selectScaleY1').options[document.getElementById('selectScaleY1').selectedIndex].value == '-log_scale' && document.getElementById("selectScaleY1" ).disabled == false)
1370               // {
1371               //     var logScale = document.getElementById('selectScaleY1').options[document.getElementById('selectScaleY1').selectedIndex].value;
1372                //}
1373                //else
1374               // {
1375               //     var logScale = ""
1376               // }
1377
1378
1379                //sélection du type de tracé pour Y1
1380                var lineType="-line_type "+this.selectTypeTraceY1.getValue();
1381                //var lineType="-line_type "+document.getElementById('selectTypePlotY1').options[document.getElementById('selectTypePlotY1').selectedIndex].value;
1382
1383
1384                //sélection ou non d'un 2eme choix pour l'axe des Y   (pas de valeur pour ce champ si choix none ou si l'option n'est pas activée)
1385                if  (this.selectTraceAxeY2.getValue() == 'no' ||  this.selectTraceAxeY2.isDisable == true)
1386                //if  (document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value == 'no' ||  document.getElementById("selectAxeY2" ).disabled == true)
1387                {
1388                    var field2 = "";
1389                }
1390                else
1391                {
1392                    var field2 = "-field2 "+this.selectTraceAxeY2.getValue();
1393                    //var field2 = "-field2 "+document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value;
1394                }
1395
1396                //sélection du type d'échelle pour le parametre Y2 (il y a une valeur pour ce champ que si logaritmic est choisi et si l'option est activée)
1397                if  (this.selectScaleY2.getValue() == '-log_scale2' && this.selectScaleY2.isDisable == false)
1398               //  if  (document.getElementById('selectScaleY2').options[document.getElementById('selectScaleY2').selectedIndex].value == '-log_scale2' && document.getElementById("selectScaleY2" ).disabled == false)
1399                {
1400                    var logScale2 =this.selectScaleY2.getValue();
1401                    //  var logScale2 = document.getElementById('selectScaleY2').options[document.getElementById('selectScaleY2').selectedIndex].value;
1402                }
1403                else
1404                {
1405                    var logScale2 = "";
1406                }
1407
1408
1409                //sélection du type de tracé pour Y2  (pas de valeur  si l'option n'est pas activée)
1410                if  ( this.selectTypeTraceY2.isDisable == true)
1411               // if  ( document.getElementById("selectTypePlotY2" ).disabled == true)
1412                {
1413                    var lineType2 = "";
1414                }
1415                else
1416                {
1417                    var lineType2 = "-line_type2 "+this.selectTypeTraceY2.getValue();
1418                    // var lineType2 = "-line_type2 "+document.getElementById('selectTypePlotY2').options[document.getElementById('selectTypePlotY2').selectedIndex].value;
1419                }
1420
1421
1422                //ouverture de la div de l'image d'attente
1423                this.loadingGraphics.display();
1424
1425
1426
1427
1428                //construction de la requête Fortran
1429               // var parameters = "&fortranRequest="+paramBase+" "+isotopesSelectedName+" "+rangeLower+" "+rangeUpper+" "+TransitionUpper+" "+TransitionLower+" "+intensityLower+" "+intensityUpper+" "+
1430                                      // meanValue+" "+nbCourbes+" "+field+" "+logScale+" "+lineType+" "+field2+" "+logScale2+" "+lineType2;
1431
1432                var parameters = "&fortranRequest="+paramBase+" "+isotopesSelectedName+" "+rangeLower+" "+rangeUpper+" "+samplingStep+" "+intensityLower+" "+intensityUpper+" "+
1433                                       meanValue+" "+nbCourbes+" "+field+" "+logScale+" "+lineType+" "+field2+" "+logScale2+" "+lineType2;
1434
1435                 //alert ("parameters"+parameters);
1436
1437                //remplacement de espace par "EEE" pour que le shell script ne voit qu'un seul argument en entrée
1438                parameters=parameters.replace(/ /g,"kkk");
1439                transitionUpper=transitionUpper.replace(/ /g,"kkk");
1440                //le + est interprété comme un espace (plus sera retransformé en + dans le shell)
1441                transitionUpper=transitionUpper.replace(/\+/g,"plus");
1442                transitionLower=transitionLower.replace(/ /g,"kkk");
1443                transitionLower=transitionLower.replace(/\+/g,"plus");
1444
1445
1446                //construction du nom du fichier  (exemple  GEISA2011-0_100)
1447                this.nomFichier=this.selectDatabase.getValue()+"-"+$("#rangeLower").val()+"_"+$("#rangeUpper").val();
1448                //envoie de la requête au controller
1449                //en cas de succes appel de la fonction "handleGeisa"
1450                $.ajax( {
1451                            //url: "project?methodName=createUserRequest&"+parameters+"&nbGraph="+ this.nbGraph,
1452                            //url: "project?methodName=createUserRequest&"+parameters+"&transitionUpper="+ transitionUpper+"&transitionLower="+ transitionLower+"&nbGraph="+ this.nbGraph,
1453                            url: "project?methodName=createUserRequest&"+parameters+"&transitionUpper="+ transitionUpper+"&transitionLower="+ transitionLower+"&nbGraph="+ this.nbGraph+"&nomFichier="+this.nomFichier+"&NomRepFileOut="+this.NomRepFileOut,
1454                            success:jQuery.proxy( this.handleGeisa, this )
1455                        } );
1456            },
1457
1458
1459            //requête pour interrogation de la base de données des transitions
1460            requestTransition: function()
1461            {
1462
1463                var  nbMolecules=0;
1464
1465                //Récupération du spectral range
1466                var spectralRangeLower = $("#rangeLower").val();
1467                var spectralRangeUpper = $("#rangeUpper").val();
1468
1469                //Récupération des isotopes sélectionnés
1470                var inputs = document.getElementsByTagName( 'input' );
1471                var count = inputs.length;
1472                var isotopesSelectedNameArray = new Array();
1473                var i=0;
1474
1475                for( i = 0; i < count; i++ )
1476                {
1477                    var input = inputs.item( i );
1478                    //ne prendre que les isotopes sélectionnés dans la base de données sélectionnée  (rechercher des id du type :  "chk-ch3cn-GEISA-11")
1479                    if( input.type == 'checkbox' && input.checked == true && input.id.indexOf("chk-")!= -1 && input.id.indexOf(this.selectDatabase.getValue())!= -1)
1480                    {
1481                        var molN=input.value;
1482                        var molN1=molN.replace("_", ":");
1483                        //tous les isotopes sélectionnés sont placés dans un tableau
1484                        isotopesSelectedNameArray.push(molN1);
1485                    }
1486
1487                    //récupération du nombre de molécules sélectionnées
1488                    if( input.type == 'checkbox' && input.checked == true && input.id.indexOf("all-")!= -1 && input.id.indexOf(this.selectDatabase.getValue())!= -1)
1489                    {
1490                       nbMolecules =  nbMolecules + 1;
1491                    }
1492
1493                }
1494                //alert ("nbMolecules"+nbMolecules);
1495                //si le nombre de molécule sélectionnées est supérieure Ã  1 les menus des transition sont inactifs
1496                if (nbMolecules > 1)
1497                {
1498
1499                    //this.selectTransitionLower.disable();
1500                    //this.selectTransitionUpper.disable();
1501                    //ajoute une classe à celle déjà existante de transitionUpper
1502                    $("#transitionUpper").addClass("notActiveText");
1503                    $("#transitionLower").addClass("notActiveText");
1504                }
1505                else
1506                {
1507                    //this.selectTransitionLower.enable();
1508                    //this.selectTransitionUpper.enable();
1509                    $("#transitionUpper").removeClass("notActiveText");
1510                    $("#transitionLower").removeClass("notActiveText");
1511                }
1512
1513
1514                //On ne fait appel à la BDD des transitions    et si au plus 1 molécule est sélectionnée
1515                if (nbMolecules == 1 )
1516                {
1517//                    $.ajax( {
1518//                                url: "project?methodName=getTransitionByIsotopeName&isotopesSelectedName="+isotopesSelectedName+"&GeisaSelectedDatabase="+GeisaSelectedDatabase+"&spectralRangeLower="+spectralRangeLower+"&spectralRangeUpper="+spectralRangeUpper,
1519//                                success:jQuery.proxy( this.handleRequestTransition, this )
1520//                            } );
1521
1522                    $.ajax( {
1523                                url: "project?methodName=getTransitionByIsotopeName&isotopesSelectedNameArray="+isotopesSelectedNameArray+"&geisaSelectedDatabase="+this.selectDatabase.getValue2()+"&spectralRangeLower="+spectralRangeLower+"&spectralRangeUpper="+spectralRangeUpper,
1524                                success:jQuery.proxy( this.handleRequestTransition, this ),
1525                                error: jQuery.proxy( this.handleErrorRequestTransition, this )
1526                            } );
1527
1528                }
1529                else
1530                {
1531                    //pour réinitialiser le menu déroulant si aucune ou plusieurs molécules sont sélectionnées
1532                    document.getElementById("transition2").length=0;
1533                    //this.selectTransitionUpper.clear();
1534                    document.getElementById("transition1").length=0;
1535
1536                    if (nbMolecules == 0 )
1537                    {
1538                        //this.selectTransitionLower.add('-1', "Select a molecule");
1539                        this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"-1", text:"Select a molecule", selected:"selected"} ));
1540                        //this.selectTransitionUpper.add('-1', "Select a molecule");
1541                        this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"-1", text:"Select a molecule", selected:"selected"} ));
1542                        //pour forcer à afficher le premier élément (et non le premier élément précédent)
1543                        //this.selectTransitionLower.selectFirst();
1544                        //this.selectTransitionUpper.selectFirst();
1545                    }
1546
1547                    if (nbMolecules > 1 )
1548                    {
1549                        //this.selectTransitionLower.add('-1', "Select a molecule");
1550                        this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"-1", text:"", selected:"selected", disabled:"disabled"} ));
1551                        //this.selectTransitionUpper.add('-1', "Select a molecule");
1552                        this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"-1", text:"", selected:"selected", disabled:"disabled"} ));
1553                        //pour forcer à afficher le premier élément (et non le premier élément précédent)
1554                        //this.selectTransitionLower.selectFirst();
1555                        //this.selectTransitionUpper.selectFirst();
1556                        //ajoute une classe à celle déjà existante de transitionUpper
1557                        $("#transitionUpper").addClass("notActiveText");
1558                        $("#transitionLower").addClass("notActiveText");
1559                    }
1560                }
1561            },
1562
1563
1564
1565
1566            //requête pour interrogation de la base de données des transitions en fonction d'une transition lower
1567            requestTransitionByTransitionLower: function()
1568            {
1569                var context  = this[0];
1570                //exemple transitionLower="                      000" : il y a 25 caractÚres dans chaque transition
1571                 context.transitionLower = this[1];
1572
1573                //Récupération de la Base Geisa sélectionnée
1574                var GeisaSelectedDatabase = context.selectDatabase.getValue();
1575
1576                //Récupération du spectral range
1577                var spectralRangeLower = $("#rangeLower").val();
1578                var spectralRangeUpper = $("#rangeUpper").val();
1579
1580                //Récupération des isotopes sélectionnés
1581                var inputs = document.getElementsByTagName( 'input' );
1582                var count = inputs.length;
1583                var isotopesSelectedNameArray = new Array();
1584                var i=0;
1585
1586                for( i = 0; i < count; i++ )
1587                {
1588                    var input = inputs.item( i );
1589                    //ne prendre que les isotopes sélectionnés dans la base de données sélectionnée  (rechercher des id du type :  "chk-ch3cn-GEISA-11")
1590                    if( input.type == 'checkbox' && input.checked == true && input.id.indexOf("chk-")!= -1 && input.id.indexOf(context.selectDatabase.getValue())!= -1)
1591                    {
1592                        var molN=input.value;
1593                        var molN1=molN.replace("_", ":");
1594                        //tous les isotopes sélectionnés sont placés dans un tableau
1595                        isotopesSelectedNameArray.push(molN1);
1596                    }
1597
1598                }
1599
1600                 //le passage de javascript Ã  java par ajax transforme les + en espace donc transformation des + en plus et dans le controller on fait l'inverse
1601                 var transitionLowerReplaced = context.transitionLower.replace(/\+/g,"plus");
1602
1603                //Appel Ã  la BDD
1604
1605                $.ajax( {
1606                            url: "project?methodName=getTransitionByIsotopeNameByTransitionLower&isotopesSelectedNameArray="+isotopesSelectedNameArray+"&geisaSelectedDatabase="+context.selectDatabase.getValue2()+"&spectralRangeLower="+spectralRangeLower+"&spectralRangeUpper="+spectralRangeUpper+"&transitionLower="+transitionLowerReplaced,
1607                            success:jQuery.proxy( context.handleRequestTransitionByTransitionLower, context)
1608                        } );
1609
1610
1611
1612            },
1613
1614
1615            //requête pour interrogation de la base de données des transitions en fonction d'une transition upper
1616            requestTransitionByTransitionUpper: function()
1617            {
1618                var context  = this[0];
1619                //exemple transitionLower="                      000" : il y a 25 caractÚres dans chaque transition
1620                 context.transitionUpper = this[1];
1621
1622                //Récupération de la Base Geisa sélectionnée
1623                var GeisaSelectedDatabase = context.selectDatabase.getValue();
1624
1625                //Récupération du spectral range
1626                var spectralRangeLower = $("#rangeLower").val();
1627                var spectralRangeUpper = $("#rangeUpper").val();
1628
1629                //Récupération des isotopes sélectionnés
1630                var inputs = document.getElementsByTagName( 'input' );
1631                var count = inputs.length;
1632                var isotopesSelectedNameArray = new Array();
1633                var i=0;
1634
1635                for( i = 0; i < count; i++ )
1636                {
1637                    var input = inputs.item( i );
1638                    //ne prendre que les isotopes sélectionnés dans la base de données sélectionnée  (rechercher des id du type :  "chk-ch3cn-GEISA-11")
1639                    if( input.type == 'checkbox' && input.checked == true && input.id.indexOf("chk-")!= -1 && input.id.indexOf(context.selectDatabase.getValue())!= -1)
1640                    {
1641                        var molN=input.value;
1642                        var molN1=molN.replace("_", ":");
1643                        //tous les isotopes sélectionnés sont placés dans un tableau
1644                        isotopesSelectedNameArray.push(molN1);
1645                    }
1646
1647                }
1648                //le passage de javascript Ã  java par ajax transforme les + en espace donc transformation des + en plus et dans le controller on fait l'inverse
1649                var transitionUpperReplaced = context.transitionUpper.replace(/\+/g,"plus");
1650
1651                //Appel Ã  la BDD
1652                $.ajax( {
1653                            url: "project?methodName=getTransitionByIsotopeNameByTransitionUpper&isotopesSelectedNameArray="+isotopesSelectedNameArray+"&geisaSelectedDatabase="+context.selectDatabase.getValue2()+"&spectralRangeLower="+spectralRangeLower+"&spectralRangeUpper="+spectralRangeUpper+"&transitionUpper="+transitionUpperReplaced,
1654                            success:jQuery.proxy( context.handleRequestTransitionByTransitionUpper, context)
1655                        } );
1656
1657
1658
1659            },
1660
1661
1662
1663//            requestTransition: function()
1664//            {
1665//                $.ajax( {
1666//                            url: "project?methodName=transition&transitionValue="+ this.selectTransitionUpper.getValue(),
1667//                            success:jQuery.proxy( this.handleRequestTransition, this )
1668//                        } );
1669//            },
1670
1671            // HANDLES ******************************************************** = retours ajax
1672            //affichage sur l'interface
1673
1674            handleGeisa: function( result )
1675            {
1676
1677                 //nom du répertoire : exemple de retour de valeur du controleur
1678                //this.nb = jQuery.parseJSON( result ).nb;
1679                //this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut;
1680
1681                //chemin court de l'image
1682                this.pathImg = "<%=Controller.PATH_IMAGES%>"+this.NomRepFileOut;
1683
1684
1685                //Pour tracer le bon nombre de graphe et de bouton download
1686                var i=1;
1687                var content="";
1688                //bouton  "Download All"  si il y a plus d'un graph
1689                if (this.nbGraph > 1)
1690                {
1691                    content = "<a href=project?methodName=downloadFile&fileName=" +this.NomRepFileOut + "GEISA.tar&fileNameToDisplay=GEISA.tar><button class='dataProtocolDownloadButton'>Download All</button></a>";
1692                }
1693                //tracer chaque graphe avec son bouton  download associé
1694                for (i=1; i<this.nbGraph+1; i++) {
1695                    //content = content + '<img src=' + this.pathImg + "graph" + this.nb +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName='  + "graph" + this.nb+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>';
1696                    content = content +'<img src=' + this.pathImg + this.nomFichier +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName=' +this.NomRepFileOut + this.nomFichier+"-"+i + ".png&fileNameToDisplay="+this.nomFichier+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>';
1697                }
1698
1699                this.displayWindow(content);
1700            },
1701
1702
1703            handleRequestTransition: function( result )
1704            {
1705
1706
1707//                var transitions = jQuery.parseJSON( result ).transitions;
1708                 var transitionsLower = jQuery.parseJSON( result ).transitionsLower;
1709                 var transitionsUpper = jQuery.parseJSON( result ).transitionsUpper;
1710
1711                 //pour vider les menus déroulant des transitions précédentes
1712                 // this.selectTransitionLower.clear();
1713                document.getElementById("transition2").length=0;
1714                //this.selectTransitionUpper.clear();
1715                document.getElementById("transition1").length=0;
1716                // this.selectTransitionLower.add('transition', "Choose a transition");
1717                this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"transition", text:"Choose a transition", disabled:"disabled", selected:"selected"} ));
1718
1719                // this.selectTransitionUpper.add('transition', "Choose a transition");
1720                this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"transition", text:"Choose a transition", disabled:"disabled", selected:"selected"} ));
1721
1722                 //pour forcer à afficher le premier élément (et non le premier élément précédent)
1723                // this.selectTransitionLower.selectFirst();
1724                // this.selectTransitionUpper.selectFirst();
1725
1726
1727                $.each(transitionsLower, jQuery.proxy( function(index, transitionsLower )
1728                {
1729                   //  this.selectTransitionLower.add(transitionsLower, transitionsLower,jQuery.proxy(this.requestTransitionByTransitionLower, [this, transitionsLower ]));
1730
1731
1732                    this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:transitionsLower, text:transitionsLower} ).bind( 'click', jQuery.proxy(this.requestTransitionByTransitionLower, [this, transitionsLower ])));
1733
1734                }, this));
1735
1736                $.each(transitionsUpper, jQuery.proxy( function(index, transitionsUpper )
1737                {
1738                    //this.selectTransitionUpper.add(transitionsUpper, transitionsUpper,jQuery.proxy(this.requestTransitionByTransitionUpper, [this, transitionsUpper ]));
1739                    this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:transitionsUpper, text:transitionsUpper} ).bind( 'click', jQuery.proxy(this.requestTransitionByTransitionUpper, [this, transitionsUpper ])));
1740
1741                }, this));
1742
1743            },
1744
1745            //en cas d'erreur dans la requête des transitions ( pas de valeur ou caractÚres à la place de nombres dans champ spectral)
1746            handleErrorRequestTransition :  function()
1747            {
1748             //pour vider les menus déroulant des transitions précédentes
1749                document.getElementById("transition2").length=0;
1750                document.getElementById("transition1").length=0;
1751
1752               this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"modify", text:"Modify spectral range value", disabled:"disabled", selected:"selected"} ));
1753               this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"modify", text:"Modify spectral range value", disabled:"disabled", selected:"selected"} ));
1754
1755            },
1756
1757            handleRequestTransitionByTransitionLower : function( result )
1758            {
1759                //alert("transitionLower"+this.transitionLower);
1760                var transitionsUpperBis = jQuery.parseJSON( result ).transitionsUpperBis;
1761                //alert("transitionsUpper"+transitionsUpper);
1762
1763                //pour vider les menus déroulant des transitions précédentes
1764               // this.selectTransitionLower.clear();
1765                document.getElementById("transition2").length=0;
1766                //this.selectTransitionUpper.clear();
1767                document.getElementById("transition1").length=0;
1768               // while(0 < document.getElementById("transition1").length)
1769               // {
1770               //     document.getElementById("transition1").options[0] = null;
1771               // }
1772
1773
1774                //this.selectTransitionLower.add(this.transitionLower, this.transitionLower);
1775                this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"transition", text:"Choose a transition", disabled:"disabled"} ));
1776                this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:this.transitionLower, text:this.transitionLower,  selected:"selected"} ));
1777                //this.selectTransitionUpper.add('transition', "Choose a transition");
1778                //rajout du text "Choose a transition" selectionné en premier mais on ne peut pas cliquer dessus
1779                this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"transition", text:"Choose a transition", disabled:"disabled", selected:"selected"} ));
1780
1781
1782                //pour forcer Ã  afficher le premier Ã©lément (et non le premier Ã©lément précédent)
1783                //this.selectTransitionLower.selectFirst();
1784                //this.selectTransitionUpper.selectFirst();
1785
1786
1787
1788                $.each(transitionsUpperBis, jQuery.proxy( function(index, transitionsUpperBis )
1789                {
1790                   // this.selectTransitionUpper.add(transitionsUpper, transitionsUpper);
1791                     this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:transitionsUpperBis, text:transitionsUpperBis} ));
1792
1793                }, this));
1794
1795            },
1796
1797
1798            handleRequestTransitionByTransitionUpper : function( result )
1799            {
1800               // alert("transitionUpper"+this.transitionUpper);
1801                var transitionsLowerBis = jQuery.parseJSON( result ).transitionsLowerBis;
1802                //alert("transitionsLower"+transitionsLower);
1803
1804                //pour vider les menus déroulant des transitions précédentes
1805               // this.selectTransitionLower.clear();
1806                document.getElementById("transition2").length=0;
1807                //this.selectTransitionUpper.clear();
1808                document.getElementById("transition1").length=0;
1809
1810               // this.selectTransitionLower.add('transition', "Choose a transition");
1811                this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"transition", text:"Choose a transition", disabled:"disabled", selected:"selected"} ));
1812
1813               // this.selectTransitionUpper.add(this.transitionUpper, this.transitionUpper);
1814                this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"transition", text:"Choose a transition", disabled:"disabled"} ));
1815                this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:this.transitionUpper, text:this.transitionUpper,  selected:"selected"} ));
1816
1817
1818                //pour forcer Ã  afficher le premier Ã©lément (et non le premier Ã©lément précédent)
1819                //this.selectTransitionLower.selectFirst();
1820                //this.selectTransitionUpper.selectFirst();
1821
1822
1823
1824                $.each(transitionsLowerBis, jQuery.proxy( function(index, transitionsLowerBis )
1825                {
1826                    //this.selectTransitionLower.add(transitionsLower, transitionsLower);
1827                    this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:transitionsLowerBis, text:transitionsLowerBis} ));
1828                }, this));
1829
1830            },
1831            // EVENTS ********************************************************
1832            //
1833
1834
1835
1836
1837            //affichage de la valeur du spectral range et affichage du bloc des molecules en fonction de la base de donnees selectionnee
1838            onClickSelectDatabase: function(value)
1839            {
1840
1841                if  ('GEISA2011' == value)
1842                {
1843                    document.getElementById('spectralRangeTitre').innerHTML = "";
1844                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range (0 to 35877.030506 cm<sup>-1</sup>) :";
1845                    //$("#rangeLower").val(0);
1846                    //$("#rangeUpper").val(35877.030506);
1847                    $("#rangeLower").val("");
1848                    $("#rangeUpper").val("");
1849
1850                    document.getElementById( "BDD-GEISA2011" ).style.display = "";
1851                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = "none";
1852                    document.getElementById( "BDD-GEISA2003" ).style.display = "none";
1853                    document.getElementById( "BDD-GEISAIASI2003" ).style.display = "none";
1854                }
1855
1856                if  ('GEISAIASI2011' == value)
1857                {
1858                    document.getElementById('spectralRangeTitre').innerHTML = "";
1859                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing spectral range (599.000793 to 3000.998767 cm<sup>-1</sup>) :";
1860                    //$("#rangeLower").val(599.000793);
1861                    //$("#rangeUpper").val(3000.998767);
1862                    $("#rangeLower").val("");
1863                    $("#rangeUpper").val("");
1864
1865                    document.getElementById( "BDD-GEISA2011" ).style.display = "none";
1866                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = "";
1867                    document.getElementById( "BDD-GEISA2003" ).style.display = "none";
1868                    document.getElementById( "BDD-GEISAIASI2003" ).style.display = "none";
1869                }
1870
1871                if  ('GEISA2003' == value)
1872                {
1873                    document.getElementById('spectralRangeTitre').innerHTML = "";
1874                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range (0 to 35877.030506 cm<sup>-1</sup>) :";
1875                    //$("#rangeLower").val(0);
1876                    //$("#rangeUpper").val(35877.030506);
1877                    $("#rangeLower").val("");
1878                    $("#rangeUpper").val("");
1879
1880                    document.getElementById( "BDD-GEISA2011" ).style.display = "none";
1881                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = "none";
1882                    document.getElementById( "BDD-GEISA2003" ).style.display = "";
1883                    document.getElementById( "BDD-GEISAIASI2003" ).style.display = "none";
1884                }
1885                if  ('GEISAIASI2003' == value)
1886                {
1887                    document.getElementById('spectralRangeTitre').innerHTML = "";
1888                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing spectral range (599.000793 to 3000.998767 cm<sup>-1</sup>) :";
1889                    //$("#rangeLower").val(599.000793);
1890                    // $("#rangeUpper").val(3000.998767);
1891                    $("#rangeLower").val("");
1892                    $("#rangeUpper").val("");
1893
1894                    document.getElementById( "BDD-GEISA2011" ).style.display = "none";
1895                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = "none";
1896                    document.getElementById( "BDD-GEISA2003" ).style.display = "none";
1897                    document.getElementById( "BDD-GEISAIASI2003" ).style.display = "";
1898                }
1899
1900                //mettre a jour le menu déroulant des transitions en fonction des isotopes sélectionnés, de la longueur d'onde et de la base geisa
1901                this.requestTransition();
1902            },
1903
1904            //Pour sélectionner-desélectionner tous les isotopes
1905            selectAll: function()
1906            {
1907                var inputs = document.getElementsByTagName( 'input' );
1908                var count = inputs.length;
1909                var i=0;
1910
1911
1912                if( this.selectButton.getValue() == 'Select all isotopologues')
1913                {
1914                    for( i = 0; i < count; i++ )
1915                    {
1916                        var  input = inputs.item( i );
1917                        if( input.type == 'checkbox' )
1918                        {
1919                            input.checked = true;
1920                        }
1921                    }
1922                    this.selectButton.setValue("Unselect all isotopologues");
1923
1924                }
1925                else
1926                {
1927                    for( i = 0; i < count; i++ )
1928                    {
1929                        var  input = inputs.item( i );
1930                        if( input.type == 'checkbox' )
1931                        {
1932                            input.checked = false;
1933                        }
1934                    }
1935                    this.selectButton.setValue("Select all isotopologues");
1936                }
1937
1938              //mettre a jour le menu déroulant des transitions en fonction des isotopes sélectionnés, de la longueur d'onde et de la base geisa
1939                this.requestTransition();
1940
1941            },
1942
1943            //Pour montrer-cacher tous les isotopes
1944            viewAll: function()
1945            {
1946                var divs = document.getElementsByTagName( 'div' );
1947                var count = divs.length;
1948                var i = 0;
1949                if( this.showButton.getValue() == 'View all isotopologues')
1950                {
1951                    for( i = 0; i < count; i++ )
1952                    {
1953                        //ouvrir que les div dont l'id contient la chaine Cache
1954                        if (divs.item(i).id.indexOf("Cache") != -1) {
1955                            divs.item(i).style.display = "" ;
1956                        }
1957                    }
1958                    this.showButton.setValue("Hide all isotopologues");
1959                }
1960                else
1961                {
1962                    for( i = 0; i < count; i++ )
1963                    {
1964                        //fermer que les div dont l'id contient la chaine Cache
1965                        if (divs.item(i).id.indexOf("Cache") != -1) {
1966                            divs.item(i).style.display = "none" ;
1967                        }
1968                    }
1969                    this.showButton.setValue("View all isotopologues");
1970                }
1971            },
1972
1973            //Actions déclenchées quand on clique sur le nom d'une molécule
1974            cliquetout: function()
1975            {
1976                var context = this[0];
1977                // exemple :moleculeName = ch3ch
1978                var moleculeName = this[1];
1979                var bddVersion = this[2];
1980                var inputs = document.getElementsByTagName( 'input' );
1981                var count = inputs.length;
1982                var i=0;
1983                for( i = 0; i < count; i++ )
1984                {
1985                    var  input = inputs.item( i );
1986                    //cliquer toutes les molécules et isotopes du meme nom dans toutes les bases
1987                    //if( input.type == 'checkbox' && ( input.id == ('chk-' + name + '-GEISA-11') || input.id == ('chk-' + name + '-GEISA-03') || input.id == ('chk-' + name + '-GEISA-IASI-11') || input.id == ('chk-' + name + '-GEISA-IASI-03')
1988                    // || input.id == (name + '-all-GEISA-03') || input.id == (name + '-all-GEISA-11') || input.id == (name + '-all-GEISA-IASI-03') || input.id == (name + '-all-GEISA-IASI-11')))
1989
1990                    if( input.type == 'checkbox' && ( input.id.indexOf('chk-' + moleculeName + '_') != -1 || input.id.indexOf('all-'+moleculeName+'-')!= -1 ))
1991
1992                    {
1993                        input.checked = document.getElementById( 'all-'+ moleculeName + '-' + bddVersion ).checked;
1994                    }
1995                }
1996                //mettre a jour le menu déroulant des transitions en fonction des isotopes sélectionnés, de la longueur d'onde et de la base geisa
1997                context.requestTransition();
1998            },
1999
2000            //actions déclenchées quand on clique sur un isotope
2001            cliqueIsotope: function()
2002            {
2003                var context = this[0];
2004                //exemple isotopeName = ch3cn_134
2005                var isotopeName = this[1];
2006                // exemple  moleculeName= ch3cn
2007                var moleculeName = this[2];
2008                var bddVersion = this[3];
2009                var inputs = document.getElementsByTagName( 'input' );
2010                var count = inputs.length;
2011                var i = 0;
2012                for( i = 0; i < count; i++ )
2013                {
2014                    input = inputs.item( i );
2015
2016                    //id=chk-ch3cn_234-GEISA2011
2017                    //cliquer ou decliquer le meme isotope dans toutes les bases
2018                    if( input.type == 'checkbox' &&  input.id.indexOf('chk-' + isotopeName) != -1)
2019                    {
2020                        input.checked = document.getElementById( 'chk-' + isotopeName + '-' + bddVersion ).checked;
2021
2022                    }
2023                     // id=all-ch3cn-GEISA2011
2024                    //pour décocher la case de la molecule quand on décoche un isotope
2025                   // if( input.type == 'checkbox' && input.id.indexOf('all-'+ moleculeName) != -1 && input.checked == true )
2026                    // {
2027                    //     input.checked = false;
2028                    // }
2029                }
2030
2031
2032                //pour cocher molecule quand on clique sur un isotope et décocher molécule quand tous les isotopes de la molécule sont décochés
2033                var nbIsotopeSelected=0;
2034                var input = "";
2035                var j=0;
2036                var k=0;
2037
2038                //tableau contenant toutes les valeurs du menu déroulant  "choosing Database"
2039                var databaseValues=context.selectDatabase.getValues();
2040                //taille du menu déroulant
2041                var nbdatabaseValues=context.selectDatabase.getSize();
2042
2043                //pour chaque base faire ...
2044                for( j = 0; j < nbdatabaseValues ; j++ )
2045                {
2046                    var nbIsotopeSelected=0;
2047                    //calcul du nombre d'isotopes sélectionnés pour une molécule précise  et une base de données
2048                    for( k = 0; k < count; k++ )
2049                    {
2050                        input = inputs.item( k );
2051                        if( input.type == 'checkbox' &&  input.id.indexOf('chk-'+moleculeName+'_') != -1  && input.id.indexOf(databaseValues[j]) != -1 && input.checked == true )
2052                        {
2053                            nbIsotopeSelected=nbIsotopeSelected+1;
2054                        }
2055
2056                    }
2057                    //si aucun isotope est sélectionné et que la molécule existe dans cette base alors on décoche la molécule
2058                    if ( nbIsotopeSelected == 0 && document.getElementById('all-'+ moleculeName+'-'+databaseValues[j]))
2059                    {
2060                        document.getElementById('all-'+ moleculeName+'-'+databaseValues[j]).checked=false;
2061                    }
2062                    //si au moins unisotope est sélectionné et que la molécule existe dans cette base alors on coche la molécule
2063                    if ( nbIsotopeSelected > 0 && document.getElementById('all-'+ moleculeName+'-'+databaseValues[j]))
2064                    {
2065                        document.getElementById('all-'+ moleculeName+'-'+databaseValues[j]).checked=true;
2066                    }
2067                }
2068
2069
2070                //mettre a jour le menu déroulant des transitions en fonction des isotopes sélectionnés, de la longueur d'onde et de la base geisa
2071                context.requestTransition();
2072
2073            },
2074
2075
2076
2077            //pour cacher ou voir les isotopes d'une molecule
2078            visibilite: function(  )
2079            {
2080                var context = this[0];
2081                var thingId = this[1];
2082                var divs = document.getElementsByTagName( 'div' );
2083                var count = divs.length;
2084                var i = 0;
2085                for( i = 0; i < count; i++ )
2086                {
2087                    var div = divs.item( i );
2088
2089
2090                    if  (  div.id ==   thingId)
2091                    {
2092                        if( div.style.display == "none" )
2093                        {
2094                            div.style.display = "";
2095                        }
2096                        else
2097                        {
2098                            div.style.display = "none";
2099                        }
2100                    }
2101                }
2102            },
2103
2104             //Faire apparatre ou disparaitre le bloc "advanced options" quand on clique sur le lien "show advanced options"
2105             onClickShowAdvancedOptions: function()
2106            {
2107                //document.getElementById( "advancedOptions" ).style.display = "none";
2108                  if( document.getElementById( "advancedOptions" ).style.display == "none" )
2109                        {
2110                            document.getElementById( "advancedOptions" ).style.display = "";
2111                            document.getElementById( "aShowHide" ).innerHTML = "";
2112                            document.getElementById( "aShowHide" ).innerHTML = "Hide advanced options";
2113                        }
2114                        else
2115                        {
2116                            document.getElementById( "advancedOptions" ).style.display = "none";
2117                            document.getElementById( "aShowHide" ).innerHTML = "";
2118                            document.getElementById( "aShowHide" ).innerHTML = "Show advanced options";
2119                        }
2120            },
2121
2122            //si aucun transition n'a Ã©té trouvée
2123            OnclickVerifTransition : function()
2124            {
2125                //si il n'y a qu'un Ã©lément dans les menu déroulant transition upper et lower et que la valeur est "transition"
2126                if (document.getElementById('transition1').length==1 && document.getElementById('transition1').options[0].value=="transition" && document.getElementById('transition2').length==1 && document.getElementById('transition2').options[0].value=="transition")
2127                {
2128                 alert("Change isotopologues selection or spectral range values to obtain transition values");
2129                }
2130                //si il n'y a qu'un Ã©lément dans les menu déroulant transition upper et lower et que la valeur est "transition"
2131                if (document.getElementById('transition1').length==1 && document.getElementById('transition1').options[0].value=="modify" && document.getElementById('transition2').length==1 && document.getElementById('transition2').options[0].value=="modify")
2132                {
2133                 alert("Change spectral range values to obtain transition values");
2134                }
2135            },
2136
2137            onBlurInputMeanValue: function()
2138            {
2139                //si step est sup a 0,   ajout d'une ligne Z aux parametres Y1 et y2  si elle n'est pas déjà présente
2140                // !this.selectTraceAxeY1.content('Z') indique que "Z" n'exite pas dans le menu déroulant  selectTraceAxeY1
2141                if  ($("#meanValue2").val() > 0 && !this.selectTraceAxeY1.content('Z'))
2142               //  if  ($("#meanValue2").val() > 0 && document.getElementById('selectAxeY1').options[document.getElementById('selectAxeY1').selectedIndex].value != "Z")
2143                {
2144
2145                    this.selectTraceAxeY1.add( 'Z', "Number of lines ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
2146                    this.selectTraceAxeY2.add( 'Z', "Number of lines ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
2147                    //this.selectTraceAxeY1.append($( document.createElement( "option" ) ).attr( {value:"Z", text:"Number of lines"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY1, [this, "Z" ])));
2148                    //this.selectTraceAxeY2.append($( document.createElement( "option" ) ).attr( {value:"Z", text:"Number of lines"} ).bind( 'click', jQuery.proxy(this.onClickSelectTraceAxeY2, [this, "Z" ])));
2149                }
2150                //si step = a 0     et autres valeurs (a faire) , retrait de la ligne Z aux parametres Y1 et y2
2151                if  ($("#meanValue2").val() == 0)
2152                {
2153                    this.selectTraceAxeY1.remove( 'Z', "Number of lines ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) );
2154                    this.selectTraceAxeY2.remove( 'Z', "Number of lines ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) );
2155                    //Selection par defaut du 1er element (pour que  "Number of lines"  ne soit plus selectionne par defaut si il n'existe plus)
2156                    this.selectTraceAxeY1.selectFirst();
2157                    this.selectTraceAxeY2.selectFirst();
2158                                     }
2159            },
2160
2161            onClickSelectNbCourbes: function(value)
2162            {
2163              var context  = this[0];
2164              var optionVal = this[1];
2165
2166               //si plusieurs courbes choisis pour les isotopes et ou molecules, les choix pour Y2 sont inactifs
2167                if  ('cm' == value || 'ci' == value)
2168                //if  ('cm' == optionVal || 'ci' == optionVal)
2169                {
2170                    //transformer le texte en gris
2171                    document.getElementById("axeY2Titre").className = "notActiveText";
2172                    document.getElementById("scaleY2Titre").className = "notActiveText";
2173                    document.getElementById("typePlotY2Titre").className = "notActiveText";
2174                    //pour rendre le menu déroulant inactif
2175                    this.selectTraceAxeY2.disable();
2176                    this.selectScaleY2.disable();
2177                    this.selectTypeTraceY2.disable();
2178                    //document.getElementById("selectAxeY2" ).disabled=true;
2179                    //document.getElementById("selectScaleY2" ).disabled=true;
2180                    //document.getElementById("selectTypePlotY2" ).disabled=true;
2181
2182                }
2183                //si une seule courbe choisie pour les isotopes et ou molecules, les choix pour Y2 sont actifs
2184                if  ('ca' == value || 'gm' == value || 'gi' == value)
2185                //if  ('ca' == optionVal || 'gm' == optionVal || 'gi' == optionVal)
2186                {
2187                    //remet le texte en couleur active
2188                    document.getElementById("axeY2Titre").className = "activeText";
2189                    //rendre actif l'echelle que si l'intensite est choisie dans les parametres
2190                    if (this.selectTraceAxeY2.getValue() == 'B')
2191                    {
2192                        document.getElementById("scaleY2Titre").className = "activeText";
2193                    }
2194                    //rendre actif le type de plot si ce n'est pas la valeur none qui est choisie
2195                    if (this.selectTraceAxeY2.getValue() != 'no')
2196                    {
2197                        document.getElementById("typePlotY2Titre").className = "activeText";
2198                    }
2199                    //pour rendre les menu déroulant actifs
2200                    this.selectTraceAxeY2.enable();
2201                    //rendre actif l'echelle que si l'intensite est choisie dans les parametres
2202                    if (this.selectTraceAxeY2.getValue() == 'B')
2203                    {
2204                        this.selectScaleY2.enable();
2205                    }
2206                    //rendre actif le type de plot si ce n'est pas la valeur none qui est choisie
2207                    if (this.selectTraceAxeY2.getValue() != 'no')
2208                    {
2209                        this.selectTypeTraceY2.enable();
2210                    }
2211
2212                    //remet le texte en couleur active
2213                   // document.getElementById("axeY2Titre").className = "activeText";
2214                    //pour rendre les menu déroulant actifs
2215                   // document.getElementById("selectAxeY2" ).disabled=false;
2216                    //rendre actif l'echelle que si l'intensite est choisie dans les parametres
2217                   // if (document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value == 'B')
2218                   // {
2219                   //     document.getElementById("scaleY2Titre").className = "activeText";
2220                    //    document.getElementById("selectScaleY2" ).disabled=false;
2221                    //}
2222                    //rendre actif le type de plot si ce n'est pas la valeur none qui est choisie
2223                   // if (document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value != 'no')
2224                    //{
2225                    //    document.getElementById("typePlotY2Titre").className = "activeText";
2226                    //    document.getElementById("selectTypePlotY2" ).disabled=false;
2227                    //}
2228                }
2229
2230
2231            },
2232
2233
2234            onClickSelectTraceAxeY1: function(value)
2235            {
2236                //si intensite n'est pas choisi pour Y1, le type d'échelle est inactif
2237                if  (this.selectTraceAxeY1.getValue() != 'B')
2238               // if  ( document.getElementById('selectAxeY1').options[document.getElementById('selectAxeY1').selectedIndex].value != 'B')
2239                {
2240                    //transformer le texte en gris
2241                    document.getElementById("scaleY1Titre").className = "notActiveText";
2242                    //pour rendre le menu déroulant inactif
2243                    this.selectScaleY1.disable();
2244                   //  document.getElementById("selectScaleY1" ).disabled=true;
2245                }
2246                //si intensite est  choisi pour Y1, le type d'échelle est actif
2247                if  (this.selectTraceAxeY1.getValue() == 'B')
2248                //if  ( document.getElementById('selectAxeY1').options[document.getElementById('selectAxeY1').selectedIndex].value == 'B')
2249                {
2250                    //transformer le texte en gris
2251                    document.getElementById("scaleY1Titre").className = "activeText";
2252                    //pour rendre le menu déroulant inactif
2253                    this.selectScaleY1.enable();
2254                   // document.getElementById("selectScaleY1" ).disabled=false;
2255                }
2256            },
2257
2258            onClickSelectTraceAxeY2: function(value)
2259            {
2260                //si intensite n'est pas choisi pour Y2, le type d'échelle est inactif
2261                if  (this.selectTraceAxeY2.getValue() != 'B')
2262                 //if  ( document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value != 'B')
2263                {
2264                    //transformer le texte en gris
2265                    document.getElementById("scaleY2Titre").className = "notActiveText";
2266                    //pour rendre le menu déroulant inactif
2267                    this.selectScaleY2.disable();
2268                    //document.getElementById("selectScaleY2" ).disabled=true;
2269                }
2270                //si intensite est  choisi pour Y2, le type d'échelle est actif
2271                if  (this.selectTraceAxeY2.getValue() == 'B')
2272               //if  ( document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value == 'B')
2273                {
2274                    //transformer le texte en foncé
2275                    document.getElementById("scaleY2Titre").className = "activeText";
2276                    //pour rendre le menu déroulant actif
2277                    this.selectScaleY2.enable();
2278                    //document.getElementById("selectScaleY2" ).disabled=false;
2279                }
2280                //si aucun parametre est  choisi pour Y2, le type de plot est inactif
2281                if  (this.selectTraceAxeY2.getValue() == 'no')
2282                //if  ( document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value == 'no')
2283                {
2284                    //transformer le texte en gris
2285                    document.getElementById("typePlotY2Titre").className = "notActiveText";
2286                    //pour rendre le menu déroulant inactif
2287                   this.selectTypeTraceY2.disable();
2288                    // document.getElementById("selectTypePlotY2" ).disabled=true;
2289                }
2290                //si un parametre est  choisi pour Y2, le type de plot est actif
2291               if  (this.selectTraceAxeY2.getValue() != 'no')
2292                // if  ( document.getElementById('selectAxeY2').options[document.getElementById('selectAxeY2').selectedIndex].value != 'no')
2293                {
2294                    //transformer le texte en foncé
2295                    document.getElementById("typePlotY2Titre").className = "activeText";
2296                    //pour rendre le menu déroulant actif
2297                    this.selectTypeTraceY2.enable();
2298                   //document.getElementById("selectTypePlotY2" ).disabled=false;
2299                }
2300
2301            },
2302
2303            //bouton reset de toute la page  (rechargement de la page)
2304            resetPage: function()
2305            {
2306                //location.reload(); //pas appliquée car supprime la fenêtre graphique
2307
2308                //reset du choix de la base de données
2309                // selectFirst : affiche le premier élément de la liste
2310                //true : active la fonction associée au bouton
2311                this.selectDatabase.selectFirst( true );
2312
2313                //cacher tous les isotopes
2314                var divs = document.getElementsByTagName( 'div' );
2315                var count = divs.length;
2316                var i = 0;
2317
2318                for( i = 0; i < count; i++ )
2319                {
2320                    //fermer que les div dont l'id contient la chaine Cache
2321                    if (divs.item(i).id.indexOf("Cache") != -1) {
2322                        divs.item(i).style.display = "none" ;
2323                    }
2324                }
2325                this.showButton.setValue("View all isotopologues");
2326
2327                //déselectionner tous les isotopes
2328                var inputs = document.getElementsByTagName( 'input' );
2329                var count = inputs.length;
2330                var i=0;
2331
2332                for( i = 0; i < count; i++ )
2333                {
2334                    var  input = inputs.item( i );
2335                    if( input.type == 'checkbox' )
2336                    {
2337                        input.checked = false;
2338                    }
2339                }
2340                this.selectButton.setValue("Select all isotopologues");
2341
2342                //spectral range
2343                $("#rangeLower").val(0);
2344                $("#rangeUpper").val(35877.030506);
2345                $("#sampStep").val("");
2346
2347                //intensity range
2348                $("#intensityLo").val(0);
2349                $("#intensityUp").val(1e-16);
2350
2351                this.selectNbCourbes.selectFirst( true );
2352
2353                this.selectTraceAxeY1.selectFirst( true );
2354                this.selectScaleY1.selectFirst( true );
2355                this.selectTypeTraceY1.selectFirst( true );
2356
2357                document.getElementById("transition1").length=0;
2358                document.getElementById("transition2").length=0;
2359                this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"-1", text:"Select a molecule", selected:"selected"} ));
2360                this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"-1", text:"Select a molecule", selected:"selected"} ));
2361                $("#transitionUpper").removeClass("notActiveText");
2362                $("#transitionLower").removeClass("notActiveText");
2363
2364
2365                $("#meanValue2").val("");
2366
2367                this.selectTraceAxeY2.selectFirst( true );
2368                this.selectScaleY2.selectFirst( true );
2369                this.selectTypeTraceY2.selectFirst( true );
2370
2371            },
2372
2373            onClickSubmit: function()
2374            {
2375                this.requestGeisa();
2376            },
2377
2378            displayWindow: function(content)
2379            {
2380                //fermeture de la div de l'image d'attente
2381                this.loadingGraphics.hide();
2382
2383                // var content = '<img src=' + this.pathImg + ' /><a href="project?methodName=downloadFile&fileName='  + this.nameImg + '"><button class="dataProtocolDownloadButton">Download</button></a>';
2384
2385                //alert(content);
2386                var $dialog = $( '<div></div>' )
2387
2388                        .html( content )
2389
2390                        .dialog( {
2391                            autoOpen: false,
2392                            title: "GEISA : spectroscopic database",
2393                            //buttons: { "Close": function() { $(this).dialog("close"); }, "Min": function() { $(this).dialog({ height: 20, width:350  }); },"Max": function() { $(this).dialog({ height: 560, width:700  }); }  },
2394                            buttons:{
2395                                "close":{
2396                                    id:'close',
2397                                    text:'Close',
2398                                    height:'30px',
2399                                    width:'53px',
2400                                    title :'to close the window',
2401                                    click: function() { $(this).dialog("close"); },
2402                                },
2403                                "min" :{
2404                                    id:'Min',
2405                                    text:'-',
2406                                    height:'30px',
2407                                    width:'30px',
2408                                    title :'to reduce the window',
2409                                    click: function() { $(this).dialog({ height:18, width:350  }); },
2410                                },
2411                                "max" :{
2412                                    id:'Max',
2413                                    text:'+',
2414                                    height:'30px',
2415                                    width:'30px',
2416                                    title :'to enlarge the window ',
2417                                    click: function() { $(this).dialog({ height: 640, width:700  }); },
2418                                },
2419                            },
2420
2421                            //minHeight: 500,
2422                            // minWidth: 660,
2423                            height: 640,
2424                            width:700,
2425                            //Exemple de  valeurs possible pour position : "middle", "top",  [200, 100]
2426                            position: "middle"
2427                        } );
2428                $dialog.dialog( 'open' );
2429            },
2430
2431            // displayWindow: function(coordinate)
2432            //{
2433            //var content = '<img src=' + this.pathImg + ' /><a href="project?methodName=downloadFile&fileName=bib.txt"><button class="dataProtocolDownloadButton">Download</button></a>';
2434            // var content = '<img src=' + this.pathImg + ' /><a href="project?methodName=downloadFile&fileName='  + this.nameImg + '"><button class="dataProtocolDownloadButton">Download</button></a>';
2435
2436            //alert(content);
2437            // var $dialog = $( '<div></div>' )
2438            // .html( content + content1 )
2439
2440            // .dialog( {
2441            //    autoOpen: false,
2442            //    title: "GEISA : spectroscopic database",
2443            //    minHeight: 500,
2444            //    minWidth: 660,
2445
2446            //coordonnee y y
2447            //   position:coordinate
2448
2449            // } );
2450            // $dialog.dialog( 'open' )
2451            //},
2452
2453
2454            onClickDownload: function()
2455            {
2456                document.location.href = "project?methodName=downloadFile&fileName=bib.txt";
2457            }
2458
2459
2460        } );
2461
2462
2463</script>
2464
2465
2466
Note: See TracBrowser for help on using the repository browser.