Code for a phonegap tutorial found at : http://coenraets.org/blog/phonegap-tutorial/