code: function(elementParam, name, observer, useCapture) {
          var element = OpenLayers.Util.getElement(elementParam);
          useCapture = useCapture || false;
  
          if (name == 'keypress' &&
             (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
             || element.attachEvent)) {
              name = 'keydown';
          }
  
          //if observers cache has not yet been created, create it
          if (!this.observers) {
              this.observers = {};
          }
  
          //if not already assigned, make a new unique cache ID
          if (!element._eventCacheID) {
              var idPrefix = "eventCacheID_";
              if (element.id) {
                  idPrefix = element.id + "_" + idPrefix;
              }
              element._eventCacheID = OpenLayers.Util.createUniqueID(idPrefix);
          }
  
          var cacheID = element._eventCacheID;
  
          //if there is not yet a hash entry for this element, add one
          if (!this.observers[cacheID]) {
              this.observers[cacheID] = [];
          }
  
          //add a new observer to this element's list
          this.observers[cacheID].push({
              'element': element,
              'name': name,
              'observer': observer,
              'useCapture': useCapture
          });
  
          //add the actual browser event listener
          if (element.addEventListener) {
              element.addEventListener(name, observer, useCapture);
          } else if (element.attachEvent) {
              element.attachEvent('on' + name, observer);
          }
      }
docs: Method: observe
  
  Parameters:
  elementParam - {DOMElement || String}
  name - {String}
  observer - {function}
  useCapture - {Boolean}