<script>
var tooManyTries = false;

function SubmitPreStepFour()
{
    var code = document.forms['phone'].phonecode.value;
    var url = 'index.php';
    var pars = 'fuse=admin&action=Signup_VerifyPhoneCode&phonecode=' + code;
    var myAjax = new Ajax.Request(url, {method: 'get', parameters: pars, onComplete: showResponse});
}

function BackPreStepFour()
{
    document.forms['phone'].step.value=2;
    document.forms['phone'].submit();
}

function showResponse(originalRequest)
{
    if (originalRequest.responseText == '1') {
        document.forms['phone'].submit();
    } else if (originalRequest.responseText == '-1') {
        if (!tooManyTries) {
            alert('Too many tries');
            tooManyTries = true;
        }
    } else {
        alert('Invalid Code');
    }
}
</script>

<form name='phone' action='signup.php?' method=post>
    {HIDDEN_INPUTS}
    <div id="kb" class="block">
        <div class="block_title">
            <h3><b><a href="index.php">[l]Support Center[/l]</a> &raquo; <a href="#">[l]Order[/l]</a></b></h3>
        </div>
        <ul>
            <li>
                <p><span class="">[l]Package Type[/l]</span> &raquo; <span class="">[l]Choose Domain[/l]</span> &raquo; <span>[l]Order Options[/l]</span> &raquo; <span class="currentStep">[l]Terms and Conditions[/l]</span> &raquo; <span class="futureStep">[l]Payment[/l]</span> &raquo; <span class="futureStep">[l]Complete[/l]</span></p>
                <p class="kb st" style="background: url(templates/{TEMPLATE}/images/public/icon_signup.gif) no-repeat  0 8px;">[l]In this step, you must complete a telephone verification.  This step protects you from fraudulent orders using your information.[/l]</p>
            </li>
        </ul>
    </div>
    <div class="block">
        <div class="block_title">
            <h3>[l]Telephone Verification[/l]</h3>
        </div>
        <ul>
            <li>
                <p class="order_override">
                    <!-- BEGIN DYNAMIC BLOCK: first_verification -->
                    {verifBox1} {phoneNum} {verifBox2}
                    <br>{verifBox3}</td>
                <!-- END DYNAMIC BLOCK: first_verification -->
                
                <!-- BEGIN DYNAMIC BLOCK: already_called -->
                {verifPostCall}
                <!-- END DYNAMIC BLOCK: already_called -->
                
                </p>
                <p>
                    [l]Verification Code[/l]:&nbsp;&nbsp;
                    <input maxlength='10' name='phonecode' size='10' onkeypress='return noenter(event)' type='text'>
                </p>
            </li>
        </ul>
    </div>
    <div class="block_footer">
        <p><a href="javascript:void();" onclick="{SUBMITFUNCTION}(); return false;">[l]Continue[/l] &raquo;</a></p>
    </div>
</form>
