<script type="text/javascript" src="{{ admin_url }}/includes/js/libsuggest.js"></script>
<style>
.suggestWindow { background:#f6f8fb; border: 1px solid #aaaaaa; color: #232323; width: 304px; position: absolute; display: block; visibility: hidden; padding: 0px; font: normal 12px  tahoma, sans-serif; top: 0px; margin: 0; left: 80px; position: absolute; }
#suggestBlock { padding-top: 2px; padding-bottom: 2px;  width: 100%; border: 0px; }
#suggestBlock td { padding-left: 2px; }
#suggestBlock tr { padding: 3px; padding-left: 8px; background: white; }
/* #suggestBlock tr:hover, */
#suggestBlock .suggestRowHighlight { background: #59a6ec; color: white; cursor: default; }
#suggestBlock .cleft { padding-left: 5px; }
#suggestBlock .cright { text-align: right; padding-right: 5px; }
.suggestClose { display: block; text-align: right; font: normal 10px verdana, tahoma, sans-serif; background:#3c9c08; color: white; padding:3px; cursor: pointer; }
</style>
<form method=post name=form action="{{ php_self }}?action=send">
<div class="s-block">
	<div class="title-block">
		Личные сообщения - Текст сообщения
	</div>
	<div class="s-block-content">
		<div class="imp" style="padding: 0;margin: 0;">
			<div style="clear: both;height: 10px;"></div>
			<div class="pm-block-menu"><a href="/plugin/pm/?action=write">Написать сообщение</a> | <a href="/plugin/pm/">Входящие сообщения</a> | <a href="/plugin/pm/?action=outbox">Отправленные сообщения</a></div>
			<table class="user-info-table">
				<tr>
					<td width="120">{{ lang.pm['subject'] }}:</td>
					<td><input type="text" name="title" class="f_input" /></td>
				</tr>
				<tr>
					<td width="120">{{ lang.pm['too'] }}:<br /><span class="impot"><small>{{ lang.pm['to'] }}</small></span></td>
					<td><input type="text" name="sendto" id="sendto" autocomplete="off" value="{{ username }}" class="f_input" /><span id="suggestLoader" style="width: 20px; visibility: hidden;"><img src="{{ skins_url }}/images/loading.gif"/></span></td>
				</tr>
				<tr>
					<td width="120">
						Сообщение:
					</td>
					<td><div class="bb-editor">{{ quicktags }}<textarea onkeypress="if(event.keyCode==10 || (event.ctrlKey && event.keyCode==13)) {add_comment();}" style="width: 500px;" name="content" id="content"></textarea></div><br /><input name="saveoutbox" class="check" type="checkbox"/> {{ lang.pm['saveoutbox'] }}<br /></td>
				</tr>
				<tr>
					<td colspan="5">
						<div style="padding-top:2px; padding-left:0px;">
							<input type="submit" value="{{ lang.pm['send'] }}" />
						</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
</div>
</form>

<script language="javascript" type="text/javascript">

function systemInit() {
	new ngSuggest('sendto', 
								{ 
									'iMinLen'	: 1,
									'stCols'	: 1,
									'stColsClass': ['cleft'],
									'lId'		: 'suggestLoader',
									'hlr'		: 'true',
									'stColsHLR'	: [ true ],
									'reqMethodName' : 'pm_get_username',
								}
							);
}

if (document.body.attachEvent) {
	document.body.onload = systemInit;
} else {
	systemInit();
}
</script>