Looks like I've run into another difficulty again.. the problem is that I can't use document.write to write html where I want it. My script loads images and then waits for them to complete in a function which just keeps checking the status and then setting a flag to true when done. Meanwhile another function keeps checking the flag using a setTimeout loop to call itself every x seconds. When the flag becomes true, this function tries to write a string to the page using document.write but since the function call originated from a new thread created by setTimeout, the string gets written to who knows where and creates errors in the page. Is there any solution to this? Any help would be appreciated.