     //--------------------------------------------------------------------------
     
     /**
+     *  Returns the bounds of the target's scrollRect in layout coordinates.
+     * 
+     *  Layout methods should not get the target's scrollRect directly.
+     * 
+     *  @return The bounds of the target's scrollRect in layout coordinates, null
+     *      if target or clipContent is false. 
+     */
+    protected function getTargetScrollRect():Rectangle
+    {
+        var g:GroupBase = target;
+        if (!g || !g.clipContent)
+            return null;     
+        var vsp:Number = g.verticalScrollPosition;
+        var hsp:Number = g.horizontalScrollPosition;
+        return new Rectangle(hsp, vsp, g.width, g.height);
+    }
+
+
+    /**
      *  Returns the bounds of the first layout element that either spans or
      *  is to the left of the scrollRect's left edge.
      * 

     */
     public function getScrollPositionDelta(index:int):Point
     {
         if (!target || !clipContent)
            return null;
            
         var n:int = target.numLayoutElements;
         if ((index < 0) || (index >= n))
            return null;
            
         var element:ILayoutElement = target.getLayoutElementAt(index);
         if (!element || !element.includeInLayout)
            return null;
            
         var scrollR:Rectangle = target.scrollRect;
         if (!scrollR)
            return null;
         

        if (!g)
            return 0;     

        var scrollRect:Rectangle = getTargetScrollRect();
        if (!scrollRect)
            return 0;
            
        // Special case: if the scrollRect's origin is 0,0 and it's bigger 
        // than the target, then there's no where to scroll to
        if ((scrollRect.y == 0) && (scrollRect.height >= g.height))
            return 0;  
            
        // maxDelta is the horizontalScrollPosition delta required 
        // to scroll to the END and minDelta scrolls to HOME. 
