code: function(component, index) {
          var added = false;
          if(component) {
              if(this.componentTypes == null ||
                 (OpenLayers.Util.indexOf(this.componentTypes,
                                          component.CLASS_NAME) > -1)) {
  
                  if(index != null && (index < this.components.length)) {
                      var components1 = this.components.slice(0, index);
                      var components2 = this.components.slice(index, 
                                                             this.components.length);
                      components1.push(component);
                      this.components = components1.concat(components2);
                  } else {
                      this.components.push(component);
                  }
                  component.parent = this;
                  this.clearBounds();
                  added = true;
              }
          }
          return added;
      }
docs: Method: addComponent
  Add a new component (geometry) to the collection.  If this.componentTypes
  is set, then the component class name must be in the componentTypes array.
  
  The bounds cache is reset.
  
  Parameters:
  component - {<OpenLayers.Geometry>} A geometry to add
  index - {int} Optional index into the array to insert the component
  
  Returns:
  {Boolean} The component geometry was successfully added