Use document ready instead of onload variable