%browserDTD; ]> -1 this._matchCount - 1) return val; if (this._selectedItem) this._styleItem(this._selectedItem, false); // highlight the selected item let item = this._items.childNodes.item(val); if (item) { this._selectedItem = item; this._styleItem(this._selectedItem, true); } return this._selectedIndex = val; ]]> false matchCount - 1) { // Just clear out the old item label.setAttribute("class", ""); label.setAttribute("value", ""); continue; } let url = controller.getValueAt(i); let title = controller.getCommentAt(i); let type = controller.getStyleAt(i); let image = controller.getImageAt(i); let typeClass = "ac-result-type-" + type; label.setAttribute("class", "autocomplete-item " + typeClass); label.setAttribute("value", title || url); } ]]> lastIndex) newIndex = 0; else if (newIndex < 0) newIndex = lastIndex; this.selectedIndex = newIndex; ]]> document.getAnonymousElementByAttribute(this, "anonid", "autocomplete-items");