{include file="./index_head.tpl"}
<style>
    .headname:hover {
        background-color: transparent;
    }
</style>
<script>
    function set_display(t) {
        el = document.getElementById('select_cats');
        pre_el = document.getElementById('pre_select_cats');
        if (t == 0) {
            el.style.display = 'none';
            pre_el.style.marginBottom = '20px';
        }
        else if (t == 1) {
            el.style.display = '';
            pre_el.style.marginBottom = '15px';
        }
    }

    function select_count() {
        manual = document.getElementById('setup_type_f');
        if (manual.checked) return true;

        el = document.getElementById('select_cats');
        els = el.getElementsByTagName('INPUT');

        for (var i = 0; i < els.length; i++) {
            if (els[i].checked) return true;
        }

        alert("{$lang.setup_manual_count}");
        return false;
    }
</script>
</HEAD>
<BODY>
<div id="alert_div"></div>
<div id="mainmenu" style='width:100%;padding: 0 32px;margin: 0px;'>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr valign="top">
            <td class="otstup" width="100%"><span class="headname">{$lang.setup_header}</span></td>
        </tr>
    </table>
</div>
<div style="padding: 15px 34px">
    <form action="select_cats.php" method="post">
        <input type=hidden name=csrf value='{$csrf}'>
        <p style="font-size:16px; margin-bottom:20px;">{$lang.select_cats_for_use}:</p>
        <table border=0 cellspacing=1 cellpadding=5 style="margin-bottom:20px;" id="pre_select_cats">
            <tr>
                <td style="padding-left:0px;"><input type="radio" name="setup_type" id="setup_type_f"
                                                     onclick="set_display(0);" checked/></td>
                <td>{$lang.Full_setup}</td>
            </tr>
            {*<tr>
                <td style="padding-left:0px;"><input type="radio" name="setup_type" id="setup_type_m"
                                                     onclick="set_display(1);"/></td>
                <td>{$lang.Manual_setup}</td>
            </tr>*}
        </table>
        {*<table border=0 cellspacing=1 cellpadding=5 style="display:none;margin-bottom:20px;" id="select_cats">
            {foreach from=$cats key=one_cat_id item=one_cat}
                <tr>
                    <td style="padding-left:26px;width:20px;"><input type="checkbox" name="cats_id[{$one_cat_id}][]"
                                                                     checked></td>
                    <td align="left"><span title='{$one_cat.help}'>{$one_cat.name}</span>{if $one_cat.tables} <span
                                style="color:gray;">({$one_cat.tables})</span>{/if}</td>
                </tr>
            {/foreach}
            <tr>
                <td colspan=2 style="padding-left:26px;"><br/><span style="color:gray;">* {$lang.Manual_setup_text}
                        .</span></td>
            </tr>
        </table>*}
        <p><input type="submit" name="send" value="{$lang.Further}" onclick="return select_count();"></p>
    </form>