var MemTip=(function(){var D=null;function I(J){if(J){D=J;var L=A(J);var K=H();K.style.left=(L[0]-15)+"px";K.style.top=(L[1]-125)+"px";K.style.display=""}}function B(){var J=H();J.style.display="none"}function F(N,L,K){var J='<div id="memTipPanel" style="float:left;width:208px; font-size:12px; line-height: 22px; display:inline; margin-left: 10px;">';if(N){J+='<div id="memTipTitle" style="font-weight:bold; margin-top: 10px;">'+N+"</div>"}if(L){J+=L}J+='</div><div  id="memTipClosePanel" style="float:right;padding: 10px 10px 0px 0px;"><a id="memTipMemTipClose" href="javascript:void(0)" style="display:block; width: 15px;height: 15px;" onclick="MemTip.hide()"></a></div><div style="clear:both"></div>';var M=H();if(M){if(K){M.style.background=K}M.innerHTML=J}}function A(J){var K=curtop=0;if(J.offsetParent){K=J.offsetLeft;curtop=J.offsetTop;while(J=J.offsetParent){K+=J.offsetLeft;curtop+=J.offsetTop}}return[K,curtop]}function H(){var J=document.getElementById("memTipDiv");if(!J){J=document.createElement("div");J.id="memTipDiv";J.style.width="245px";J.style.height="120px";J.style.position="absolute";J.style.zIndex="999";J.style.display="none";E(document,"click",C);document.body.appendChild(J)}return J}function C(L){var K=L.target||event.srcElement;if(K!=D){var M=["memTipDiv","memTipPanel","memTipTitle","memTipClosePanel"];var J=0;for(J=0;J<M.length;J++){if(document.getElementById(M[J])==K){break}}if(J==M.length){MemTip.hide()}}}function E(L,J,K){if(window.addEventListener){L.addEventListener(J,K,false)}else{if(window.attachEvent){L.attachEvent("on"+J,K)}}}return{buildHTML:function(L,K,J){F(L,K,J)},show:function(J){I(J)},hide:function(){B()}}})();function showMemTip(C){var D="会员发贴：";var B="只允许本吧会员在登录状态下发贴。<br>请检查一下您是否已经登录，以及是否<br>已经加入本吧会员。";var A="url('http://static.tieba.baidu.com/tb/img/infotip.gif') no-repeat";MemTip.buildHTML(D,B,A);MemTip.show(C)}var SignNameApply={getSignNameUrl:"/f?ct=503316480&cm=60001&tn=jsonSignName&t="+new Date().getTime().toString(36),isFirst:true,active:function(){var B=this.postProcess;if(this.isFirst){this.isFirst=false;var A=this.getSignNameUrl;new Ajax.Request(A,{method:"get",parameters:"",onComplete:function(C){B(C)}})}},postProcess:function(xmlHttp){var json=eval("("+xmlHttp.responseText+")");if(!json.hasError){var viewAllUrl="/f?ct=486539264&cm=58580&tn=bdUserCenter#3";var use="";if(json.useSign==1){if(json.signNames.length>0){var html='<input type="checkbox" name="useSignName" id="useSignName" checked onclick="SignNameApply.useSignNameClick(this)"><label for="useSignName">使用签名档</label>&nbsp;<span id="signNameShow"><select name= "signName" id="signName" onchange="SignNameApply.selectChange(this)">';for(var i=0;i<json.signNames.length;i++){if(i==json.selectIndex){html+="<option value='"+json.signNames[i].id+"' selected>"+json.signNames[i].name+"</option>"}else{html+="<option value='"+json.signNames[i].id+"'>"+json.signNames[i].name+"</option>"}}html+='</select>&nbsp;<a href="'+viewAllUrl+'" target="_blank" style="color:#0449be">查看全部</a></span>';G("signNamePanel").innerHTML='<div id="signNameWrapper">'+html+"</div>"}else{var html='<input type="checkbox" name="useSignName" id="useSignName" onclick="SignNameApply.useSignNameClick(this)"><label for="useSignName">使用签名档</label>&nbsp;<span id="signNameShow" style="display:none"><span style="color:#666666">（您目前没有可使用的签名档，<a href="'+viewAllUrl+'" target="_blank" style="color:#0449be">查看全部</a>）</span></span>';G("signNamePanel").innerHTML='<div id="signNameWrapper">'+html+"</div>"}G("signNamePanel").style.display=""}else{G("signNamePanel").style.display="none"}}},_showSignName:function(){},useSignNameClick:function(A){if(A.checked){G("signNameShow").style.display=""}else{G("signNameShow").style.display="none"}},selectChange:function(A){G("useSignName").checked=true}};var MyVcode={img_str:"",audio_str:"",setYzm:function(){if(!this.ifUpdateImg){return }else{this.ifUpdateImg=false}if(!G("y_img")){this.getAjaxVcode();G("synYzm").innerHTML="<img onerror='MyVcode.changeYImg(this);' id=y_img src='"+img_str+"&t="+Math.random()+"' align=middle>";G("yzmLine").style.display=""}else{this.getAjaxVcode();G("y_img").src=img_str+"&t="+Math.random()}},setAudio:function(){MyVcode.ifUpdateImg=false;if(audio_str==""){this.getAjaxVcode()}G("audioimg").style.display="";if(!document.all){G("audiocontent").innerHTML="<embed src="+audio_str+"&t="+Math.random()+" name=MediaPlayer type=video/x-ms-wmv autostart=1 showcontrols=1 allowscan=1 playcount=1 enablecontextmenu=0 height=0 width=0></object>"}else{G("audiocontent").innerHTML="<object height=0 width=0 classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6><param name=AutoStart value=1><param NAME=url value="+audio_str+"&t="+Math.random()+"><param name=PlayCount value=1>"}document.post.word1.focus()},check_img:function(){MyVcode.ifUpdateImg=false;document.post.word1.value="";document.post.word1.focus();G("y_img").src=img_str+"&t="+Math.random()},changeYImg:function(A){var B=A;B.src="http://static.tieba.baidu.com/tb/img/errorYimg.jpg"},getAjaxVcode:function(){antiAnswer.antiProcess();var url=antiAnswer.getVcodeUrl()+"&t="+Math.random();var xmlhttp=Ajax.getTransport();xmlhttp.open("GET",url,false);xmlhttp.send(null);var rst=eval("("+xmlhttp.responseText+")");img_str="/cgi-bin/genimg?"+rst.nbdSignStr;audio_str="http://tieba.baidu.com/cgi-bin/genaudio?"+rst.nbdSignStr;document.post.bs.value=rst.nbdSignStr},ifUpdateImg:true};var VCodePanel={yzm_str:'<INPUT onblur="MyVcode.ifUpdateImg=true;" onfocus="MyVcode.setYzm();" name=word1 autocomplete=off size=10 maxlength=10>&nbsp;请点击后输入验证码，加入会员后本吧发贴免验证码。<div style="padding-left:0px;display:none;" id=yzmLine><span id=synYzm></span>&nbsp;&nbsp;<span style="vertical-align:bottom;"><a href="javascript:MyVcode.check_img()">看不清？</a></span>&nbsp;&nbsp;<span   style="vertical-align:bottom;"><a id=audio href="javascript:MyVcode.setAudio();">收听验证码</a></span>&nbsp;<img id=audioimg style="display:none;vertical-align: bottom;padding-bottom:2px;" src="http://static.tieba.baidu.com/tb/img/audio.gif"/><span id=audiocontent></span></div>',isEmpty:function(){return(G("yzm").innerHTML==null||G("yzm").innerHTML=="")},show:function(){G("yzm").innerHTML=this.yzm_str;G("yzm_co").style.display="";G("yzm_ti").style.display=""},hide:function(){G("yzm").innerHTML="";G("yzm_co").style.display="none";G("yzm_ti").style.display="none"}};function f_escape(A){A=escape(A);return A}function f_trim(C){if(typeof C!="string"){return C}var B=C,A=B.substring(0,1);while(A==" "||A=="\r"||A=="\n"){B=B.substring(1,B.length);A=B.substring(0,1)}A=B.substring(B.length-1,B.length);while(A==" "||A=="\r"||A=="\n"){B=B.substring(0,B.length-1);A=B.substring(B.length-1,B.length)}while(B.indexOf("  ")!=-1){B=B.substring(0,B.indexOf("  "))+B.substring(B.indexOf("  ")+1,B.length)}return B}function textCount(B,A){if(B.value.length>A){B.value=B.value.substring(0,A)}}function ga(B,A){if(document.getElementById){a=B.id.substring(1);p="";r="";g=A.target;if(g){t=g.id;f=g.parentNode;if(f){p=f.id;h=f.parentNode;if(h){r=h.id}}}else{h=A.srcElement;f=h.parentNode;if(f){p=f.id}t=h.id}if(t==a||p==a||r==a){return true}window.open(document.getElementById(a).href,"_blank")}}function getByte(C){if(C){var B=C.match(/[^\x00-\xff]/ig);var A=C.length+(B==null?0:B.length);return A}}function alertGroup(){var A=new Popup({width:535,height:215,scrollType:"yes"});A.xwindow("/f?ct=486539264&tn=bdAdminGroup&word="+PageData.forum_name_u+"&cm=58567&rs7="+PageData.forum_id+"&t="+Math.random(),"吧务团队")}function buildParamDataString(D){var A=[];for(var B=0;B<D.length;B++){var C=D[B];if(C&&C[1]){A.push(C[0]+"="+encodeURIComponent((Element.isElem(C[1])?C[1].value:C[1])))}}return A.join("&")}function showMsg(){if(typeof (redmsg)!="undefined"){if(!redmsg||redmsg.length<1){return }G("sMsg").innerHTML=redmsg}}function delThread(A,B){A+=PageData.bu_url;if(B==1){if(confirm("此主题已有较多回复，您确认要删除?")){window.location.href=A;return }}else{window.location.href=A;return }return false}function resetReplyTitle(){if(!PageData.is_can_post){return false}CountPv.countNewTiePv();setTimeout(function(){document.post.ti.focus();document.post.ti.value=document.post.ti.value},300);return true}function f_click_old(C,B){var A=getByte(document.post.co.value);document.post.rs1.value="";B.checked=!C.checked;if(document.post.rs1&&document.post.rs1.checked){document.post.rs1.value=1}antiAnswer.antiProcess();if(PageData.is_need_verify||A>5000){VCodePanel.show()}else{VCodePanel.hide()}}function f_submit_old(){try{if(f_check_old()){var B=[["co",document.post.co],["ct",document.post.ct],["tn",document.post.tn],["word",document.post.word],["word1",document.post.word1],["lm",document.post.lm],["z",document.post.z],["sc",document.post.sc],["cm",document.post.cm],["bs",document.post.bs],["str2",document.post.str2],["str3",document.post.str3],["str4",document.post.str4],["bu",document.post.bu],["code",document.post.code],["ti",document.post.ti],["str1",document.post.str1],["ch1",document.post.ch1],["rs1",document.post.rs1]];var C=buildParamDataString(B);formApply_old(C)}}catch(A){}return false}function f_check_old(){var B=document.post.ti.value;if(B==""||B==null){G("tiError").innerHTML="标题不能为空";G("ti").focus();return false}antiAnswer.antiProcess();var A=getByte(document.post.co.value);if(PageData.is_need_verify||A>5000){if(!VCodePanel.isEmpty()){if(document.post.word1.value==""||document.post.word1.value==null){G("yzmError").innerHTML="验证码不能为空，请输入验证码";G("yzm").focus();return false}}}document.post.ti.value=f_trim(B);return true}function formApply_old(paramsStr){var url="/f";this.popup=null;var postProcess=function(xmlHttp){var rst=eval("("+xmlHttp.responseText+")");var no=rst.resultNo;var doAction=function(result){switch(result.getActionType()){case result.Action_FocusTitle:if(document.post.ti){document.post.ti.focus();document.post.ti.value=document.post.ti.value}break;case result.Action_FocusContent:if(document.post.co){document.post.co.focus();document.post.co.value=document.post.co.value}break;case result.Action_ClearYZM:if(document.post.word1){document.post.word1.value="";document.post.word1.focus()}break;case result.Action_FocusUrl:if(document.post.str1){document.post.str1.focus();document.post.str1.value=document.post.str1.value}break;case result.Action_GoToHead:document.location.hash="pgTop";break;case result.Action_FlushAndGoToHead:if(document.post.ti){document.post.ti.value=""}if(document.post.co){document.post.co.value=""}document.location.href=document.location.href.split("#")[0];break;default:break}};if(no==0){setTimeout(function(){doAction(rst)},500)}else{if(rst.isNeedWaitForCheck()){AlertPopup.alertMessage({width:340,height:165,title:"发表贴子",messageTitle:"等待审核...",content:rst.getMessage()},function(){doAction(rst);document.post.Submit3.disabled=false;return true})}else{AlertPopup.alertError({width:340,height:165,title:"发表贴子",messageTitle:"发贴失败",content:rst.getMessage()},function(){doAction(rst);document.post.Submit3.disabled=false;return true})}}};document.post.Submit3.disabled=true;new Ajax.Request(url,{method:"post",parameters:paramsStr,onComplete:function(xmlHttp){postProcess(xmlHttp)}})}function f_focus_old(){antiAnswer.antiProcess();var A=getByte(document.post.co.value);if(A>5000||PageData.is_need_verify){if(VCodePanel.isEmpty()){VCodePanel.show()}}}function f_showVerify_old(B){antiAnswer.antiProcess();var A=getByte(B.value);if(A>5000||PageData.is_need_verify){if(VCodePanel.isEmpty()){VCodePanel.show()}}else{VCodePanel.hide()}}function f_paste_old(){f_showVerify_old(document.post.co)}function f_init(){if(PageData.is_need_post){document.post.ti.value=PageData.ju_bao_text;document.post.ti.focus()}if(!PageData.is_vote_or_good&&document.post.ti.value!=""){if(document.post.rs1&&document.post.rs1.checked){document.post.rs1.value=1}antiAnswer.antiProcess();if(PageData.is_need_verify){VCodePanel.show()}}}function f_init_edit(){f_init();initPanel();initDragdata();var A=window.location.hash;if(A=="#model"){PanelCon.show()}}function f_click(C,B){var A=ContentInput?getByte(ContentInput.getHtml()):0;document.post.rs1.value="";B.checked=!C.checked;if(document.post.ch1.checked){SignNameApply.active()}if(document.post.rs1.checked){document.post.rs1.value=1;G("signNamePanel").style.display="none"}else{G("signNamePanel").style.display=""}antiAnswer.antiProcess();if(PageData.is_need_verify||A>5000){VCodePanel.show()}else{VCodePanel.hide()}}function f_submit(){try{if(f_check()){var B=[["co",ContentInput.getHtml()],["ct",document.post.ct],["tn",document.post.tn],["word",document.post.word],["word1",document.post.word1],["lm",document.post.lm],["z",document.post.z],["sc",document.post.sc],["cm",document.post.cm],["bs",document.post.bs],["str2",document.post.str2],["str3",document.post.str3],["str4",document.post.str4],["bu",document.post.bu],["code",document.post.code],["ti",document.post.ti],["ch1",document.post.ch1],["rs1",document.post.rs1],["rs4",document.post.rs4]];if(document.post.ch1&&document.post.ch1.checked&&document.post.useSignName&&document.post.useSignName.checked){B[B.length]=["rs10",document.post.signName]}var C=buildParamDataString(B);formApply(C)}}catch(A){}return false}function f_check(){var B=document.post.ti.value;if(B==""||B==null){G("tiError").innerHTML="标题不能为空";G("ti").focus();return false}var C=ContentInput.getImageNum();if(C>g_pg.imageLimite){G("coError").innerHTML="抱歉，每层楼插入的图片不能超过"+g_pg.imageLimite+"张，请修改后重新提交";ContentInput.focus();return false}var E=ContentInput.getFlashNum();if(E>g_pg.flashLimite){G("coError").innerHTML="抱歉，每层楼插入的视频不能超过"+g_pg.flashLimite+"个，请修改后重新提交";ContentInput.focus();return false}var D=ContentInput.getSmileyNum();if(D>g_pg.smileyLimite){G("coError").innerHTML="抱歉，每层楼插入的表情不能超过"+g_pg.smileyLimite+"个，请修改后重新提交";ContentInput.focus();return false}var A=getByte(ContentInput.getHtml());antiAnswer.antiProcess();if(PageData.is_need_verify||A>5000){if(G("yzm").innerHTML!=null||G("yzm").innerHTML!=""){if(document.post.word1.value==""||document.post.word1.value==null){G("yzmError").innerHTML="验证码不能为空，请输入验证码";G("yzm").focus();return false}}}document.post.ti.value=f_trim(B);return true}function formApply(paramsStr){var url="/f";this.popup=null;var postProcess=function(xmlHttp){var rst=eval("("+xmlHttp.responseText+")");var no=rst.resultNo;var doAction=function(result){switch(result.getActionType()){case result.Action_FocusTitle:if(document.post.ti){document.post.ti.focus();document.post.ti.value=document.post.ti.value}break;case result.Action_FocusContent:setTimeout(function(){ContentInput.focus()},400);break;case result.Action_ClearYZM:if(document.post.word1){document.post.word1.value="";document.post.word1.focus()}break;case result.Action_FocusUrl:setTimeout(function(){ContentInput.focus()},400);break;case result.Action_GoToHead:document.location.hash="pgTop";break;case result.Action_FlushAndGoToHead:if(document.post.ti){document.post.ti.value=""}ContentInput.clearHtml();document.location.href=document.location.href.split("#")[0];break;default:break}};if(no==0){setTimeout(function(){doAction(rst)},500)}else{if(rst.isNeedWaitForCheck()){AlertPopup.alertMessage({width:340,height:165,title:"发表贴子",messageTitle:"等待审核...",content:rst.getMessage()},function(){doAction(rst);document.post.Submit3.disabled=false;return true})}else{AlertPopup.alertError({width:340,height:165,title:"发表贴子",messageTitle:"发贴失败",content:rst.getMessage()},function(){doAction(rst);document.post.Submit3.disabled=false;return true})}}};document.post.Submit3.disabled=true;new Ajax.Request(url,{method:"post",parameters:paramsStr,onComplete:function(xmlHttp){postProcess(xmlHttp)}})}function f_focus(){if(PageData.is_logined){if(document.post.ch1.checked){SignNameApply.active()}}antiAnswer.antiProcess();if(PageData.is_need_verify){if(VCodePanel.isEmpty()){VCodePanel.show()}}}function tikeydown(E){var B=1000,A=2000,D=4000,I=9;var E=E||window.event;var H=E.which||E.keyCode||E.charCode;var F=0;if(E.ctrlKey||E.metaKey){F+=B}if(E.shiftKey){F+=A}if(E.altKey){F+=D}var C=H+F;if(C==I&&ContentInput){ContentInput.focus();return false}return true}function f_showVerify(){antiAnswer.antiProcess();var A=getByte(ContentInput.getHtml());if(A>5000||PageData.is_need_verify){if(VCodePanel.isEmpty()){VCodePanel.show()}}else{VCodePanel.hide()}}function f_paste(){if(PageData.is_logined){SignNameApply.active()}f_showVerify()}function f_initi(){if(PageData.is_need_post){document.post.ti.value=PageData.ju_bao_text;document.post.ti.focus()}if(!PageData.is_vote_or_good&&document.post.ti.value!=""){if(document.post.rs1&&document.post.rs1.checked){document.post.rs1.value=1}antiAnswer.antiProcess();if(PageData.is_need_verify){VCodePanel.show()}}}function changePage(H,E,A,D,B){if(A>0&&A<=D){var C=0;var F=/&pn=[^&]+/;if(F.exec(B)){B=RegExp.leftContext+RegExp.rightContext}C=(A-1+H)*E;if(C>=0&&C<=(D-1)*E){window.location.href=B+"&pn="+C}return true}return false}function keyupChangePage(B){var C=B||window.event;var A=C.srcElement||C.target;if(A.tagName!="input"&&A.tagName!="INPUT"&&A.tagName!="textarea"&&A.tagName!="TEXTAREA"){switch(C.keyCode){case 37:changePage(-1,PageData.pageDataNum,PageData.curr_page_num,PageData.all_page_num,PageData.curURL);break;case 39:changePage(1,PageData.pageDataNum,PageData.curr_page_num,PageData.all_page_num,PageData.curURL);break}}}var nPopup=null;function setMemberName(){nPopup=new Popup({width:400,height:120});nPopup.xwindow("/f?ct=486539264&cm=59112&lm="+PageData.forum_id+"&word="+PageData.forum_name_u+"&word1="+PageData.member_name_u+"&tn=memberNameSet","设置")}function memApply(){var url="/f";var pars="ct=486539264&cm=59107&lm="+PageData.forum_id+"&word="+PageData.forum_name_u+"&tn=resultNo";new Ajax.Request(url,{method:"post",parameters:pars||"",onComplete:function(xmlHttp){this.postProcess(xmlHttp)}});this.popup=null;this.postProcess=function(xmlHttp){var JData="("+xmlHttp.responseText+")";var rst=eval(JData);var no=rst.resultNo;if(no=="0"){this.popup=new Popup({width:470,height:200});this.popup.xwindow("/f?ct=486539264&cm=59105&lm="+PageData.forum_id+"&word="+PageData.forum_name_u+"&tn=memberApply","会员申请")}else{this.popup=new Popup({width:370,height:300});this.popup.xwindow("https://passport.baidu.com/?login&psp_tt=2&tpl=tb&fu=http%3A//static.tieba.baidu.com/tb/TBjump.html%3Ftype%3D0&u="+escape(top.location),"您尚未登录")}}}var CountPv={count:function(B){var A=new Image();window["bd_pv_"+(new Date().getTime())]=A;A.src="http://static.tieba.baidu.com/tb/img/pv.gif?t="+new Date().getTime()+"&"+B},countDirPv:function(){setTimeout(function(){CountPv.count("area=frs_dir")},10)},countNewTiePv:function(){setTimeout(function(){CountPv.count("area=frs_newTie")},10)},countNewTouPiaoPv:function(){setTimeout(function(){CountPv.count("area=frs_newTouPiao")},10)}};function FrsAdStyle(F){var D;var A;function E(){D=frs_ad_data[F];A=F}function B(){var J="<style>		#frsHTagPanel{background: transparent url('#img_nav#') no-repeat right -51px;}		#frsHTagPanel .frsHTagUnSelected a:hover{background-color:#color_hover#;}		#frsHTagPanel .frsHTagSelected div{background: transparent url('#img_nav#') repeat-x 0 -27px;}		#frsHTagPanel .frsHTagNewTie{background: transparent url('#img_nav#') no-repeat -1px -1px;}		#frsHTagPanel .frsHTagNewTouPiao{background: transparent url('#img_nav#') no-repeat -74px -1px;}		#tbList{background: url('#img_watermark#') no-repeat 50% 86% ;}		</style>";var H="<style>		#frsHTagPanel{width:100%;background:transparent url('#img_nav#') repeat-x 0 0;height:29px;overflow:hidden;}		#frsHTagPanel td{line-height:29px;}		#frsHTagPanel .frsHTag{font-size:12px;color:#fff;text-align:center;margin-left:10px;}		#frsHTagPanel .frsHTag a{overflow:hidden;text-decoration:underline;color:#fff;}		#frsHTagPanel .frsHTagFix{width:50px;}		#frsHTagPanel .frsHTagSelected div{height:29px;overflow:hidden;line-height:31px;border:none;}		#frsHTagPanel .frsHTagBtn a{height:auto;display:block;}		#frsHTagPanel .frsHTagUnSelected .frsHTagFix a{margin-right:2px;margin-left:2px;}		#frsHTagPanel .frsHTagSelected .frsHTagUnFix{padding:0 6px;}		#frsHTagPanel .frsHTagUnSelected .frsHTagUnFix a{margin-right:2px;margin-left:2px;padding:0 4px;}		#frsHTagPanel .frsHTagSelected #tooShortTag{padding:0 16px;}		#frsHTagPanel .frsHTagUnSelected #tooShortTag a{margin-right:2px;margin-left:2px;padding:0 14px;}		#frsHTagPanel .frsHTagSelected a{color:#fff;text-decoration:none;}		#frsHTagPanel .frsHTagSelected{font-weight:bold;}		#frsHTagPanel .frsHTagSpace div{width:6px;}		#frsHTagPanel .frsHTagNewTie{width:86px;height:29px;line-height:29px;background:transparent url('#img_nav#') repeat-x 0 -29px;margin-top:0px;}		#frsHTagPanel .frsHTagNewTouPiao{width:86px;height:29px;line-height:29px;background:transparent url('#img_nav#') repeat-x 0 -29px;margin-top:0px;}		</style>";var K="";if(A!="nike"){K=J}else{K=H}for(var I in D){K=K.replace(new RegExp("#"+I+"#","ig"),D[I])}document.write(K)}function C(){if(document.title){document.title=document.title.replace(/^百度贴吧_/,"百度贴吧_"+D.title+"_")}}this.set_logo=function(){var H=document.getElementById("hdSearch").getElementsByTagName("IMG")[0];if(H){if(H.src.indexOf("img/post-jg.gif")>-1){H.src=D.img_logo}}};this.set_rili_logo=function(){if(G("rili_ad_logo")){G("rili_ad_logo").href=D.rili_logo_href;G("rili_ad_logo").onclick=function(){ForHeader.countPV("area="+A+"LogoMode")};var H=G("rili_ad_logo").getElementsByTagName("img")[0];if(H){H.src=D.img_rili_imgsrc}}};E();C();B()}var Manager={data:{team_link:'<a href="#" onClick="alertGroup();return false;">吧主</a>：',getCandidatesLink:function(A,C){var B="查看"+A+"位吧主候选人";if(PageData.manager_num>0&&"voting"==C){B="给"+A+"位吧主候选人投票"}return'[<a href="/manager-apply/view/list?kw='+PageData.forum_name_u+'" target="_blank" style="color:#261CDC;">'+B+"</a>]"},getApplyLink:function(C,A){if(C){return'[<a href="/manager-apply/view/apply?kw='+PageData.forum_name_u+'" target="_blank" onclick="return Manager.apply.verify();" style="color:#261CDC;">申请</a>]'}else{var B="";if(!A){B='<a href="/manager-apply/view/apply?kw='+PageData.forum_name_u+'" target="_blank" class="tbManagerApply" onclick="return Manager.apply.verify();" title="申请本吧吧主"></a>'}else{B=this.team_link+'[<a href="/manager-apply/view/apply?kw='+PageData.forum_name_u+'" target="_blank" onclick="return Manager.apply.verify();" style="color:#261CDC;">申请</a>]'}return B}},getManageApplying:function(){var A="";if(PageData.manager_num==0){A=this.team_link}return A+'<span style="background:#b8b8b8;padding:4px 5px 1px;color:#fff;">申请处理中</span>'},_getMemberHandleLink:function(){return'<a href="/f?ct=486539264&cm=59106&lm='+PageData.forum_id+"&word="+PageData.forum_name_u+'&tn=memberCenter#2" target="_blank">有会员申请</a>'},_getCandidateHandleLink:function(A){return'<a href="/manager-apply/view/approve?kw='+PageData.forum_name_u+'" target="_blank">'+A+"个吧主申请</a>"},getAdminTip:function(B){var A=['<table cellpadding="0" cellspacing="0"><tr>'];A.push('<td valign="top"><p class="tbNeedHandle">待处理：</p></td>');A.push("<td><ul>");if(B>0){A.push("<li>"+this._getCandidateHandleLink(B)+"</li>")}if(PageData.member_status=="3"){A.push("<li>"+this._getMemberHandleLink()+"</li>")}A.push("</ul></td></tr></table>");A.push('<p class="tbAdminTipDivide"></p>');return A.join("")}}};Manager.apply={tip_dialog:null,has_right:false,verify:function(){var passport_url="https://passport.baidu.com/?login&psp_tt=2&tpl=tb&fu=http%3A//static.tieba.baidu.com/tb/TBjump.html%3Ftype%3D0&u="+escape(top.location);var url="/manager-apply/data/right?dtype=json&fid="+PageData.forum_id+"&kw="+PageData.forum_name_u+"&t="+new Date().getTime().toString(32);var xmlhttp=Ajax.getTransport();xmlhttp.open("GET",url,false);xmlhttp.send(null);var data=eval("("+xmlhttp.responseText+")");if(typeof data=="undefined"){return false}var dialog_height={not_member:124,is_voting:94,not_meet_limit:134,banned_forum:94,meet_max_apply:94,meet_max_manager:94,is_prisoner:94,fired_manager:94,banned_user:134,is_manager:94,manager_is_full:94,is_applying:94};this.has_right=data.can_apply;if(!data.can_apply){if(data.invalid_type=="not_login"){Manager.apply.tip_dialog=new Popup({width:370,height:300});Manager.apply.tip_dialog.xwindow(passport_url,"您尚未登录")}else{var h=94;if(data.invalid_type in dialog_height){h=dialog_height[data.invalid_type]}var html=data.apply_error+'<p style="padding:5px 0 10px;text-align:center;"><input type="button" onclick="Manager.apply.tip_dialog.close();" value="确 定" style="width:75px;" /></p>';html=html.replace(/#memIndexLink#/ig,document.getElementById("memIndexLink").href);Manager.apply.tip_dialog=new Popup({width:470,height:h});Manager.apply.tip_dialog.html(html,"吧主申请")}}return this.has_right},open:function(A){window.open(A);Manager.apply.tip_dialog.reset()}};Manager.displayApplyInfo=function(){var params=["dtype=json","ie=gbk"];params.push("kw="+PageData.forum_name_u);params.push("fid="+PageData.forum_id);params.push("is_mgr="+PageData.is_manager);params.push("mgr_num="+PageData.manager_num);params.push("t="+new Date().getTime().toString(32));var url="/manager-apply/data/frs?"+params.join("&");new Ajax.Request(url,{method:"get",parameters:"",onComplete:function(xhr){var data=eval("("+xhr.responseText+")");if(typeof data=="undefined"){return }var apply_html="";if(data.is_applying){apply_html=Manager.data.getManageApplying()}else{if(PageData.manager_num==0){apply_html=Manager.data.getApplyLink(false,data.is_banned)}else{if(PageData.is_manager!=1){apply_html=Manager.data.getApplyLink(true,false)}}}G("tbManagerApply").innerHTML=apply_html;if(data.candidates_num>0){G("tbManagerCandidatesNum").innerHTML=Manager.data.getCandidatesLink(data.candidates_num,data.state)}if(PageData.is_manager==1&&(PageData.member_status=="3"||data.unhandled_manager_num>0)){G("tbAdminTip").innerHTML=Manager.data.getAdminTip(data.unhandled_manager_num)}}})};Manager.displayMemberApplyInfo=function(){if(PageData.is_manager==1&&PageData.member_status=="3"){G("tbAdminTip").innerHTML=Manager.data.getAdminTip(0)}};String.prototype.getByteLength=function(){return this.replace(/[^\x00-\xff]/g,"mm").length};String.prototype.subByte=function(C){if(this.getByteLength()<=C){return this}for(var B=Math.floor((C=C-2)/2),A=this.length;B<A;B++){if(this.substr(0,B).getByteLength()>=C){return this.substr(0,B)+"\u2026"}}return this};var resizePic=function(C,A,J,D){var H=A||120;var E=J||120;var F=C;if(F.width==0){var I=this;var L=arguments;setTimeout(function(){L.callee.apply(I,L)},10);return false}function K(M,P,N,R){var O=0,Q=M,S=P;if(M>N){O+=1}if(P>R){O+=2}switch(O){case 1:Q=N;Q=P*N/M;case 2:S=R;Q=M*R/P;case 3:S=(P/R>M/N)?R:P*N/M;Q=(P/R>M/N)?M*R/P:N}return[Q,S]}var B=K(F.width,F.height,H,E);C.style.width=B[0]+"px";C.style.height=B[1]+"px";C.style.visibility="visible";if(D==true){C.style.marginTop=(J-parseInt(B[1]))/2+"px"}};var frs_adright=function(){var B=G("i_ad_rlist").getElementsByTagName("span");for(var A=0;A<B.length;A++){B[A].getElementsByTagName("b")[0].innerHTML=feed_type[""+B[A].getAttribute("type")];B[A].getElementsByTagName("a")[0].innerHTML=B[A].getElementsByTagName("a")[0].innerHTML.subByte(24)}};var frs_adleft=function(){var O=G("feedlist").getElementsByTagName("div");var H="";var K="";var D="";var E="";for(var C=0;C<O.length;C++){E="";H=O[C].getAttribute("prod");K=O[C].getAttribute("type");D=O[C].getAttribute("num");if(O[C].className=="iline"){if("2"==H&&"2"==K){E="i&nbsp;贴&nbsp;&nbsp;"}else{if("1"==K&&parseInt(D)>1){E=""+D+"次"}E+=feed_type[""+K]}O[C].getElementsByTagName("b")[0].innerHTML=E}if(feed_type[""+O[C].getAttribute("type")]=="投票"){O[C].getElementsByTagName("b")[1].innerHTML="[<font color=#009933>投票</font>]"}}var L=new Array();var A=new Array();(function M(){var Q=G("feedlist").getElementsByTagName("a");for(var P=0;P<Q.length;P++){if(Q[P].className=="i_tit"){L[L.length]=Q[P].innerHTML;A[A.length]=Q[P]}}})();function J(R){var S=G("feedlist").getElementsByTagName("a");var P=new Array();for(var Q=0;Q<A.length;Q++){A[Q].innerHTML=L[Q].subByte(R)}}var N=65;J(N);function F(Q,R){var P=new Array();for(C=0;C<R.length;C++){P[P.length]=Math.abs(Q-R[C])}min_idx=0;for(C=1;C<P.length;C++){if(P[C]<P[min_idx]){min_idx=C}}return R[min_idx]}var B={893:40,1068:50,1130:70,1200:85,1330:180,1430:200};function I(){var Q=1150;var P=document.body.clientWidth;if(P<Q){J(N-Math.floor((Q-P)/10*1.5))}else{J(N)}}I();Event.observe(window,"resize",I)};function memPopTequan(){var A=new Popup({width:540,height:200});A.setContent("title","会员特权");A.alert('<div style="text-align:left;font-size:12px; line-height:20px">&#8226;&nbsp;享受本吧发贴免验证码的优待，让发贴更简单、更顺畅！<br>&#8226;&nbsp;本吧发贴时每楼可插入多张图片、多个视频，让你的贴子瞬时生动起来！<br>&#8226;&nbsp;随时随地在吧内发起投票，大家喜欢什么，讨厌什么，发个投票就知道！<br>&#8226;&nbsp;拥有申请本吧吧主的资格，我的贴吧我做主！<br>&#8226;&nbsp;独享本吧会员专属个性昵称，随时展现你的身份！<br>&#8226;&nbsp;......</div>')}var FrsStatistics={config:{small_tower:"",big_tower:""},addParams:function(B,C){var A=this.getUrl(B,C);_html=B.innerHTML;B.href=A;B.innerHTML=_html},getUrl:function(D,F){var B="";B=D.href;var E=B;var C="";var A=B.indexOf("#");if(A>=0){E=B.slice(0,A);C=B.slice(A)}E+=(E.indexOf("?")==-1?"?":"&");B=E+F+C;return B},sendRequest:function(B){if(document.images){var A=new Image();window["bd_pv_"+(new Date().getTime())]=A;A.src="http://static.tieba.baidu.com/tb/img/pv.gif?"+B+"&t="+new Date().getTime();A=null}},work:function(D){var F=document.getElementById(D.id);var C=D.type;if(F){var H=F.getElementsByTagName("a");var E=null;var B="";for(var A=H.length;A>0;A--){E=H[A-1];if(E.getAttribute("st_type")!=null){E.onclick=function(){FrsStatistics.statistics(this)}}}H=null}},statistics:function(B){var A=B.getAttribute("st_mod");var C=FrsStatistics.config[A];FrsStatistics.sendRequest(C)}};