{include file="$gentemplates/$header_tpl"}
{strip}
	<div class="header">{$lang.mobile.my_mailbox}</div>
	{if $form.err}
	<div class="error_msg">*&nbsp;{$form.err}</div>
	{/if}
	<div id="mailbox_menu">
		<div>
			<span><a href="{$form.inbox_link}" {if $mailbox_menu_sel ne 'inbox'}class="unselected"{/if}>{$lang.mobile.inbox}</a></span>
			<span><a href="{$form.outbox_link}" {if $mailbox_menu_sel ne 'outbox'}class="unselected"{/if}>{$lang.mobile.sent}</a></span>
			<span id="last"><a href="{$form.write_link}" {if $mailbox_menu_sel ne 'new'}class="unselected"{/if}>{$lang.mobile.new_message}</a></span>
		</div>
	</div>
	<div id="mail_form">
		<form action="{$form.action}" method="post">
		{$form.hidden}
		<div class="text_field">
		{$lang.mobile.to}:
		</div>
		<div class="mail_input_field">
			<input type="hidden" name="mail_to_id" id="mail_to_id" value="{$data.to_user_id}">
			<input type="text" maxlength="100" name="to" value="{$data.to}">
		</div>
		<div class="text_field">
			{$lang.mobile.subject}:
		</div>
		<div class="mail_input_field">
			<input type="text" maxlength="250" name="subject" value="{$data.subject}">
		</div>
		<div class="text_field">
			{$lang.mobile.body}:
		</div>
		<div>
			<textarea name="body">{$data.body}</textarea>
		</div>
		<input type="submit" class="button" value="{$lang.mobile.send}" />
		</form>
	</div>
{/strip}
{include file="$gentemplates/$footer_tpl"}