more javascript code gets taken out of the main document...
windows now pass in whether or not they are the top document...