Execute o script após a carga HTML

window.onload = function ...
Outstanding Oystercatcher