The HTML5 datalist tag allows you to create a text field with an autocomplete drop-down. So as the user types, they will see a list of suggestions. This will save you tons of time implementing a similar feature.

Demo (with polyfill): http://css-tricks.com/examples/RelevantDropdown/

<input list="states">

<datalist id="states">
  <option value="Alabama">
  <option value="Alaska">
  <option value="Arizona">
  <option value="Arkansas">
  <option value="California">
  <option value="Colorado">
  <option value="Connecticut">
</datalist>