Index: tapas/web/project/formTapas.jsp
===================================================================
--- tapas/web/project/formTapas.jsp	(revision 439)
+++ tapas/web/project/formTapas.jsp	(revision 440)
@@ -29,5 +29,7 @@
     <tiles:put name="body" type="string">
 
-        <div id="formulaire"></div>
+        <div id="formulaire">
+
+        </div>
 
         <div id="errors"></div>
@@ -38,5 +40,6 @@
             tapasTexts["<%=WebException.WebCode.ERROR_JSON_TAPAS_IS_NULL%>"] = "<spring:message code="error.ERROR_JSON_TAPAS_IS_NULL"/>";
 
-            var interfaceTapas = new InterfaceTapas( ${jSonFileFormats}, ${jSonYesNos} );
+            //var interfaceTapas = new InterfaceTapas(${jSonFileFormats},${jSonYesNos},${jSonObservatories},${jSonSelectUnits});
+            var interfaceTapas = new InterfaceTapas(${jSonFileFormats},${jSonYesNos},${jSonObservatories});
         </script>
 
Index: tapas/web/project/formTapas_script.jsp
===================================================================
--- tapas/web/project/formTapas_script.jsp	(revision 439)
+++ tapas/web/project/formTapas_script.jsp	(revision 440)
@@ -2,5 +2,5 @@
 var InterfaceTapas = Class.create( {
 
-    initialize: function( jsonFileFormats, jsonYesNos )
+    initialize: function( jsonFileFormats, jsonYesNos, jsonObservatories )
     {
         /** *********** CONTAINERS *********** **/
@@ -10,9 +10,11 @@
         this.jsonFileFormats = jsonFileFormats || null;
         this.jsonYesNos = jsonYesNos || null;
+        this.jSonObservatories = jsonObservatories || null;
+        //this.jSonSelectUnits = jsonSelectUnits || null;
 
         this.containerErrors.hide();
 
         this.createForm();
-        this.createCalendar( this.containerForm );
+
     },
 
@@ -23,5 +25,5 @@
     {
         // Create input for date text
-        var inputDateId = "observationDate";
+        var inputDateId = "iobservation_date";
         var inputDate = $( document.createElement( "input" ) );
         inputDate.attr( {id:inputDateId, size:"17"} );
@@ -65,10 +67,11 @@
         var input = $( document.createElement( "input" ) );
 
-
         input.attr( {id: inputId} );
         td1.html( texte );
         tr.append( td1 );
         if( type == 'format' ) this.displayFileFormats( td2 );
-        else if( type == 'yesno' ) this.displayYesNo( td2 );
+        else if( type == 'yesno' ) this.displayYesNo( td2, inputId );
+        else if( type == 'observatories' ) this.displayObservatories( td2 );
+        else if( type == 'spectralUnit' ) this.displaySpectralUnits( td2 );
 
         tr.append( td2 );
@@ -80,18 +83,39 @@
     {
 
-        //Creation div
+        //Creation div / tab
         var divPreference = $( document.createElement( "div" ) );
         var tabPreference = $( document.createElement( "table" ) );
 
-        this.createTrList( "File format", "p1", tabPreference, 'format' );
-        this.createTr( "Rayleigh extinction", "p2", tabPreference );
-        this.createTrList( "H20 extinction", "p3", tabPreference, 'yesno' );
-        this.createTrList( "O3 extinction", "p4", tabPreference, 'yesno' );
-        this.createTrList( "O2 extinction", "p5", tabPreference, 'yesno' );
-        this.createTrList( "CO2 extinction", "p6", tabPreference, 'yesno' );
+        var divObservation = $( document.createElement( "div" ) );
+        var tabObservation = $( document.createElement( "table" ) );
+
+        this.createTrList( "File format", "iformat", tabPreference, 'format' );
+        this.createTr( "Rayleigh extinction", "irextinction", tabPreference );
+        this.createTrList( "H20 extinction", "ih2oe", tabPreference, 'yesno' );
+        this.createTrList( "O3 extinction", "io3e", tabPreference, 'yesno' );
+        this.createTrList( "O2 extinction", "io2e", tabPreference, 'yesno' );
+        this.createTrList( "CO2 extinction", "ico2e", tabPreference, 'yesno' );
+
+        this.createTrList( "Observatory", "iobservatory", tabObservation, 'observatories' );
+
+
+
+        this.createCalendar( tabObservation );
+
+
+
+        this.createTr( "Right LOS ascension", "ira", tabObservation );
+        this.createTr( "LOS declension", "ide", tabObservation );
+        this.createTr( "Zenith angle", "iza", tabObservation );
+        // this.createTrList("Spectral unit", "ispectral_choice", tabObservation, 'spectralUnit');
+        this.createTr( "Spectral range", "ispectral_ranger", tabObservation );
+
 
         divPreference.append( tabPreference );
         this.containerForm.append( divPreference );
 
+        divObservation.append( tabObservation );
+        this.containerForm.append( divObservation );
+
         //jQuery.proxy permet d'envoyer le contexte this courant
         var submitButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerForm, id:"button_submit", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} );
@@ -104,5 +128,5 @@
     requestCreateXML: function()
     {
-        var tapasForm = this.createTapasForm();
+        var tapasForm = this.createTapasObject();
         //passage de javascript a json grace au jquery
         var jsonTapasForm = $.toJSON( tapasForm );
@@ -130,4 +154,5 @@
         this.requestCreateXML();
     },
+
 
     // OTHERS ********************************************************
@@ -160,4 +185,35 @@
 
 
+    displayObservatories: function( container )
+    {
+        var paramSelect = new Object();
+        paramSelect.id = "select_observatory";
+        paramSelect.parent = container;
+        this.selectObservatories = new Select( paramSelect );
+        //ajouter select vide avec add
+        this.selectObservatories.add( "-1", "-- Select an observatory --" );
+        jQuery.each( this.jSonObservatories, jQuery.proxy( function ( i, jsonObservatory )
+        {
+            this.selectObservatories.add( jsonObservatory.id, jsonObservatory.name );
+        }, this ) );
+        this.selectObservatories.selectFirst( true );
+    },
+
+
+    displaySpectralUnits: function( container )
+    {
+        var paramSelect = new Object();
+        paramSelect.id = "select_spectral_unit";
+        paramSelect.parent = container;
+        this.selectSpectralUnits = new Select( paramSelect );
+        //ajouter select vide avec add
+        this.selectSpectralUnits.add( "-1", "-- Select unit --" );
+        jQuery.each( this.jSonSpectralUnit, jQuery.proxy( function ( i, jsonSpectralUnit )
+        {
+            this.selectSpectralUnits.add( jsonSpectralUnit.id, jsonSpectralUnit.name );
+        }, this ) );
+        this.selectSpectralUnits.selectFirst( true );
+    },
+
     showErrors: function( result )
     {
@@ -166,5 +222,5 @@
     },
 
-    createTapasForm: function()
+    createTapasObject: function()
     {
         // PREFERENCE
@@ -172,12 +228,17 @@
 
         preference.format = new Object();
-        preference.format.firstValue = $( "#1" ).val();
-        preference.format.secondValue = $( "#2" ).val();
+        //toutes les valeurs possibles
+        //preference.format.firstValue = $( "#select_formats" ).val();
+        preference.format.firstValue = this.selectFormats.getValues();
+        //la valeur selectionnee
+        preference.format.secondValue = this.selectFormats.getValue();
+
 
         var pair = new Object();
         pair.firstValue = "YES,NO";
-        pair.secondValue = "YES";
-
-        preference.rayleighExtinction = pair;
+        pair.secondValue = this.selectFormats.getValue();
+
+        preference.rayleighExtinction = new Object();
+        ;
         preference.h2oExtinction = pair;
         preference.o3Extinction = pair;
@@ -188,20 +249,10 @@
         // Observatory
         var observatory = new Object();
-        observatory.name = "SanFernandoObs.RSanFernando";
-
-        observatory.longitude = new Object();
-        observatory.longitude.min = "-180";
-        observatory.longitude.max = "180";
-        observatory.longitude.value = -118.491666666667;
-
-        observatory.latitude = new Object();
-        observatory.latitude.min = "-90";
-        observatory.latitude.max = "90";
-        observatory.latitude.value = 34.3083333333333;
-
-        observatory.altitude = new Object();
-        observatory.altitude.min = "0";
-        observatory.altitude.max = "10000";
-        observatory.altitude.value = 371;
+        //observatory.name = this.selectFormats.name;
+
+        observatory.longitude = this.longitude.value;
+        observatory.latitude = this.latitude.value;
+        observatory.altitude = this.altitude.value;
+
 
         // Los
@@ -234,5 +285,5 @@
 
         var observation = new Object();
-        observation.date = this.calendarConverter.parse( $( "#observationDate" ).val() ).getTime();
+        observation.date = this.calendarConverter.parse( $( "#iobservation_date" ).val() ).getTime();
         observation.observatory = observatory;
         observation.los = los;
@@ -251,4 +302,5 @@
         atmosphere.ecmwfFile = new Array();
         atmosphere.ecmwfFile[0] = "/home/ferron/tmp/tapas/ecmwf12.txt";
+
 
         // REQUEST
