code: function() {
  
          if (this.layers.length == this.map.layers.length) { 
              this.map.events.unregister('addlayer', this, this.configureLayers);
  
              for(var i=0, len=this.layers.length; i<len; i++) {
                  
                  var layer = this.map.layers[i];
                  var c = this.layers.charAt(i);
                  
                  if (c == "B") {
                      this.map.setBaseLayer(layer);
                  } else if ( (c == "T") || (c == "F") ) {
                      layer.setVisibility(c == "T");
                  }
              }
          }
      }
docs: Method: configureLayers
  As soon as all the layers are loaded, cycle through them and
  hide or show them.