
  function cTable(oParent, sId){
    this.m_oParent = oParent;
    this.m_sId = sId;
    this.m_Index = 0;
    this.m_oTable = null;
    this.m_oBody = null;
    this.m_oRows = new Array();
    this.m_RowCount = 0;
    this.m_Selected = false;
    this.m_sOrderBy;
    this.m_sTag;

    // -------------------------------------------------------------------
    this.addRow = function(Id){
      var oRow = new cRow(this);
      this.m_oRows[Id] = oRow;
      this.m_RowCount++;
      return oRow;
    };
    // -------------------------------------------------------------------
       
    this.deleteRows = function(){
      if(this.m_oBody){
        while(this.m_oBody.firstChild) {
          var oRow = this.m_oBody.firstChild;
          while (oRow.firstChild) {
            oRow.deleteCell(0);
          }
          this.m_oBody.deleteRow(0);
        }
      }
    }
    // -------------------------------------------------------------------    
    
    this.show = function(value){
      if(this.m_oTable){
        this.m_oTable.style.display = value == true ? '' : 'none';  
      }
    }
  }