Phonegap code for displaying spine curve