function changeTopicPage(B,A,D){var C="/forum/show.do?method=showSingleForum&pageNo="+B+"&forumId="+A;if(D!=null&&D!=""){C+="&type="+D}window.location.href=C}function searchPage(A,B){window.location.href="/editor/bbs/search.do?method=search&pageNo="+A+"&term="+encodeURIComponent(B)}function changeTopicTab(A,D,C){if($("topicTab1")==null){return }for(var B=0;B<2;B++){$("topicTab"+B).className="fys"}if($("topicTab"+D)!=null){$("topicTab"+D).className="fy"}changeTopicPage(1,A,C)}function deleteItem(B,A){if(confirm("确认要删除吗？")){window.location.href="/editor/forum/item.do?method=remove&itemid="+B+"&forumId="+A}}function deleteTopic(A){if(confirm("确认要删除吗？")){window.location.href="/editor/forum/topic.do?method=remove&id="+A}}function updateType(D,C){var F="";if(D=="1"){F="确定要加精吗？"}else{if(D=="2"){F="确定要置顶吗？"}else{if(D=="0"){F="确定要撤消吗？"}else{return }}}if(confirm(F)){var B=function(H){alert("Error "+H.status+" -- "+H.statusText)};var E=function(I){window.location.href="http://"+window.location.hostname+":"+window.location.port+"/forum/topic/"+C;var H=I.responseText;if(H!="1"){alert("操作失败。")}else{alert("操作成功。")}};var A="http://"+window.location.hostname+":"+window.location.port+"/editor/forum/topic.do";var G="method=updateType&type="+D+"&topicId="+C;new Ajax.Request(A,{asynchronous:true,method:"post",postBody:G,onSuccess:E,onFailure:B})}}function downLoadAnnex(C,B,A){if(A<B){alert("对不起您的积分不够！下载此附件需要"+B+"分！");return }}function pageTopic(A,D){var B="/editor/forum/person.do";var C="method="+D+"&pageNo="+A+"&reflash=true";ajaxUpdate(B,"topicContent",{postBody:C})}function delMyTopic(C,A){if(confirm("确认要删除吗？")){var B="/editor/forum/topic.do";var D="method=remove&id="+C+"&pageNo="+A+"&flag=myTopic";ajaxUpdate(B,"topicContent",{postBody:D})}}function delShareTopic(B,A){if(confirm("确认要删除该分享吗？")){var C="/editor/forum/person.do";var D="method=delShare&id="+B+"&pageNo="+A+"&reflash=true";ajaxUpdate(C,"topicContent",{postBody:D})}}function delMyItem(D,A){if(confirm("确认要删除该回复吗？")){var B="/editor/forum/item.do";var C="method=remove&itemid="+D+"&pageNo="+A+"&flag=myItem";ajaxUpdate(B,"topicContent",{postBody:C})}}function getHotTopic(B,A){if(A=="24_hour"){document.getElementById("24_hour").className="title_bianselect";document.getElementById("7_day").className="title_bian";document.getElementById("1_month").className="title_bian";if($("hotTopicList")&&$("24hourHotTopicList")){$("hotTopicList").innerHTML=$("24hourHotTopicList").innerHTML}}if(A=="7_day"){document.getElementById("7_day").className="title_bianselect";document.getElementById("24_hour").className="title_bian";document.getElementById("1_month").className="title_bian";if($("hotTopicList")&&$("7dayHotTopicList")){$("hotTopicList").innerHTML=$("7dayHotTopicList").innerHTML}}if(A=="1_month"){document.getElementById("1_month").className="title_bianselect";document.getElementById("24_hour").className="title_bian";document.getElementById("7_day").className="title_bian";if($("hotTopicList")&&$("1monthHotTopicList")){$("hotTopicList").innerHTML=$("1monthHotTopicList").innerHTML}}}function showDetailInfo(B){for(var A=1;A<11;A++){if(A!=B&&$("textObj_"+A)){$("textObj_"+A).style.display=""}if(A!=B&&$("imgObj_"+A)){$("imgObj_"+A).style.display="none"}if(A==B){if($("textObj_"+B)){$("textObj_"+B).style.display="none"}if($("imgObj_"+B)){$("imgObj_"+B).style.display=""}}}}function vote(E,B){var C=function(G){var F=G.responseText;if(F!="success"){if(F=="logout"){alert("请登录后再进行投票！");window.location.href="/5j5xLogin.do"}else{alert(F)}}else{$("voteNum").innerHTML=parseInt($("voteNum").innerHTML)+1;alert("投票成功！")}};var A="/editor/forum/vote.do";var D="method=voteOfZhengwen&parentId="+E+"&topicId="+B;ajaxRequest(A,{postBody:D,onSuccess:C})};