if(value!=null && (value instanceof FloatValue))
if(d==null)
    public static int getDimensionValue(CSSValue value)    {    	if(value!=null && (value instanceof FloatValue))    	{    		FloatValue fv = (FloatValue)value;    		float v = fv.getFloatValue();    		switch(fv.getPrimitiveType())    		{    		case CSSPrimitiveValue.CSS_CM:    			return (int)(v*72000/2.54);    			    		case CSSPrimitiveValue.CSS_IN:    			return (int)(v*72000);    			    		case CSSPrimitiveValue.CSS_MM:    			return (int)(v*7200/2.54);    			    		case CSSPrimitiveValue.CSS_PT:    			return (int)(v*1000);    		case CSSPrimitiveValue.CSS_NUMBER:    			return (int)v;    		}    	}    	return 0;    }