<script language='javascript'>
    function SwitchMember(myObj)
    {
        if (myObj.checked){
            $('billingblock').style.display="none";
            $('billingblockmember').style.display="";
            $('memberinfo').style.display="";
            $('accountinfoblock').style.display="none";
            if (document.getElementById('accessCodeSection')) {
                $('accessCodeSection').style.display="none";
            }
        }else{
            $('billingblock').style.display="";
            $('billingblockmember').style.display="none";
            $('memberinfo').style.display="none";
            $('accountinfoblock').style.display="";
            if (document.getElementById('accessCodeSection')) {
                $('accessCodeSection').style.display = "";
            }
            $('forgotpassword').style.display = "none";
        }
    }

    function changeAccessCodeImg()
    {
      var randomimage = Math.random();
      document.images.captcha.src = "modules/clients/captcha.php?" + randomimage + "";
    }
</script>

<div class="block" style="display:{DISPLAY_ACCOUNT_INFO}">
    <div class="block_title">
        <h3>[l]Account Information[/l]</h3>
    </div>
    <ul>
        <li>
            <p class="order_override" style="display:{MEMBERBOX_STYLE}">
                <label>[l]I'm an Existing Member[/l]</label>
                <input name="member" onclick="SwitchMember(this);" {CHECKEDMEMBERINPUT} type="checkbox">
            </p>
            <div id="memberinfo" style="display:{MEMBERINFO_STYLE}">
                <p class="order_override">
                    <label></label>
                    [l]Please enter your profile's E-mail address and password[/l]
                    <div id="membervalid"></div>
                </p>
                <p class="order_override">
                    <label>[l]E-mail[/l]:</label>
                    <input type="text" name="member_email" value="{MEMBER_EMAIL}" class="txtbox" onkeypress="return noenter(event);">
                </p>
                <p class="order_override">
                    <label>[l]Password[/l]:</label>
                    <input type="password" name="member_password" value="{MEMBER_PASSWORD}" class="txtbox" onkeypress="return noenter(event);">
                </p>
                <p class="order_override center">
                    <a style="display:visibility" id="linkForgotPassword" href="javascript:hideshow($('forgotpassword'),'toggle0')">[l]Forgot Password?[/l]</a>
                </p>
                <p class="order_override" id="message">
                </p>
            </div>
            
            <div id="forgotpassword" style="display:none">
                <p class="order_override">
                    [l]Please enter your profile's E-mail to retrieve your password[/l]
                </p>
                <p class="order_override">
                <label></label>
                    <input id=femail name=femail type=text class="txtbox" size=20>
                    <input onclick="javascript:hideshow($('forgotpassword'),'toggle0');passwordRequest('femail')" type="button" value="[lh]SUBMIT[/lh]" class="button_medium"></td>           
                </p>  
                <p class="order_override center">
                    <font color=#006699>[l]Your IP will be logged for security reasons[/l]</font>
                </p>
            </div>
            
            <div id="accountinfoblock" style="display:{ACCOUNTINFO_STYLE}">
                {DISPLAYPROFILECUSTOMFIELDS}
                <p class="order_override bold">
                [l]Please enter your preferred password for this account.[/l]
                </p>
                <p class="order_override">
                    <label>[l]Account Password[/l]:</label>
                    <input type="password" class="txtbox" name="new_password" id="new_password" size="20" value="{NEW_PASSWORD}" onkeypress="return noenter(event)">
                    <input type="hidden" name="r_new_password" value="[lh]Password[/lh]">
                </p>
                <p class="order_override">
                    <label>[l]Confirm Password[/l]:</label>
                    <input type="password" class="txtbox" name="new_password_confirm" id="new_password_confirm" size="20" value="{NEW_PASSWORD_CONFIRM}" onkeypress="return noenter(event)">
                    <input type="hidden" name="r_new_password_confirm" value="[lh]Confirm Password[/lh]">
                </p>
            </div>
            
            <!-- BEGIN DYNAMIC BLOCK: request_access_code -->
            <div id="accessCodeSection">
                <p class="order_override">
                    <label>[l]Access code picture[/l]:</label>
                    <img name="captcha" id="antiflood" src="modules/clients/captcha.php" border="0">&nbsp;&nbsp;
                    <a href="javascript:void(0);" onclick="changeAccessCodeImg();return false;" style="text-decoration:none">
                        <img src="templates/{TEMPLATE}/images/refresh.gif" border="0" alt="[lh]Request a new access code picture[/lh]" title="[lh]Request a new access code picture[/lh]">
                    </a>
                </p>
                <p class="order_override">
                    <label>[l]Please enter the access code[/l]:</label>
                    <input type="textbox" class="txtbox" name="accesscode" size="20" onkeypress="return noenter(event)"> {ENTERACCODE}
                    <input type=hidden name=r_accesscode value="[lh]Access code[/lh]">
                </p>
            </div>
            <!-- END DYNAMIC BLOCK: request_access_code -->
        </li>
    </ul>
</div>

