<div id="selComposeMail" class="clsTitleLinkRoundedCorner">
	<div class="clsClearfix">
        <div class="clsTitleLeft">
        	<h2>{$LANG.mailcompose_title}</h2>
        </div>
        <div class="clsTitleRight">
            <ul class="clsTitleLink clsFloatright">
               <li><span><a href="{$myobj->mailcompose.populateMailNavigation.inbox}"> {$myobj->LANG.nav_mail_inbox}({$myobj->mailcompose.countUnReadMail.mail_count})</a></span></li>
               <li><span><a href="{$myobj->mailcompose.populateMailNavigation.sent}"> {$myobj->LANG.nav_mail_sent} </a></span></li>
               <li class="{$myobj->mailcompose.populateMailNavigation.compose_class}"><span><a href="{$myobj->mailcompose.populateMailNavigation.compose}"> {$myobj->LANG.nav_mail_compose} </a></span></li>
            </ul>
        </div>
	</div>

	{include file='../general/box.tpl' opt='topanalyst_top'}
    {include file='../general/information.tpl'}
	{if $myobj->isShowPageBlock('block_form_compose')}
		{if $CFG.feature.html_editor eq 'richtext' }
			<form name="selFormCompose" id="selFormCompose" method="post" action="{$myobj->getCurrentUrl()}" onsubmit="return getHTMLSource('rte1', 'selFormCompose', 'message');">
		{else}
			<form name="selFormCompose" id="selFormCompose" method="post" action="{$myobj->getCurrentUrl()}" >
		{/if}
	    <!-- clsFormSection - starts here -->
	    {include file='../general/box.tpl' opt='form_top'}
	    <table class="clsRichTextTable">
		   	<tr class="clsFormRow">
				<td class="{$myobj->getCSSFormLabelCellClass('username')}">
					<label for="username">{$LANG.common_to}</label><span class="clsMandatory">*</span>
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('username')}">
					<span><input type="text" class="clsTextBox" name="username" id="username" tabindex="{smartyTabIndex}" maxlength="250"  value="{$myobj->getFormField('username')}" autocomplete = "off" /></span> {$myobj->getFormFieldElementErrorTip('username')}
		   	{$myobj->ShowHelpTip('messages_to', 'username')}
				</td>
			</tr>
		   	<tr class="clsFormRow">
				<td class="{$myobj->getCSSFormLabelCellClass('subject')}">
					<label for="subject">{$LANG.common_subject}</label>
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('subject')}">
					<span><input type="text" class="clsTextBox" name="subject" id="subject" tabindex="{smartyTabIndex}" maxlength="250"  value="{$myobj->getFormField('subject')}" autocomplete="off" /></span> {$myobj->getFormFieldElementErrorTip('subject')}
			   	{$myobj->ShowHelpTip('messages_subject', 'subject')}</td>
            </tr>
		   	<tr class="clsFormRow">
				<td class="{$myobj->getCSSFormFieldCellClass('subject')}" colspan="2">
					{if $CFG.feature.html_editor eq 'textarea'}
						<textarea name="message" id="message" tabindex="{smartyTabIndex}" cols="100" rows="15">{$myobj->getFormField('message')}</textarea>
							<p>{$LANG.mail_put_the_html_code}</p>
					{else}
						{if (chkBrowser() ||  $CFG.feature.html_editor eq 'fckeditor') }
							{if $CFG.feature.html_editor eq 'fckeditor' || $CFG.feature.html_editor eq 'richtext'}
									{$myobj->populateHtmlEditor('message')}
								{else}
									<textarea name="forum_response" id="forum_response" tabindex="{smartyTabIndex}" cols="100" rows="15">{$myobj->getFormField('message')}</textarea>
								{/if}
						{else}
							<textarea name="message" id="message" tabindex="{smartyTabIndex}" cols="100" rows="15">{$myobj->getFormField('message')}</textarea>
							<p>{$LANG.mail_put_the_html_code}</p>
						{/if}
					{/if}
					<p class="clsButtonAlignment">{$myobj->getFormFieldElementErrorTip('message')}</p>
				</td>
		   </tr>
			{if $CFG.admin.mails.redirect}
		   	<tr class="clsFormRow">
		   		<td class="" colspan="2"><label for="gotocompose">{$LANG.mailcompose_go_to}</label>
					<input type="radio" class="clsChechRadio" name="goto" id="gotocompose" tabindex="{smartyTabIndex}" value="compose" {$myobj->isCheckedRadio('goto', 'compose')} /> <label for="gotocompose">{$LANG.mailcompose_goto_compose}</label>
					<input type="radio" class="clsChechRadio" name="goto" id="gotoinbox" tabindex="{smartyTabIndex}" value="inbox" {$myobj->isCheckedRadio('goto', 'inbox')} /> <label for="gotoinbox">{$LANG.inbox}</label>
					<input type="radio" class="clsChechRadio" name="goto" id="gotosent" tabindex="{smartyTabIndex}" value="sent" {$myobj->isCheckedRadio('goto', 'sent')} /> <label for="gotosent">{$LANG.mailcompose_goto_sent}</label>
				</td>
		   	</tr>
		   	{/if}
		   	<tr class="clsFormRow">
				<td><!----></td>
				<td class="{$myobj->getCSSFormFieldCellClass('submit')}" >
				<div class="clsClearfix clsFloatright">
					 <div class="clsSubmitLeft clsMarginLeft10">
						<div class="clsSubmitRight">
							<input type="submit" class="clsSubmitButton" name="mailcompose_submit" id="mailcompose_submit" tabindex="{smartyTabIndex}" value="{$LANG.mailcompose_send}" />
						</div>
					</div>
					 <div class="clsCancelLeft clsMarginLeft10">
						<div class="clsCancelRight">
							<input type="submit" class="clsCancelButton" name="maildiscard_submit" id="maildiscard_submit" tabindex="{smartyTabIndex}" value="{$LANG.mail_discard}" />
						</div>
					</div>
				</div>
				</td>
		   	</tr>
		</table>
		{$myobj->populateHidden($myobj->selFormCompose_hidden_arr)}
    	{include file='../general/box.tpl' opt='form_bottom'}
		</form>
    	<!-- clsFormSection - ends here -->
		{literal}
			<script type="text/javascript">
				needLiveValidation('username',Array('Presence'));
			</script>
		{/literal}
	{/if}
	{include file='../general/box.tpl' opt='topanalyst_bottom'}
  	<!--end of rounded corners-->
</div>