My problem only happens on Safari. IE, FF, Chrome and Opera all work flawlessly. I am adding an object to the DOM (exactly the same way YouTube does it, depending on ActiveX or NPAPI) so after I determine the write object type I add it to the DOM via :
document.write(MyObject)
At the head section of the page, so that js functions called from body can access it. It works on everything except Safari. The only way I can let Safari work is by adding an alert after document.write! I even tried setTimeout, but it works one time and fails 10.