<script type="text/javascript" src="{{ scriptLibrary }}/libsuggest.js"></script>
<style>
.suggestWindow {
	background: #ffffff;
	border: 1px solid #3394e6;
	width: 316px;
	position: absolute;
	display: block;
	visibility: hidden;
	padding: 0px;
	font: normal 12px  tahoma, sans-serif;
	top: 0px;
	margin: 0;
	left: 80px;
	z-index: 99999;
}
#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 .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: #3394e6;
	padding: 5px;
	cursor: pointer;
}
</style>
<form method=post name=form action="{{ php_self }}?action=send">
<article class="box_content">
	<div class="box_in">
		<div class="pm-box">
			<nav id="pm-menu">
				<a href="{{ pm_inbox_link }}"><span>{{ lang['pm:inbox'] }}</span></a>
				<a href="{{ pm_outbox_link }}"><span>{{ lang['pm:outbox'] }}</span></a>
				<a href="{{ pm_set_link }}"><span>{{ lang['pm:set'] }}</span></a>
			</nav>
		</div>
		<div class="addform">
			<ul class="ui-form">
				<li class="form-group combo">
					<div class="combo_field">
						<input placeholder="{{ lang['pm:too'] }}" type="text" name="to_username" id="to_username" maxlength="70" autocomplete="off" value="{{ username }}" class="wide" required>
					</div>
					<div class="combo_field">
						<input placeholder="{{ lang['pm:subject'] }}" type="text" name="title" class="wide" required>
					</div>
				</li>
				<li id="comment-editor">
					<div class="bb-editor">{{ quicktags }}<textarea onkeypress="if(event.keyCode==10 || (event.ctrlKey && event.keyCode==13)) {add_comment();}" name="content" rows="5" id="pm_content"></textarea></div>
					<br /><input name="saveoutbox" type="checkbox"/> {{ lang['pm:saveoutbox'] }}
				</li>
			</ul>
		</div>
		<div class="form_submit" style="padding: 15px 0;">
			<button class="btn btn-big" type="submit">{{ lang['pm:send'] }}</button>
		</div>
	</div>
</article>
</form>
<script language="javascript" type="text/javascript">
	function systemInit() {
		new ngSuggest('to_username',
			{
				'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>