 	       	}
 	
 	   		// add listener activate/deactivate requests
-	   		if (!(form.systemManager is SystemManagerProxy))
+	   		if (bridge && !(form.systemManager is SystemManagerProxy))
 	   		{
 	   			bridge.removeEventListener(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST, focusRequestActivateHandler);
 	   			bridge.removeEventListener(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST, focusRequestDeactivateHandler);

	 *  @param eObj if a SandboxBridgeEvent, then propagate the message,
	 * 			   if null, start a new message.
	 */
	private function dispatchActivatedFocusManagerEvent(eObj:Object):void
	{
		// If in a popup, then don't send this message to non-popup 
		// focus managers that are part of the application.
		if (popup)
			return;
			
		var sm:ISystemManager = form.systemManager;
		if (sm && sm.swfBridgeGroup)
		{
			var lastBridge:IEventDispatcher = eObj ? eObj.target : null;
	       	var parentBridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;

//			TODODJL: don't send the ACTIVATED_FOCUS_MANAGER message if we are already
//			active.	       	
//	       	if (lastActiveFocusManager == this)
//	       	{
//	       		// trace("FM: dispatchActivatedFocusManagerEvent already active, skipping messages");
//	       		return;		// already active
//	       	}
	       		
	       	// need to create the event locally so the "is this a message from ourselves"
	       	// check works. Otherwise the message is created in the same domain. 
    		eObj = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE);
			
	       	// send message to top-level that we are active
	       	if (parentBridge && parentBridge != lastBridge)
	       		parentBridge.dispatchEvent(Event(eObj));
	       	
	       			// send to children
			for (var iter:Object in bridgedFocusManagers)
			{
				if (iter != lastBridge)
				{
					var childBridge:IEventDispatcher = IEventDispatcher(iter);
					childBridge.dispatchEvent(Event(eObj));
				}
			}

		}
	}
	
	/**
	 * Send the event to all the subordinate focus managers.
	 */
	private function sendEventToBridgedFocusManagers(event:Event):void
	{
		for (var iter:Object in bridgedFocusManagers)
		{
			IEventDispatcher(iter).dispatchEvent(event);
		}
	}


	private function getBrowserFocusComponent(shiftKey:Boolean):InteractiveObject
	{
    	var focusComponent:InteractiveObject = form.systemManager.stage.focus;

	  	}
	  	
		if (focusSetLocally)
		{
            dispatchActivatedFocusManagerEvent(null);
            lastActiveFocusManager = this;
		}
    }

    private function focusRequestActivateHandler(event:Event):void
	{
		// trace("FM focusRequestActivateHandler");
		skipBridge = IEventDispatcher(event.target);
		activate();
		skipBridge = null;
	}

    private function focusRequestDeactivateHandler(event:Event):void
	{
		// trace("FM focusRequestDeactivateHandler");
        skipBridge = IEventDispatcher(event.target);
		deactivate();
        skipBridge = null;
	}

    private function bridgeEventActivateHandler(event:Event):void
