Moved code to new function loaded via window.onload()
Moved code to new function loaded via window.onload()

Ensures the page is fully loaded before running the script, avoiding
grabbing of elements before they are defined.

CalumJEadie/frame-by-frame,CalumJEadie/frame-by-frame,regularWand/frame-by-frame,regularWand/frame-by-frame