 
     }
     
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Automation
+    //
+    //--------------------------------------------------------------------------
+    /**
+	 * @private
+	 * This function gets the class which is responsible for getting the 
+	 * drag automation handler class.
+	 */
+	 	 
+	 private var _dragAutomationHandlerClass:Class;
+	 
+	 /**
+	  *  @private
+	  */  
+	 private function get dragAutomationHandlerClass():Class
+	 {
+	 	if (!_dragAutomationHandlerClass)
+	 	{ 	
+	 	 	try
+		 	{
+		 		if (sm)
+		 		{
+		 			_dragAutomationHandlerClass = 
+		 				Class(sm.getDefinitionByName("mx.automation.delegates.DragManagerAutomationImpl"));
+		 		}
+		 		else
+		 		{
+		 			_dragAutomationHandlerClass = 
+		 				Class(getDefinitionByName("mx.automation.delegates.DragManagerAutomationImpl"));
+		 		}
+		 	}
+		 	catch (e:Error)
+		 	{
+		 		trace(e.message);
+		 	}
+	 	} 	
+	 	return _dragAutomationHandlerClass;
+	 }
+    
     //--------------------------------------------------------------------------
     //
     //  Event handlers

import flash.events.NativeDragEvent;
import flash.geom.Point;
import flash.system.Capabilities;

import mx.core.DragSource;
import mx.core.IFlexDisplayObject;

            dragEvent.relatedObject = _relatedObject;
        else
            dragEvent.relatedObject = event.relatedObject;
            
        if (dragAutomationHandlerClass)
		{
			if (newType == DragEvent.DRAG_DROP)
			{
				dragAutomationHandlerClass["recordAutomatableDragDrop1"](target,dragEvent);
			}
			else if (newType == DragEvent.DRAG_COMPLETE)
			{
			   	dragAutomationHandlerClass["recordAutomatableDragCancel1"]
			   		(NativeDragManager.dragInitiator as IUIComponent, dragEvent);
			}
		}    
            
        // Resend the event as a DragEvent.
        _dispatchDragEvent(target, dragEvent);
                
