var Control = Class.create({
  //static data
},{//instance data
  
  //methods
  __construct:function(serverData) {
    
    //properties
    this._serverData = {};
    this._controls = {};
    this._parentControl = null;
    this._id = this._name = undefined;
    
    this._serverData = eval(serverData);
  },
  
  __destruct:function() {
    
  },
  
  initialize:function() {
    
    var m = ControlsManager.getInstance();
    
    //child controls init
    if (this._serverData['__childControls']) {
      var arr = this._serverData['__childControls'];
      delete this._serverData['__childControls'];
      
      for (var key in arr) 
        this._controls[key] = m.getControl(arr[key]);
    }
    
    //parent control init
    if (this._serverData['__parentControlId']) {
      this._parentControl = m.getControl(this._serverData['__parentControlId']);
      delete this._serverData['__parentControlId'];
    }
    
    //id and name
    this._id = this._serverData['__id'];
    delete this._serverData['__id'];
    this._name = this._serverData['__name'];
    delete this._serverData['__name'];
    
    if (this.init && this.init.constructor === Function)
      this.init();
    
  }
  
  
},[Event]);