  function Listview(htmlFile, displayTaskBar){
    this.m_oColumns = new Array();
    this.m_oSplitters = new Array();
    this.m_oPages = new Array();
    this.m_LastColId = '';
    this.m_orderBy;
    this.m_oSelectedPage = null;
    this.m_orderDirection = 'desc';
    this.m_oBrowser = new cBrowser();
    this.m_oEvent = new cEvent();
    this.m_Id = Listview.Instances.length;
    this.m_oCookies = new cCookies();
    this.m_sHtmlFile = htmlFile; // For cookies
    this.m_iExpiredays = 1;  // For cookies
    this.m_ExternalSort = false;
    this.m_callback_onclickheader = null;
    Listview.Instances[Listview.Instances.length] = this;
    
    // detect a special case of "web browser"
    this.is_ie8 = this.m_oBrowser.m_type['msie'] && this.m_oBrowser.m_type.version > 7.0;
    this.is_ie = this.m_oBrowser.m_type['msie'];
    
    var m_oSelf = this;
    var m_oTaskBar = null;
    var m_displayTaskBar = typeof(displayTaskBar) == 'undefined' ? false : displayTaskBar;;
    
    // -------------------------------------------------------------------    
    this._createElement = function(type, parent) {
      var el = null;
      if(document.createElementNS) {
        // use the XHTML namespace; IE won't normally get here unless
        // _they_ "fix" the DOM2 implementation.
        el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
      } 
      else{
        el = document.createElement(type);
      }
      if (typeof(parent) != "undefined" && parent != null) {
        parent.appendChild(el);
      }
      return el;
    };       
    
    // -------------------------------------------------------------------        
    this.m_oElement = this._createElement('div');    
    
    with(this.m_oElement){
      style.overflow = 'auto';
      style.height = '100%';
      style.width = '100%';
      style.zIndex = 100;
      style.position = 'relative';
    }
    
    this.oHeadTable = this._createElement('table',this.m_oElement);    
    with(this.oHeadTable){
 		  cellSpacing = 0;
		  cellPadding = 0;
		  style.width ='100%';
		  className = 'listview-table-header';
		}
    this.oHeadTableHead = this._createElement('thead',this.oHeadTable);    

    
    //------------------------------------------------------------------------------      
    this._sort = function(sColumn){
      if(!this.m_ExternalSort){
        this.m_oSelectedPage.m_oRows.sort(this._getSortFunction(sColumn));      
      }
      
      if(this.m_orderDirection == 'asc'){
        this.m_orderDirection = 'desc';
        if(!this.m_ExternalSort){
          this.m_oSelectedPage.m_oRows.reverse();  
        }
      }
      else{
         this.m_orderDirection = 'asc';  
      }
      this.m_orderBy = sColumn;
      this.m_oSelectedPage.m_orderBy = sColumn;
    };
    
    //------------------------------------------------------------------------------  
    this._getSortFunction = function(sProperty) {
      return function(oObject1, oObject2){
        var Object1 = oObject1.m_Cells[sProperty].m_Text;
        var Object2 = oObject2.m_Cells[sProperty].m_Text;
        if(isNaN(Object1)){
          Object1 = Object1.toLowerCase()    
        }
        if(isNaN(Object2)){
          Object2 = Object2.toLowerCase()    
        }
        if(Object1 == Object2) {
          return 0
        }
        else {
          return Object1 < Object2 ? -1 : 1
        }
      } 
    };
    
    // -------------------------------------------------------------------
    this._unit = function(value){
      if(value.toString().indexOf('%') != -1){
        return value;
      }
      return value + 'px';        
    };
    
    // -------------------------------------------------------------------    
    this._onmousemoveSplitter = function(){ // the splitter call this function when we change the width of the column header.
      var oListview = this.m_oObjects[0];
      if(oListview.m_oSelectedPage.m_oRows.length == 0) return;
      with(oListview.m_oSelectedPage.m_oBody.rows[0].cells[this.m_oObject1.cellIndex]){
        this.m_oObjects[1].m_Width = this.m_sizeObject1;    // we update the size of the column
        style.width = this._unit(this.m_sizeObject1);
      }
    }
    // -------------------------------------------------------------------        
    this._onclickHeader = function(event){
      var evt = window.event || event;
      with(this.m_oParent.m_oColumns[this.m_oParent.m_orderBy].m_oTh.childNodes[1]){
        if(!this.m_oParent.is_ie)
         style.visibility = 'hidden';
        else
          style.display = 'none';
      }
      
      this.m_oParent._columnBackground(false);      
      this.m_oParent._sort(this.m_Id);
      this.m_oParent._fillRows();
      this.m_oParent._columnBackground();      
      this.m_oParent._rowBackGround();      

      this.m_oParent.setConfig();

      this.m_oTh.childNodes[1].src = Listview.GraphicUrl + '/' + this.m_oParent.m_orderDirection + '.png';
      with(this.m_oTh.childNodes[1]){
        if(!this.m_oParent.is_ie)
          style.visibility = 'visible';
        else
          style.display = 'inline';        
      }
      if(this.m_oParent.m_callback_onclickheader != null){
        this.m_oParent.m_callback_onclickheader(this.m_Id,this.m_oParent.m_orderDirection);
      }
    };
    // -------------------------------------------------------------------
    this._onscroll = function(event){
      this.oHeadTable.style.top = this._unit(this.m_oElement.scrollTop);
    };
    // -------------------------------------------------------------------        
    this._onmouseoverRow= function(event){
      evt = window.event || event;
      // this => row      
      with(this.m_oTr){
        style.backgroundColor = this.m_backgroundColor['hover'];  
      }        
      
      if(!Listview.bckgColorRowAlternate){
        var oListview = this.m_oParent.m_oParent;
        var oTd = this.m_Cells[oListview.m_orderBy];            
        with(oTd.m_oTd){
          style.backgroundColor = oTd.m_backgroundColor['hover-row'];    
        }
      }
    };
    // -------------------------------------------------------------------        
    this._onmouseRow = function(event){ //onclick,onmouseout
      evt = window.event || event;
      if(evt.type == 'click'){
        this.m_Selected = !this.m_Selected;                 // this => row
      }
      // this => row
      with(this.m_oTr){
        style.backgroundColor = this.m_Selected ? this.m_backgroundColor['selected'] : this.m_backgroundColor['normal'];
      }
      
      if(!Listview.bckgColorRowAlternate){
        var oCell = this.m_Cells[this.m_oParent.m_oParent.m_orderBy];      
        with(oCell){
          m_oTd.style.backgroundColor = (this.m_Selected ? m_backgroundColor['selected-row'] : m_backgroundColor['selected-column']);
        }
      }
      
      if(Listview.selectToggleRow && evt.type == 'click'){
        for(ii = 0 ; ii < this.m_oParent.m_oRows.length; ii++){
          var oListview = this.m_oParent.m_oParent;
          if(oListview.m_oSelectedPage.m_oRows[ii].m_Index != this.m_Index){
            var oRow = oListview.m_oSelectedPage.m_oRows[ii];
            oRow.m_oTr.style.backgroundColor = oRow.m_backgroundColor['normal'];     
            oRow.m_Selected = false;
            if(!Listview.bckgColorRowAlternate){
              var oCell = oRow.m_Cells[oListview.m_orderBy];
              oCell.m_oTd.style.backgroundColor = oCell.m_backgroundColor['selected-column'];
            }
          }
        }  
      }
    };
    // -------------------------------------------------------------------    
    this._columnBackground = function(display){ // Display or not the backgound color
      display = typeof(display) == 'undefined' ? true : display;
      if(!Listview.bckgColorRowAlternate){
        for(var ii = 0; ii <  this.m_oSelectedPage.m_oRows.length; ii++){
          with(this.m_oSelectedPage.m_oRows[ii].m_Cells[this.m_oSelectedPage.m_orderBy]){
            if(display){
              m_oTd.style.backgroundColor = (m_oParent.m_Selected ? m_backgroundColor['selected-row'] : m_backgroundColor['selected-column']);
            }
            else{
              m_oTd.style.backgroundColor = '';
            }
          }
        }        
      }
    };
    // -------------------------------------------------------------------
    this._rowBackGround = function(){
      if(Listview.bckgColorRowAlternate){ 
        for(var ii = 0; ii <  this.m_oSelectedPage.m_oRows.length; ii++){
          var oRow = this.m_oSelectedPage.m_oRows[ii];
          with(oRow){
            m_backgroundColor['normal'] = ii%2 ? Listview.bckgColorRow : Listview.bckgColorRowOdd;
            m_oTr.style.backgroundColor = m_Selected == true ?  m_backgroundColor['selected'] : m_backgroundColor['normal'];
          }
        }
      }
    }    
    // -------------------------------------------------------------------
    this._clearRows = function(){
      if(this.m_oSelectedPage)
        this.m_oSelectedPage.deleteRows();
    };
    // -------------------------------------------------------------------
    this._buildRows = function(){
      // build the body
      if(this.m_oSelectedPage.m_oRows.length == 0) return;
      
      var oBodyTable = this._createElement('table',this.m_oElement);    
      with(oBodyTable){
        cellSpacing = 0;
        cellPadding = 0;
        style.width ='100%';		  
        className = 'listview-table-body';		  
        style.display = 'none';
      }
      var oBodyTableBody = this._createElement('tbody',oBodyTable);  
        
      this.m_oSelectedPage.m_oTable = oBodyTable;
      this.m_oSelectedPage.m_oBody  = oBodyTableBody;
      
      
      for(var ii = 0; ii <  this.m_oSelectedPage.m_oRows.length; ii++){
        var Tr = oBodyTableBody.insertRow(ii);   
        var oRow = this.m_oSelectedPage.m_oRows[ii];
        with(oRow){
          m_backgroundColor['normal']     = !Listview.bckgColorRowAlternate ? 
                                            Listview.bckgColorRow : 
                                            (ii%2 ? Listview.bckgColorRow : Listview.bckgColorRowOdd);
          m_backgroundColor['selected']   = Listview.bckgColorRowSelected;
          m_backgroundColor['hover']      = Listview.bckgColorRowHover;
          m_oTr = Tr;     
        }
        with(Tr){
          className   = 'listview-body-row';
          onmouseover = Listview.hotTrackRow ? this.m_oEvent.bindEvent(this._onmouseoverRow,oRow) : null;
          onmouseout  = Listview.hotTrackRow ? this.m_oEvent.bindEvent(this._onmouseRow,    oRow) : null;
          onclick     = Listview.selectRow   ? this.m_oEvent.bindEvent(this._onmouseRow,    oRow) : null;
          style.backgroundColor = oRow.m_Selected ? oRow.m_backgroundColor['selected'] : oRow.m_backgroundColor['normal'];

        }
        for(c in this.m_oColumns){
          var Td = this._createElement('td',Tr);  
          var oTd = this.m_oSelectedPage.m_oRows[ii].m_Cells[c];
          with(oTd){
            m_oTd = Td;  
            m_backgroundColor['selected-row']    = Listview.bckgColorRowSelected;            
            m_backgroundColor['selected-column'] = Listview.bckgColorColumnSelected;
            m_backgroundColor['hover-row']       = Listview.bckgColorRowHover;
          }
          
          with(Td){
            var cell = this.m_oSelectedPage.m_oRows[ii].m_Cells[c];

            if(typeof(cell.m_aObject['menu']) != 'undefined'){
              cell.m_aObject['menu'].appendChild(Td);
              style.cursor = 'pointer';
            }

            if(typeof(cell.m_aObject['icone']) != 'undefined'){
              var oImage = this._createElement('img',Td);
              with(oImage){
                src = Listview.GraphicSystemUrl + '/images/types/' + cell.m_aObject['icone'].getIcone();
              }
            }
            if(typeof(cell.m_aObject['link']) != 'undefined'){
              var oA = this._createElement('a',Td);
              var arr = cell.m_aObject['link'].get();
              with(oA){
                className = 'listview-body-cell-link';
                href      =  arr['Url'];
                target    = arr['onclick'] == null && arr['onmousemove'] == null && arr['onmouseup'] == null && arr['onmousedown'] == null ? arr['Target'] : '';
                innerHTML += cell.m_Text;
                title     = arr['Text'];
                onclick     = arr['onclick'];
                onmousemove = arr['onmousemove'];
                onmouseup   = arr['onmouseup'];
                onmousedown = arr['onmousedown'];
              }
            }
            else{
              innerHTML += (!this.is_ie8 && cell.m_Text == '' && this.is_ie && !cell.m_aObject['icone']) ? '&nbsp;' : cell.m_Text;  // to see the border                
              if(c.indexOf('_splitter') == -1 && 
                 typeof(cell.m_aObject['icone']) == 'undefined' && 
                 typeof(cell.m_aObject['menu'])  == 'undefined' && 
                 typeof(cell.m_aObject['link'])  == 'undefined'){
                ondblclick = cell.evt_ondblclick;              // cell edition
              }
            }
            className = 'listview-body-cell';  
            width = this._unit(this.m_oColumns[c].m_Width);
            style.textAlign = cell.m_Align;
          }
        }
      }
      this._columnBackground();
    };    
    // -------------------------------------------------------------------
    this._fillRows = function(){
      if(this.m_oSelectedPage.m_oRows.length == 0) return;      
      var tbody = this.m_oSelectedPage.m_oBody;
      while(tbody.firstChild) {
        with(tbody){
          removeChild(firstChild);    
        }
      }
      for(var ii = 0; ii < this.m_oSelectedPage.m_oRows.length; ii++){
        with(tbody){
          appendChild(this.m_oSelectedPage.m_oRows[ii].m_oTr);  // add node to the end
        }
      } 
      var ii = 0;
      for(oCell in this.m_oColumns){
        tbody.rows[0].cells[ii].style.width = this._unit(this.m_oColumns[oCell].m_Width);
        ++ii;
      }
    }
    // -------------------------------------------------------------------    
    this._displayHeader = function(){
      var Tr = this.oHeadTableHead.insertRow(0);
      for(c in this.m_oColumns){
        var Td = this._createElement('td',Tr); 
        with(Td){
          innerHTML = (!this.is_ie8 && this.m_oColumns[c].m_Text == '' && this.is_ie) ? '&nbsp;' : this.m_oColumns[c].m_Text;  // to see the border          
          width     = this._unit(this.m_oColumns[c].m_Width);
          
          if(c.indexOf('_splitter') != -1){
            className = 'listview-header-cell-splitter';
            var cell = Tr.cells[Tr.cells.length - 2];                        // cell = the cell to resize when we move the splitter             
            var oSplitter = new cSplitter(Td, cell,this.m_oElement);         // Td is the cell splitter
            this.m_oSplitters[this.m_oSplitters.length] = oSplitter;
            oSplitter.m_callback_onmousemove = this._onmousemoveSplitter;    // the callback function for the splitter to resize the body table
            oSplitter.m_oObjects[0] = this;                      
            oSplitter.m_oObjects[1] = this.m_oColumns[c.replace(/_splitter/i,'')];
            oSplitter.setProperties(12);
            onmousedown = oSplitter.onmousedown; 
            onmouseover = oSplitter.onmouseover; 
          }
          else{
            this.m_oColumns[c].m_oTh = Td;
            className = 'listview-header-cell';
            style.textAlign = this.m_oColumns[c].m_Align; 
            
            if(this.m_oColumns[c].m_aObject['menu']){
              this.m_oColumns[c].m_aObject['menu'].appendChild(Td);
            }


            if(this.m_oColumns[c].m_Image != null){
              var oImage = this._createElement('img',Td); 
              with(oImage){
                src = this.m_oColumns[c].m_Image;
              }              
            }
            
            if(this.m_oColumns[c].m_bySort){
              onclick   =  this.m_oEvent.bindEvent(this._onclickHeader, this.m_oColumns[c]);
              var oImage = this._createElement('img',Td); 
              with(oImage){
                src = Listview.GraphicUrl + '/' + this.m_orderDirection + '.png';
                if(!this.is_ie)
                  style.visibility = (c != this.m_orderBy) ? 'hidden' : 'visible';         
                else
                  style.display = (c != this.m_orderBy) ? 'none' : 'inline';         
                
                className = 'listview-header-cell-order';
              }
            }
          }
        }
      }
    };
    
    this._test = function(event){
      this.getUiImage().src = Listview.GraphicSystemUrl + '/images/actions/update.png';
    }
    
    // -------------------------------------------------------------------
    function buildTaskbar(){
      if(!m_displayTaskBar) return;
      m_oTaskBar = new TaskBar(m_oSelf);
      var item = m_oTaskBar.addItem();
      item.set('undefined', '#', '_self', 'disk', Listview.GraphicSystemUrl + '/images/actions/');
      item.setTitle('Sauvegarder');
      item.onmouseup = m_oSelf.m_oEvent.bindEvent(m_oSelf._test, item);

      m_oTaskBar.show();        
    }
    // -------------------------------------------------------------------
    this._create = function(){
      if(this.m_oSelectedPage.m_oRows.length == 0) this.addColumn('sEmpty','100%','','&nbsp;',null, false, false);
      delete this.m_oColumns[this.m_LastColId];  // We remove the last splitter
      this.m_oColumns.length--;
      with(this.m_oElement){      
        onscroll = this.m_oEvent.bindEvent(this._onscroll, this);  
      }

      var aConfig = this.getConfig();
      if(aConfig['Listview.Instance.Id'] &&  aConfig['Listview.Order.Direction'] && aConfig['Listview.Order.Column']){
        if(aConfig['Listview.Instance.Id'] == this.m_Id){
          this.m_orderBy = aConfig['Listview.Order.Column']; 
          this.m_orderDirection = aConfig['Listview.Order.Direction'] == 'asc' ? 'desc' : 'asc';
        }  
      }

      this._sort(this.m_orderBy);
      this._displayHeader();            
      
      var oSelectedPage = this.m_oSelectedPage;  // temp save  
      
      for(Page in this.m_oPages){
        this.m_oSelectedPage = this.m_oPages[Page];
        if(this.m_oSelectedPage.m_sId != oSelectedPage.m_sId){
          this.m_orderDirection = this.m_orderDirection == 'asc' ? 'desc' : 'asc';;
          this._sort(this.m_orderBy);
        }
        this._buildRows();      
      }
      this._buildRows();            
      buildTaskbar();
      this.m_oSelectedPage = oSelectedPage;     // Restore after the all pages creation
      this.m_oSelectedPage.show(true);
    };
    
    // -------------------------------------------------------------------
    this.addColumn = function(Id, Width, Align, Text, Image, Fixed, bySort){
      if(!this.m_oColumns[Id]){
        var oColumn = new cColumn(this, Id, Width, Align, Text, Image, Fixed, bySort);        
        this.m_oColumns[Id] = oColumn;
        this.m_oColumns.length++;   // the length is not incrementate automaticly if we don't use numerical value for index
        if(!oColumn.m_Fixed){
          this.m_oColumns[Id + '_splitter'] = new cColumn(this, Id + '_splitter',20, 'left', '');
          this.m_oColumns.length++;
          this.m_LastColId = Id + '_splitter';
          this.m_orderBy = typeof(this.m_orderBy) == 'undefined' ?  Id : this.m_orderBy;
        }
      }
      else{
        var oColumn = this.m_oColumns[Id];
      }
      return oColumn;
    };
    // -------------------------------------------------------------------
    this.addPage = function(sPage){
      if(!this.m_oPages[sPage]){
        this.m_oPages[sPage] = new cTable(this, sPage);
      }
      this.m_oSelectedPage = this.m_oPages[sPage];
    }
    // -------------------------------------------------------------------    
    this.addRow = function(){
      if(this.m_oColumns.length > 0 && this.m_oSelectedPage != null){
        this.addColumn('sEmpty','100%','','&nbsp;',null, false, false);
        if(this.m_oSelectedPage){// Dows the page exist ?
          var oRow = this.m_oSelectedPage.addRow(this.m_oSelectedPage.m_oRows.length);
          oRow.m_Index = this.m_oSelectedPage.m_oRows.length - 1;
        
          for(c in this.m_oColumns){
            var oCol = this.m_oColumns[c];
            oRow.addCell(oCol.m_Id);
          }
          return oRow;
        }
      }
      else{
        alert('you must define all columns and a page before add a row');  
      }
    };
    // -------------------------------------------------------------------
    this.setPage= function(value){
      if(this.m_oPages[value]){
        this.m_oSelectedPage = this.m_oPages[value];
      }
    };
    // -------------------------------------------------------------------
    this.evtPage = function(event){ // we wait an cInterface object -> this
      if(typeof(this.m_classType) == 'undefined') return;  // check if the property exists
      if(this.m_classType != 'cInterface') return;         // check if the class type is good
      if(!m_oSelf.m_oPages[this.m_sTag]) return;           // check if the page exists

      if(Listview.Selected.m_Id != m_oSelf.m_Id){// Is an other listview
        Listview.Selected._display(false);    
        m_oSelf._display(true);
        Listview.Selected = m_oSelf;        
      }

      m_oSelf.m_oSelectedPage.show(false);
      m_oSelf.m_orderDirection = m_oSelf.m_orderDirection == 'asc' ? 'desc' : 'asc';
      m_oSelf.setPage(this.m_sTag);   

      m_oSelf._columnBackground(false);      
      m_oSelf._sort(m_oSelf.m_orderBy);
      m_oSelf._fillRows();
      m_oSelf._columnBackground();              
      m_oSelf.m_oSelectedPage.show(true);      
      
      m_oSelf.setConfig();
    }
    //------------------------------------------------------------------------------      
    this.getConfig = function(){
      var aConfig = new Array();
      aConfig['Listview.Instance.Id']     = this.m_oCookies.get(this.m_sHtmlFile + '.Listview.Instance.Id');
      aConfig['Listview.Page.Id']         = this.m_oCookies.get(this.m_sHtmlFile + '.Listview.Page.Id');
      aConfig['Listview.Order.Direction'] = this.m_oCookies.get(this.m_sHtmlFile + '.Listview.Order.Direction');
      aConfig['Listview.Order.Column']    = this.m_oCookies.get(this.m_sHtmlFile + '.Listview.Order.Column');
      return aConfig;  
    }
    //------------------------------------------------------------------------------      
    this.deleteConfig = function(){
      this.m_oCookies.clear(this.m_sHtmlFile + '.Listview.Instance.Id');
      this.m_oCookies.clear(this.m_sHtmlFile + '.Listview.Page.Id');
      this.m_oCookies.clear(this.m_sHtmlFile + '.Listview.Order.Direction');
      this.m_oCookies.clear(this.m_sHtmlFile + '.Listview.Order.Column');
    }    
    //------------------------------------------------------------------------------      
    this.setConfig = function(){
      var oDate = new Date();
      oDate.setDate(oDate.getDate()+ this.m_iExpiredays);
      this.m_oCookies.set(this.m_sHtmlFile + '.Listview.Instance.Id',this.m_Id,                oDate);
      this.m_oCookies.set(this.m_sHtmlFile + '.Listview.Page.Id',this.m_oSelectedPage.m_sId,   oDate);
      this.m_oCookies.set(this.m_sHtmlFile + '.Listview.Order.Direction',this.m_orderDirection,oDate);
      this.m_oCookies.set(this.m_sHtmlFile + '.Listview.Order.Column',this.m_orderBy,          oDate);
    }    
    //------------------------------------------------------------------------------  
    this._display = function(value){
      with(document.getElementById(Listview.IdContainer)){
        if(value){          
          appendChild(this.m_oElement);
          if(m_oTaskBar){
             appendChild(m_oTaskBar.m_oContainer);          
             m_oTaskBar.m_oContainer.style.display = 'block';                    
           }
          this.m_oElement.style.display = 'block';  
          
          var taskbarHeight = 0;
          if(m_oTaskBar){
            taskbarHeight = m_oTaskBar.getHeight();   // must called after display 
          }
          this.m_oElement.style.height = this._unit(offsetHeight - taskbarHeight ); 
        }
        else{
          this.m_oElement.style.display = 'none';
          if(m_oTaskBar){
            m_oTaskBar.m_oContainer.style.display = 'none';
            removeChild(m_oTaskBar.m_oContainer);
          }
          removeChild(this.m_oElement);
        }
      }
    }
    //------------------------------------------------------------------------------  
    // Build the Listview
    //------------------------------------------------------------------------------  
    this.build = function(){
      this._create();
      this.m_oElement.style.display = 'none';      
    }

    //------------------------------------------------------------------------------  
    // Display the Listview
    //------------------------------------------------------------------------------  
    this.show = function(){
      this.build();
      Listview.Selected = this;  
      this._display(true);    
      with(document.getElementById(Listview.IdContainer)){
        style.position = 'relative';                // It's important for IE
      }
    };
  }
  
  // --------------------------------------------------------------------------       
  // Static property with default value
  Listview.Instances = new Array();
  Listview.Selected = null;
  
  //------------------------------------------------------------------------------  
  // Public function
  //------------------------------------------------------------------------------  
  //------------------------------------------------------------------------------  
  // Setup of Listview
  //------------------------------------------------------------------------------  
  Listview.setup = function (params) {
    function param_default(pname, def) { 
      if (typeof params[pname] == "undefined") { 
        Listview[pname] = def; 
      } 
      else{
        Listview[pname] = params[pname]; 
      }
    };  

    param_default("IdContainer", null);
    param_default("GraphicUrl",       'listview/skin/default/images');
    param_default("GraphicSystemUrl", 'system');
    param_default("bckgColorColumnSelected", '#FAFAFA');
    param_default("bckgColorRowHover"      , '#D4DCFC');
    param_default("bckgColorRowSelected"   , '#FFCC99');
    param_default("bckgColorRowOdd"        , '#FAFAFA');
    param_default("bckgColorRow"           , 'transparent');
    param_default("bckgColorRowAlternate"  , false);
    param_default("hotTrackRow"  , true);
    param_default("selectRow"  , true);
    param_default("selectToggleRow"  , true);  // work with selectRow
    
    if(Listview.IdContainer == null){
      alert("Listview.Setup:\n  Nothing to setup (no fields found).  Please check your code");  
    }
//    Listview.Instance = new Listview();    
  };
  
  