Geocode_autocompletion_js is a project mainly written in JavaScript, it's free.
Autocompletion textbox for places using google geocode API
Geocoder Reference in Google Map JavaScript API v3
http://code.google.com/apis/maps/documentation/javascript/reference.html#Geocoder
Google Maps Geocoding API(to know what attributes are return in result and which refers to what)
http://code.google.com/apis/maps/documentation/geocoding/
autocomplete Jquery UI(1.8.12)
http://jqueryui.com/demos/autocomplete/
This is needed to use google maps code
Please refer working sample_geocode_usage.html for exact code.