/*publish date:2011-12-30 11:39:58*/
if(typeof APP=="undefined"||!APP){var APP={}}APP.busyWin="";APP.highLight_color=new Array("#005eac","red","orange","","green","cyan","blue","#6600FF","gray");APP.ajax_cache=new Array("setgood","maketop","movecate");APP.actived_win="";APP.xx="passss";APP.replyToUser=function(b,c,d){document.location="#top_reply";var a="<img src=http://icon.xgo-img.com.cn/group/bbs/3189.gif>对 ";if(d){a+="第"+d+"楼"}else{a+="楼主"}a+=" "+b+" 说：";ZB.$("reply_info").value=a;ZB.$("reply_to_userid").value=c;ZB.$("content").focus()};APP.popWinBusy=function(c,b,a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){if(typeof a=="undefined"){a="数据请求中"}APP.busyWin=new ZB.box({boxid:"popWinBusyBox",width:100,height:15,left:c,top:b,hidden_title:true,content:a});APP.busyWin.show()})};APP.popWinPrompt=function(e,d,b,a,c,f){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){if(typeof c=="undefined"){c="暂无提示"}if(typeof f=="undefined"){f=""}var g=new ZB.box({boxid:"popWinPromptBox",width:b,height:a,left:e,top:d,hidden_title:true,content:"<center>"+c+"</center>",close_time:2000,time_close_callback:f});g.show()})};APP.deleteBook=function(b,a){if(!ZB.DOMLoaded()){return}if(typeof b!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var f=0;if(typeof a=="undefined"){var d=ZB.getCheckboxVal("booklist");a=d.join("_");f=d.length}else{f=1}if(f==0){var e=new ZB.box({width:232,height:110,is_move:true,box_sure_id:"box_sure",title:"提示：",content:"<div><p>请选择您要删除的帖子!</p></div>",sure_callback:function(){}});e.show();return}var e=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"选择了 "+f+" 篇帖子",content:'<div>                      <p>您确认要 <span class="fb red">删除</span> 选择的帖子吗？</p>                      </div>                      <p class="reason">操作原因</p>                      <p><textarea id="reason" cols="" rows=""></textarea></p>                      <p><input type="submit" id="box_sure" value="确定" /> <input id="message" type="checkbox" value="" checked/> 通知作者</p>                      ',sure_callback:function(){c()}});e.show();var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var h=ZB.$("reason").value;var g=ZB.$("message").checked;new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:a,boardid:b,reason:h,message:g,act:"delete"},busy:function(){var j=e.getABSCoord();APP.popWinBusy(j.left,j.top);ZB.$(e.conf.boxid).style.display="none"},success:function(k){var j=e.getABSCoord();APP.busyWin.close();e.close();APP.popWinPrompt(j.left,j.top,200,15,k);window.location.href=ZB.base_url+"/forum-"+b+"-1.html"}})})}})};APP.lockBook=function(b,a){if(!ZB.DOMLoaded()){return}if(typeof b!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var f=0;if(typeof a=="undefined"){var d=ZB.getCheckboxVal("booklist");a=d.join("_");f=d.length}else{f=1}if(f==0){var e=new ZB.box({width:232,height:110,is_move:true,box_sure_id:"box_sure",title:"提示：",content:"<div><p>请选择您要锁定的主题!</p></div>",sure_callback:function(){}});e.show();return}var e=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"选择了 "+f+" 篇帖子",content:'<div>                      <p><input name="booklock" id="lock" type="radio" value="lock" checked/> <label for="lock">锁定主题</label>&nbsp;&nbsp;&nbsp;&nbsp;<input name="booklock" id="unlock" type="radio" value="unlock" /> <label for="unlock">打开主题</label></p>                      </div>                      <p class="reason" >操作原因</p>                      <p><textarea name="reason" id="reason" cols="" rows=""></textarea></p>                      <p><input type="submit" value="确定" id="box_sure" /> <input type="checkbox" value="" id="message" checked/> 通知作者</p>                      ',sure_callback:function(){c()}});e.show();var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var j=ZB.getRadioVal("booklock");var h=ZB.$("reason").value;var g=ZB.$("message").checked;new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:a,boardid:b,reason:h,message:g,close:j,act:"close"},busy:function(){var k=e.getABSCoord();APP.popWinBusy(k.left,k.top);ZB.$(e.conf.boxid).style.display="none"},success:function(l){var k=e.getABSCoord();APP.busyWin.close();e.close();APP.popWinPrompt(k.left,k.top,200,15,l,function(){window.location.reload()})}})})}})};APP.tuijian=function(b,a){if(!ZB.DOMLoaded()){return}if(typeof b!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:a,boardid:b,act:"tuijian"},busy:function(){},success:function(c){ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:200,content:c})})}})})};APP.pupBook=function(b,a){if(!ZB.DOMLoaded()){return}if(typeof b!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var f=0;if(typeof a=="undefined"){var d=ZB.getCheckboxVal("booklist");a=d.join("_");f=d.length}else{f=1}if(f==0){var e=new ZB.box({width:232,height:110,is_move:true,box_sure_id:"box_sure",title:"提示：",content:"<div><p>请选择您要提升或下沉的主题!</p></div>",sure_callback:function(){}});e.show();return}var e=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"选择了 "+f+" 篇帖子",content:'<div>                          <p><input name="upordown" type="radio" value="up" checked/> 提升主题&nbsp;&nbsp;&nbsp;&nbsp;<input name="upordown" type="radio" value="down" /> 下沉主题</p>                          </div>                          <p class="reason">操作原因</p>                          <p><textarea name="reason" id="reason" cols="" rows=""></textarea></p>                          <p><input type="submit" value="确定" id="box_sure" /> <input type="checkbox" id="message" value="" checked /> 通知作者</p>                      ',sure_callback:function(){c()}});e.show();var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var h=ZB.getRadioVal("upordown");var j=ZB.$("reason").value;var g=ZB.$("message").checked;new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:a,boardid:b,reason:j,message:g,isbump:h,act:"bump"},busy:function(){var k=e.getABSCoord();APP.popWinBusy(k.left,k.top);ZB.$(e.conf.boxid).style.display="none"},success:function(l){var k=e.getABSCoord();APP.busyWin.close();e.close();APP.popWinPrompt(k.left,k.top,200,15,l,function(){window.location.reload()})}})})}})};APP.checkHighLight=function(){if(ZB.$("is_highlight").checked==true){ZB.$("hightlight_checklist").disabled=false}else{ZB.$("hightlight_checklist").disabled=true}};APP.hlBold=function(){if(ZB.$("hl_bold").style.fontSize=="20px"){ZB.$("hl_bold").style.fontSize="14px";ZB.$("hl_xiaoguo").style.fontWeight="normal"}else{ZB.$("hl_bold").style.fontSize="20px";ZB.$("hl_xiaoguo").style.fontWeight="bold"}};APP.hlItalic=function(){if(ZB.$("hl_italic").style.fontSize=="20px"){ZB.$("hl_italic").style.fontSize="14px";ZB.$("hl_xiaoguo").style.fontStyle="normal"}else{ZB.$("hl_italic").style.fontSize="20px";ZB.$("hl_xiaoguo").style.fontStyle="italic"}};APP.hlUnderline=function(){if(ZB.$("hl_underline").style.fontSize=="20px"){ZB.$("hl_underline").style.fontSize="14px";ZB.$("hl_xiaoguo").style.textDecoration=""}else{ZB.$("hl_underline").style.fontSize="20px";ZB.$("hl_xiaoguo").style.textDecoration="underline"}};APP.hlColor=function(c){var b=c.value;var a=APP.highLight_color[b];ZB.$("hl_xiaoguo").style.color=a};APP.highLight=function(b,a){if(!ZB.DOMLoaded()){return}if(typeof b!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var h=0;if(typeof a=="undefined"||a==0){var e=ZB.getCheckboxVal("booklist");a=e.join("_");h=e.length}else{h=1}if(h==0){var g=new ZB.box({width:232,height:110,is_move:true,box_sure_id:"box_sure",title:"提示：",content:"<div><p>请选择您要高亮显示的主题!</p></div>",sure_callback:function(){}});g.show();return}var f='<div>                      <p class="blue">                        <input type="checkbox" id="is_highlight" value="" checked="checked"  onclick="APP.checkHighLight();"/> 高亮&nbsp;&nbsp;                         <select style="width:50px;" id="hightlight_checklist" onchange="APP.hlColor(this);">';for(var d=0;d<APP.highLight_color.length;d++){if(APP.highLight_color[d]){f+='<option style="background:'+APP.highLight_color[d]+'; " value="'+d+'"></option>'}}f+='</select> &nbsp;&nbsp;                        <b id="hl_bold" style="cursor:pointer" onclick="APP.hlBold();">B</b>&nbsp;                        <i id="hl_italic"  style="cursor:pointer"  onclick="APP.hlItalic();">I</i>&nbsp;&nbsp;                        <u id="hl_underline" style="cursor:pointer"  onclick="APP.hlUnderline();">U</u>                      </p>                      <p style="margin-top:2px;font-size:16px;color:#005eac;" align="center" id="hl_xiaoguo">显示效果预览</p>                      </div>                      <p class="reason" id="reason">操作原因</p>                      <p><textarea name="reason" cols="" rows=""></textarea></p>                      <p><input type="submit" value="确定" id="box_sure" /> <input type="checkbox" value="" id="message" checked/> 通知作者</p>                  ';var g=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"选择了 "+h+" 篇帖子",content:f,sure_callback:function(){c()}});g.show();var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var n=ZB.$("is_highlight").checked;if(n==false){g.close();return}var j=ZB.$("hightlight_checklist").value;var l=ZB.$("hl_bold").style.fontSize=="20px"?true:false;var p=ZB.$("hl_italic").style.fontSize=="20px"?true:false;var k=ZB.$("hl_underline").style.fontSize=="20px"?true:false;var o=ZB.$("reason").value;var m=ZB.$("message").checked;new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:a,boardid:b,reason:o,message:m,isHighlight:n,color:j,isBold:l,isItalic:p,isUnderline:k,act:"highlight"},busy:function(){var q=g.getABSCoord();APP.popWinBusy(q.left,q.top);ZB.$(g.conf.boxid).style.display="none"},success:function(r){var q=g.getABSCoord();APP.busyWin.close();g.close();APP.popWinPrompt(q.left,q.top,200,15,r,function(){window.location.reload()})}})})}})};APP.setGood=function(e,c,d,b,a){if(!ZB.DOMLoaded()){return}if(typeof e!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var k=0;if(typeof c=="undefined"||c==0){var g=ZB.getCheckboxVal("booklist");c=g.join("_");k=g.length}else{k=1}if(k==0){var j=new ZB.box({width:232,height:110,is_move:true,box_sure_id:"box_sure",title:"提示：",content:"<div><p>请选择您要设置精华的主题!</p></div>",sure_callback:function(){}});j.show();return}var h='<div id="good_list_area">                          <img src="http://icon.xgo-img.com.cn/group/bbs/wait.gif" width="16" height="16"/>数据请求中，请等待                          </div>                          <p class="reason">操作原因</p>                          <p><textarea name="reason"  id="reason" cols="" rows=""></textarea></p>                          <p><input type="submit" value="确定" id="box_sure" disabled="true"/> <input type="checkbox" value="" id="message" checked/> 通知作者</p>                      ';var j=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"选择了 "+k+" 篇帖子",content:h,sure_callback:function(){f()}});j.show();if(!APP.ajax_cache.setgood){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_get_good_info.php",method:"post",data:{bookid:c,boardid:e,product:d,manuid:b,subsubid:a},success:function(l){ZB.$("good_list_area").innerHTML=l;ZB.$("box_sure").disabled=false;APP.ajax_cache.setgood=l}})})}else{ZB.$("good_list_area").innerHTML=APP.ajax_cache.setgood;ZB.$("box_sure").disabled=false}var f=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var n=ZB.getRadioVal("setgood");if(typeof n=="undefined"){j.close();return}var l=ZB.$("good_list").value;var p=ZB.$("reason").value;var o=ZB.$("message").checked;var m=ZB.strlen(p);if(n=="add"){if(m>50){alert("对不起，精华评语不能超过25个汉字！");return}if(ZB.bbsid==2&&m<30){alert("对不起，精华评语不能低于15个汉字！");return}}new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:c,boardid:e,reason:p,message:o,set_good:n,good_level:l,act:"digest"},busy:function(){var q=j.getABSCoord();APP.popWinBusy(q.left,q.top);ZB.$(j.conf.boxid).style.display="none"},success:function(r){var q=j.getABSCoord();APP.busyWin.close();j.close();APP.popWinPrompt(q.left,q.top,200,15,r,function(){window.location.reload()})}})})}})};APP.makeTop=function(c,b,a){if(!ZB.DOMLoaded()){return}if(typeof c!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var h=0;if(typeof b=="undefined"||b==0){var e=ZB.getCheckboxVal("booklist");b=e.join("_");h=e.length}else{h=1}if(h==0){var g=new ZB.box({width:232,height:110,is_move:true,box_sure_id:"box_sure",title:"提示：",content:"<div><p>请选择您要置顶的帖子!</p></div>",sure_callback:function(){}});g.show();return}var f='<div id="top_list_area">                          <img src="http://icon.xgo-img.com.cn/group/bbs/wait.gif" width="16" height="16"/>数据请求中，请等待                          </div>                          <p class="reason">操作原因</p>                          <p><textarea name="reason"  id="reason" cols="" rows=""></textarea></p>                          <p><input type="submit" value="确定" id="box_sure" disabled="true"/> <input type="checkbox" value="" id="message" checked/> 通知作者</p>                      ';var g=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"选择了 "+h+" 篇帖子",content:f,sure_callback:function(){d()}});g.show();if(!APP.ajax_cache.maketop){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_get_top_info.php",method:"post",data:{bookid:b,boardid:c,subsubid:a},success:function(j){ZB.$("top_list_area").innerHTML=j;ZB.$("box_sure").disabled=false;APP.ajax_cache.maketop=j}})})}else{ZB.$("top_list_area").innerHTML=APP.ajax_cache.maketop;ZB.$("box_sure").disabled=false}var d=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var m=ZB.getRadioVal("settop");if(typeof m=="undefined"){g.close();return}var j=ZB.$("top_list").value;var l=ZB.$("reason").value;var k=ZB.$("message").checked;new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:b,boardid:c,subsubid:a,reason:l,message:k,set_top:m,top_level:j,act:"stick"},busy:function(){var n=g.getABSCoord();APP.popWinBusy(n.left,n.top);ZB.$(g.conf.boxid).style.display="none"},success:function(o){var n=g.getABSCoord();APP.busyWin.close();g.close();APP.popWinPrompt(n.left,n.top,200,15,o,function(){window.location.reload()})}})})}})};APP.getSubcate=function(a){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_get_subcate.php",method:"post",data:{cateid:a},success:function(b){ZB.$("move_subcate_area").innerHTML=b;ZB.$("box_sure").disabled=false}})})};APP.moveBook=function(b,a){if(!ZB.DOMLoaded()){return}if(typeof b!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var g=0;if(typeof a=="undefined"){var d=ZB.getCheckboxVal("booklist");a=d.join("_");g=d.length}else{g=1}if(g==0){var f=new ZB.box({width:232,height:110,is_move:true,box_sure_id:"box_sure",title:"提示：",content:"<div><p>请选择您要移动的帖子!</p></div>",sure_callback:function(){}});f.show();return}var e='<div >                          <p id="move_cate_area"><img src="http://icon.xgo-img.com.cn/group/bbs/wait.gif" width="16" height="16"/>数据载入中，请等待                          </p>                          <p id="move_subcate_area">                          子版：<select id="move_subcatid">                          <option value="0">无</option>                          </select>                          </p>                          </div>                          <p class="reason">操作原因</p>                          <p><textarea name="reason"  id="reason" cols="" rows=""></textarea></p>                          <p><input type="submit" value="确定" id="box_sure" disabled="true"/> <input type="checkbox" value="" id="message" checked/> 通知作者</p>                      ';var f=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"选择了 "+g+" 篇帖子",content:e,sure_callback:function(){c()}});f.show();if(!APP.ajax_cache.movecate){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_get_cate.php",method:"post",data:{bookid:a,boardid:b},success:function(h){ZB.$("move_cate_area").innerHTML=h;ZB.$("box_sure").disabled=false;APP.ajax_cache.movecate=h}})})}else{ZB.$("move_cate_area").innerHTML=APP.ajax_cache.movecate;ZB.$("box_sure").disabled=false}var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var k=ZB.$("move_subcatid").value;if(k==0){f.close();return}var j=ZB.$("reason").value;var h=ZB.$("message").checked;new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:a,boardid:b,reason:j,message:h,new_boardid:k,act:"move"},busy:function(){var l=f.getABSCoord();APP.popWinBusy(l.left,l.top);ZB.$(f.conf.boxid).style.display="none"},success:function(m){var l=f.getABSCoord();APP.busyWin.close();f.close();APP.popWinPrompt(l.left,l.top,200,15,m,function(){window.location.reload()})}})})}})};APP.pingFen=function(b,a,c){if(!ZB.DOMLoaded()){return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){if(typeof b=="undefined"||typeof a=="undefined"){alert("参数错误")}if(typeof c=="undefined"){c=0}var e='<div class="pop_popinner"><div id="pingfen_sel_area"><img src="http://icon.xgo-img.com.cn/group/bbs/wait.gif" width="16" height="16"/>数据载入中，请等待</div><table><tr><td></td><td><input type="button" id="box_sure" value="确定" class="btn"/><input id="box_cancel" type="button" class="btn" value="取消"/></td></tr></table></table></div>';var f=new ZB.box({width:482,height:310,dl_style:"report",is_move:true,box_sure_id:"box_sure",title:"参与评分",content:e,sure_callback:function(){d()}});if(ZB.readCookie("xgo_author")){f.show()}else{alert("请先登陆以后再加油！");window.location.href=ZB.base_url+"/logging.php"}ZB.$("box_cancel").onclick=function(){f.close()};ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_get_boarder_score.php",method:"post",data:{bookid:a,boardid:b},success:function(g){ZB.$("pingfen_sel_area").innerHTML=g;ZB.$("box_sure").disabled=false;APP.ajax_cache.pingfen=g}})});var d=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var g=ZB.$("petrol_value").value;var j=ZB.$("expertscore_value").value;var k=ZB.$("reason").value;var h=1;new ZB.ajax({url:ZB.base_url+"/tips/ajax_pingfen.php",method:"post",data:{bookid:a,boardid:b,postid:c,petrol_value:g,expertscore_value:j,reason:k,message:h},busy:function(){var l=f.getABSCoord();APP.popWinBusy(l.left,l.top);ZB.$(f.conf.boxid).style.display="none"},success:function(l){APP.busyWin.close();f.close();ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:200,content:l})})}})})}})};APP.jubao=function(d,c,e,a,f,b){if(!ZB.DOMLoaded()){return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){if(typeof d=="undefined"||typeof c=="undefined"){alert("参数错误")}if(typeof f=="undefined"){f=0}var h='<p>举报帖子：    <span class="fb">'+e+"</span></p>                          <p>帖子链接：    "+a+'</p>                          <p>举报类型：    <input name="jubao_type" id="ad" type="radio" value="4" /> <label for="ad">广告</label>                            <input name="jubao_type" id="fd" type="radio" value="1" /> <label for="fd">反动</label>                            <input name="jubao_type" id="sq" type="radio" value="2" /> <label for="sq">色情</label>                           <input name="jubao_type" id="wg" type="radio" value="3" />  <label for="wg">违规违法</label>                             <span class="red">*</span></p>                          <div>举报理由：    <textarea class="reason_txt" name="reason" id="reason" cols="" rows=""></textarea> 可输入100字</div>                          <div class="report_btn"><input type="submit" value="确定" id="box_sure"/></div>                      ';var j=new ZB.box({width:482,height:290,dl_style:"report",is_move:true,box_sure_id:"box_sure",title:"不良内容举报",content:h,sure_callback:function(){g()}});j.show();var g=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var k=ZB.getRadioVal("jubao_type");if(k==0||typeof k=="undefined"){alert("请选择举报类别");return}var l=ZB.$("reason").value;new ZB.ajax({url:ZB.base_url+"/tips/ajax_jubao.php",method:"post",data:{bookid:c,boardid:d,postid:f,bookurl:a,title:e,floor_num:b,jubao_type:k,reason:l},busy:function(){var m=j.getABSCoord();APP.popWinBusy(m.left,m.top);ZB.$(j.conf.boxid).style.display="none"},success:function(n){var m=j.getABSCoord();APP.busyWin.close();j.close();APP.popWinPrompt(m.left,m.top,200,15,n)}})})}})};APP.confirmDel=function(c,b,a,d){if(!ZB.DOMLoaded()){return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){if(a=="delete"){if(typeof d!="undefined"){var f="确认删除该回复?";var e="delete_post"}else{var f="确认删除该帖?";var e="delete"}}else{if(a=="hidden"){if(typeof d!="undefined"){var f="确认隐藏该回复?";var e="banpost_post"}else{var f="确认隐藏该帖?";var e="banpost"}}else{return}}if(typeof d=="undefined"){d=0}var g=new ZB.box({title:f,type:1,sure_callback:function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:b,boardid:c,postid:d,reason:"帖子页上操作",act:e},busy:function(){var h=g.getABSCoord();APP.popWinBusy(h.left,h.top);ZB.$(g.conf.boxid).style.display="none"},success:function(h){APP.busyWin.close();g.close();ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:300,content:h})})}})})}});g.show()})};APP.showList=function(b,a){ZB.loadFile(ZB.js_base_url+"/inf/list.js?v="+ZB.version,function(){new ZB.list({id:b,listid:a})})};APP.bookVote=function(c,b,a){if(a!="good"&&a!="bad"){alert("讹，你要投哪边呢？");return}if(typeof c!="number"||typeof b!="number"){alert("参数错误");return}ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_good_bad_vote.php",method:"post",data:{bookid:b,boardid:c,type:a},success:function(f){var d=f.split("|");var e=d[1];ZB.$("good_or_bad_area").innerHTML=e;ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:200,content:"投票成功！"})})}})})};APP.modifySign=function(b,e,c){if(b=="undefine"||b==""){return}var a="";var g="";if(e=="modify"){if(ZB.$(c)){var f=ZB.$(c).innerHTML}else{var f=""}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){g=new ZB.box({type:2,title:"请输入您要修改的内容",default_input:f,sure_callback:function(h){a=h;d()}});g.show()})}else{ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){g=new ZB.box({type:1,title:"确认删除该用户签名？",sure_callback:function(){d()}});g.show()})}var d=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_modify_sign.php",method:"post",data:{userid:b,sign:a},success:function(l){var h=l.split("|");var k=h[1];var j=g.getABSCoord();g.close();if(h[0]==0){APP.popWinPrompt(j.left,j.top,200,15,"操作成功，2秒后自动刷新！",function(){window.location.reload()})}else{APP.popWinPrompt(j.left,j.top,200,15,k)}}})})}};APP.delPingFen=function(b){if(b=="undefine"||b==""){return}var c="";ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){c=new ZB.box({type:1,title:"确认删除该用户评分？",sure_callback:function(){a()}});c.show()});var a=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_delete_pingfen.php",method:"post",data:{pingfenid:b},success:function(g){var d=g.split("|");var f=d[1];var e=c.getABSCoord();c.close();if(d[0]==0){APP.popWinPrompt(e.left,e.top,200,15,"操作成功，2秒后自动刷新！",function(){window.location.reload()})}else{APP.popWinPrompt(e.left,e.top,200,15,f)}}})})}};APP.fontSize=function(b,a){if(typeof ZB.$(b)=="object"){if(a=="18"){ZB.$(b).style.fontSize=a+"px";ZB.$("big_font").innerHTML="大";ZB.$("big_font").style.fontWeight="bold";ZB.$("big_font").className="f14";ZB.$("small_font").innerHTML='<a  href="javascript:void(0);" onclick="APP.fontSize(\'main_content\',12);" >小</a>'}else{if(a=="12"){ZB.$(b).style.fontSize=a+"px";ZB.$("small_font").innerHTML="小";ZB.$("big_font").innerHTML='<a class="f14 fb" href="javascript:void(0);" onclick="APP.fontSize(\'main_content\',18);">大</a>'}}}};APP.mb_strlen=function(c){var a=0;var d="";for(var b=0;b<c.length;b++){a+=c.charCodeAt(b)<0||c.charCodeAt(b)>255?(d=="utf-8"?3:2):1}return a};APP.reply=function(){var d=ZB.$("content").value;var e=APP.mb_strlen(d);var h=ZB.$("fb_area").value;var f=ZB.$("bid").value;var c=ZB.$("bookid").value;var g=ZB.$("reply_info").value;var b=ZB.$("reply_to_userid").value;var a="";if(ZB.$("imgcheck")){a=ZB.$("imgcheck").value}if(f==0||c==0){alert("参数错误");return false}if(d.trim()==""){alert("不能提交空内容～");return false}if(e>60000){alert("现有内容长度为"+e+"字符["+Math.ceil(e/2)+"字]，可能是您的内容太长或代码过多了，请控制在60000字符["+Math.ceil(60000/2)+"汉字]以内!");return false}d=d.replace(/([^>=\]"'\/]|^)((((https?|ftp):\/\/)|www\.)([\w\-]+\.)*[\w\-\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!]*)+\.(jpg|gif|png|bmp))/ig,"$1[img]$2[/img]");d=d.replace(/([^>=\]"'\/@]|^)((((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|synacast):\/\/))([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig,"$1[url=$2]$2[/url]");d=d.replace(/([^\w>=\]"'\/@]|^)((www\.)([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig,"$1[url=$2]$2[/url]");d=d.replace(/([^\w->=\]:"'\.\/]|^)(([\-\.\w]+@[\.\-\w]+(\.\w+)+))/ig,"$1[email]$2[/email]");ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){d=APP.formatFaceContent(d);d=d.replace(/%/g,"%25");d=d.replace(/\&/g,"%26");d=d.replace(/\+/g,"%2B");new ZB.ajax({url:ZB.base_url+"/tips/ajax_reply.php",method:"post",data:{content:d,fb_area:h,boardid:f,bookid:c,reply_info:g,imgcheck:a,reply_to_userid:b},success:function(l){var k=l.split("|");if(k[0]==1){alert(k[1])}else{if(k[0]==3){window.location.href=ZB.base_url+"/tips/prompt.php?boardid="+f+"&bookid="+c+"&postid="+k[1]}else{if(k[0]==0){var j=ZB.addBefore("DIV",ZB.$("under_pagelist"));j.style.width="960px";j.style.margin="0 auto";j.innerHTML=k[2]}ZB.$("content").value="";if(ZB.$("checkimgdiv")){ZB.$("checkimgdiv").innerHTML=""}ZB.$("reply_btn_id").focus();ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:250,content:k[1]})});if(ZB.$("display_content_id")!="undefined"&&ZB.$("display_content_id")){ZB.$("display_content_id").style.display="";if(ZB.$("display_content_words_id")!="undefined"){ZB.$("display_content_words_id").style.display="none"}}}}}})})};APP.fastFb=function(){var f=ZB.$("title").value;var c=ZB.$("content").value;var a=ZB.$("booktype").value;var d=APP.mb_strlen(c);var e=ZB.$("bid").value;var b="";if(ZB.$("imgcheck")){b=ZB.$("imgcheck").value}if(e==0){alert("参数错误");return false}if(f.trim()==""){alert("标题不能为空～");return false}if(c.trim()==""){alert("不能提交空内容～");return false}if(d>60000){alert("现有内容长度为"+d+"字符["+Math.ceil(d/2)+"字]，可能是您的内容太长或代码过多了，请控制在60000字符["+Math.ceil(60000/2)+"汉字]以内!");return false}c=c.replace(/([^>=\]"'\/]|^)((((https?|ftp):\/\/)|www\.)([\w\-]+\.)*[\w\-\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!]*)+\.(jpg|gif|png|bmp))/ig,"$1[img]$2[/img]");c=c.replace(/([^>=\]"'\/@]|^)((((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|synacast):\/\/))([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig,"$1[url=$2]$2[/url]");c=c.replace(/([^\w>=\]"'\/@]|^)((www\.)([\w\-]+\.)*[:\.@\-\w\u4e00-\u9fa5]+\.([\.a-zA-Z0-9]+|\u4E2D\u56FD|\u7F51\u7EDC|\u516C\u53F8)((\?|\/|:)+[\w\.\/=\?%\-&~`@':+!#]*)*)/ig,"$1[url=$2]$2[/url]");c=c.replace(/([^\w->=\]:"'\.\/]|^)(([\-\.\w]+@[\.\-\w]+(\.\w+)+))/ig,"$1[email]$2[/email]");ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){c=APP.formatFaceContent(c);c=c.replace(/%/g,"%25");c=c.replace(/\&/g,"%26");c=c.replace(/\+/g,"%2B");new ZB.ajax({url:ZB.base_url+"/tips/ajax_fastfb.php",method:"post",data:{title:f,content:c,boardid:e,booktype:a,imgcheck:b},success:function(g){if(g){var g=decodeURI(g);if(/window.location.href/.test(g)){document.write(g)}else{document.write('<script type="text/javascript">alert("'+g+'");history.go(-1);<\/script>')}}}})})};APP.noLogin=function(a){var b="请登录以后再进行"+a+"!";alert(b);window.location.href=ZB.base_url+"/logging.php"};APP.collectBook=function(b,a){if(!b||!a){alert("参数错误")}if(!ZB.readCookie("xgo_author")){alert("请先登陆以后再进行收藏！");window.location.href=ZB.base_url+"/logging.php"}ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_collect_book.php",method:"post",data:{boardid:b,bookid:a},success:function(d){var c=d.split("|");ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:300,content:c[1]})})}})})};APP.selfMakeTop=function(c,b,d){if(!c||!b){return}var e="";ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){e=new ZB.box({type:1,height:120,title:"确认置顶该帖？",sure_box_content:d,sure_callback:function(){a()}});e.show()});var a=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_make_top.php",method:"post",data:{boardid:c,bookid:b},success:function(j){var f=j.split("|");var h=f[1];var g=e.getABSCoord();e.close();if(f[0]==0){ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:300,content:h})})}else{APP.popWinPrompt(g.left,g.top,200,30,h)}}})})}};APP.ctlent=function(a){ZB.loadFile(ZB.js_base_url+"/inf/tips.js?v="+ZB.version,function(){ZB.ctlent(a,function(){APP.reply()})})};APP.listCtlent=function(a){ZB.loadFile(ZB.js_base_url+"/inf/tips.js?v="+ZB.version,function(){ZB.ctlent(a,function(){APP.fastFb()})})};APP.expertReply=function(a){if(!ZB.DOMLoaded()){return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({is_move:true,top:100,width:500,height:300,type:3,title:"我来回答该问题",iframe_src:ZB.base_url+"/tips/popwin_expert_reply.php?askid="+a});ibox.show()})};APP.askChangeUpload=function(){var b=ZB.$("upload_a");var a=ZB.$("add_pic");b.style.display="none";a.style.display="block"};APP.askCheckUpload=function(){var a=ZB.$("pic_form");APP.askRepairCheck();a.submit()};APP.askRepairCheck=function(){var c=ZB.$("upload_a");var a=ZB.$("add_pic");var b=ZB.$("piccode");picid_str=b.value;pic_arr=picid_str.split("_");if(pic_arr.length>3){a.style.display="none"}else{c.style.display="";a.style.display="none"}};APP.askDelPicAjax=function(a){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_ask_del_pic.php",method:"get",data:{picid:a},success:function(d){var b=d.split("|");var c=b[1];if(b[0]==1){alert(c)}else{APP.askDelPic(a)}}})})};APP.askDelPic=function(b){var d=ZB.$("pic"+b);var e=ZB.$("upload_a");d.parentNode.removeChild(d);var c=ZB.$("piccode");picid_str=c.value;pic_arr=picid_str.split("_");var a="";if(pic_arr.length){for(i=0;i<pic_arr.length;i++){if(pic_arr[i]!=b){if(a!=""){a+="_"+pic_arr[i]}else{a=pic_arr[i]}}}}c.value=a;if(pic_arr.length<6){e.style.display=""}};APP.peakIt=function(e,c,f,b,a,d){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_askbook_peak.php",method:"post",data:{boardid:e,bookid:c,replyid:f,type:b,userid:a},success:function(j){var g=j.split("|");var h=g[1];if(g[0]==1){if(b==1){ZB.$("expert_peak_msg").innerHTML=h}else{alert(h)}}else{d.innerHTML=h;ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:200,content:"多谢支持"})})}}})})};APP.askGiveScore=function(a){var b=ZB.getSelectVal("writer_give_score");ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_ask_give_score.php",method:"post",data:{askid:a,w_score:b},success:function(e){var c=e.split("|");var d=c[1];if(c[0]==1){alert(d)}else{ZB.$("score_area").innerHTML=d;ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:200,content:"感谢支持"})})}}})})};APP.modifyExpertReply=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({is_move:true,top:100,width:500,height:300,type:3,title:"修改回复内容",iframe_src:ZB.base_url+"/tips/popwin_modify_expert_reply.php?expert_reply_id="+a});ibox.show()})};APP.deleteExpertReply=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({type:1,title:"确认删除该回复？",sure_callback:function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_ask_del_expert_reply.php",method:"post",data:{expert_reply_id:a},success:function(d){var b=d.split("|");var c=b[1];if(b[0]==1){alert(c)}else{window.location.reload()}}})})}});ibox.show()})};APP.addContent=function(b,a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({is_move:true,top:100,width:500,height:300,type:3,title:'补充问题&nbsp;<span style="font-size:12px;font-weight:normal;">补充提问细节，以得到更准确的答案</span>',iframe_src:ZB.base_url+"/tips/popwin_add_content.php?boardid="+b+"&bookid="+a});ibox.show()})};APP.noGoodAnswerWin=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({type:1,height:120,title:"无满意答案",sure_box_content:"没有满意的回答，可以直接结束提问,是否要关闭问题？出于保护回答者利益的考虑，问题的悬赏分将不再返还。",sure_callback:function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_no_good_answer.php",method:"post",data:{askid:a},success:function(d){var b=d.split("|");var c=b[1];if(b[0]==1){alert(c)}else{window.location.reload()}}})})}});ibox.show()})};APP.modifyAskbook=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({is_move:true,top:100,width:500,height:300,type:3,title:"修改提问",iframe_src:ZB.base_url+"/tips/popwin_modify_askbook.php?askid="+a});ibox.show()})};APP.changeAskAddScore=function(){if(ZB.$("mes_form_gscore").style.display=="none"){ZB.$("mes_form_gscore").style.display="block"}else{ZB.$("mes_form_gscore").style.display="none"}};APP.askAddGiveScore=function(a){var b=ZB.getSelectVal("score_list");ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_ask_add_give_score.php",method:"post",data:{askid:a,score:b},success:function(f){var c=f.split("|");if(c[0]==1){alert(c[1])}else{var e=c[1];var d=c[2];ZB.$("mes_form_gscore").style.display="none";ZB.$("ask_score_area").innerHTML=d;ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:200,content:" +"+e})})}}})})};APP.setAnswer=function(b,e,d,a,c){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var f='<table class="adopt_answer"><tr><td>&nbsp;</td><td align="left"><font style="font-size:12px;color:#D53838">小提示：采纳答案后，该用户将得到您的悬赏分。</font></td></tr>';f+='<tr><td valign="top"><font style="font-size:14px;color:#353434;">感谢语或评论：</font></td><td align="left">';f+="<textarea id=\"adoptcomment\" style=\"color: rgb(153,153,153);\" onfocus=\"if( ZB.$('hid_can_fb').value==0 ){this.value='';this.style.color='#000';ZB.$('setAnswer_sure').disabled='';ZB.$('hid_can_fb').value=1;}\" name=\"\" cols=80 rows=8>说声谢谢，感谢回答者的无私帮助。</textarea>";f+='<input type="hidden" name="commentflag" id="commentflag" value="-1">';f+='</td></tr><tr><td>&nbsp;</td><td align="left"><font style="font-size:12px;color:#353434;">如果您对这一回答非常满意，您可以选择给回答者额外的奖励：';f+='<select id="addscore"><option value="0">0</option>';f+='<option value="5">5</option>';f+='<option value="10">10</option>';f+='<option value="15">15</option>';f+='</select>，您目前有 <font color="red"><b>'+a+"</b></font>"+c+"。</font></td></tr>";f+='<tr><td>&nbsp;</td><td><input type="button" value=" 确 认 " id="setAnswer_sure" disabled/><input type="button" value=" 取 消 "  id="setAnswer_cancel"/><input type="hidden" id="hid_can_fb" value="0" /> </td></tr>';f+="</table>";ibox=new ZB.box({is_move:true,top:100,width:670,height:230,box_sure_id:"setAnswer_sure",box_cancel_id:"setAnswer_cancel",title:"采纳答案",content:f,sure_callback:function(){if(300<ZB.$("adoptcomment").value.length){alert("评价内容请控制在300字以内");return}var h=ZB.$("adoptcomment").value;var g=ZB.getSelectVal("addscore");ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_ask_set_answer.php",method:"post",data:{askid:b,replyid:e,replier:d,adoptcomment:h,addscore:g},success:function(l){var j=l.split("|");var k=j[1];if(j[0]==1){alert(k)}else{window.location.reload()}}})})}});ibox.show()})};APP.voteBook=function(b,d,c){var e=0;if(b==1){e=ZB.getRadioVal("vote_option");if(!e){alert("请选择您要投票的选项~");return}}else{if(b==2){var a=ZB.getCheckboxVal("vote_option");e=a.join("_");if(e==""){alert("请选择您要投票的选项~");return}}else{return}}ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_vote.php",method:"post",data:{boardid:d,bookid:c,vote_value:e},success:function(h){var f=h.split("|");var g=f[1];if(f[0]==1){alert(g)}else{ZB.$("vote_list_area").innerHTML=g;ZB.$("vote_fb_btn").style.display="none";ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:230,content:"感谢您的投票～"})})}}})})};APP.confirmActiveIn=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({top:150,type:1,title:"确认要参加此活动吗？",sure_callback:function(){if(ZB.readCookie("xgo_author")){APP.checkActiveInfo(a)}else{APP.showLogin(a)}}});ibox.show()})};APP.checkActiveInfo=function(a){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_active_check_info.php",method:"post",data:{},success:function(c){var b=parseInt(c);if(b==1){APP.actived(a)}else{APP.showInfo(a)}}})})};APP.showInfo=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({is_move:true,top:100,width:430,height:370,type:3,title:"填写更详细的个人信息",iframe_src:ZB.base_url+"/tips/active_info.php?activeid="+a});ibox.show()})};APP.actived=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){APP.actived_win=new ZB.box({is_move:true,top:250,width:300,height:130,type:3,title:"成功参与活动",iframe_src:ZB.base_url+"/tips/active_act.php?activeid="+a});APP.actived_win.show()})};APP.activeChangCi=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){box=new ZB.box({is_move:true,top:150,width:300,height:220,type:3,title:"请选择要参加的场次",iframe_src:ZB.base_url+"/tips/active_changci.php?activeid="+a});box.show()})};APP.showLogin=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({is_move:true,top:100,width:250,height:300,type:3,title:"登录",iframe_src:ZB.base_url+"/tips/active_login.php?activeid="+a});ibox.show()})};APP.showHotTab=function(b,a,d){var e=arguments[4]?arguments[4]:"current";for(var c=1;c<=d;c++){if(c==a){ZB.$("tab_"+b+"_"+c).className=e;ZB.$("div_"+b+"_"+c).style.display=""}else{ZB.$("tab_"+b+"_"+c).className="";ZB.$("div_"+b+"_"+c).style.display="none"}}};var screen_limit_width=document.documentElement.clientWidth;if(screen_limit_width<=1024){ZB.writeCookieDomain("right_content_flag",1)}APP.closeRightDiv=function(){if(ZB.$("wrap_r").style.display==""){ZB.writeCookieDomain("right_content_flag",1);ZB.$("wrapper").style.width="100%";ZB.$("wrap_r").style.display="none";ZB.$("wrap_l").style.margin="0 0 0 0";ZB.$("right_open").style.display=""}else{ZB.writeCookieDomain("right_content_flag",0);ZB.$("wrapper").style.width="99%";ZB.$("wrap_r").style.display="";ZB.$("wrap_l").style.margin="0 200px 0 0";ZB.$("right_open").style.display="none"}};APP.delActiveBook=function(a){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({top:150,type:1,title:"你确定要删除这个链接吗？",sure_callback:function(){window.location.href=ZB.base_url+"/tips/add_active_url.php?act=del&refid="+a+"&r="+Math.random()}});ibox.show()})};APP.copyToClipboard=function(b){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",b)}else{if(navigator.userAgent.indexOf("Opera")!=-1){window.location=b}else{if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(g){alert("您的firefox安全限制限制您进行剪贴板操作，请在地址栏中输入“about:config”将“signed.applets.codebase_principal_support”设置为“true”之后重试");return false}var d=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!d){return}var c=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!c){return}c.addDataFlavor("text/unicode");var h=new Object();var a=new Object();var h=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);var j=b;h.data=j;c.setTransferData("text/unicode",h,j.length*2);var f=Components.interfaces.nsIClipboard;if(!d){return false}d.setData(c,null,f.kGlobalClipboard)}}}};APP.filterID=function(a,b){if(!ZB.DOMLoaded()){return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var d='<table border=0 cellspacing=0 cellpadding=0 style="margin-top:5px;margin-left:8px;font-size:12px;font-family: Verdana, Arial, Helvetica, sans-serif;"><tr><td>禁止：&nbsp;</td><td><input type="radio" name="days" id="days1" value="3day"><label for="days1">3天&nbsp;</label>                                <input type="radio" name="days" id="days2" value="7day"><label for="days2">7天&nbsp;</label>                                <input type="radio" name="days" id="days3" value="30day"><label for="days3">30天&nbsp;</label>                                <input type="radio" name="days" id="days4" checked value=""><label for="days4">永禁</label>                          </td></tr><tr><td colspan=2>&nbsp;</td></tr>                          <tr><td valign=top>理由：&nbsp;</td>                          <td><select name="selectreason" size="7" style=" height:145px; width:180px;"                           onchange="document.getElementById(\'reason\').value=this.value">                           <option value="">自定义</option><option value="">--------</option>                           <option value="恶意灌水或广告">恶意灌水或广告</option>                           <option value="违反国家法律法规">违反国家法律法规</option>                           <option value="发布QQ群或违规团购、广告">发布QQ群或违规团购、广告</option>                           <option value="谩骂、诋毁或枪手言论">谩骂、诋毁或枪手言论</option>                           <option value="不合时宜的内容">不合时宜的内容</option>                           <option value="发布违规外部网站链接">发布违规外部网站链接</option>                           <option value="与本论坛无关内容">与本论坛无关内容</option>                           </select>                           <textarea id="reason" name="reason" style="height:140px; width:213px;font-size:12px;color:#969696;"                            ><100汉字</textarea></div>                           <div class="report_btn"><input type=hidden id="userid" value="'+a+'" >                           <input type=hidden id="score" value="'+b+'" ></td></tr><tr><td></td><td><input type="submit" value="&nbsp;确&nbsp;认&nbsp;" id="box_sure"/>                           </td></tr></table>                      ';var e=new ZB.box({width:480,height:240,dl_style:"report",is_move:true,box_sure_id:"box_sure",title:"确认禁止该用户？",content:d,sure_callback:function(){c()}});e.show();var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var j=ZB.getRadioVal("days");var g=ZB.$("reason").value;var f=ZB.$("userid").value;var h=ZB.$("score").value;if(ZB.strlen(g)==0||g=="<100汉字"){alert("必须填写理由");return}if(ZB.strlen(g)>200){alert("内容太多了吧？小于100字！");return}new ZB.ajax({url:ZB.base_url+"/tips/ajax_filter.php",method:"post",data:{userid:f,days:j,reason:g,score:h},busy:function(){var k=e.getABSCoord();APP.popWinBusy(k.left,k.top);ZB.$(e.conf.boxid).style.display="none"},success:function(l){var k=e.getABSCoord();APP.busyWin.close();e.close();APP.popWinPrompt(k.left,k.top,200,15,l)}})})}})};APP.filterID2=function(a){if(a=="undefine"||a==""){return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){ibox=new ZB.box({type:3,title:"确认禁止该用户？",height:260,width:480,iframe_src:"/tips/filterid.php",sure_callback:function(){b()}});ibox.show()});var b=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_filterid.php",method:"post",data:{userid:a},success:function(f){var c=f.split("|");var e=c[1];var d=ibox.getABSCoord();ibox.close();if(c[0]==0){ZB.loadFile(ZB.js_base_url+"/inf/flutter.js?v="+ZB.version,function(){new ZB.flutter({width:350,content:c[1]})})}else{APP.popWinPrompt(d.left,d.top,200,15,e)}}})})}};APP.g_content_focus=0;APP.showFace=function(){if(ZB.$("face_main_box").style.display=="block"){ZB.$("face_main_box").style.display="none";return}ZB.loadFile(ZB.js_base_url+"/editjs/smilies_var.js?v="+ZB.version,function(){if(typeof smilies_type=="object"&&smilies_type){type_len=smilies_type.length;if(type_len>0){var d=ZB.$("content");if(!d.hasfocus){d.focus()}if(document.selection){selection=document.selection}if(ZB.checkBrowser().ie==false){APP.g_content_focus=d.selectionStart}else{if(selection&&selection.createRange){var c=selection.createRange();var f=c.duplicate();f.moveToElementText(d);f.setEndPoint("EndToEnd",c);APP.g_content_focus=f.text.length}}var e="";for(var b=1;b<type_len;b++){e+='<li id="face_group_list_'+smilies_type[b][1]+'" onclick="APP.switchFace(this,'+smilies_type[b][1]+');"><a>'+smilies_type[b][0]+"</a></li>"}ZB.$("face_group_area").innerHTML=e;var a=parseInt(ZB.readCookie("xgo_bbs_face_group"));if(isNaN(a)){a=3}if(APP.switchFace(null,a)){ZB.$("face_main_box").style.display="block"}else{alert("表情载入失败")}}else{alert("无可用表情")}}else{alert("表情列表加载失败")}})};APP.switchFace=function(e,d){if(d>0){var a=smilies_array[d][1];if(typeof a=="object"&&a){type_len=a.length;if(type_len>0){ZB.writeCookieDomain("xgo_bbs_face_group",d,720);if(e==null){e=ZB.$("face_group_list_"+d)}for(var c in smilies_type){ZB.$("face_group_list_"+c).className=""}e.className="now";var f="";for(var b in a){f+='<li><img height="50" width="50" alt="" src="http://icon.xgo-img.com.cn/bbs/smilies/'+d+"/"+a[b][2]+'" id="smilie_'+a[b][0]+'" onclick="APP.insertFace(\''+a[b][1]+"');\" /></li>"}ZB.$("show_face_area").innerHTML=f;return true}else{alert("该组表情不存在")}}else{alert("该组表情不存在")}}else{alert("错误的组别ID")}return false};APP.insertFace=function(a){var c=ZB.$("content");if(!c.hasfocus){c.focus()}if(document.selection){selection=document.selection}if(ZB.checkBrowser().ie==false){c.selectionStart=APP.g_content_focus;c.selectionEnd=c.selectionStart}else{if(selection&&selection.createRange){var b=c.createTextRange();b.moveStart("character",APP.g_content_focus);b.collapse(true);b.select()}}ZB.AddText(c,a);APP.closeFace()};APP.closeFace=function(){ZB.$("face_main_box").style.display="none"};APP.formatFaceContent=function(f){var j=f.match(/{:[0-9]{1,3}_[a-zA-Z0-9]{1,15}:}/ig);if(typeof j=="object"&&j){var c=j.length;for(var b=0;b<c;b++){var h=j[b].match(/[0-9]{1,3}_[a-zA-Z0-9]{1,15}/ig)[0];var g=h.split("_");var a=parseInt(g[0]);var e=g[1];var d='<img height="50" width="50" src="http://icon.xgo-img.com.cn/bbs/smilies/'+a+"/"+e+'.gif" />';f=f.replace(j[b],d)}}return f};APP.readLimit=function(b,a){if(!ZB.DOMLoaded()){return}if(typeof b!="number"){alert("参数错误")}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var d=new ZB.box({width:232,height:210,is_move:true,box_sure_id:"box_sure",title:"添加帖子限制",content:'<div>                          <p><input name="readlimit" type="radio" value="up" checked/> 开启限制&nbsp;&nbsp;&nbsp;&nbsp;<input name="readlimit" type="radio" value="down" /> 关闭限制</p>                          <p style="color:red;padding-left:5px;">&nbsp;&nbsp;经验值≤100无法查看该帖 </p>                          </div>                          <p class="reason">操作原因</p>                          <p><textarea name="reason" id="reason" cols="" rows=""></textarea></p>                          <p><input type="submit" value="确定" id="box_sure" /> <input type="checkbox" id="message" value="" checked/> 通知作者</p>                      ',sure_callback:function(){c()}});d.show();var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var g=ZB.getRadioVal("readlimit");var f=ZB.$("reason").value;var e=ZB.$("message").checked;new ZB.ajax({url:ZB.base_url+"/tips/ajax_topicadmin.php",method:"post",data:{bookid:a,boardid:b,reason:f,message:e,isreadlimit:g,act:"readlimit"},busy:function(){var h=d.getABSCoord();APP.popWinBusy(h.left,h.top);ZB.$(d.conf.boxid).style.display="none"},success:function(j){var h=d.getABSCoord();APP.busyWin.close();d.close();APP.popWinPrompt(h.left,h.top,200,15,j)}})})}})};APP.buyNow=function(b,a,c){if(!ZB.DOMLoaded()){return}if(typeof a=="undefined"||!a){alert("登录之后才可购买");return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var e='<table border=0 width=100% cellspacing=0 cellpadding=5 style="margin-top:5px;margin-left:8px;font-size:12px;font-family: Verdana, Arial, Helvetica, sans-serif;">                            <tr><td align=right>收货人: </td><td>&nbsp;<input type="text" id="shopper">                            <input type="hidden" id="bookid" value='+b+'><input type="hidden" id="writer" value='+c+'></td></tr>                            <tr><td align=right>收货地址: </td><td>&nbsp;<input type="text" id="shopper_add"></td></tr>                            <tr><td align=right>联系电话: </td><td>&nbsp;<input type="text" id="shopper_tel"></td></tr>                            <tr><td align=right>购买数量: </td><td>&nbsp;<input type="text" value = "1" id="shopper_num">个</td></tr>                            <tr><td align=right>运送方式: </td><td>&nbsp;<input type="text" id="shopper_ship_type"></td></tr>                            <tr><td  align=right>给卖家留言：</td><td>&nbsp;<textarea cols="40"  rows="3" id="shopper_msg"></textarea></td></tr>                            <tr><td  align=right></td><td><input type="checkbox" checked disabled="disabled">发短消息通知卖家</td></tr>                           <td></td><td><input type="submit" style="height:30px;" value="&nbsp;确&nbsp;认&nbsp;" id="box_sure"/><font style="font-size:14px;color:red;">&nbsp;&nbsp;<b>注:网上交易有风险，谨慎交易，防止上当受骗。</b><font><a href="http://diybbs.zol.com.cn/18/300_174489.html" target="_blank"><font style="font-size:12px;color:gray;">防骗宝典</a> </font>                           </td></tr></table>                      ';var f=new ZB.box({width:600,height:350,dl_style:"report",is_move:true,box_sure_id:"box_sure",title:"我要购买",content:e,sure_callback:function(){d()}});f.show();var d=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){var o=ZB.$("writer").value;var m=ZB.$("bookid").value;var l=ZB.$("shopper_add").value;var k=ZB.$("shopper").value;var h=ZB.$("shopper_tel").value;var g=ZB.$("shopper_num").value;var j=ZB.$("shopper_ship_type").value;var n=ZB.$("shopper_msg").value;if(ZB.strlen(l)==""||ZB.strlen(k)==""||ZB.strlen(h)==""){alert("以下内容为必填写完整!\n收货人\n收货地址\n联系电话");return}if(ZB.strlen(n)>400){alert("内容太多了吧？小于200字！");return}new ZB.ajax({url:ZB.base_url+"/tips/ajax_trade.php",method:"post",data:{writer:o,bookid:m,shopper_add:l,shopper:k,shopper_tel:h,shopper_num:g,shopper_ship_type:j,shopper_msg:n},busy:function(){var p=f.getABSCoord();APP.popWinBusy(p.left,p.top);ZB.$(f.conf.boxid).style.display="none"},success:function(s){var q=f.getABSCoord();APP.busyWin.close();f.close();var p=s.split("|");var r=p[1];if(p[0]==0){APP.popWinPrompt(q.left,q.top,260,15,r)}else{APP.popWinPrompt(q.left,q.top,260,15,r)}}})})}})};APP.endTrade=function(a,b){if(!ZB.DOMLoaded()){return}ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version,function(){var d="";var e=new ZB.box({type:1,width:282,height:80,dl_style:"report",is_move:true,box_sure_id:"box_sure",title:"此操作不可逆,确认结束此交易？",content:d,sure_callback:function(){c()}});e.show();var c=function(){ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version,function(){new ZB.ajax({url:ZB.base_url+"/tips/ajax_trade.php",method:"post",data:{tradeid:a,writer:b},busy:function(){var f=e.getABSCoord();APP.popWinBusy(f.left,f.top);ZB.$(e.conf.boxid).style.display="none"},success:function(j){var g=e.getABSCoord();APP.busyWin.close();e.close();var f=j.split("|");var h=f[1];if(f[0]==0){APP.popWinPrompt(g.left,g.top,260,15,h)}else{APP.popWinPrompt(g.left,g.top,260,15,h+"，2秒后自动刷新！",function(){window.location.reload()})}}})})}})};
