 		var paddingBottom:Object;
 		
 		var padding:Object = ValuesManager.valuesImpl.getValue(object, "padding");
-		if (padding is Array)
-		{
-			if (padding.length == 1)
-				paddingLeft = paddingTop = padding[0];
-			else if (padding.length <= 3)
-			{
-				paddingTop = padding[0];
-				paddingLeft = padding[1];
-				paddingBottom = padding[0];
-				paddingRight = padding[1];
-			}
-			else if (padding.length == 4)
-			{
-				paddingTop = padding[0];
-				paddingLeft = padding[1];
-				paddingBottom = padding[2];
-				paddingRight = padding[3];					
-			}
-		}
-		else if (padding == null)
-		{
-			paddingLeft = ValuesManager.valuesImpl.getValue(object, "padding-left");
-			paddingTop = ValuesManager.valuesImpl.getValue(object, "padding-top");
-			paddingRight = ValuesManager.valuesImpl.getValue(object, "padding-right");
-			paddingBottom = ValuesManager.valuesImpl.getValue(object, "padding-bottom");
-		}
-		else
-		{
-			paddingLeft = paddingTop = padding;
-			paddingRight = paddingBottom = padding;
-		}
-		var pl:Number = Number(paddingLeft);
-		var pt:Number = Number(paddingTop);
-		var pr:Number = Number(paddingRight);
-		var pb:Number = Number(paddingBottom);
+		paddingLeft = ValuesManager.valuesImpl.getValue(object, "padding-left");
+		paddingTop = ValuesManager.valuesImpl.getValue(object, "padding-top");
+		paddingRight = ValuesManager.valuesImpl.getValue(object, "padding-right");
+		paddingBottom = ValuesManager.valuesImpl.getValue(object, "padding-bottom");
+		var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, object.width);
+		var pt:Number = CSSUtils.getTopValue(paddingTop, padding, object.height);
+		var pr:Number = CSSUtils.getRightValue(paddingRight, padding, object.width);
+		var pb:Number = CSSUtils.getBottomValue(paddingBottom, padding, object.height);
 		
 		var marginLeft:Object;
 		var marginRight:Object;

     */
	public static function getMetrics(object:Object) : UIMetrics
	{
		var borderThickness:Object = ValuesManager.valuesImpl.getValue(object,"border-thickness");
		var borderOffset:Number;
		if( borderThickness == null ) {
			borderOffset = 0;
		}
		else {
			borderOffset = Number(borderThickness);

		if (marginLeft == "auto")
			ml = 0;
		else
        {
            ml = CSSUtils.getLeftValue(marginLeft, margin, object.width);
            if (isNaN(ml))
                ml = 0;
        }
		if (marginRight == "auto")
			mr = 0;
		else
        {
            mr = CSSUtils.getRightValue(marginRight, margin, object.width);
            if (isNaN(mr))
                mr = 0;
        }
		mt = CSSUtils.getTopValue(marginTop, margin, object.height);
		if (isNaN(mt))
			mt = 0;
        mb = CSSUtils.getBottomValue(marginBottom, margin, object.height);
		if (isNaN(mb))
			mb = 0;
		
        borderOffset *= 2; // border on each side
		var result:UIMetrics = new UIMetrics();
		result.top = borderOffset + pt;
		result.left = borderOffset + pl;
