document onloads should be in html or separate js file