     //
     //--------------------------------------------------------------------------
 
-    internal static function hasPercentWidth(layoutItem:ILayoutItem):Boolean
-    {
-        return !isNaN( layoutItem.percentWidth );
-    }
-    
-    internal static function hasPercentHeight(layoutItem:ILayoutItem):Boolean
-    {
-        return !isNaN( layoutItem.percentHeight );
+    internal static function hasPercentWidth(layoutElement:ILayoutElement):Boolean
+    {
+        return !isNaN(layoutElement.percentWidth);
+    }
+    
+    internal static function hasPercentHeight(layoutElement:ILayoutElement):Boolean
+    {
+        return !isNaN(layoutElement.percentHeight);
     }
 
     //--------------------------------------------------------------------------


import mx.components.baseClasses.GroupBase;
import mx.core.ScrollUnit;
import mx.layout.ILayoutItem;
import mx.utils.OnDemandEventDispatcher;



        if (!g)
            return 0;     

        var maxIndex:int = g.numLayoutElements -1;
        if (maxIndex < 0)
            return 0;

