Index: /ether_megapoli/trunk/common/implementation/com/ether/EtherHelper.java
===================================================================
--- /ether_megapoli/trunk/common/implementation/com/ether/EtherHelper.java	(revision 529)
+++ /ether_megapoli/trunk/common/implementation/com/ether/EtherHelper.java	(revision 530)
@@ -219,3 +219,59 @@
     }
 
+    /**
+     * This method returns only the files included in the directory
+     *
+     * @param pathSimulation
+     * @param fileEnd
+     * @return
+     */
+    public static List<String> getOnlyFileNames( @NotNull final String pathSimulation, @Nullable final String fileEnd )
+    {
+        final List<String> files = new ArrayList<String>();
+        final File directory = new File( pathSimulation );
+        for( final File file : directory.listFiles() )
+        {
+            if( file.isFile() && ( fileEnd != null && file.getName().endsWith( fileEnd ) ) )
+                files.add( file.getName() );
+        }
+        return files;
+    }
+
+    /**
+     * This method returns only the directories included in the directory
+     *
+     * @param pathSimulation
+     * @return
+     */
+    public static List<String> getOnlyDirectorieNames( @NotNull final String pathSimulation )
+    {
+        final List<String> files = new ArrayList<String>();
+        final File directory = new File( pathSimulation );
+        for( final File file : directory.listFiles() )
+        {
+            if( file.isDirectory() )
+                files.add( file.getName() );
+        }
+        return files;
+    }
+
+    /**
+     * This method wait until the file exist (and until the end of duration)
+     * The duration is used to avoid infinite waiting
+     *
+     * @param file
+     * @param duration
+     * @throws InterruptedException
+     */
+    public static void waitForFileWithMax( @NotNull final File file, @NotNull final Integer duration )
+            throws InterruptedException
+    {
+        Integer start = 0;
+        final Integer interval = 1000;
+        while( !file.exists() && start < duration )
+        {
+            Thread.sleep( interval );
+        }
+        start += interval;
+    }
 }
Index: /ether_megapoli/trunk/common/implementation/com/ether/ParameterConstants.java
===================================================================
--- /ether_megapoli/trunk/common/implementation/com/ether/ParameterConstants.java	(revision 529)
+++ /ether_megapoli/trunk/common/implementation/com/ether/ParameterConstants.java	(revision 530)
@@ -35,3 +35,4 @@
     public static final String PARAMETER_CATEGORY = "category";
     public static final String PARAMETER_VERSION = "version";
+    public static final String PARAMETER_DIRECTORY_NAME = "directoryName";
 }
Index: /ether_megapoli/trunk/domain/interface/com/ether/simulation/Attribute.java
===================================================================
--- /ether_megapoli/trunk/domain/interface/com/ether/simulation/Attribute.java	(revision 530)
+++ /ether_megapoli/trunk/domain/interface/com/ether/simulation/Attribute.java	(revision 530)
@@ -0,0 +1,55 @@
+package com.ether.simulation;
+
+import org.jetbrains.annotations.NotNull;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * @author vmipsl
+ * @date 25 juin 2012
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Attribute
+{
+    public Attribute()
+    {
+    }
+
+    public Attribute( @NotNull final String name, @NotNull final String value )
+    {
+        _name = name;
+        _value = value;
+    }
+
+    @NotNull
+    public String getName()
+    {
+        return _name;
+    }
+
+    public void setName( @NotNull final String name )
+    {
+        _name = name;
+    }
+
+    @NotNull
+    public String getValue()
+    {
+        return _value;
+    }
+
+    public void setValue( @NotNull final String value )
+    {
+        _value = value;
+    }
+
+    @NotNull
+    @XmlAttribute
+    private String _name;
+
+    @NotNull
+    @XmlAttribute
+    private String _value;
+}
Index: /ether_megapoli/trunk/domain/interface/com/ether/simulation/Dimension.java
===================================================================
--- /ether_megapoli/trunk/domain/interface/com/ether/simulation/Dimension.java	(revision 530)
+++ /ether_megapoli/trunk/domain/interface/com/ether/simulation/Dimension.java	(revision 530)
@@ -0,0 +1,71 @@
+package com.ether.simulation;
+
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * @author vmipsl
+ * @date 25 juin 2012
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Dimension
+{
+    public Dimension()
+    {
+    }
+
+    public Dimension( @NotNull final String name, @NotNull final String length )
+    {
+        _name = name;
+        _length = length;
+    }
+
+    @NotNull
+    public String getName()
+    {
+        return _name;
+    }
+
+    public void setName( @NotNull final String name )
+    {
+        _name = name;
+    }
+
+    @NotNull
+    public String getLength()
+    {
+        return _length;
+    }
+
+    public void setLength( @NotNull final String length )
+    {
+        _length = length;
+    }
+
+    @Nullable
+    public Boolean getUnlimited()
+    {
+        return _isUnlimited;
+    }
+
+    public void setUnlimited( @Nullable final Boolean unlimited )
+    {
+        _isUnlimited = unlimited;
+    }
+
+    @NotNull
+    @XmlAttribute
+    private String _name;
+
+    @NotNull
+    @XmlAttribute
+    private String _length;
+
+    @Nullable
+    @XmlAttribute
+    private Boolean _isUnlimited;
+}
Index: /ether_megapoli/trunk/domain/interface/com/ether/simulation/SimulationHeader.java
===================================================================
--- /ether_megapoli/trunk/domain/interface/com/ether/simulation/SimulationHeader.java	(revision 530)
+++ /ether_megapoli/trunk/domain/interface/com/ether/simulation/SimulationHeader.java	(revision 530)
@@ -0,0 +1,97 @@
+package com.ether.simulation;
+
+import org.jetbrains.annotations.NotNull;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+/**
+ * @author vmipsl
+ * @date 25 juin 2012
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "netcdf")
+public class SimulationHeader
+{
+    public SimulationHeader()
+    {
+    }
+
+    public String getLocation()
+    {
+        return _location;
+    }
+
+    public void setLocation( final String location )
+    {
+        _location = location;
+    }
+
+    public String getXmlnsHeader()
+    {
+        return _xmlnsHeader;
+    }
+
+    public void setXmlnsHeader( final String xmlnsHeader )
+    {
+        _xmlnsHeader = xmlnsHeader;
+    }
+
+    @NotNull
+    public List<Attribute> getDimension()
+    {
+        return _dimension;
+    }
+
+    public void setDimension( @NotNull final List<Attribute> dimension )
+    {
+        _dimension = dimension;
+    }
+
+    @NotNull
+    public List<Attribute> getAttribute()
+    {
+        return _attribute;
+    }
+
+    public void setAttribute( @NotNull final List<Attribute> attribute )
+    {
+        _attribute = attribute;
+    }
+
+    @NotNull
+    public List<Variable> getVariable()
+    {
+        return _variable;
+    }
+
+    public void setVariable( @NotNull final List<Variable> variable )
+    {
+        _variable = variable;
+    }
+
+    @XmlAttribute
+    private String _location;
+
+    /**
+     * We can't keep the real term "xmlns" because of the method "unmarshal"
+     */
+    @XmlAttribute
+    private String _xmlnsHeader;
+
+    @NotNull
+    @XmlElement(name = "dimension")
+    private List<Attribute> _dimension;
+
+    @NotNull
+    @XmlElement(name = "attribute")
+    private List<Attribute> _attribute;
+
+    @NotNull
+    @XmlElement(name = "variable")
+    private List<Variable> _variable;
+}
Index: /ether_megapoli/trunk/domain/interface/com/ether/simulation/Variable.java
===================================================================
--- /ether_megapoli/trunk/domain/interface/com/ether/simulation/Variable.java	(revision 530)
+++ /ether_megapoli/trunk/domain/interface/com/ether/simulation/Variable.java	(revision 530)
@@ -0,0 +1,114 @@
+package com.ether.simulation;
+
+import org.jetbrains.annotations.NotNull;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import java.util.List;
+
+/**
+ * @author vmipsl
+ * @date 28 juin 2012
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Variable
+{
+    public Variable()
+    {
+    }
+
+    public Integer getId()
+    {
+        return _id;
+    }
+
+    public void setId( final Integer id )
+    {
+        _id = id;
+    }
+
+    @NotNull
+    public String getName()
+    {
+        return _name;
+    }
+
+    public void setName( @NotNull final String name )
+    {
+        _name = name;
+    }
+
+    @NotNull
+    public String getShape()
+    {
+        return _shape;
+    }
+
+    public void setShape( @NotNull final String shape )
+    {
+        _shape = shape;
+    }
+
+    @NotNull
+    public String getType()
+    {
+        return _type;
+    }
+
+    public void setType( @NotNull final String type )
+    {
+        _type = type;
+    }
+
+    @NotNull
+    public List<Attribute> getAttribute()
+    {
+        return _attribute;
+    }
+
+    public void setAttribute( @NotNull final List<Attribute> attribute )
+    {
+        _attribute = attribute;
+    }
+
+    public String getUnits()
+    {
+        return _attribute.get( 0 ).getValue();
+    }
+
+    public void setUnits( final String units )
+    {
+        _attribute.get( 0 ).setValue( units );
+    }
+
+
+    public String getLongName()
+    {
+        return _attribute.get( 1 ).getValue();
+    }
+
+    public void setLongName( final String longName )
+    {
+        _attribute.get( 1 ).setValue( longName );
+    }
+
+    private Integer _id;
+
+    @NotNull
+    @XmlAttribute
+    private String _name;
+
+    @NotNull
+    @XmlAttribute
+    private String _shape;
+
+    @NotNull
+    @XmlAttribute
+    private String _type;
+
+    @NotNull
+    @XmlElement(name = "attribute")
+    private List<Attribute> _attribute;
+}
Index: /ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/Variable.hbm.xml
===================================================================
--- /ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/Variable.hbm.xml	(revision 530)
+++ /ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/Variable.hbm.xml	(revision 530)
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+    <class name="com.ether.simulation.Variable" table="simulation_variable" schema="public">
+        <id name="id">
+            <column name="id"/>
+
+            <generator class="sequence">
+                <param name="sequence">s_variable</param>
+            </generator>
+        </id>
+
+        <property name="name">
+            <column name="name" not-null="true"/>
+        </property>
+
+        <property name="shape">
+            <column name="shape"/>
+        </property>
+
+        <property name="type">
+            <column name="type"/>
+        </property>
+
+        <property name="units">
+            <column name="units"/>
+        </property>
+
+        <property name="longName">
+            <column name="long_name"/>
+        </property>
+    </class>
+</hibernate-mapping>
Index: /ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/VariableDAOImpl.java
===================================================================
--- /ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/VariableDAOImpl.java	(revision 530)
+++ /ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/VariableDAOImpl.java	(revision 530)
@@ -0,0 +1,19 @@
+package com.ether.dao.simulation;
+
+import com.ether.dao.DomainAccessObjectImpl;
+import com.ether.dao.VariableDAO;
+import com.ether.simulation.Variable;
+
+/**
+ * @author vmipsl
+ * @date 03 juillet 2012
+ */
+public class VariableDAOImpl
+        extends DomainAccessObjectImpl<Variable, Integer>
+        implements VariableDAO
+{
+    protected VariableDAOImpl()
+    {
+        super( Variable.class, Integer.class );
+    }
+}
Index: /ether_megapoli/trunk/persistence/implementation/dao-context.xml
===================================================================
--- /ether_megapoli/trunk/persistence/implementation/dao-context.xml	(revision 529)
+++ /ether_megapoli/trunk/persistence/implementation/dao-context.xml	(revision 530)
@@ -52,3 +52,9 @@
     </bean>
 
+    <bean id="refVariableDAO" class="com.ether.dao.simulation.VariableDAOImpl">
+        <property name="sessionFactory">
+            <ref bean="sessionFactory"/>
+        </property>
+    </bean>
+
 </beans>
Index: /ether_megapoli/trunk/persistence/implementation/hibernate-domain.cfg.xml
===================================================================
--- /ether_megapoli/trunk/persistence/implementation/hibernate-domain.cfg.xml	(revision 529)
+++ /ether_megapoli/trunk/persistence/implementation/hibernate-domain.cfg.xml	(revision 530)
@@ -36,4 +36,5 @@
         <mapping resource="com/ether/dao/person/Personne.hbm.xml"/>
         <mapping resource="com/ether/dao/mco/Mco.hbm.xml"/>
+        <mapping resource="com/ether/dao/simulation/Variable.hbm.xml"/>
 
         <!--<mapping resource="com/ether/dao/Query.hbm.xml"/>-->
Index: /ether_megapoli/trunk/persistence/interface/com/ether/dao/VariableDAO.java
===================================================================
--- /ether_megapoli/trunk/persistence/interface/com/ether/dao/VariableDAO.java	(revision 530)
+++ /ether_megapoli/trunk/persistence/interface/com/ether/dao/VariableDAO.java	(revision 530)
@@ -0,0 +1,12 @@
+package com.ether.dao;
+
+import com.ether.simulation.Variable;
+
+/**
+ * @author vmipsl
+ * @date 03 juillet 2012
+ */
+public interface VariableDAO
+        extends DomainAccessObject<Variable, Integer>
+{
+}
Index: /ether_megapoli/trunk/service/implementation/com/ether/EtherServiceImpl.java
===================================================================
--- /ether_megapoli/trunk/service/implementation/com/ether/EtherServiceImpl.java	(revision 529)
+++ /ether_megapoli/trunk/service/implementation/com/ether/EtherServiceImpl.java	(revision 530)
@@ -9,6 +9,9 @@
 import com.ether.dao.UserDAO;
 import com.ether.dao.ValueDAO;
+import com.ether.dao.VariableDAO;
 import com.ether.mco.Mco;
 import com.ether.mco.McoFilter;
+import com.ether.simulation.SimulationHeader;
+import com.ether.simulation.Variable;
 import com.ether.user.User;
 import com.ether.user.UserFilter;
@@ -25,4 +28,11 @@
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.PropertyException;
+import javax.xml.bind.Unmarshaller;
+import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Date;
@@ -576,4 +586,91 @@
     }
 
+    /**
+     * This method create a directory for all ".nc" files in the simulation directory
+     * And create for each a "header_init.xml" file which contents the attributes, variables, dimensions, etc... for the simulation
+     * The second line of the "header_init.xml" file is changed by "xmlnsHeader" because of the term "xmlns" which is not ok for the "unmarshall" method
+     * The real file to work becomes "header.xml"
+     *
+     * @param simulationPath
+     */
+    public void launchNCDumpInSimulationDirectory( @NotNull final String simulationPath )
+            throws ServiceException
+    {
+        final File simulationsDirectory = new File( simulationPath );
+        for( final String fileName : simulationsDirectory.list() )
+        {
+            if( fileName.endsWith( ".nc" ) )
+            {
+                // Create directory and move simulation file into
+                final String shortFileName = fileName.substring( 0, fileName.lastIndexOf( '.' ) );
+                final String directoryName = simulationPath + File.separatorChar + shortFileName;
+                final File directory = new File( directoryName );
+                final File file = new File( simulationPath + File.separatorChar + fileName );
+                if( !directory.exists() )
+                {
+                    directory.mkdir();
+                    file.renameTo( new File( directoryName + File.separatorChar + fileName ) );
+                    try
+                    {
+                        final Runtime runtime = Runtime.getRuntime();
+                        final String headerInit = directoryName + File.separatorChar + "header_init.xml";
+                        final String[] argsNcdump = {"/bin/sh", "-c", "/usr/bin/ncdump -h -x " + directoryName + File.separatorChar + fileName + " > " + headerInit};
+                        runtime.exec( argsNcdump );
+                        EtherHelper.waitForFileWithMax( new File( headerInit ), 5000 );
+                        final String[] argsSed = {"/bin/sh", "-c", "sed s/xmlns/xmlnsHeader/ " + directoryName + File.separatorChar + "header_init.xml > " + directoryName + File.separatorChar + FILE_HEADER_NAME};
+                        runtime.exec( argsSed );
+                    }
+                    catch( IOException e )
+                    {
+                        throw new ServiceException( ServiceException.ServiceCode.ERROR_PROCESS_SIMULATION_NCDUMP, e );
+                    }
+                    catch( InterruptedException e )
+                    {
+                        throw new ServiceException( ServiceException.ServiceCode.ERROR_PROCESS_SIMULATION_NCDUMP_WAIT, e );
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * This method insert the header in database
+     * The new variables are separatly created in the table ....
+     * The metadata are saved in the table ....
+     *
+     * @param simulationPath
+     * @param directoryName
+     */
+    public void insertHeader( @NotNull final String simulationPath, @NotNull final String directoryName )
+            throws ServiceException
+    {
+        try
+        {
+            final String fileName = simulationPath + File.separatorChar + directoryName + File.separatorChar + FILE_HEADER_NAME;
+
+            final JAXBContext context = JAXBContext.newInstance( SimulationHeader.class );
+            final Marshaller marshaller = context.createMarshaller();
+            marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, true );
+            final Unmarshaller uMarshaller = context.createUnmarshaller();
+            final SimulationHeader simulation = (SimulationHeader) uMarshaller.unmarshal( new File( fileName ) );
+
+            final Variable var = simulation.getVariable().get( 0 );
+            _variableDAO.insert( var );
+            final String bob = "bib";
+        }
+        catch( PersistenceException e )
+        {
+            throw new ServiceException( ServiceException.ServiceCode.PERSISTENCE, e );
+        }
+        catch( PropertyException e )
+        {
+            throw new ServiceException( ServiceException.ServiceCode.ERROR_PROPERTY, e );
+        }
+        catch( JAXBException e )
+        {
+            throw new ServiceException( ServiceException.ServiceCode.ERROR_JAXB, e );
+        }
+    }
+
     @Required
     public void setPlateformDAO( final PlateformDAO plateformDAO )
@@ -622,4 +719,10 @@
     {
         _jeuDAO = jeuDAO;
+    }
+
+    @Required
+    public void setVariableDAO( final VariableDAO variableDAO )
+    {
+        _variableDAO = variableDAO;
     }
 
@@ -634,3 +737,6 @@
     private McoDAO _mcoDAO;
     private JeuDAO _jeuDAO;
+    private VariableDAO _variableDAO;
+
+    private static String FILE_HEADER_NAME = "header.xml";
 }
Index: /ether_megapoli/trunk/service/implementation/service-context.xml
===================================================================
--- /ether_megapoli/trunk/service/implementation/service-context.xml	(revision 529)
+++ /ether_megapoli/trunk/service/implementation/service-context.xml	(revision 530)
@@ -12,4 +12,5 @@
         <property name="mcoDAO" ref="refMcoDAO"/>
         <property name="jeuDAO" ref="refJeuDAO"/>
+        <property name="variableDAO" ref="refVariableDAO"/>
     </bean>
     <bean id="etherService" parent="transactionProxy">
Index: /ether_megapoli/trunk/service/interface/com/ether/EtherService.java
===================================================================
--- /ether_megapoli/trunk/service/interface/com/ether/EtherService.java	(revision 529)
+++ /ether_megapoli/trunk/service/interface/com/ether/EtherService.java	(revision 530)
@@ -152,3 +152,10 @@
     String getDatasetNameById( @NotNull final Integer jeuId )
             throws ServiceException;
+
+    public void launchNCDumpInSimulationDirectory( @NotNull final String simulationPath )
+            throws ServiceException;
+
+    void insertHeader( @NotNull final String simulationPath, @NotNull final String directoryName )
+            throws ServiceException;
+
 }
Index: /ether_megapoli/trunk/service/interface/com/ether/ServiceException.java
===================================================================
--- /ether_megapoli/trunk/service/interface/com/ether/ServiceException.java	(revision 529)
+++ /ether_megapoli/trunk/service/interface/com/ether/ServiceException.java	(revision 530)
@@ -58,5 +58,9 @@
         PROPERTIES_FILE_NOT_READABLE,
         ERROR_INSERT_PRINCIPAL,
-        ERROR_IN_FILE_TO_INSERT
+        ERROR_IN_FILE_TO_INSERT,
+        ERROR_PROCESS_SIMULATION_NCDUMP,
+        ERROR_PROCESS_SIMULATION_NCDUMP_WAIT,
+        ERROR_PROPERTY,
+        ERROR_JAXB
     }
 }
Index: /ether_megapoli/trunk/web/WEB-INF/megapoli.properties
===================================================================
--- /ether_megapoli/trunk/web/WEB-INF/megapoli.properties	(revision 529)
+++ /ether_megapoli/trunk/web/WEB-INF/megapoli.properties	(revision 530)
@@ -40,3 +40,3 @@
 
 # ParamÃštres pour la simulation
-directory.simulation=/home_local/Simulations
+directory.simulation=/home_local/PROJETS/MEGAPOLI/Simulations
Index: /ether_megapoli/trunk/web/backoffice/simulation-script.jsp
===================================================================
--- /ether_megapoli/trunk/web/backoffice/simulation-script.jsp	(revision 529)
+++ /ether_megapoli/trunk/web/backoffice/simulation-script.jsp	(revision 530)
@@ -3,8 +3,9 @@
 var interfaceBODataInsertion = Class.create( {
 
-    initialize: function( pathSimulationFiles )
+    initialize: function( simulationFiles, simulationDirectories )
     {
         // Values
-        this.files = pathSimulationFiles || null;
+        this.files = simulationFiles || null;
+        this.directories = simulationDirectories || null;
 
         // Containers
@@ -41,5 +42,5 @@
 
         // Bind buttons
-//        $( "#insert" ).bind( 'click', this, jQuery.proxy( this.onClickInsert, this ) );
+        $( "#ncdumpButton" ).bind( 'click', this, jQuery.proxy( this.onClickLaunchNcDump, this ) );
 //        $( "#cleanLocalisationAndFlagButton" ).bind( 'click', this, jQuery.proxy( this.onClickCleanLocalisationAndFlag, this ) );
     },
@@ -58,4 +59,21 @@
     },
 
+    requestLaunchNcDump: function()
+    {
+        $.ajax( {
+            url: "backoffice?methodName=launchNCDumpInSimulationDirectory",
+            success:jQuery.proxy( this.handleLaunchNcDump, this ),
+            error: jQuery.proxy( this.showErrors, [this] )
+        } );
+    },
+
+    requestInsertHeader: function( directoryName )
+    {
+        $.ajax( {
+            url: "backoffice?methodName=insertHeader&directoryName=" + directoryName,
+            success:jQuery.proxy( this.handleInsertHeader, this ),
+            error: jQuery.proxy( this.showErrors, [this] )
+        } );
+    },
 
     // HANDLES ********************************************************
@@ -67,16 +85,45 @@
     },
 
+    handleLaunchNcDump: function( result )
+    {
+        this.files = jQuery.parseJSON( result ).simulationFiles;
+        this.directories = jQuery.parseJSON( result ).simulationDirectories;
+        this.displayFiles();
+    },
+
+    handleInsertHeader: function( result )
+    {
+//        this.files = jQuery.parseJSON( result ).simulationFiles;
+//        this.directories = jQuery.parseJSON( result ).simulationDirectories;
+//        this.displayFiles();
+    },
+
     // DISPLAYS ********************************************************
     displayFiles: function()
     {
+        this.containerFileList_left.empty();
+        this.containerFileList_right.empty();
         var number = this.files.length;
+        jQuery.each( this.directories, jQuery.proxy( function( i, directory )
+        {
+            var divDirectory = $( document.createElement( "div" ) );
+            var divDirectoryName = $( document.createElement( "div" ) );
+            divDirectoryName.attr( {style:"float:left"} );
+            divDirectoryName.html( "-&nbsp;" + directory + "&nbsp;&nbsp;" );
+            divDirectory.append( divDirectoryName );
+
+            var button = $( document.createElement( "button" ) );
+            button.addClass( "small negative" );
+            button.html( interfaceTexts["bo.simulation.save.header"] );
+            button.bind( 'click', [this, directory], jQuery.proxy( this.onClickInsertHeader, this ) );
+            divDirectory.append( button );
+
+            this.containerFileList_left.append( divDirectory );
+        }, this ) );
+
         jQuery.each( this.files, jQuery.proxy( function( i, file )
         {
-            if( (number / 2) > i )
-                this.containerFileList_left.append( "&nbsp;&nbsp;-&nbsp;" + file + "<BR/>" );
-            else
-                this.containerFileList_right.append( "&nbsp;&nbsp;-&nbsp;" + file + "<BR/>" );
+            this.containerFileList_right.append( "&nbsp;&nbsp;-&nbsp;" + file + "<BR/>" );
         }, this ) );
-
     },
 
@@ -193,47 +240,14 @@
     },
 
-    onClickRemove: function( dataset )
-    {
-        this.dataset = dataset;
-
-        this.containerErrors.hide();
-        this.hideRemove();
-        this.hideMove();
-        this.hideInsert();
-
-        this.displayFilesMove();
-
-        $( "#categoryNameInsert" ).val( this.dataset.categoryName );
-        $( "#datasetNameInsert" ).val( this.dataset.name );
-
-        if( window.confirm( interfaceTexts["bo.dataset.remove.confirm"] + " " + dataset.name + " ?" ) )
-            this.requestRemoveDataset();
-    },
-
-    onClickMove: function()
-    {
-        this.containerErrors.hide();
-        this.containerResultRemove.addClass( "disable" );
-        this.hideMove();
-        this.hideInsert();
-        this.requestFilesMove();
-    },
-
-    onClickInsert: function()
-    {
-        this.containerErrors.hide();
-        this.containerResultMove.addClass( "disable" );
-        this.hideInsert();
-
-        if( "" != $( "#categoryNameInsert" ).val() && "" != $( "#datasetNameInsert" ).val() && "" != $( "#versionInsert" ).val() )
-            this.requestDatasetInsert();
-        else
-            this.showErrors( interfaceTexts["bo.dataset.fields"] );
-    },
-
-    onClickCleanLocalisationAndFlag: function()
-    {
-        if( window.confirm( interfaceTexts["bo.cleanTables.confirm"] ) )
-            this.requestCleanLocalisationAndFlag();
+    onClickLaunchNcDump: function()
+    {
+        this.requestLaunchNcDump();
+    },
+
+    onClickInsertHeader: function( parameters )
+    {
+        var context = parameters.data[0];
+        var directoryName = parameters.data[1];
+        this.requestInsertHeader( directoryName );
     },
 
Index: /ether_megapoli/trunk/web/backoffice/simulation.jsp
===================================================================
--- /ether_megapoli/trunk/web/backoffice/simulation.jsp	(revision 529)
+++ /ether_megapoli/trunk/web/backoffice/simulation.jsp	(revision 530)
@@ -35,4 +35,8 @@
             <div id="fileList_left" style="float:left"></div>
             <div id="fileList_right" style="float:right"></div>
+
+            <div class="containerButtons">
+                <button id="ncdumpButton" class="small positive" style="float:right"><bean:message key="bo.simulation.launchNcDump"/></button>
+            </div>
         </div>
 
@@ -106,6 +110,7 @@
         <script type="text/javascript">
             var interfaceTexts = $A( "" );
+            interfaceTexts["bo.simulation.save.header"] = '<bean:message key="bo.simulation.save.header"/>';
 
-            new interfaceBODataInsertion( ${pathSimulationFiles} );
+            new interfaceBODataInsertion( ${simulationFiles}, ${simulationDirectories} );
         </script>
 
Index: /ether_megapoli/trunk/web/resources/css/backoffice.css
===================================================================
--- /ether_megapoli/trunk/web/resources/css/backoffice.css	(revision 529)
+++ /ether_megapoli/trunk/web/resources/css/backoffice.css	(revision 530)
@@ -86,2 +86,6 @@
     margin-right: 11px;
 }
+
+#fileList_left, #fileList_right {
+    margin: 0 40px;
+}
Index: /ether_megapoli/trunk/web/resources/css/megapoli.css
===================================================================
--- /ether_megapoli/trunk/web/resources/css/megapoli.css	(revision 529)
+++ /ether_megapoli/trunk/web/resources/css/megapoli.css	(revision 530)
@@ -244,4 +244,10 @@
     width: 950px;
     margin-bottom: 10px;
+}
+
+.containerButtons {
+    float: right;
+    width: 800px;
+    margin-top: 12px;
 }
 
Index: /ether_megapoli/trunk/web/src/ApplicationResources_en.properties
===================================================================
--- /ether_megapoli/trunk/web/src/ApplicationResources_en.properties	(revision 529)
+++ /ether_megapoli/trunk/web/src/ApplicationResources_en.properties	(revision 530)
@@ -658,2 +658,4 @@
 bo.simulation.database=Simulations in database
 bo.simulation.list=List of simulations
+bo.simulation.launchNcDump=Launch ncdump
+bo.simulation.save.header=Save header in database
Index: /ether_megapoli/trunk/web/src/com/ether/ControllerBackoffice.java
===================================================================
--- /ether_megapoli/trunk/web/src/com/ether/ControllerBackoffice.java	(revision 529)
+++ /ether_megapoli/trunk/web/src/com/ether/ControllerBackoffice.java	(revision 530)
@@ -86,7 +86,10 @@
         final JSONObject jsonObject = new JSONObject();
         final String pathSimulation = getProperty( "directory.simulation" );
-        final File directory = new File( pathSimulation );
+
+        final List<String> files = EtherHelper.getOnlyFileNames( pathSimulation, ".nc" );
+        final List<String> directories = EtherHelper.getOnlyDirectorieNames( pathSimulation );
         jsonObject.put( "pathSimulation", pathSimulation );
-        jsonObject.put( "pathSimulationFiles", directory.list() );
+        jsonObject.put( "simulationFiles", files );
+        jsonObject.put( "simulationDirectories", directories );
         return jsonObject;
     }
@@ -94,4 +97,8 @@
     /** *********************************************************** **/
     /** *********************** CALLS ***************************** **/
+    /** *********************************************************** **/
+
+    /** *********************************************************** **/
+    /** *********************** USERS ***************************** **/
     /** *********************************************************** **/
     /**
@@ -293,4 +300,7 @@
     }
 
+    /** *********************************************************** **/
+    /** *********************** MCO ******************************* **/
+    /** *********************************************************** **/
     /**
      * This method sorts the MCO's requests
@@ -441,4 +451,7 @@
 
 
+    /** *********************************************************** **/
+    /** *********************** DATASETS ************************** **/
+    /** *********************************************************** **/
     /**
      * This method sorts the datasets
@@ -568,4 +581,53 @@
 //    }
 
+    /** *********************************************************** **/
+    /** *********************** SIMULATIONS *********************** **/
+    /** *********************************************************** **/
+    /**
+     * @return
+     * @throws WebException
+     */
+    @ControllerMethod(jsonResult = true)
+    public JSONObject launchNCDumpInSimulationDirectory()
+            throws WebException
+    {
+        final JSONObject jsonObject = new JSONObject();
+        try
+        {
+            final String pathSimulation = getProperty( "directory.simulation" );
+            getEtherService().launchNCDumpInSimulationDirectory( pathSimulation );
+
+            final List<String> files = EtherHelper.getOnlyFileNames( pathSimulation, ".nc" );
+            final List<String> directories = EtherHelper.getOnlyDirectorieNames( pathSimulation );
+            jsonObject.put( "simulationFiles", files );
+            jsonObject.put( "simulationDirectories", directories );
+        }
+        catch( ServiceException e )
+        {
+            throw new WebException( WebException.WebCode.ERROR_PROCESS_SIMULATION_NCDUMP, e );
+        }
+        return jsonObject;
+    }
+
+    @ControllerMethod(jsonResult = true)
+    public JSONObject insertHeader( @NotNull @ParamName(ParameterConstants.PARAMETER_DIRECTORY_NAME) final String directoryName )
+            throws WebException
+    {
+        final JSONObject jsonObject = new JSONObject();
+        try
+        {
+            final String pathSimulation = getProperty( "directory.simulation" );
+            getEtherService().insertHeader( pathSimulation, directoryName );
+        }
+        catch( ServiceException e )
+        {
+            throw new WebException( WebException.WebCode.ERROR_INSERT_HEADER, e );
+        }
+        return jsonObject;
+    }
+
+    /** *********************************************************** **/
+    /** ************************ PRIVATES ************************* **/
+    /** *********************************************************** **/
     /**
      * This method create and send an email to the user to inform of the administrator decision
Index: /ether_megapoli/trunk/web/src/com/ether/WebException.java
===================================================================
--- /ether_megapoli/trunk/web/src/com/ether/WebException.java	(revision 529)
+++ /ether_megapoli/trunk/web/src/com/ether/WebException.java	(revision 530)
@@ -59,5 +59,7 @@
         DOWNLOAD_DIRECTORY_DOESNOT_EXISTS,
         ERROR_NO_CLEAN_LOCALISATION_AND_FLAG,
-        ERROR_TO_READ_FILE_PROPERTIES
+        ERROR_TO_READ_FILE_PROPERTIES,
+        ERROR_PROCESS_SIMULATION_NCDUMP,
+        ERROR_INSERT_HEADER
     }
 
Index: /ether_megapoli/trunk/web/visualization/visu_simulation-script.jsp
===================================================================
--- /ether_megapoli/trunk/web/visualization/visu_simulation-script.jsp	(revision 530)
+++ /ether_megapoli/trunk/web/visualization/visu_simulation-script.jsp	(revision 530)
@@ -0,0 +1,488 @@
+<%@ page import="com.ether.EtherPlotServiceImpl" %>
+<script type="text/javascript">
+var InterfaceVisualization = Class.create( {
+
+    initialize: function( jsonPlateforms, axeTypesForFixedPlateforms, axeTypesForMobilePlateforms, firstDate, lastDate )
+    {
+        // Values
+        this.parent = $( "#txt" );
+        this.superParent = $( "#pageContent" ); // need to resize in function of containerParameters
+        this.generalContainerPlateforms = $( "#generalContainerPlateforms" );
+        this.generalContainerParameters = $( "#generalContainerParameters" );
+        this.generalContainerOptions = $( "#generalContainerOptions" );
+        this.jsonPlateforms = jsonPlateforms || null;
+        this.jsonAxeTypesForFixedPlateforms = axeTypesForFixedPlateforms || null;
+        this.jsonAxeTypesForMobilePlateforms = axeTypesForMobilePlateforms || null;
+        this.firstDate = firstDate || false;
+        this.lastDate = lastDate || false;
+        this.selectedPlateform = false;
+        this.selectedParameter = false;
+        // This variable is needed to manage the subMenu id's
+        this.selectedParameterId = false;
+        this.beginDate = false;
+        this.endDate = false;
+        this.numberParameterToDisplay = 0;
+
+        /** *********** CONTAINERS *********** **/
+        this.containerPlateforms = $( "#containerPlateforms" );
+        this.containerParameters = $( "#containerParameters" );
+        this.containerButtons = $( "#containerButtons" );
+        this.containerOptionCalendar = $( "#containerOptionCalendar" );
+        this.containerOptionType = $( "#containerOptionType" );
+        this.containerOptionPlotsSelect = $( "#containerOptionPlotsSelect" );
+        this.containerOptionPlotsButtons = $( "#containerOptionPlotsButtons" );
+
+        /** *********** LOADING *********** **/
+        // Create loading object for plateforms
+        var param = new Object();
+        param.id = "loadingForPlateforms";
+        param.parent = this.containerPlateforms;
+        this.loadingPlateforms = new Loading( param );
+        this.loadingPlateforms.display();
+
+        // Create loading object for parameters
+        var param = new Object();
+        param.id = "loadingForParameters";
+        param.parent = this.containerParameters;
+        this.loadingParameters = new Loading( param );
+        this.loadingParameters.display();
+
+        this.createOptions();
+        this.displayPlateforms();
+    },
+
+    // CREATES ********************************************************
+    createOptions: function()
+    {
+        // Calendar
+        this.calendarFormat = "%Y-%m-%d %H:%i";
+        this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } );
+
+        AnyTime.picker( "beginDate", { format: this.calendarFormat, firstDOW: 1,
+            labelTitle: interfaceTexts["visualization.selectDate"], labelYear: interfaceTexts["visualization.selectYear"], labelMonth: interfaceTexts["visualization.selectMonth"], labelDayOfMonth: interfaceTexts["visualization.selectDay"],
+            labelHour: interfaceTexts["visualization.selectHour"], labelMinute: interfaceTexts["visualization.selectMinute"],
+            methodToCall: jQuery.proxy( this.onClickBeginDate, this )
+        } );
+
+        AnyTime.picker( "endDate", { format: this.calendarFormat, firstDOW: 1,
+            labelTitle: interfaceTexts["visualization.selectDate"], labelYear: interfaceTexts["visualization.selectYear"], labelMonth: interfaceTexts["visualization.selectMonth"], labelDayOfMonth: interfaceTexts["visualization.selectDay"],
+            labelHour: interfaceTexts["visualization.selectHour"], labelMinute: interfaceTexts["visualization.selectMinute"],
+            methodToCall: jQuery.proxy( this.onClickEndDate, this ),
+            idToUpdateEarliest: "beginDate"
+        } );
+
+        $( "#beginDate" ).val( this.firstDate );
+        $( "#endDate" ).val( this.lastDate );
+        this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime();
+        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime();
+
+        this.clearCalendarButton = new Button( {value:interfaceTexts["visualization.button.clear"], parent:this.containerOptionCalendar, id:"button_clear_calendar", className:"small", onClick:jQuery.proxy( this.onClickClear, this )} );
+
+        // Buttons and axe's types
+        this.createButtons();
+        this.createListTypes();
+        this.createListPlots();
+    },
+
+    createButtons: function()
+    {
+        this.visualizeButton = new Button( {value:interfaceTexts["visualization.button.visualize"], parent:this.containerButtons, id:"button_visualize", onClick:jQuery.proxy( this.onClickVisualize, this )} );
+        this.visualizeButton.disable();
+        this.downloadButton = new Button( {value:interfaceTexts["visualization.button.download"], parent:this.containerButtons, id:"button_download", onClick:jQuery.proxy( this.onClickDownload, this )} );
+        this.downloadButton.disable();
+    },
+
+    createListTypes: function()
+    {
+        var paramSelect = new Object();
+        paramSelect.id = "select_axes";
+        paramSelect.parent = this.containerOptionType;
+        this.selectAxes = new Select( paramSelect );
+    },
+
+    createListPlots: function()
+    {
+        var paramSelect = new Object();
+        paramSelect.id = "select_plots";
+        paramSelect.parent = this.containerOptionPlotsSelect;
+        paramSelect.classNameOption = "select_plot_option";
+        this.selectPlots = new Select( paramSelect );
+        this.selectParameters = $();
+        this.selectPlots.add( null, interfaceTexts["visualization.graph.noPlot"] );
+        this.selectPlots.selectFirst( false );
+
+        this.selectPlotsPlateformType = false;
+
+        this.addPlotButton = new Button( {value:interfaceTexts["visualization.add"], parent:this.containerOptionPlotsButtons, id:"button_add_plot", className:"small", onClick:jQuery.proxy( this.onClickAddPlot, this )} );
+        this.addPlotButton.disable();
+        this.initPlotButton = new Button( {value:interfaceTexts["visualization.button.init"], parent:this.containerOptionPlotsButtons, id:"button_init_plot", className:"small", onClick:jQuery.proxy( this.onClickInitPlot, this )} );
+    },
+
+    // REQUESTS ********************************************************
+    requestParametersByPlateform: function()
+    {
+        if( this.selectedPlateform )
+            $.ajax( {
+                url: "visualization?methodName=searchParametersByPlateform&id=" + this.selectedPlateform.getId(),
+                success:jQuery.proxy( this.handleParametersBySelectedPlateform, this )
+            } );
+    },
+
+    requestDownload: function()
+    {
+        var urlObject = this.createUrl();
+        $.ajax( {
+            url: "visualization?methodName=downloadData&" + urlObject.parameters,
+            success:jQuery.proxy( this.handleDownload, this )
+        } );
+    },
+
+    // HANDLES ********************************************************
+    handleParametersBySelectedPlateform: function( result )
+    {
+        this.jsonParameters = jQuery.parseJSON( result ).parameters;
+        this.displayParameters();
+    },
+
+    handleDownload: function( result )
+    {
+        var stateResult = jQuery.parseJSON( result ).result;
+
+        if( "ok" == stateResult )
+        {
+            var $dialog = $( '<div></div>' )
+                    .html( '<div class="textExamplesTD">' + interfaceTexts["data.access.extract.process.short"] + '</div>' )
+                    .dialog( {
+                                 autoOpen: false,
+                                 title: interfaceTexts["data.access.extract3"],
+                                 minHeight: 50,
+                                 minWidth: 350
+                             } );
+            $dialog.dialog( 'open' );
+        }
+        else
+        {
+            var $dialog = $( '<div></div>' )
+                    .html( '<div class="textExamplesTD">' + interfaceTexts["data.access.extract.process.error"] + '</div>' )
+                    .dialog( {
+                                 autoOpen: false,
+                                 title: interfaceTexts["data.access.extract3"],
+                                 minHeight: 60,
+                                 minWidth: 350
+                             } );
+            $dialog.dialog( 'open' );
+        }
+    },
+
+    // DISPLAYS ********************************************************
+    displayPlateforms: function()
+    {
+        this.plateforms = new ListPlatforms( this.jsonPlateforms, new Object() );
+
+        this.plateforms.addOpenListener( jQuery.proxy( this.onSelectPlateform, this ) );
+        this.loadingPlateforms.hide();
+        this.plateforms.display( this.containerPlateforms, "NoPlateform", interfaceTexts["visualization.noPlateform"] );
+
+        // Select the first plateform by default
+        if( this.jsonPlateforms && this.jsonPlateforms[0] )
+        {
+            var plateformToSelect = this.plateforms.getItemById( this.jsonPlateforms[0].id );
+            this.onSelectPlateform( plateformToSelect.divItem );
+            this.selectedPlateform = plateformToSelect.divItem;
+        }
+    },
+
+    displayParameters: function()
+    {
+        this.parameters = new ListParameters( this.jsonParameters, new Object() );
+
+        this.parameters.addOpenListener( jQuery.proxy( this.onSelectParameter, this ) );
+        this.loadingParameters.hide();
+        this.parameters.display( this.containerParameters, "NoParameter", interfaceTexts["visualization.noParameter"], "containerParameter" );
+    },
+
+    // EVENTS ********************************************************
+    onSelectPlateform: function( objPlateform )
+    {
+        if( this.selectedPlateform && objPlateform.getId() == this.selectedPlateform.getId() )
+            return;
+
+        // Unselect old plateform
+        if( this.selectedPlateform )
+            this.selectedPlateform.unselect();
+
+        this.selectedPlateform = objPlateform;
+        this.selectedPlateform.select();
+
+        // Unselect old parameter
+        if( this.selectedParameter )
+            this.selectedParameter = false;
+        this.selectedParameterId = false;
+
+        // Change axe's list select
+        this.updateListAxes();
+
+        this.addPlotButton.disable();
+
+//        $( "#textareaTitle" ).html( this.selectedPlateform.getName() );
+
+        // Init number and list of parameter to display
+        if( "MOBILE" == this.selectedPlateform.jsonElement.type )
+            this.updateNumberAndListParameterToDisplay( 0 );
+
+        if( 1 > this.selectPlots.getSize() )
+            this.numberParameterToDisplay = 0;
+
+        this.requestParametersByPlateform();
+        this.testAllFields();
+    },
+
+    onSelectParameter: function( objParameter )
+    {
+        if( this.selectedParameter && objParameter.getId() == this.selectedParameterId )
+            return;
+
+        // Unselect old parameter
+        if( this.selectedParameter )
+            this.selectedParameter.unselect();
+
+        this.selectedParameterId = objParameter.getId();
+        this.selectedParameter = objParameter;
+        this.selectedParameter.select();
+
+        // Change title
+//        $( "#textareaTitle" ).html( this.selectedPlateform.getName() + " - " + this.selectedParameter.getNameWithCode() );
+
+        // Update number and list of parameter to display
+        this.updateNumberAndListParameterToDisplay( 1 );
+
+        // Enable/disable addPlot's button
+        if( (!this.selectPlotsPlateformType || this.selectPlotsPlateformType == this.selectedPlateform.jsonElement.type) && "MOBILE" != this.selectedPlateform.jsonElement.type )
+            this.addPlotButton.enable();
+        else
+            this.addPlotButton.disable();
+
+        this.testAllFields();
+    },
+
+    onClickBeginDate: function()
+    {
+        var oneHour = 60 * 60 * 1000;
+        var beginDateTime = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime();
+        var endDateTime = null;
+        if( "" != $( "#endDate" ).val() )
+            endDateTime = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime();
+        this.beginDateWithAnHourLater = new Date( beginDateTime + oneHour );
+
+        if( null == endDateTime || endDateTime < beginDateTime )
+            $( "#endDate" ).val( this.calendarConverter.format( this.beginDateWithAnHourLater ) );
+
+        this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime();
+        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime();
+
+        this.testAllFields();
+    },
+
+    onClickEndDate: function()
+    {
+        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime();
+    },
+
+    onClickClear: function()
+    {
+        $( "#beginDate" ).val( "" );
+        this.beginDate = false;
+        $( "#endDate" ).val( "" );
+        this.endDate = false;
+    },
+
+    onClickInitPlot: function()
+    {
+        this.updateNumberAndListParameterToDisplay( 0 );
+    },
+
+    onClickAddPlot: function()
+    {
+        this.updateNumberAndListParameterToDisplay( 2 );
+    },
+
+    onClickVisualize: function()
+    {
+        var urlObject = this.createUrl();
+
+        if( urlObject.displayPlot )
+        {
+            var url = "visualization/plotEther?" + urlObject.parameters;
+            var $dialog = $( '<div></div>' )
+                    .html( '<img src=' + url + ' />' )
+                    .dialog( {
+                                 autoOpen: false,
+                                 title: interfaceTexts["app.title"] + "-" + interfaceTexts["visualization.quicklook"],
+                                 minHeight: <%=EtherPlotServiceImpl.getMaxHeight()%>,
+                                 minWidth: <%=EtherPlotServiceImpl.getMaxWidth()%> + 28
+                             } );
+        }
+        else
+        {
+            var $dialog = $( '<div></div>' )
+                    .html( '<BR/><center>' + interfaceTexts["visualization.graph.noPlot"] + '</center>' )
+                    .dialog( {
+                                 autoOpen: false,
+                                 title: interfaceTexts["app.title"] + "-" + interfaceTexts["visualization.quicklook"],
+                                 height: 50,
+                                 width: 400
+                             } );
+        }
+
+        $dialog.dialog( 'open' );
+    },
+
+    onClickDownload: function()
+    {
+        if( !getJSONUser() )
+            getLoginModule().showLogin( templateTexts["login.text"] );
+        else
+            this.requestDownload();
+    },
+
+    // OTHERS ********************************************************
+    testAllFields: function()
+    {
+        if( (!this.selectedPlateform || !this.selectedParameter) && 0 == this.numberParameterToDisplay )
+        {
+            this.visualizeButton.disable();
+            this.downloadButton.disable();
+            return;
+        }
+
+        this.visualizeButton.enable();
+        this.downloadButton.enable();
+    },
+
+    updateListAxes: function()
+    {
+        this.selectAxes.clear();
+        var jsonAxeTypes;
+
+        if( "MOBILE" == this.selectedPlateform.jsonElement.type )
+            jsonAxeTypes = this.jsonAxeTypesForMobilePlateforms;
+        else
+            jsonAxeTypes = this.jsonAxeTypesForFixedPlateforms;
+
+        jQuery.each( jsonAxeTypes, jQuery.proxy( function ( i, axeType )
+        {
+            this.selectAxes.add( axeType.value, interfaceTexts[axeType.text] );
+        }, this ) );
+
+        this.selectAxes.selectFirst( false );
+    },
+
+    /**
+     * action = 0 --> init list
+     * action = 1 --> select parameter
+     * action = 2 --> add parameter
+     */
+    updateNumberAndListParameterToDisplay: function( action )
+    {
+        switch( action )
+        {
+            case 0:
+                // INIT
+                this.selectPlots.clear();
+                this.selectParameters = $();
+                this.selectPlotsPlateformType = false;
+
+                if( this.selectedPlateform && this.selectedParameter )
+                {
+                    this.selectPlots.changeSelectMiddle( this.selectedPlateform.getId() + "-" + this.selectedParameter.getId(), this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() );
+
+                    this.numberParameterToDisplay = 1;
+                    $( "#messages_number_parameters" ).html( this.numberParameterToDisplay + " " + interfaceTexts["visualization.parameter"] );
+                }
+                else
+                {
+                    this.selectPlots.add( null, interfaceTexts["visualization.graph.noPlot"] );
+                    this.selectPlots.selectFirst( false );
+
+                    this.numberParameterToDisplay = 0;
+                    $( "#messages_number_parameters" ).html( "" );
+                }
+                break;
+
+            case 1 :
+                // SELECT
+                if( 0 == this.numberParameterToDisplay || "MOBILE" == this.selectedPlateform.jsonElement.type )
+                {
+                    this.selectPlots.clear();
+                    this.selectParameters.empty();
+                    this.numberParameterToDisplay = 1;
+                }
+
+                this.selectPlots.changeSelectMiddle( this.selectedPlateform.getId() + "-" + this.selectedParameter.getId(), this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() );
+                $( "#messages_number_parameters" ).html( this.numberParameterToDisplay + " " + interfaceTexts["visualization.parameter"] );
+                break;
+
+            default:
+                // ADD
+                var plotValue = this.selectedPlateform.getId() + "-" + this.selectedParameter.getId();
+                var isParameterAlreadySelected = content( this.selectParameters, this.selectedParameter.getId() );
+                if( !this.selectPlots.content( plotValue ) && (isParameterAlreadySelected || (!isParameterAlreadySelected && this.selectParameters.size() < 2)) )
+                {
+                    this.selectPlots.add( plotValue, this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() );
+                    this.selectPlots.select( plotValue, false );
+                    this.selectPlotsPlateformType = this.selectedPlateform.jsonElement.type;
+                    if( !isParameterAlreadySelected )
+                        this.selectParameters.push( this.selectedParameter.getId() );
+
+                    this.numberParameterToDisplay = this.selectPlots.getSize();
+                }
+
+                $( "#messages_number_parameters" ).html( this.numberParameterToDisplay + " " + interfaceTexts["visualization.parameter"] );
+                break;
+        }
+    },
+
+    createUrl : function()
+    {
+        // TODO : utiliser JSON pour envoyer arrayPIdPId
+        var result = new Object();
+
+        result.displayPlot = true;
+        var arrayPIdPId = new Array();
+        if( 1 <= this.numberParameterToDisplay && 1 <= this.selectPlots.getSize() )
+        {
+            this.selectPlots.arrayOptions.each( function( index, option )
+            {
+                arrayPIdPId[index] = option.itemValue;
+            } );
+        }
+        else if( this.selectedPlateform && this.selectedParameter )
+            arrayPIdPId[0] = this.selectedPlateform.getId() + "-" + this.selectedParameter.getId();
+        else
+            result.displayPlot = false;
+
+        result.parameters = "dateBegin=" + this.beginDate
+                + "&dateEnd=" + this.endDate
+                + "&title=" + encodeURIComponent( $( "#textareaTitle" ).val() )
+                + "&pfIdPIdList=" + arrayPIdPId
+                + "&axeType=" + this.selectAxes.getValue();
+
+        return result;
+    }
+} );
+
+function onClickHelp()
+{
+    var $dialog = $( '<div></div>' )
+            .html( '<div class="textExamplesTD">' + interfaceTexts["visualization.parameter.buttons.help.text"] + '</div>' )
+            .dialog( {
+                         autoOpen: false,
+                         title: interfaceTexts["visualization.parameter.buttons.help"],
+                         minHeight: 100,
+                         minWidth: 350
+                     } );
+    $dialog.dialog( 'open' );
+}
+
+
+</script>
Index: /ether_megapoli/trunk/web/visualization/visu_simulation.jsp
===================================================================
--- /ether_megapoli/trunk/web/visualization/visu_simulation.jsp	(revision 529)
+++ /ether_megapoli/trunk/web/visualization/visu_simulation.jsp	(revision 530)
@@ -10,6 +10,4 @@
 
     <tiles:put name="insertCss" type="string">
-        <ether:htmlCss cssFile="blueprint-css/blueprint/src/grid"/>
-        <ether:htmlCss cssFile="visu_parameter_by_pf"/>
         <ether:htmlCss cssFile="select"/>
         <ether:htmlCss cssFile="calendar/anytime"/>
@@ -20,6 +18,5 @@
         <ether:htmlJs jsFile="classesForJQuery/etherClasses"/>
         <ether:htmlJs jsFile="classesForJQuery/megapoliClasses"/>
-        <ether:htmlJsp jspFile="visu_parameter_by_pf-script"/>
-        <ether:htmlJs jsFile="classesForJQuery/Select"/>
+        <ether:htmlJsp jspFile="visu_simulation-script"/>
         <ether:htmlJs jsFile="classesForJQuery/Loading"/>
         <ether:htmlJs jsFile="calendar/anytime"/>
