     /**
      *  @private
      */ 
-    private var _window:Window = null;
-    
-    mx_internal function get window():Window
+    private var _window:IWindow = null;
+    
+    mx_internal function get window():IWindow
     {
         return _window;
     }
     
-    mx_internal function set window(value:Window):void
+    mx_internal function set window(value:IWindow):void
     {
         _window = value;
     }

            {
                var n:int = forms.length;
                var p:DisplayObject = DisplayObject(event.target);
                var isApplication:Boolean = document.rawChildren.contains(p);
                while (p)
                {
                    for (var i:int = 0; i < n; i++)

                     is NativeDragManagerImpl)
            NativeDragManagerImpl(Singleton.getClass("mx.managers::IDragManager").getInstance()).unregisterSystemManager(this);
        SystemManagerGlobals.topLevelSystemManagers.splice(SystemManagerGlobals.topLevelSystemManagers.indexOf(this), 1);
        myWindow.nativeWindow.removeEventListener("close", cleanup);
        myWindow = null;
    }

