 								child.m_marginLeft - absolutePosition.x;
 						}
 					}
-					else if (!child.m_rightIsAuto)
+					else if (!child.m_autoFlags.right)
 					{
 						child.x = child.m_containingBlock.m_paddingBoxWidth - 
 							child.m_paddingBoxWidth - child.m_borderRightWidth - 
 							child.m_right - child.m_marginRight - absolutePosition.x;
 					}
 					
-					if (!child.m_topIsAuto)
-					{
-						var childMarginTop : CSSProperty = 
-							child.m_complexStyles.getStyle('marginTop');
-						var childMarginBottom : CSSProperty = 
-							child.m_complexStyles.getStyle('marginBottom');
-						if (!child.m_bottomIsAuto && 
-							childMarginTop && childMarginTop.isAuto() && 
-							childMarginBottom && childMarginBottom.isAuto())
+					if (!child.m_autoFlags.top)
+					{
+						if (!child.m_autoFlags.bottom && 
+							child.m_autoFlags.marginTop && child.m_autoFlags.marginBottom)
 						{
 							//center vertically if margin-top and margin-bottom 
 							//are both auto and top and bottom have values.

								child.m_marginTop - absolutePosition.y;
						}
					}
					else if (!child.m_bottomIsAuto)
					{
						child.y = child.m_containingBlock.m_paddingBoxHeight - 
							child.m_paddingBoxHeight - child.m_borderBottomWidth - 

			}
			
			
			if (!m_currentStyles.outerWidth)
			{
				m_currentStyles.outerWidth = m_width + 
					m_borderLeftWidth + m_paddingLeft + 
					m_borderRightWidth + m_paddingRight;
			}
			if (!m_currentStyles.outerHeight)
			{
				m_currentStyles.outerHeight = m_height + 
					m_borderTopWidth + m_paddingTop + 
					m_borderBottomWidth + m_paddingBottom;
			}
			m_paddingBoxWidth = m_paddingLeft + m_width + m_paddingRight;
			m_paddingBoxHeight = m_paddingTop + m_height + m_paddingBottom;
			
			
			if (m_currentStyles.tabIndex != null)
			{
				m_tabIndex = m_currentStyles.tabIndex;
