             
         var maxDelta:Number = g.contentWidth - scrollR.width - scrollR.x;
         var minDelta:Number = -scrollR.x; 
-        var itemR:Rectangle;
+        var itemR:Rectangle = null;
         var firstIndex:int;
         var lastIndex:int;
         

                firstIndex = firstIndexInView;
                if (inView(firstIndex) >= 1)
                   firstIndex = Math.max(0, firstIndex -1);
                itemR = itemScan(g, firstIndex, -1);
                break;
            }


                lastIndex = lastIndexInView;
                if (inView(lastIndex) >= 1)
                   lastIndex = Math.min(maxIndex, lastIndex + 1);
                itemR = findLayoutItemBounds(g, lastIndex, +1);
                break;
            }
            
            default:
                return super.horizontalScrollPositionDelta(unit);
        }

        if (!itemR)
            return 0;

        switch (unit)
        {
            // Special case: only one item is partially visible.   If it
            // extends above the scrollR, then top justify it
            case Keyboard.LEFT:
            case Keyboard.PAGE_UP:
            {
                if ((itemR.left < scrollR.left) && (itemR.right >= scrollR.right))
                    return itemR.left - scrollR.left;
                break;
            }
                    
            // Special case: only one item is partially visible.   If it
            // extends below the scrollR, then bottom justify it
            case Keyboard.RIGHT:
            case Keyboard.PAGE_DOWN:
            {
                if ((itemR.left <= scrollR.left) && (itemR.right > scrollR.right))
                   return itemR.right - scrollR.right;
                break;
            }
        }
                
        switch (unit)
        {
            case Keyboard.LEFT:
                return Math.max(minDelta, itemR.left - scrollR.left);
                
            case Keyboard.RIGHT:
                return Math.min(maxDelta, itemR.right - scrollR.right);
                
            case Keyboard.PAGE_UP:
                return Math.max(minDelta, itemR.right - scrollR.right);

            case Keyboard.PAGE_DOWN:
                return Math.min(maxDelta, itemR.left - scrollR.left);
        }
        
        return 0;   
    }     

    public function variableColumnWidthMeasure(layoutTarget:GroupBase):void
