Create apps.js

The Javascript for the main page