<%@ page language="java"  pageEncoding="UTF-8"%>
<%@page import="com.stfoa.dao.hibernate.QuestionDAO"%>
<%@page import="com.stfoa.domain.Question"%>
<%@page import="com.stfoa.dao.hibernate.EmployeeDAO"%>
<%@page import="com.stfoa.common.util.FormatUtil"%>
<%@page import="com.stfoa.domain.Employee"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Iterator"%>
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office">
<% 
 Integer empId = (Integer)session.getAttribute("empid");
 String questionId = request.getParameter("questionId");
 String thisquestionId = request.getParameter("thisquestionId");
 if("0".equals(questionId)){
  questionId = thisquestionId;
 } 
 QuestionDAO questiondao = new QuestionDAO();
 Question question = questiondao.findById(Integer.valueOf(questionId));
 question.setClickCount(question.getClickCount()+1);
 questiondao.save(question);
 EmployeeDAO empdao = new EmployeeDAO();
 Question thisquestion = questiondao.findById(Integer.valueOf(thisquestionId));
 if(thisquestion.getQuestionStatus()==0){
  thisquestion.setQuestionStatus(Short.valueOf("3"));
  questiondao.save(thisquestion);
 }
 
%>
<HEAD>
<TITLE><%=question.getQuestionTitle() %>-培训系统答疑专区</TITLE>
<SCRIPT language=JavaScript>
<!--
var currentpos,timer; 
function initialize() 
{ 
timer=setInterval("scrollwindow()",100);
} 
function sc(){
clearInterval(timer);	
}
function scrollwindow() 
{ 
currentpos=document.body.scrollTop; 
window.scroll(0,++currentpos); 
if (currentpos != document.body.scrollTop) 
sc();
} 
document.onmousedown=sc
document.ondblclick=initialize

//-->
</SCRIPT>

<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>A:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
	COLOR: #787878; TEXT-DECORATION: none
}
A:active {
	TEXT-DECORATION: none
}
A:hover {
	COLOR: #0000cc; TEXT-DECORATION: underline overline
}
TD {
	TABLE-LAYOUT: fixed; FONT-SIZE: 12px; COLOR: #000000; WORD-BREAK: break-all; FONT-FAMILY: Verdana,宋体
}
P {
	TABLE-LAYOUT: fixed; FONT-SIZE: 12px; COLOR: #000000; WORD-BREAK: break-all; FONT-FAMILY: Verdana,宋体
}
BODY {
	TABLE-LAYOUT: fixed; FONT-SIZE: 12px; COLOR: #000000; WORD-BREAK: break-all; FONT-FAMILY: Verdana,宋体
}
.f12 {
	FONT-SIZE: 12px; LINE-HEIGHT: 1.5
}
.f13 {
	FONT-SIZE: 12px; LINE-HEIGHT: 2
}
.f14 {
	FONT-SIZE: 14px; LINE-HEIGHT: 1.5
}
.Tips_bo {
	BORDER-RIGHT: #333333 1px solid; BORDER-TOP: #eeeeee 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #eeeeee 1px solid; COLOR: #000066; BORDER-BOTTOM: #333333 1px solid; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #75ddff; TEXT-DECORATION: none
}
.bk {
	BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: #333333 1px solid; BORDER-LEFT: #333333 1px solid; COLOR: #0000cc; BORDER-BOTTOM: #eeeeee 1px solid
}
.f30 {
	FONT-SIZE: 12px; LINE-HEIGHT: 2.5
}
.f20 {
	FONT-WEIGHT: bold; FONT-SIZE: 20px; LINE-HEIGHT: 1.5
}
.udline {
	FONT-SIZE: 12px; TEXT-DECORATION: underline
}
td.topic_title {
  background-color: #efefef;
  font-weight: bold;
  font-family: Tahoma;
}
BUTTON.btnnormal {
	BORDER-RIGHT: #000000 1px inset; BORDER-TOP: #000000 1px inset; FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND: #84b0dc; FILTER: progid:DXImageTransform.Microsoft.Gradient(startColorstr='#84B0DC',endColorstr='#ffffff', gradientType='0')
	progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='#8b9b99', Positive='true'); BORDER-LEFT: #000000 1px inset; BORDER-BOTTOM: #000000 1px inset; FONT-FAMILY: Verdana
}
BUTTON.btnOver {
	BORDER-RIGHT: #000000 1px inset; BORDER-TOP: #000000 1px inset; FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND: #84b0dc; FILTER: progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FEFEDD',endColorstr='#FED394', gradientType='0')
	progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='#8b9b99', Positive='true'); BORDER-LEFT: #000000 1px inset; BORDER-BOTTOM: #000000 1px inset; FONT-FAMILY: Verdana
}
BUTTON.btnSel {
	BORDER-RIGHT: #000000 1px inset; BORDER-TOP: #000000 1px inset; FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND: #84b0dc; FILTER: progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FEFEDD',endColorstr='#FED394', gradientType='0')
	progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='#8b9b99', Positive='true'); BORDER-LEFT: #000000 1px inset; BORDER-BOTTOM: #000000 1px inset; FONT-FAMILY: Verdana
}
form{margin:0px;display: inline}
</STYLE>

<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY text=#000066 bgColor=whitesmoke leftMargin=0 background="" topMargin=0 
marginheight="0" marginwidth="0">
<TABLE cellSpacing=0 cellPadding=0 width="99%" align=center>
  <TBODY>
  <TR bgColor=#6293bb>
    <TD width=1 bgColor=#6293bb height=30></TD>
    <TD width=0 height=30  class="topic_title"><font color=darkblue><B>
    <%=question.getQuestionStatus()==1?"<img src='images/greenright.gif' alt='已答复'>":"<img src='images/noquestion.gif' alt='未答复'>"%>
    主题提问标题：<%=FormatUtil.formatString(question.getQuestionTitle(),40) %><%=question.getQuestionStatus()==3?"<img src='images/replying.gif' alt='解决中'>":""%></B></font>【<FONT 
      color=#990000><B><%=question.getClickCount() %></B></FONT> 次点击】
    
    </TD>
    <TD align=right width=0 height=30  class="topic_title">
      双击自动滚屏(单击停)<IMG height=10 src="images/lastpost1.gif" 
      width=9>
    </TD>
    <TD width=1 bgColor=#6293bb height=30></TD>
   </TR>
  </TBODY>
</TABLE>
<TABLE height=1 cellSpacing=0 cellPadding=0 width="99%" align=center bgColor=#6293bb border=0>
 <TBODY>
  <TR>
   <TD></TD>
  </TR>
 </TBODY>
</TABLE>
<TABLE height=200 cellSpacing=0 cellPadding=0 width="99%" align=center border=0>
 <TBODY>
  <TR >
    <TD width=1 bgColor=#6293bb rowSpan=2></TD>
    <TD vAlign=top width=180 rowSpan=2 bgColor=#dee3e7>
      <TABLE cellSpacing=0 cellPadding=8 width="100%" border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE  cellSpacing=0  cellPadding=2 width="100%" border=0>
              <TBODY>
               <TR>
                <TD><b>
                 <% Employee emp = empdao.findById(question.getCreateEmpId()); %>
                   学员：<%=emp.getEmpName() %><BR><BR>
                   部门：<%=emp.getOaTblDepartment().getDeptName() %><BR><BR>
                   职务：<%=emp.getOaTblTitle().getTitleName() %><BR><BR>
                   </b>
                </TD>
               </TR>
              </TBODY>
             </TABLE>
            <HR noShade SIZE=1>
            <SPAN class=f13>提问: <%=FormatUtil.formatDate("yyyy-MM-dd HH:mm",question.getCreateTime()) %>
            <BR>回复: <%=question.getQuestionStatus()==1? FormatUtil.formatDate("yyyy-MM-dd HH:mm",question.getReplyTime()):"-" %>
            </SPAN>
          </TD>
         </TR>
        </TBODY>
      </TABLE>
    </TD>
    <TD width=1 bgColor=#6293bb rowSpan=2></TD>
    <TD vAlign=top width=* bgColor=whitesmoke>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
        <TBODY>
        <TR vAlign=top>
          <TD height=177>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD>【<FONT color=#ff0033><B>提问内容</B></FONT>】</TD>
                <TD align=right>
                 <A onclick="javascript:addToFavorite()" href="#">
                  <IMG alt=把本贴加入我的收藏夹 src="images/fav_add2.gif"  border=0></A> &nbsp;
                <%
                  if(empId.intValue()==question.getCourseware().getCoursewareAskEmpId().intValue() && question.getQuestionStatus()==1){
                 %>
                  <%if(question.getIsGoodQuestion()==0){ %>
                  <A onclick=javascript:addToGood() href="#">
                  <IMG height=16 alt=评为精华 src="images/good.gif" width=16 border=0>评为精华
                  </A>
                 <%}} %>
                 <%if(question.getQuestionStatus()==1){%>
                <%if(question.getIsOtherQuestion()==1){ %>
                [<a href="#" onclick="undoother('<%=question.getQuestionId() %>')">取消显示</a>]
                <%}else{%>
                [<a href="#" onclick="doother('<%=question.getQuestionId() %>')">显示到其他学员问题</a>]
                <%}} %>
                </TD>
               </TR>
              </TBODY>
            </TABLE>
            <HR noShade SIZE=1>
            <TABLE style="TABLE-LAYOUT: fixed" cellSpacing=2 cellPadding=0 width="99%" border=0>
             <TBODY>
              <TR vAlign=top>
                <TD><SPAN class=f12><%=question.getQuestionContent() %><BR></SPAN>
                  <BR><BR>
                </TD>
              </TR>
             </TBODY>
            </TABLE>
            <%if(question.getQuestionStatus()==1){ %>
             <table width=99%><tr><td width=60%>
             【<B><FONT color=#009900>教师<%=empdao.findById(question.getReplyEmpId()).getEmpName()%>回答</FONT></B>】 
             <font color=red><%=FormatUtil.formatDate("yyyy-MM-dd HH:mm:ss",question.getReplyTime()) %></font>
              </td>
              <td width=35%></td>
              <td width=5%>
              <%if(question.getCourseware().getCoursewareAskEmpId().intValue()==empId.intValue()){%>
                 <A onclick=javascript:editReply('<%=question.getQuestionId() %>') href="#">
                  <IMG alt=修改 src="images/edit.gif"  border=0>
                 </A>
                 <%} %>
              </td>
              </table>
            <HR noShade SIZE=1>
            <TABLE style="TABLE-LAYOUT: fixed" cellSpacing=2 cellPadding=0 width="99%" border=0>
              <TBODY>
               <TR vAlign=top>
                <TD>
                <%=question.getReplyContent() %>
                </TD>
               </TR>
              </TBODY>
            </TABLE>
            
            <%} %>
            <br>
          </TD>
        </TR>
     </TBODY>
  </TABLE>
  </TD>
  <TD width=1 bgColor=#6293bb height=27></TD>
  </TR>
  </TBODY>
 </TABLE>
<TABLE height=1 cellSpacing=0 cellPadding=0 width="99%" align=center bgColor=#6293bb border=0>
 <TBODY>
  <TR>
   <TD></TD>
  </TR>
 </TBODY>
</TABLE>

<%if(question.getQuestionId().intValue()==thisquestion.getQuestionId().intValue() && question.getQuestionStatus()!=1){ %>
 <form action="<%=request.getContextPath() %>/question.do?actionmethod=reply" method="post" name="replyform">

<input type=hidden name=replyContent>
<input type=hidden name=questionId value="<%=thisquestionId%>">
<TABLE cellSpacing=1 cellPadding=5 width="99%" align=center bgColor=#6293bb border=0>

  <TBODY>
  <TR bgColor=#6293bb>
    <TD vAlign=center><B><FONT color=#000000>回答此问题　</FONT></B>
    <input type=checkbox value="1" name="isOther" id=isOther checked><label for=isOther>显示到其他学员问题</label>
    <input type=checkbox value="1" name="isGood" id=isGood><label for=isGood>评为精华</label>
    </TD>
    <TD>
     
     </TD>
  </TR>
  <TR>
    <TD colspan=2>
<%
String basePath = request.getContextPath()+"/commons/";
 String autoDetectLanguageStr;
 String defaultLanguageStr;
 String codeStr=request.getParameter("code");
 if(codeStr==null) {
	autoDetectLanguageStr="true";
	defaultLanguageStr="zh-cn";
 }else {
	autoDetectLanguageStr="false";
	defaultLanguageStr=codeStr;
 }
%>
    <FCK:editor id="editorContent" basePath="<%=basePath%>"
			    width="100%"
			    height="200"
			    toolbarSet="OADefault"
			    autoDetectLanguage="<%=autoDetectLanguageStr%>"
				defaultLanguage="<%=defaultLanguageStr%>" >
			</FCK:editor>
    </TD>
  </TR>
  <TR>
    <TD colspan=2>
    <div align=center>
			<BUTTON class=Btnnormal onmousedown="javascript:this.className='Btnover'" id=okButton
onmouseover="javascript:this.className='Btnover'" title='确定'
onmouseout="javascript:this.className='Btnnormal'" onclick="saveQuestion()">&nbsp;&nbsp;确定&nbsp;&nbsp;</BUTTON>&nbsp;&nbsp;&nbsp;
<BUTTON class=Btnnormal onmousedown="javascript:this.className='Btnover'" 
onmouseover="javascript:this.className='Btnover'" title='退出'
onmouseout="javascript:this.className='Btnnormal'" onclick="self.close()">&nbsp;&nbsp;退出&nbsp;&nbsp;</BUTTON>&nbsp;&nbsp;&nbsp;
            </div>
    </TD>
  </TR>
 </TBODY>
</TABLE>

</form>
<%} %>
<br><br>
<%
//继续提问的问题
 List continuelist = questiondao.findContinueQuestions(question.getQuestionId(),false);
 Iterator iter = continuelist.iterator();
 while(iter.hasNext()){
  Question continuequestion = (Question)iter.next();
%>
<TABLE height=1 cellSpacing=0 cellPadding=0 width="99%" align=center bgColor=#6293bb border=0>
 <TBODY>
  <TR>
   <TD></TD>
  </TR>
 </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="99%" align=center>
  <TBODY>
  <TR bgColor=#6293bb>
    <TD width=1 bgColor=#6293bb height=30></TD>
    <TD width=0 height=30  class="topic_title"><font color=darkblue><B><%=continuequestion.getQuestionStatus()==1?"<img src='images/greenright.gif' alt='已答复'>":"<img src='images/noquestion.gif' alt='未答复'>"%>
    继续提问问题：<%=continuequestion.getQuestionTitle() %><%=continuequestion.getQuestionStatus()==3?"<img src='images/replying.gif' alt='解决中'>":""%>
    </TD>
    <TD width=1 bgColor=#6293bb height=30></TD>
   </TR>
  </TBODY>
</TABLE>
<TABLE height=1 cellSpacing=0 cellPadding=0 width="99%" align=center bgColor=#6293bb border=0>
 <TBODY>
  <TR>
   <TD></TD>
  </TR>
 </TBODY>
</TABLE>
 <TABLE height=200 cellSpacing=0 cellPadding=0 width="99%" align=center border=0>
 <TBODY>
  <TR >
    <TD width=1 bgColor=#6293bb rowSpan=2></TD>
    <TD vAlign=top width=180 rowSpan=2 bgColor=#dee3e7>
      <TABLE cellSpacing=0 cellPadding=8 width="100%" border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE  cellSpacing=0  cellPadding=2 width="100%" border=0>
              <TBODY>
               <TR>
                <TD><b>
                 <% 
                 
                 Employee conemp = empdao.findById(continuequestion.getCreateEmpId()); %>
                   学员：<%=conemp.getEmpName() %><BR><BR>
                   部门：<%=conemp.getOaTblDepartment().getDeptName() %><BR><BR>
                   职务：<%=conemp.getOaTblTitle().getTitleName() %><BR><BR>
                   </b>
                </TD>
               </TR>
              </TBODY>
             </TABLE>
            <HR noShade SIZE=1>
            <SPAN class=f13>提问: <%=FormatUtil.formatDate("yyyy-MM-dd HH:mm",continuequestion.getCreateTime()) %>
            <BR>回复: <%=continuequestion.getQuestionStatus()==1? FormatUtil.formatDate("yyyy-MM-dd HH:mm",continuequestion.getReplyTime()):"-" %>
            </SPAN>
          </TD>
         </TR>
        </TBODY>
      </TABLE>
    </TD>
    <TD width=1 bgColor=#6293bb rowSpan=2></TD>
    <TD vAlign=top width=* bgColor=whitesmoke>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
        <TBODY>
        <TR vAlign=top>
          <TD height=177>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD>【<FONT color=#ff0033><B>提问内容</B></FONT>】</TD>
                <TD align=right>
               
                <%if(continuequestion.getQuestionStatus()==1){%>
                 <%if(continuequestion.getIsOtherQuestion()==1){ %>
                [<a href="#" onclick="undoother('<%=continuequestion.getQuestionId() %>')">取消显示</a>]
                <%}else{%>
                [<a href="#" onclick="doother('<%=continuequestion.getQuestionId() %>')">显示到继续提问问题</a>]
                <%} %>
                <%} %>
                </TD>
               </TR>
              </TBODY>
            </TABLE>
            <HR noShade SIZE=1>
            <TABLE style="TABLE-LAYOUT: fixed" cellSpacing=2 cellPadding=0 width="99%" border=0>
             <TBODY>
              <TR vAlign=top>
                <TD><SPAN class=f12><%=continuequestion.getQuestionContent() %><BR></SPAN>
                  <BR><BR>
                </TD>
              </TR>
             </TBODY>
            </TABLE>
           
            <%if(continuequestion.getQuestionStatus()==1){ %>
             <table width=99%><tr><td width=60%>
             【<B><FONT color=#009900>教师<%=empdao.findById(continuequestion.getReplyEmpId()).getEmpName()%>回答</FONT></B>】 
             <font color=red><%=FormatUtil.formatDate("yyyy-MM-dd HH:mm:ss",continuequestion.getReplyTime()) %></font>
              </td>
              <td width=35%></td>
              <td width=5%>
              <%if(continuequestion.getCourseware().getCoursewareAskEmpId().intValue()==empId.intValue()){%>
                 <A onclick=javascript:editReply('<%=continuequestion.getQuestionId() %>') href="#">
                  <IMG alt=修改 src="images/edit.gif"  border=0>
                 </A>
                 <%} %>
              </td>
              </table>
            <HR noShade SIZE=1>
            <TABLE style="TABLE-LAYOUT: fixed" cellSpacing=2 cellPadding=0 width="99%" border=0>
              <TBODY>
               <TR vAlign=top>
                <TD>
                <%=continuequestion.getReplyContent() %>
                </TD>
               </TR>
              </TBODY>
            </TABLE>
            
            <%} %>
            <br>
          </TD>
        </TR>
     </TBODY>
  </TABLE>
  </TD>
  <TD width=1 bgColor=#6293bb height=27></TD>
  </TR>
  </TBODY>
 </TABLE>
<TABLE height=1 cellSpacing=0 cellPadding=0 width="99%" align=center bgColor=#6293bb border=0>
 <TBODY>
  <TR>
   <TD></TD>
  </TR>
 </TBODY>
</TABLE>
<%if(continuequestion.getQuestionId().intValue()==thisquestion.getQuestionId().intValue() && continuequestion.getQuestionStatus()!=1){ %>
 <form action="<%=request.getContextPath() %>/question.do?actionmethod=reply" method="post" name="replyform">
<input type=hidden name=replyContent>
<input type=hidden name=questionId value="<%=thisquestionId%>">
<TABLE cellSpacing=1 cellPadding=5 width="99%" align=center bgColor=#6293bb border=0>

  <TBODY>
  <TR bgColor=#6293bb>
    <TD vAlign=center><B><FONT color=#000000>回答此问题　</FONT></B>
     <input type=checkbox value="1" name="isOther" id=isOther checked><label for=isOther>显示到继续提问问题</label>
    <input type=checkbox value="1" name="isGood" id=isGood><label for=isGood>评为精华</label>
    </TD>
    <TD>
    
     </TD>
  </TR>
  <TR>
    <TD colspan=2>
<%
 String basePath = request.getContextPath()+"/commons/";
 String autoDetectLanguageStr;
 String defaultLanguageStr;
 String codeStr=request.getParameter("code");
 if(codeStr==null) {
	autoDetectLanguageStr="true";
	defaultLanguageStr="zh-cn";
 }else {
	autoDetectLanguageStr="false";
	defaultLanguageStr=codeStr;
 }
%>
    <FCK:editor id="editorContent" basePath="<%=basePath%>"
			    width="100%"
			    height="200"
			    toolbarSet="OADefault"
			    autoDetectLanguage="<%=autoDetectLanguageStr%>"
				defaultLanguage="<%=defaultLanguageStr%>" >
			</FCK:editor>
    </TD>
  </TR>
  <TR>
    <TD colspan=2>
    <div align=center>
			<BUTTON class=Btnnormal onmousedown="javascript:this.className='Btnover'" id=okButton
onmouseover="javascript:this.className='Btnover'" title='确定' 
onmouseout="javascript:this.className='Btnnormal'" onclick="saveQuestion()">&nbsp;&nbsp;确定&nbsp;&nbsp;</BUTTON>&nbsp;&nbsp;&nbsp;
<BUTTON class=Btnnormal onmousedown="javascript:this.className='Btnover'" 
onmouseover="javascript:this.className='Btnover'" title='退出'
onmouseout="javascript:this.className='Btnnormal'" onclick="self.close()">&nbsp;&nbsp;退出&nbsp;&nbsp;</BUTTON>&nbsp;&nbsp;&nbsp;
            </div>
    </TD>
  </TR>
 </TBODY>
</TABLE>

</form>
<%} %>
<br><br>
<%} %>

<br><br><br>
<form action="<%=request.getContextPath() %>/question.do?actionmethod=addfavor" name=favorform method=post>
 <input type=hidden name=questionId value="<%=question.getQuestionId() %>">
</form>
<form action="<%=request.getContextPath() %>/question.do?actionmethod=addgood" name=goodform method=post>
 <input type=hidden name=questionId value="<%=question.getQuestionId() %>">
</form>
</BODY>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/ajaxform.js"></script>
<script type="text/javascript">
function saveQuestion(){
  var content =  editorContent___Frame.FCK.GetXHTML(true);
  if(content==''){
   alert('请输入问题答案!');
   return;
  }
  replyform.replyContent.value = content;
  document.all.okButton.disabled = true;
  ajaxSubmitForm(replyform);
 }
function ajaxSubmitHandle(responseText){  
 if(responseText=='success'){
  window.opener.location.reload();
  self.close();
 }else if(responseText=='fail'){
  alert('操作失败，请重试！');
  document.all.okButton.disabled = false;
 }else{
  alert(responseText);
  document.all.okButton.disabled = false;
 }
}

function undoother(questionId){
  ajaxDel('<%=request.getContextPath()%>/question.do?actionmethod=undoother&questionId='+questionId);
}
function doother(questionId){
  ajaxDel('<%=request.getContextPath()%>/question.do?actionmethod=doother&questionId='+questionId);
}
function ajaxDelHandle(responseText){
 if(responseText=='success'){
  location.reload();
  window.opener.location.reload();
 }else{
  alert('操作失败！');
 }
}

function addToGood(){
 ajaxSubmitForm(goodform);
}

function addToFavorite(){
 ajaxSubmitForm(favorform);
}

function editReply(questionId){
   window.showModalDialog('editreply.jsp?questionId='+questionId,self, 'dialogHeight: '+540+'px; dialogWidth: '+800+'px;dialogTop: 80;dialogLeft: 100;center: yes; status=no');
}
</script>
</HTML>
