This script is not correct, and I beleive its only really working by chance (I understand this is a blogpost but the same script is included in the documentation)
window.attachEvent takes a function as its second parameter, but by putting brackets after callPage (and in fact a parameter) you are passing the result of executing the callPage function into window.attachEvent (which is null because it doesn't return anything).
You would need a closure to bind the parameter with the method, which would be then passed as a parameter to attachEvent.
On the other hand however, I can't really see why you would want the callPage function to run after the page has loaded, particularly as it uses the (deprecated) document.write, which, should it run after the document has loaded, would insert the iframe at the end of the document.
would be my recommendation