This page contains an image whose loading is (server-side) delayed (about 8 seconds), and includes a javascript function that changes the image's border color from yellow to red. The loading of the page itself is slightly delayed (about 2 seconds.)

The current page calls the function at windows.onload. This waits for the image to arrive.

This other page attempts to call the function at DOM available.

If you see this sequence:
(1) yellow border ...~8 seconds... (2) red border and image (appearing more or less simultaneously)
then the function is called at windows.onload

If you see this sequence:
(1) yellow border ...~2 seconds... (2) red border ...~6 seconds... (3) image
then the function is called at DOM available (before windows.onload)
(The transition yellow-red border may not be visible at all in some browsers.)

miao

Credits for the DOM-available combination of methods Dean Edwards windows.onload (again). Seems to work in IE/Win, Mozilla, Opera 9, Safari.