Moved js call to head
Added window.onLoad method