         if (hsb) hsb.visible = showHSB;
         if (showHSB)
         {
-            hsbElt.setLayoutBoundsSize(Math.max(hsbElt.getMinBoundsWidth(), viewportW), hsbH);
-            hsbElt.setLayoutBoundsPosition(0, h - hsbH);
+            hsb.setLayoutBoundsSize(Math.max(hsb.getMinBoundsWidth(), viewportW), hsbH);
+            hsb.setLayoutBoundsPosition(0, h - hsbH);
         }
         if (vsb) vsb.visible = showVSB;
         if (showVSB)
         {
-            vsbElt.setLayoutBoundsSize(vsbW, Math.max(vsbElt.getMinBoundsHeight(), viewportH));
-            vsbElt.setLayoutBoundsPosition(w - vsbW, 0);
+            vsb.setLayoutBoundsSize(vsbW, Math.max(vsb.getMinBoundsHeight(), viewportH));
+            vsb.setLayoutBoundsPosition(w - vsbW, 0);
         }
         
         target.setContentSize(w, h);

        
        if (showHSB)
        {
            var hsbElt:ILayoutElement = LayoutElementFor(hsb);
            measuredH += hsbElt.getPreferredBoundsHeight();
            minW += hsbElt.getMinBoundsWidth();              
            minH += hsbElt.getMinBoundsHeight();  
        }
        if (showVSB)
        {
            var vsbElt:ILayoutElement = LayoutElementFor(vsb);
            measuredW += vsbElt.getPreferredBoundsWidth();
            minW += vsbElt.getMinBoundsWidth();
            minH += vsbElt.getMinBoundsHeight();
        }
        
        var g:GroupBase = target;

package spark.components.supportClasses
{

import mx.core.ILayoutElement;
import mx.core.ScrollPolicy;

import spark.components.Scroller;
import spark.core.IViewport;
import spark.layout.supportClasses.LayoutBase;

[ExcludeClass]

