Update script.js

window on load function added