Minor code revision.

Moved some code from index.html to the newly created /js/config.js which
will hold configuration stuff like window object that is not a global
variable thus doesn't belong in /js/globals.js