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

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