JavaScript running before and after window.onload

There are actually 11 links in this page. The last 8 don't actually exist at the point when we call showLinks(); But it does get counted after the window has completed loading window.load();
View the HTML in the <head> section as well as in the <body>.

ubc
Jim's course site
JavaScript Examples