Google has documented this method here: https://developers.google.com/webmasters/ajax-crawling/
I have made a service that takes care of this for javascript sites that don't want to mess with maintaining this system themself. http://www.BromBone.com