	<script type="text/javascript">
		var chat_url='{url type="json"}';
		var chat_user='{$_user->login|escape}';
	</script>
	<div id="mainChat">

	</div>
	{if access('write')}
		<form id="msg" action="" onsubmit="return lc_chat.send_msg(this);">
			<p>
				<input type="hidden" name="token" value="{$_user->token}" />
				<input type="text" id="msg_input" name="msg" style="width:70%" class="bbcode" />
				<input type="submit" value="отправить" />
			</p>
		</form>
	{else}
		<div>Вы не можете писать в чат</div>
	{/if}
