code: function (control) {
          //make sure control is non-null and actually part of our map
          if ( (control) && (control == this.getControl(control.id)) ) {
              if (control.div && (control.div.parentNode == this.viewPortDiv)) {
                  this.viewPortDiv.removeChild(control.div);
              }
              OpenLayers.Util.removeItem(this.controls, control);
          }
      }
docs: APIMethod: removeControl
  Remove a control from the map. Removes the control both from the map
  object's internal array of controls, as well as from the map's
  viewPort (assuming the control was not added outsideViewport)
  
  Parameters:
  control - {<OpenLayers.Control>} The control to remove.