html5 phonegap application for counting costs