In jquery you can do
$(document).onload(function() { // do something}
//then later on do
$(document).onload(function() { // do something here too!}
jQuery will intelligently add both events to the onload event and both will be executed when the page loads. With jQuery you also get crossbrowser support as an added bonus.