Added phonegap javascript