{%LADDER%}
<div class="forumTitle">
    <div style="float:left">
        {%HEADTEXT%}
        <div style="float:right">
            <a href="javascript:void(0)" onclick="switchBlock('add');"><img src="media/other/{%COOKIE_IMG%}.png" id="img_stat" style="width:16px; height: 16px; border:0;" alt=""/></a>
        </div>
    </div>
    <br style="clear:both"/>
</div>
<article class="hentry">
    <form name="topic" method="post" action="{%ACTION%}/{%HASH%}" enctype="multipart/form-data" checkAddPost();">
    <table style="width:100%; border: 0; border-spacing: 1px; border-collapse: separate;">
        <tbody>
        <tr>
            <td class="label">
                Название темы:<span class="impot">*</span>
            </td>
            <td>
                <label for="title"></label><input type="text" name="title" id="title" value="{%NAME%}" maxlength="150" maxsize="100" class="f_input" placeholder="Введите название темы" required onchange="alt_btitle(gid('title').value, 'check_btitle');"/>
                <div id="check_btitle"></div>
            </td>
        </tr>
        <tr>
            <td class="label">
                Иконка:<span class="impot"></span>
            </td>
            <td>
              <br/>{%ICON%}
            </td>
        </tr>

        <tr>
            <td class="label">
                Сообщение:<span class="impot">*</span>
            </td>
            <td>
                {%TEXTAREA%}
            </td>
        </tr>

        <tr>
            <td style="width:200px;"></td>
            <td style="text-align:right;">
                <div class="padding">
                    <br/>
                    [post]
                    <input type="hidden" name="st" value="editPost"/>
                    [/post]
                    [users]
                    <input type="hidden" name="st" value="newTopic"/>
                    [/users]
                    [post]
                    <input type="hidden" name="id" value="{%ID%}"/>
                    <input type="hidden" name="page" value="{%PAGE%}"/>
                    <input type="hidden" name="tid" value="{%TID%}"/>
                    <input type="hidden" name="forum" value="{%FORUM_NAME%}"/>
                    [/post]
                    [users]
                    <input type="hidden" name="forum" value="{%ID%}"/>
                    <input type="hidden" name="uniqCode" value="{%UNIQCODE%}"/>
                    <input type="hidden" name="tid" value="{%ID%}"/>
                    <input type="hidden" name="type" value="topic"/>
                    [/users]
                    <input type="submit" class="form-button-tt" value="Сохранить">
                    <input type="reset" class="form-button-tt" value="Очистить">
                </div>
                <div style="clear: both;"></div>
        </tr>
        </tbody>
    </table>
    </form>
</article>
<script>
    function checkAddPost()
    {var err = 0;gid('titleErr').innerHTML = '';gid('postTextErr').innerHTML = '';if(gid('title').value == ''){err = 1;gid('titleErr').innerHTML = '[lang_tpl:not_headline]';} if(gid('short').value == ''){	err = 1;gid('postTextErr').innerHTML = '[lang_tpl:not_announcement]';}if (err === 1){alert('[lang_tpl:alert_fields]');return false;} else
    {return true;}
    }
    function alt_btitle(val, id)
    {if(val.length>3){AJAXEngine.setPostVar('title',encodeURI(val,true));AJAXEngine.sendRequest('ajax.php?do=alt_btitle',id)}}
</script>