code: function(elementParam, name, observer, useCapture) {
          useCapture = useCapture || false;
      
          var element = OpenLayers.Util.getElement(elementParam);
          var cacheID = element._eventCacheID;
  
          if (name == 'keypress') {
              if ( navigator.appVersion.match(/Konqueror|Safari|KHTML/) || 
                   element.detachEvent) {
                name = 'keydown';
              }
          }
  
          // find element's entry in this.observers cache and remove it
          var foundEntry = false;
          var elementObservers = OpenLayers.Event.observers[cacheID];
          if (elementObservers) {
      
              // find the specific event type in the element's list
              var i=0;
              while(!foundEntry && i < elementObservers.length) {
                  var cacheEntry = elementObservers[i];
      
                  if ((cacheEntry.name == name) &&
                      (cacheEntry.observer == observer) &&
                      (cacheEntry.useCapture == useCapture)) {
      
                      elementObservers.splice(i, 1);
                      if (elementObservers.length == 0) {
                          delete OpenLayers.Event.observers[cacheID];
                      }
                      foundEntry = true;
                      break; 
                  }
                  i++;           
              }
          }
      
          //actually remove the event listener from browser
          if (foundEntry) {
              if (element.removeEventListener) {
                  element.removeEventListener(name, observer, useCapture);
              } else if (element && element.detachEvent) {
                  element.detachEvent('on' + name, observer);
              }
          }
          return foundEntry;
      }
docs: Method: stopObserving
  
  Parameters:
  elementParam - {DOMElement || String}
  name - {String}
  observer - {function}
  useCapture - {Boolean}
  
  Returns:
  {Boolean} Whether or not the event observer was removed