I know there are some ways to get notified when the page body has loaded (before all the images and 3rd party resources load which fires the window.onload e
I found this page, which shows a compact self-contained solution. It seems to work on every browser and has an explanation on how:
http://www.kryogenix.org/days/2007/09/26/shortloaded