      */ 
     public function register(obj:IHistoryManagerClient):void
     {
-        if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
-            !ApplicationGlobals.application.historyManagementEnabled)
+        if (!("historyManagementEnabled" in FlexGlobals.topLevelApplication) ||
+            !FlexGlobals.topLevelApplication.historyManagementEnabled)
             return;
 
         // Ensure that this object isn't already registered.

        if (haveState)
        {
            pendingQueryString = queryString;
            ApplicationGlobals.application.callLater(this.submitQuery);
        }
    }
    

     */
    public function unregister(obj:IHistoryManagerClient):void
    {
        if (!("historyManagementEnabled" in FlexGlobals.topLevelApplication) ||
            !FlexGlobals.topLevelApplication.historyManagementEnabled)
            return;

        // Find the index of the object in the Array of all
