moved javascript tag back
added a window.onload in case some know-it-all theme designer puts the javascript tag at the bottom of the theme.