When I was on the search for a javascript autocomplete sample it turned out that
all code was not very flexible at all or very flexible but came with huge footprint.
Use the 'view source' capability of your browser to get the source code.
This here is just a workprint - you will surely want to enhance it, feel free.