enable 'window', 'document' objects in jscript.
// create window & document objects.
if( typeof( document ) == 'undefined'){
document = new ActiveXObject( 'htmlfile');
document.write('<html></html>');
}
if( typeof( window ) == 'undefined') {
window = document.parentWindow;
}