After a second the text will show two parts: the filter (current typed letters) and the complement to the first matching element marked. Current search engine respects the letter case.
The second textbox will receive the corresponding code.
Type any search. After a delay of one second without typewritting, the input text will show itself in a red color,load the autocomplete, and show it in their natural color.
-> extend the filter to the next letter
-> contract the filter to the prior letter
-> select prior matching element
-> select next matching element
-> erase last letter from filter and reload the autocomplete
(test.php contains the code for use it with arrays or with a MySQL database. Currently an array of countries).