<?xml version="1.0" encoding="utf-8"?>
<ui:TitleForm xmlns:fx="http://ns.adobe.com/mxml/2009" 
              xmlns:s="library://ns.adobe.com/flex/spark" 
              xmlns:mx="library://ns.adobe.com/flex/mx" 
              xmlns:form="com.afi.estimator.views.form.*" 
              xmlns:ui="com.afi.estimator.views.ui.*"
              creationComplete="init()"
              addedToStage="callTracking()"
              >
    <fx:Script>
        <![CDATA[
            import com.tracking.TrackingManager;
            private function callTracking():void{
                TrackingManager.trackOmniture("Why Apply Now");
            }
            
            import com.afi.estimator.model.TextModel;
            import com.afi.estimator.views.View;
            
            [Bindable]private var pageName:String = 'whyApplyNow';
            
            import com.afi.estimator.style.buttons.GreenButton;
            
            [Bindable]private var header_padding:Number = 25;
            
            [Bindable]private var padding:Number = 5;
            
            private function init():void
            {
                View.instance.nextprevious.visible = true;
            }
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <s:VerticalLayout />
    </fx:Declarations>
    
    <s:Label id="formTitle" text="{TextModel.get(pageName).title}" styleName="formTitle" paddingBottom="20" /> 
    
    <s:Group height="100%">
        <ui:Formbackground width="100%" height="100%" />
        
        <s:VGroup horizontalAlign="center" accessibilityEnabled="false">
            <s:VGroup paddingLeft="{padding}" paddingRight="{padding}" paddingTop="{padding}" paddingBottom="{padding}" accessibilityEnabled="false">
                <mx:Image source="@Embed('../../assets/images/types-new.png')" accessibilityEnabled="false" />
            </s:VGroup>
        </s:VGroup>
        
        <s:VGroup paddingLeft="{header_padding}"   paddingRight="{header_padding}" paddingTop="{header_padding}" paddingBottom="{header_padding}"
                  top="0" height="100%">
            <mx:Text maxWidth="550" htmlText="{TextModel.get(pageName).body}" condenseWhite="true" height="100%"/>
        </s:VGroup>
        
    </s:Group>
    
</ui:TitleForm>