<?if(!$USER_LOGGED_IN$)?><div align="center"><a href="$LOGIN_LINK$">Для добавления необходима авторизация</a></div><?else?>
<?if(!$CAN_ADD$)?><div align="center"><?if($LOGIN_LINK$)?><a href="$LOGIN_LINK$">Для добавления необходима авторизация</a><?else?>Доступ запрещен<?endif?></div><?else?> 
<script type="text/javascript"> 
function sbtFrmMC991(f){$('#mchatBtn').css({display:'none'});$('#mchatAjax').css({display:''});_uPostForm('MCaddFrm',{type:'POST',url:'/mchat/'});} 
function countMessLength(){var rst = 500-$('#mchatMsgF').val().length;if (rst<0){rst=0;$('#mchatMsgF').val($('#mchatMsgF').val().substr(0,500));}$('#jeuwu28').html(rst);} 
var tID7174=-1;var tAct7174=false; 
function setT7174(s){var v=parseInt(s.options[s.selectedIndex].value);document.cookie="mcrtd="+s.selectedIndex+"; path=/";if(tAct7174){clearInterval(tID7174);tAct7174=false;}if(v>0){tID7174=setInterval("document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();",v*1000);tAct7174=true;}} 
function initSel7174() {var res=document.cookie.match(/(\W|^)mcrtd=([0-9]+)/);if(res){s=$("#mchatRSel")[0];;s.selectedIndex=parseInt(res[2]);setT7174(s);}$("#mchatMsgF").bind("keydown",function(e){if(e.keyCode==13 && e.ctrlKey && !e.shiftKey){e.preventDefault();sbtFrmMC991();}})} 
</script> 
<form style="margin:0;padding:0;" id="MCaddFrm" onsubmit="sbtFrmMC991();return false;"> 
<br> 

<span>
<span style="padding-left:10px;align:center;" id="bc9"><input title="Вставить картинку" 
value="img" onclick="tag_image1('mchatMsgF','')" 
class="codeButtons" style="width: 25px;" id="img" 
type="button"></span> 
<span style="align:center;" id="bc18"><input title="Вставить код" 
value="code" onclick="simpletag1('code','','','mchatMsgF','')" 
class="codeButtons" style="width: 30px;" id="code" 
type="button"></span> 
<span style="align:center;" id="bc7"><input title="Вставить ссылку" value="URL" onclick="tag_url1('mchatMsgF','')" class="codeButtons" 
style="direction: ltr; width: 45px;" id="url" 
type="button"></span> 
<script src="/js/bbmchat.js" type="text/javascript"></script> <span style="align:center;" id="bc1"><input title="Bold" value="b" onclick="simpletag1('b','','','mchatMsgF','')" class="codeButtons" 
id="b" style="width: 20px; font-weight: bold;" 
type="button"></span> 
<span style="align:center;" id="bc2"><input title="Italic" value="i" onclick="simpletag1('i','','','mchatMsgF','')" class="codeButtons" 
id="i" style="width: 20px; font-style: italic;" 
type="button"></span> 
<span style="align:center;" id="bc3"><input title="Underline" value="u" onclick="simpletag1('u','','','mchatMsgF','')" class="codeButtons" 
id="u" style="width: 15px; text-decoration: underline;" 
 type="button"></span></span>
<br> 

<table border="0" cellpadding="0" cellspacing="0" width="100%"> 

<td style="padding-left:1px;" align="center">
<div align="center"> 
<span style="padding-right: 
0px;" id="bc18"><input title="Добавить иконку сообщения" 
value="Добавить иконку" onclick="$('#ICONMCHAT').slideToggle(400);" href="javascript://" class="codeButtons" style="width: 100px;" id="code" 
type="button"></span></div>
</td> 

<td width="70%" align="right"> 
<a href="$RELOAD_URI$" title="Обновить"><img alt="" border="0" align="absmiddle" src="/site_design/img/other/reload.png"></a>
<?if($SMILES_URI$)?>&nbsp;<a href="$SMILES_URI$" title="Вставить смайл"><img alt="" border="0" align="absmiddle" src="/site_design/img/other/emoticon_wink.png"></a><?endif?>
<?if($BBCODES_URI$)?>&nbsp;<a href="$BBCODES_URI$" title="BB-Коды"><img alt="" border="0" align="absmiddle" src="/site_design/img/other/application-xml.png"></a><?endif?>
<?if($MSGCTRL_URI$)?>&nbsp;<a href="$MSGCTRL_URI$" title="Управление сообщениями"><img alt="" border="0" align="absmiddle" src="/site_design/img/other/configure_shortcuts.png"></a><?endif?>
</td></tr></table> 

<?if(!$USER_LOGGED_IN$)?> 
<table border="0" cellpadding="1" cellspacing="1" width="100%"> 
<tr><td colspan="2">$FLD_NAME$</td></tr> 
<tr><td width="50%">$FLD_EMAIL$</td><td>$FLD_URL$</td></tr> 
</table> 
<?endif?> 

<div id="ICONMCHAT" align="center" style="border: 1px solid #с5с5с5;background:url('/site_design/img/login.png');display:none;">
<img src="/site_design/MChat/1.png" style="cursor: pointer" onclick="$('#mchatC1F').val(this.src);" /> 
<img src="/site_design/MChat/2.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" /> 
<img src="/site_design/MChat/3.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" /> 
<img src="/site_design/MChat/4.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" /> 
<img src="/site_design/MChat/5.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" /> 
<img src="/site_design/MChat/6.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" /> 
<img src="/site_design/MChat/7.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" />
<img src="/site_design/MChat/8.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" />
<img src="/site_design/MChat/9.png" style="cursor:pointer" onclick="$('#mchatC1F').val(this.src);" />
 </div>
 <?if($FLD_CUSTOM1$ || $FLD_CUSTOM2$)?> 
 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 
 <tr><td width="50%">$FLD_CUSTOM1$</td><td>$FLD_CUSTOM2$</td></tr> 
 </table> 
 <?endif?>
 <script type="text/javascript">$('#mchatC1F').hide();</script>



<?if($FLD_SECURE$)?> 
<table border="0" cellpadding="1" cellspacing="1" width="100%"> 
<tr><td width="50%">$FLD_SECURE$</td><td align="right">$IMG_SECURE$</td></tr> 
</table> 
<?endif?> 

<table border="0" cellpadding="1" cellspacing="1" width="100%"> 
<tr><td width="95%" rowspan="2">$FLD_MESSAGE$</td> 
<td align="center" valign="top"><div style="font-size:10px;">$LENGTH_COUNTER$</div></td> 
</tr><tr><td align="center" valign="bottom">$SUBMIT$</td></tr></table> 
<?endif?><?endif?>