Added object literal and window.onload method