Invoke javascript on window load.

Fixes bug with addEventListener not finding DOM objects.
Revert script file to standard state.