If you have control of the page source, you can just set a global variable
value in the Body_OnLoad area of the Body tag. That would let you know when
the window has finished loading....
<body onload="JavaScript:aglobalvariable=True;">
Then you just check the aglobalvariable value...make sure you define the
global variable value on a global scale somewhere first.....
Mythran