<script>
    {$Page->getAllStates()}
</script>
<div class="order order_2">
    {$Order->showSteps()}
    <p style="clear: both">&nbsp;</p>

    {if $smarty.post.mode=='createaccount'}

    <form id="order" name="order" class="formulaire" action="order" method="post" accept-charset="utf-8">
        <input type="hidden" name="step" value="2"/>
        <h2>{$trad.strYourAccount}</h2>
        <input type="hidden" name="action" value="createaccount,saveaddresses"/>
        <input type="hidden" name="mode" value="createaccount"/>
        <p><label for="email">{$trad.strEmail}<em>*</em></label>
            <input type="text" autocomplete="off" name="email" id="email" size="32" maxlength="64"
                   value="{$Order->email}" dir="ltr"/><br/></p>
        <p><label for="password">{$trad.strPassword}<em>*</em></label>
            <input type="password" autocomplete="off" name="password" id="password" size="16" maxlength="16"
                   value="{$account->password}"/><br/></p>
        <p><label for="confirm_password">{$trad.strConfirmPassword}<em>*</em></label>
            <input type="password" name="confirm_password" autocomplete="off" id="confirm_password" size="16"
                   maxlength="16" value="{$account->password}"/></p>
        {else}
        <form id="order" name="order" id="order" action="order" method="post" accept-charset="utf-8" class="formulaire">
            <input type="hidden" name="action" value="saveaddresses"/>
            {/if}


            <div id="contact">
                <h2><a>{$trad.youraddress}</a></h1>

                    <p><label for="name">{$trad.strName}<em>*</em></label>
                        <input type="text" name="name" id="name" size="32" maxlength="64" value="{$Order->name}"/><br/>
                    </p>
                    <p><label for="firstname">{$trad.strFirstname}</label>
                        <input type="text" name="firstname" id="firstname" size="32" maxlength="64"
                               value="{$Order->firstname}"/><br/></p>
                    {if $smarty.post.mode!='createaccount'}
                        <p><label for="email">{$trad.strEmail}<em>*</em></label>
                            <input type="text" autocomplete="off" name="email" id="email" size="32" maxlength="64"
                                   value="{$Order->email}"/><br/></p>
                    {/if}

                    {include file="file:address.part.tpl"}
                    {include file="file:address_invoice.part.tpl"}
                    <br/><br/>
                    <input type="hidden" name="cg" value="1">
            </div>

            <input type="hidden" name="step" value="2"/>
            <p align="right"><input type="submit" value="{$Page->translate('Poursuivre la commande')}"
                                    class="ga_trackevent button"
                                    ga_event="Order;{if $smarty.post.mode=='createaccount'}createAccount;valid;1{else}saveAddress;valid;1{/if}"/>
            </p>
        </form>
        <br/>
        <table width="100%">
            <tr>
                <td>{$widget->get("part","code=order_2:title=0")}</td>

            </tr>
        </table>

</div>

<script>
    var ga_page = folder + 'order/{if $smarty.post.mode=='createaccount'}createaccount{else}saveaddress{/if}';
</script>