     public function addPopUp(window:IFlexDisplayObject,
                              parent:DisplayObject,
                              modal:Boolean = false,
-                             childList:String = null):void
+                             childList:String = null,
+                             moduleFactory:IFlexModuleFactory = null):void
     {
         // trace("POPUP: window is " + window);
         // All popups go on the local root.

     *  <code>PopUpManagerChildList.POPUP</code>, 
     *  or <code>PopUpManagerChildList.PARENT</code> (default).
     *
     *  @see PopUpManagerChildList
     *  
     *  @langversion 3.0

              IUIComponent(window).document == null)
              IUIComponent(window).document = IUIComponent(parent).document;

        if (window is IFlexModule && IFlexModule(window).moduleFactory == null)
        {
            if (moduleFactory) 
                IFlexModule(window).moduleFactory = moduleFactory;
            else if (parent is IUIComponent && IUIComponent(parent).document is IFlexModule)
                IFlexModule(window).moduleFactory = IFlexModule(IUIComponent(parent).document).moduleFactory;
        }
        
        var sm:ISystemManager = getTopLevelSystemManager(parent);
        var children:IChildList;
        var topMost:Boolean;
