<%if {quickeditorad}!=""%>
<div class="leaderboard">{quickeditorad}</div>
<%/if%>
<script type="text/javascript" src="editor/post.js"></script>
<div class="ntforumbox">
	<div class="titlebar">
		<h3>快速回复帖子</h3>
	</div>
	<script type="text/javascript" src="editor/bbcode.js"></script>
	<form method="post" name="postform" id="postform" action="postreply.aspx?topicid={topicid}" enctype="multipart/form-data" onsubmit="return validate(this);">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tbody>
			  <tr class="list">
					<th class="formlabel quicklabel">标题</th>
					<td class="formbody"><input type="text" id="title" name="title" size="84" tabindex="1" value="回复：{replytitle}" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" /></td>
			  </tr>
		</tbody>
		<tbody>
		 <tr>
			<td class="formlabel editorbody quicklabel">
					<input type="checkbox" name="parseurloff" ID="parseurloff" value="1"
						<%if {parseurloff}==1%>
							checked
						<%/if%>
						/> 禁用 URL 识别<br />
						<input type="checkbox" name="smileyoff" ID="smileyoff" value="1"
							<%if {smileyoff}==1%>
								checked disabled
							<%/if%>
						/> 禁用表情<br />
						<input type="checkbox" name="bbcodeoff" ID="bbcodeoff" value="1"
							<%if {bbcodeoff}==1%>
								checked disabled
							<%/if%>
						/> 禁用 Discuz!NT 代码<br />
						<input type="checkbox" name="usesig" ID="usesig" value="1"
							<%if {usesig}==1%>
								checked
							<%/if%>		
						/> 使用个人签名
			 </td>
			 <td class="formbody editorbody">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
					  <tr>
						<td valign="top" class="navtextarea" ><textarea rows="7" cols="80" name="message" id="message" onKeyDown="ctlent(event,false);" tabindex="2" class="autosave colorblue" onfocus="this.className='autosave colorfocus';" onblur="this.className='autosave colorblue';"></textarea>
							<%if {isseccode}%><p class="formcode">验证码:<%template _vcode%></p><%/if%></td>
						<td valign="top">
							 <script type="text/javascript">
										var textobj = $('message');
										var lang = new Array();
										if(is_ie >= 5 || is_moz >= 2) {
											window.onbeforeunload = function () {
												saveData(textobj.value);
											};
											lang['post_autosave_none'] = "没有可以恢复的数据";
											lang['post_autosave_confirm'] = "本操作将覆盖当前帖子内容，确定要恢复数据吗？";
										}
										else {
											$('restoredata').style.display = 'none';
										}
					
										var bbinsert = parseInt('1');
										var smileyinsert = parseInt('1');
										var editor_id = 'posteditor';
										var smiliesCount = 9;
										var colCount = 3;
										var showsmiliestitle = 0;
										var smiliesIsCreate = 0;
										var scrMaxLeft; //表情滚动条宽度
			
								var smilies_HASH = {};
							</script>
				<%set (string){defaulttypname} = string.Empty%>
		<div class="navcontrol">
			<div class="smiliepanel">
					<div id="scrollbar" class="scrollbar">
							<table cellspacing="0" cellpadding="0" border="0">
								<tr>
								<%loop stype smilietypes%>
									<%if {stype[_id]}==1%>
									<%set {defaulttypname} = {stype[code]}%>
									<%/if%>
									<td id="t_s_{stype[_id]}"><div id="s_{stype[_id]}" onclick="showsmiles({stype[_id]}, '{stype[code]}');">{stype[code]}</div></td>
								<%/loop%>
								</tr>
							</table>
					</div>
					<div id="scrlcontrol">
						<img src="editor/images/smilie_prev_default.gif" alt="向前" onmouseover="if($('scrollbar').scrollLeft>0)this.src=this.src.replace(/_default|_selected/, '_hover');" onmouseout="this.src=this.src.replace(/_hover|_selected/, '_default');" onmousedown="if($('scrollbar').scrollLeft>0){this.src=this.src.replace(/_hover|_default/, '_selected');this.boder=1;}" onmouseup="if($('scrollbar').scrollLeft>0)this.src=this.src.replace(/_selected/, '_hover');else{this.src=this.src.replace(/_selected|_hover/, '_default');}this.border=0;" onclick="scrollSmilieTypeBar($('scrollbar'), 1-$('t_s_1').clientWidth);"/>&nbsp;
						<img src="editor/images/smilie_next_default.gif" alt="向后"  onmouseover="if($('scrollbar').scrollLeft<scrMaxLeft)this.src=this.src.replace(/_default|_selected/, '_hover');" onmouseout="this.src=this.src.replace(/_hover|_selected/, '_default');" onmousedown="if($('scrollbar').scrollLeft<scrMaxLeft){this.src=this.src.replace(/_hover|_default/, '_selected');this.boder=1;}" onmouseup="if($('scrollbar').scrollLeft<scrMaxLeft)this.src=this.src.replace(/_selected/, '_hover');else{this.src=this.src.replace(/_selected|_hover/, '_default');}this.border=0;" onclick="scrollSmilieTypeBar($('scrollbar'), $('t_s_1').clientWidth);" />
					</div>	
				</div>
				<div id="showsmilie"><img src="images/common/loading_wide.gif" width="200" style=" margin-top:20px;" alt="表情下载" /><p>正在加载表情...</p></div>
				<div id="showsmilie_pagenum">&nbsp;</div></div>

				<script type="text/javascript">
		            function getSmilies(func){
		                var c="tools/ajax.aspx?t=smilies";
		                _sendRequest(c,function(d){var e={};try{e=eval("("+d+")")}catch(f){e={}}var h=e?e:null;func(h);e=null;func=null},false,true)
	                }
					window.onload = function() {
		                getSmilies(function(obj){ 
	                    smilies_HASH = obj; 
	                    showsmiles(1, '{defaulttypname}');
	                    });
						$('scrollbar').scrollLeft = 10000;
						scrMaxLeft = $('scrollbar').scrollLeft;
						$('scrollbar').scrollLeft = 1;	
						if ($('scrollbar').scrollLeft > 0)
						{
							$('scrlcontrol').style.display = '';
							$('scrollbar').scrollLeft = 0;	
						}
					}
				</script>
					 </td>
					</tr>
					 <tbody>
						<tr>
							<td colspan=2><input class="sbutton" type="submit" id="postsubmit" name="replysubmit" value="发表帖子" tabindex="3"/>
							 &nbsp; [完成后可按 Ctrl+Enter 发布]<input name="topicsreset" class="lightbutton" value="清空内容" tabindex="6" type="reset" onclick="javascript:document.postform.reset(); return true; "/>&nbsp;&nbsp;<input class="lightbutton" name="restoredata" id="restoredata" value="恢复数据" tabindex="5" title="恢复上次自动保存的数据" onclick="loadData();" type="button" /></td>
						</tr>
					 </tbody>
					</table>
				</td>
			  </tr>
		</tbody>
	</table>
</form>
</div>
