Create main1.js

Updated Javascript page for the app.