Re-arranged codes due to phone gap
index page update