<th valign="top">
	<script type="text/javascript">
	lang['post_discuzcode_code'] = '{lang post_discuzcode_input_code}';
	lang['post_discuzcode_quote'] = '{lang post_discuzcode_input_quote}';
	lang['post_discuzcode_free'] = '{lang post_discuzcode_input_free}';
	lang['post_discuzcode_hide'] = '{lang post_discuzcode_input_hide}';
	var editorcss = 'forumdata/cache/style_{STYLEID}_common.css';
	var editorcss_editor = 'forumdata/cache/style_{STYLEID}_editor.css';
	var editorcss_append = 'forumdata/cache/style_{STYLEID}_append.css';
	var TABLEBG = '{TABLEBG}';
	</script>
	<label for="posteditor_textarea">
	<!--{if $special == 1}-->
		{lang poll_message}
	<!--{elseif $thread['special'] == 2 && $isfirstpost}-->
		{lang post_trade_counterdesc}
	<!--{elseif $thread['special'] == 2 && $special == 2}-->
		{lang post_trade_description}
	<!--{elseif $special == 3 && $allowpostreward}-->
		{lang reward_message}
	<!--{elseif $special == 4 && $allowpostactivity}-->
		{lang activity_description}
	<!--{elseif $special == 5}-->
		<!--{if $allowpostdebate && $isfirstpost || $action == 'newthread'}-->
			{lang debate_backgroup}
		<!--{else}-->
			{lang debate_position}
		<!--{/if}-->
	<!--{else}-->
		{lang message}
	<!--{/if}-->
	</label>
	<div id="{$editorid}_left" {if !$advanceeditor}style="display: none"{/if}>
		<ul {if !$advanceeditor}style="display: none"{/if}>
			<li>{lang post_html} <em><!--{if $forum['allowhtml'] || $allowhtml}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></em></li>
			<li>{faq smilies} <em><!--{if $forum['allowsmilies']}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></em></li>
			<li>{faq discuzcode} <em><!--{if $forum['allowbbcode']}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></em></li>
			<li>{lang post_imgcode} <em><!--{if $forum['allowimgcode']}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></em></li>
		</ul>
	<!--{if $smileyinsert}-->
		<div class="smilies">
			<div id="smilieslist" style="width: 180px;">{subtemplate post_smilies}</div>
		</div>
	<!--{/if}-->
	<div  style="clear: both;">
	<ul>
		<li><label><input type="checkbox" name="parseurloff" id="parseurloff" value="1" $urloffcheck /> {lang disable} {lang post_parseurl}</label></li>
		<li><label><input type="checkbox" name="smileyoff" id="smileyoff" value="1" $smileyoffcheck /> {lang disable} {faq smilies}</label></li>
		<li><label><input type="checkbox" name="bbcodeoff" id="bbcodeoff" value="1" $codeoffcheck /> {lang disable} {faq discuzcode}</label></li>
		<!--{if $tagstatus && ($action == 'newthread' || $action == 'edit' && $isfirstpost)}--><li><label><input type="checkbox" name="tagoff" id="tagoff" value="1" $tagoffcheck /> {lang disable} {lang tag_parse}</label></li><!--{/if}-->
		<!--{if $allowhtml}--><li><label><input type="checkbox" name="htmlon" id="htmlon" value="1" $htmloncheck /> {lang enable} {lang post_html}</label></li><!--{/if}-->
		<!--{if $action != 'edit'}-->
			<!--{if $allowanonymous}--><li><label><input type="checkbox" name="isanonymous" value="1" /> {lang post_anonymous}</label></li><!--{/if}-->
		<!--{else}-->
			<!--{if $allowanonymous || (!$allowanonymous && $orig['anonymous'])}--><li><label><input type="checkbox" name="isanonymous" value="1" <!--{if $orig['anonymous']}-->checked="checked"<!--{/if}--> /> {lang post_anonymous}</label></li><!--{/if}-->
		<!--{/if}-->
		<li><label><input type="checkbox" name="usesig" value="1" $usesigcheck> {lang post_show_sig}</label></li>
		<!--{if $action != 'edit'}-->
			<li><label><input type="checkbox" name="emailnotify" value="1" $notifycheck> {lang post_email_notify}</label></li>
			<!--{if $action == 'newthread'}-->
				<!--{if $forum['ismoderator'] && ($allowdirectpost || !$forum['modnewposts'])}-->
					<!--{if $allowstickthread}-->
						<li><label><input type="checkbox" name="sticktopic" value="1" $stickcheck> {lang post_stick_thread}</label></li>
					<!--{/if}-->
					<li><label><input type="checkbox" name="addtodigest" value="1" $digestcheck> {lang post_digest_thread}</label></li>
				<!--{/if}-->
			<!--{/if}-->
		<!--{else}-->
			<!--{if ($isorigauthor || $forum['ismoderator']) && $isfirstpost && $thread['replies'] < 1}-->
				<li><label><input type="checkbox" name="delete" value="1"> <b>{lang post_delpost}</b>
				<!--{if $thread['special'] == 3}-->{lang reward_price_back}<!--{/if}--></label></li>
			<!--{elseif !$isfirstpost && ($isorigauthor || $forum['ismoderator'])}-->
				<li><label><input type="checkbox" name="delete" value="1"> <b>{lang post_delpost}</b></label></li>
			<!--{/if}-->

			<!--{if $auditstatuson}--><li><label><input type="checkbox" name="audit" value="1"> <b>{lang auditstatuson}</b></label></li><!--{/if}-->
		<!--{/if}-->
		<!--{if $uc['addfeed'] && $ucappopen['UCHOME']}--><li><label><input type="checkbox" name="addfeed" value="1" $addfeedcheck> {lang addfeed}</label></li><!--{/if}-->
	</ul>
	</div>
</div>
</th>

<td valign="top">
	<div id="$editorid" class="editor">
	<!--{if $bbinsert}-->
		<div id="{$editorid}_controls">
			<div class="editorrow">
				<a id="{$editorid}_cmd_bold" title="{lang post_discuzcode_bold}">B</a>
				<a id="{$editorid}_cmd_italic" title="{lang post_discuzcode_italic}">I</a>
				<a id="{$editorid}_cmd_underline" title="{lang post_discuzcode_underline}">U</a><em></em>
				<a id="{$editorid}_popup_fontname" title="{lang post_discuzcode_fontname}"><span style="width: 110px; display: block; white-space: nowrap;" id="{$editorid}_font_out">{lang post_discuzcode_fontname}</span></a>
				<a id="{$editorid}_popup_fontsize" title="{lang post_discuzcode_fontsize}"><span style="width: 30px; display: block;" id="{$editorid}_size_out">{lang post_discuzcode_fontsize}</span></a>
				<a id="{$editorid}_popup_forecolor" title="{lang post_discuzcode_forecolor}"><span style="width: 30px; display: block;"><img alt="color" src="images/common/bb_color.gif"/><br/><img width="21" height="4" style="background-color: Black;" alt="" id="{$editorid}_color_bar" src="images/common/bb_clear.gif"/></span></a><em></em>
				<a id="{$editorid}_cmd_justifyleft" title="{lang post_discuzcode_left}">Align Left</a>
				<a id="{$editorid}_cmd_justifycenter" title="{lang post_discuzcode_center}">Align Center</a>
				<a id="{$editorid}_cmd_justifyright" title="{lang post_discuzcode_right}">Align Right</a><em></em>
				<a id="{$editorid}_cmd_createlink" title="{lang post_discuzcode_url}">Url</a>
				<a id="{$editorid}_cmd_email" title="{lang post_discuzcode_email}">Email</a>
				<a id="{$editorid}_cmd_insertimage" title="{lang post_discuzcode_image}">Image</a>
				<!--{if $forum['allowmediacode']}-->
					<a id="{$editorid}_popup_media" title="{lang post_discuzcode_media}">Media</a>
				<!--{/if}--><em></em>
				<a id="{$editorid}_cmd_quote" title="{lang post_discuzcode_quote}">Quote</a>
				<a id="{$editorid}_cmd_code" title="{lang post_discuzcode_code}">Code</a>
				<a id="{$editorid}_buttonctrl" class="plugeditor editormode"><!--{if $advanceeditor}-->{lang editor_mode_simple}<!--{else}-->{lang editor_mode_all}<!--{/if}--></a>
			</div>

			<div class="editorrow" id="{$editorid}_morebuttons0" {if !$advanceeditor}style="display: none"{/if}>
				<a id="{$editorid}_cmd_removeformat" title="{lang post_discuzcode_removeformat}">Remove Format</a>
				<a id="{$editorid}_cmd_unlink" title="{lang post_discuzcode_unlink}">Unlink</a>
				<a id="{$editorid}_cmd_undo" title="{lang post_discuzcode_undo}">Undo</a>
				<a id="{$editorid}_cmd_redo" title="{lang post_discuzcode_redo}">Redo</a><em></em>
				<a id="{$editorid}_cmd_insertorderedlist" title="{lang post_discuzcode_orderedlist}">Ordered List</a>
				<a id="{$editorid}_cmd_insertunorderedlist" title="{lang post_discuzcode_unorderedlist}">Unordered List</a>
				<a id="{$editorid}_cmd_outdent" title="{lang post_discuzcode_outdent}">Outdent</a>
				<a id="{$editorid}_cmd_indent" title="{lang post_discuzcode_indent}">Indent</a>
				<a id="{$editorid}_cmd_floatleft" title="{lang post_discuzcode_floatleft}">Float Left</a>
				<a id="{$editorid}_cmd_floatright" title="{lang post_discuzcode_floatright}">Float Right</a><em></em>
				<a id="{$editorid}_cmd_table" title="{lang post_discuzcode_table}">Table</a>
				<a id="{$editorid}_cmd_free" title="{lang post_discuzcode_free}">Free</a>
				<!--{if $allowhidecode}--><a id="{$editorid}_cmd_hide" title="{lang post_discuzcode_hide}">Hide</a><!--{/if}-->

				<em></em>
				<!--{if $forum['allowbbcode'] && $allowcusbbcode}-->
					<!--{eval $cusnum=0;}-->
					<!--{loop $_DCACHE['bbcodes_display'] $tag $bbcode}-->
					<a class="plugeditor" id="{$editorid}_cmd_custom{$bbcode[params]}_$tag"><img src="images/common/$bbcode[icon]" title="$bbcode[explanation]" alt="$tag" /></a><!--{if in_array($cusnum++, array(5, 25))}--></div><div id="{$editorid}_morebuttons{if $cusnum == 6}1{else}2{/if}" {if !$advanceeditor}style="display: none"{/if}><!--{/if}-->
					<!--{/loop}-->
				<!--{/if}-->
			</div>

			<div id="{$editorid}_switcher" class="editor_switcher_bar">
				<button type="button" id="bbcodemode">{lang editor_mode_discuzcode}</button>
				<button type="button" id="wysiwygmode">{lang editor_mode_wysiwyg}</button>
			</div>
		</div>
	<!--{/if}-->
	</div>

	<div class="editortoolbar">
		<!--{eval $fontoptions = array({lang post_discuzcode_fontoptions})}-->
		<div class="popupmenu_popup fontname_menu" id="{$editorid}_popup_fontname_menu" style="display: none">
		<ul unselectable="on">
		<!--{loop $fontoptions $fontname}-->
				<li onclick="discuzcode('fontname', '$fontname');hideMenu()" style="font-family: $fontname" unselectable="on">$fontname</li>
		<!--{/loop}-->
		</ul>
		</div>

		<!--{eval $sizeoptions = array(1, 2, 3, 4, 5, 6, 7)}-->
		<div class="popupmenu_popup fontsize_menu" id="{$editorid}_popup_fontsize_menu" style="display: none">
		<ul unselectable="on">
		<!--{loop $sizeoptions $size}-->
				<li onclick="discuzcode('fontsize', $size);hideMenu()" unselectable="on"><font size="$size" unselectable="on">$size</font></li>
		<!--{/loop}-->
		</ul>
		</div>

		<!--{if $forum['allowmediacode']}-->
			<div class="popupmenu_popup" id="{$editorid}_popup_media_menu" style="width: 240px;display: none">
			<input type="hidden" id="{$editorid}_mediatype" value="ra">
			<input type="hidden" id="{$editorid}_mediaautostart" value="0">
			<table cellpadding="4" cellspacing="0" border="0" unselectable="on">
			<tr class="popupmenu_option">
				<td nowrap>
					{lang post_discuzcode_media_url}:<br />
					<input id="{$editorid}_mediaurl" size="40" value="" onkeyup="setmediatype('$editorid')" />
				</td>
			</tr>
			<tr class="popupmenu_option">
				<td nowrap>
					<label style="float: left; width: 32%"><input type="radio" name="{$editorid}_mediatyperadio" id="{$editorid}_mediatyperadio_ra" onclick="$('{$editorid}_mediatype').value = 'ra'" checked="checked">RA</label>
					<label style="float: left; width: 32%"><input type="radio" name="{$editorid}_mediatyperadio" id="{$editorid}_mediatyperadio_wma" onclick="$('{$editorid}_mediatype').value = 'wma'">WMA</label>
					<label style="float: left; width: 32%"><input type="radio" name="{$editorid}_mediatyperadio" id="{$editorid}_mediatyperadio_mp3" onclick="$('{$editorid}_mediatype').value = 'mp3'">MP3</label>
					<label style="float: left; width: 32%"><input type="radio" name="{$editorid}_mediatyperadio" id="{$editorid}_mediatyperadio_rm" onclick="$('{$editorid}_mediatype').value = 'rm'">RM/RMVB</label>
					<label style="float: left; width: 32%"><input type="radio" name="{$editorid}_mediatyperadio" id="{$editorid}_mediatyperadio_wmv" onclick="$('{$editorid}_mediatype').value = 'wmv'">WMV</label>
					<label style="float: left; width: 32%"><input type="radio" name="{$editorid}_mediatyperadio" id="{$editorid}_mediatyperadio_mov" onclick="$('{$editorid}_mediatype').value = 'mov'">MOV</label>
				</td>
			</tr>
			<tr class="popupmenu_option">
				<td nowrap>
					<label style="float: left; width: 32%">{lang width}: <input id="{$editorid}_mediawidth" size="5" value="400" /></label>
					<label style="float: left; width: 32%">{lang height}: <input id="{$editorid}_mediaheight" size="5" value="300"/></label>
					<label style="float: left; width: 32%"><input type="checkbox" onclick="$('{$editorid}_mediaautostart').value =this.checked ? 1 : 0"> {lang post_discuzcode_media_autostart}</label>
				</td>
			</tr>

			<tr class="popupmenu_option">
				<td align="center" colspan="2"><input type="button" size="8" value="{lang submit}" onclick="setmediacode('$editorid')"> <input type="button" onclick="hideMenu()" value="{lang cancel}" /></td>
			</tr>
			</table>
			</div>
		<!--{/if}-->

		<!--{eval $coloroptions = array('Black', 'Sienna', 'DarkOliveGreen', 'DarkGreen', 'DarkSlateBlue', 'Navy', 'Indigo', 'DarkSlateGray', 'DarkRed', 'DarkOrange', 'Olive', 'Green', 'Teal', 'Blue', 'SlateGray', 'DimGray', 'Red', 'SandyBrown', 'YellowGreen','SeaGreen', 'MediumTurquoise', 'RoyalBlue', 'Purple', 'Gray', 'Magenta', 'Orange', 'Yellow', 'Lime', 'Cyan', 'DeepSkyBlue', 'DarkOrchid', 'Silver', 'Pink', 'Wheat', 'LemonChiffon', 'PaleGreen', 'PaleTurquoise', 'LightBlue', 'Plum', 'White')}-->
		<div class="popupmenu_popup" id="{$editorid}_popup_forecolor_menu" style="display: none">
		<table cellpadding="0" cellspacing="0" border="0" unselectable="on" style="width: auto;"><tr>
		<!--{loop $coloroptions $key $colorname}-->
				<td class="editor_colornormal" onclick="discuzcode('forecolor', '$colorname');hideMenu()" unselectable="on" onmouseover="colorContext(this, 'mouseover')" onmouseout="colorContext(this, 'mouseout')"><div style="background-color: $colorname" unselectable="on"></div></td><!--{if ($key + 1) % 8 == 0}--></tr><tr><!--{/if}-->
		<!--{/loop}-->
		</tr></table></div>
	</div>

	<table class="editor_text" summary="Message Textarea" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
		<tr>
			<td>
				<textarea class="autosave" name="message" rows="10" cols="60" style="width:99%; height:250px" tabindex="100" id="{$editorid}_textarea"><!--{if $action == 'edit'}-->$postinfo[message]<!--{else}-->$message<!--{/if}--></textarea>
			</td>
		</tr>
	</table>

	<div id="{$editorid}_bottom" {if !$advanceeditor}style="border-top: none; display: none"{/if}>

		<table summary="Enitor Buttons" cellpadding="0" cellspacing="0" class="editor_button" style="border-top: none;">
			<tr>
				<td style="border-top: none;">
					<div class="editor_textexpand">
						<img src="images/common/bb_contract.gif" width="11" height="21" title="{lang post_discuzcode_contract}" alt="{lang post_discuzcode_contract}" id="{$editorid}_contract" /><img src="images/common/bb_expand.gif" width="12" height="21" title="{lang post_discuzcode_expand}" alt="{lang post_discuzcode_expand}" id="{$editorid}_expand" />
					</div>
					</td>
				<td align="right" style="border-top: none;">
					<button type="button" id="checklength">{lang post_check_length}</button>
					<button type="button" name="previewbutton" id="previewbutton" tabindex="102">{lang post_previewpost}</button>
					<button type="button" tabindex="103" id="clearcontent">{lang post_topicreset}</button>
				</td>
			</tr>
		</table>

		<!--{if $allowpostattach}-->
			<table class="box" summary="Upload" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th>{lang attachment_new}</th>
						<!--{if $allowsetattachperm}--><td class="nums">{lang readperm}</td><!--{/if}-->
						<!--{if $maxprice}--><td class="nums">{lang price}</td><!--{/if}-->
						<td>{lang description}</td>
					</tr>
				</thead>
				<tbody id="attachbodyhidden" style="display:none"><tr>
					<th>
						<input type="file" name="attach[]" />
						<span id="localfile[]"></span>
						<input type="hidden" name="localid[]" />
					</th>
					<!--{if $allowsetattachperm}--><td class="nums"><input type="text" name="attachperm[]" value="0" size="1" /></td><!--{/if}-->
					<!--{if $maxprice}--><td class="nums"><input type="text" name="attachprice[]" value="0" size="1" />{$extcredits[$creditstrans][unit]}</td><!--{/if}-->
					<td><input type="text" name="attachdesc[]" size="25" /></td>
				</tr></tbody>
				<tbody id="attachbody"></tbody>
				<tr><td colspan="5" style="border-bottom: none;">
					{lang attachment_size}: <strong><!--{if $maxattachsize_kb}-->{lang lower_than} $maxattachsize_kb kb <!--{else}-->{lang size_no_limit}<!--{/if}--></strong><br />
					<!--{if $attachextensions}-->{lang attachment_allow_exts}: <strong>$attachextensions</strong><br /><!--{/if}-->
					<!--{if $maxprice}-->{lang price}: <strong>{lang post_price_comment}{$extcredits[$creditstrans][title]}<!--{if $maxincperthread}-->{lang post_price_income_comment}<!--{/if}--><!--{if $maxchargespan}-->{lang post_price_charge_comment}<!--{/if}--><!--{/if}--></strong>
				</td></tr>
			</table>
			<div id="img_hidden" alt="1" style="position:absolute;top:-100000px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='image');width:{$thumbwidth}px;height:{$thumbheight}px"></div>
		<!--{/if}-->
	</div>
</div>
</td>