if (("addMethods" in Autocompleter.Base)) {
  Autocompleter.Base.addMethods({
    onBlur: function(event) {
      try {
        setTimeout(this.hide.bind(this), 250);
        this.hasFocus = false;
        this.active   = false;
        var currentEntry = this.getCurrentEntry();        
        if (new RegExp("Airport").test(this.element.id)) {
            if (!new RegExp("\[[A-Z]{3}\]").test(this.element.value)) {
              if (this.getEntry(0).getAttribute("value") != "NAN") {
                this.element.value = currentEntry.innerHTML;
                
              }
            }
        } else {
            if (this.element.value != currentEntry.innerHTML) {
                if (this.getEntry(0).getAttribute("value") != "NAN") {
                    console.log('test1');
                    this.element.value = currentEntry.innerHTML;
                }
            }
        }
      } catch (e) {
        this.hasFocus = false;
        this.active = false;
      }
    }
  });  
  Autocompleter.Base.addMethods({
    onClick: function(event) {        
    }
  });
}