  		dispatchEvent(new AIREvent(AIREvent.APPLICATION_DEACTIVATE));
  	}
 
+ 	/**
+ 	 *  @private
+ 	 */
+ 	private function nativeWindow_activateHandler(event:Event):void
+ 	{
+ 		dispatchEvent(new Event("windowActivate"));
+ 	}	
+ 	
+ 	/**
+ 	 *  @private
+ 	 */
+ 	private function nativeWindow_deactivateHandler(event:Event):void
+ 	{
+ 		dispatchEvent(new Event("windowDeactivate"));
+ 	}
+ 	
  	/**
  	 *  @private
  	 */

 *  @eventType mx.events.AIREvent.APPLICATION_DEACTIVATE
 */
[Event(name="applicationDeactivate", type="mx.events.AIREvent")]

/**
 *  Dispatched before the window closes.

	 		nativeApplication.addEventListener(Event.DEACTIVATE, nativeApplication_deactivateHandler, false, 0, true);
	 		nativeApplication.addEventListener(Event.NETWORK_CHANGE,
 				nativeApplication_networkChangeHandler, false, 0, true);
 			_nativeWindow.addEventListener("activate", nativeWindow_activateHandler, false, 0, true);
            _nativeWindow.addEventListener("deactivate", nativeWindow_deactivateHandler, false, 0, true);
            
 			addEventListener(Event.ENTER_FRAME, enterFrameHandler);
 			//debug
 			var x:Object = StyleManager.stylesRoot;
