Redefined attributes, removed window.onload and var pop. Moved script call to foot of html.