MooTools hits an error on this line:
this.Window = this.$constructor = new Type('Window', function(){});
This is a problem if you're loading MooTools at the bottom of the
page, and have a non-iframed DoubleClick Ad on the page ( DC uses
window.execScript to create Flash objects in IE ).
This is easily replicated (in IE 6/7/8) with a page containing only
this small JS block and a MooTools library include:
[script type="text/javascript"]
if (window.ActiveXObject && window.execScript){
window.execScript('Sub Pressed\nAlert "Hello World!"\nEnd Sub
\n',"VBScript");
}
[/script]
followed by:
[script type="text/javascript" src="https://ajax.googleapis.com/ajax/
libs/mootools/1.4.1/mootools-yui-compressed.js"]
I was thinking it might be a timing issue ( window.execScript
preventing MooTools from prototyping the window object ) but I tested
with a 3 second delay before loading MooTools and still got the error.
Loading MooTools FIRST works fine, but that impacts page load
performance. Iframing the ad works as well but we want this placement
to render with the page ( so that content doesn't jump around if the
ad collapses ).