function addManageBtn(e,b){if(!g_clubInfo.userInfo){return false;}if(!addManageBtn.obj){addManageBtn.obj={NoticeApp:{txt:"编辑信息公告",noSepar:true,fun:function(){Eagle.changeMenu("manageNotice");return false;}},BookSelfApp:{txt:"管理书架",fun:function(){Eagle.changeMenu("manageBookSelf");return false;}},TopicApp:{txt:"管理版块",fun:function(){Eagle.changeMenu("manageSection");return false;}},ReportApp:{txt:"管理成员",fun:function(){Eagle.changeMenu("manageAllMember");return false;}}};}if(g_clubInfo.isAdmin&&(g_clubInfo.isAdmin===8||g_clubInfo.isAdmin===9)){var a=addManageBtn.obj[b];var d=GD.createElement("a",{href:"javascript:;",innerHTML:a.txt,hideFocus:true,title:a.txt});$(d).click(a.fun);e.appendChild(d);if(!a.noSepar){var c=GD.createElement("span",{className:"m_lr5",innerHTML:"|"});e.appendChild(c);c=null;}a=d=null;}}Module.prototype.generatePluginDom=function(){};var ClubMenu=(function(c,b,a){Menu.apply(this,arguments);}).extend(Menu);GD.$extend(ClubMenu.prototype,{panelType:"ClubMenu",generatePnl:function(){return GD$("club_menu_list");},$render:function(){var c,b;for(var a in this.menuItem){c=this.menuItem[a];b=this.renderMenu(c);if(b){this.itemDom.push(b);this.panelDom.appendChild(b);}}},renderMenu:function(c){if(!c){return null;}var b='<span class="left"></span><a href="javascript:;" hideFocus="true">'+(c.name||"")+'</a><span class="right"></span>';var a=GD.createElement("li",{innerHTML:b});$(a).click(function(){Eagle.changeMenu(c.href||"main");return false;});b=null;return a;},clearSelected:function(a){if(this.selectDom){this.selectDom.className=a||"";}},setSelected:function(d,c,a){this.clearSelected(c);for(var b in this.item){if(this.item[b]["href"]==d){this.itemDom[b].className=a;this.selectDom=this.itemDom[b];break;}}}});var SideMenu=(function(c,b,a){Menu.apply(this,arguments);}).extend(Menu);GD.$extend(SideMenu.prototype,{panelType:"SideMenu",className:"m_nav backBG_0 borWidth borColor_1",$render:function(){var f,d,e,a;this.item=[];for(var c in this.menuItem){f=this.menuItem[c];e=GD.createElement("h2",{className:"backBG_1 borColor_1"},[["img",{src:"http://x.9917.com/themes/css/q/img/b.gif",className:"icons "+f.className}],["span",{innerHTML:f.title}]]);a=GD.createElement("ul",{className:"color_2"});for(var b in f.items){d=this.renderMenu(f.items[b]);if(d){this.itemDom.push(d);this.item.push(f.items[b]);a.appendChild(d);}}this.panelDom.appendChild(e);this.panelDom.appendChild(a);}},renderMenu:function(b){var a=GD.createElement("li",{},[["span",{innerHTML:"└"}],["a",{href:"javascript:;",hideFocus:true,innerHTML:b.name}]]);$(a).find("a:eq(0)").click(function(){Eagle.changeMenu(b.href);return false;});return a;},clearSelected:function(a){if(this.selectDom){this.selectDom.className=a||"";}},setSelected:function(e,d,a){this.clearSelected(d);for(var c in this.item){if(this.item[c]["href"]==e){var b=$(this.itemDom[c]).find("a:eq(0)").get(0);b.className=a;this.selectDom=b;break;}}}});var ManageContApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(ManageContApp.prototype,{panelType:"ManageContApp",className:"m_right backBG_0 borWidth borColor_1",$init:function(){var a=GD.createElement("div",{className:"columnTitle backBG_1"},[["h2",{className:"C_T_Left",innerHTML:'<img class="i_15 icons" src="http://x.9917.com/themes/css/q/img/b.gif" />圈子管理后台首页'}]]);var b=GD.createElement("div",{className:"m_r_frame p_t15"},[["div",{className:"loginInfo"},[["div",{className:"clubinfo borColor_1"},[["h3",{innerHTML:"圈子信息"}],["dl",{},[["dt",{innerHTML:'<img class="img64 borColor_1" src="'+GD.getClubPic("m",g_clubInfo.NCid)+'" _clubLogo="m" />'}],["dd",{innerHTML:"<strong>"+g_clubInfo.SName+"</strong>"}],["dd",{innerHTML:'圈主：<a href="'+GD.getUserHome(g_clubInfo.manageCache.master.NUserid)+'" target="_blank" title="" hideFocus="true">'+g_clubInfo.manageCache.master.SNickname+"</a>"}],["dd",{className:"color_2",innerHTML:"创建时间："+g_clubInfo.DCreate.substr(0,10)}],["dd",{innerHTML:'本圈总访问量：<strong class="color_1">'+g_clubInfo.NAccess+"</strong>"}]]]]],["div",{className:"myinfo"},[["h3",{innerHTML:"我的信息"}],["dl",{},[["dt",{innerHTML:'<a href="'+GD.getUserHome(g_clubInfo.userInfo[0])+'" title="" hideFocus="true" target="_blank"><img class="img48 borColor_1" src="'+GD.getUserPic("m",g_clubInfo.userInfo[0])+'" /></a>'}],["dd",{innerHTML:'欢迎你：<strong><a href="'+GD.getUserHome(g_clubInfo.userInfo[0])+'" title="" hideFocus="true" target="_blank">'+g_clubInfo.userInfo[1]+"</a></strong>"}],["dd",{className:"color_2",innerHTML:(g_clubInfo.isAdmin===9?"圈主":"副圈主")}],["dd",{innerHTML:'<a href="'+GD.getUserHome(g_clubInfo.userInfo[0])+'" title="" hideFocus="true" target="_blank">去我的个人空间</a>'}]]]]]]],["div",{className:"trends",ref:"dynamic"},[["h2",{className:"borColor_1",innerHTML:"圈子最新动态"}]]]]);this.panelDom.appendChild(a);this.panelDom.appendChild(b);this.dynamicElem=b.refs.dynamic;b=null;},$render:function(){var a=this;var b={m:"getDynamic",cid:g_clubInfo.NCid};Ajax("/do/find/q/dataFeed.do",b,function(d){if(d&&d.code=="0"){var c=['<h2 class="borColor_1">圈子最新动态</h2>','<p>今天共有<strong class="m_lr5 color_1">$newMemberCount$</strong>位新成员加入 需要审批通过的有<strong class="m_lr5 color_1">$newApplyCount$</strong>位。</p>','<p>今天圈子共有<strong class="m_lr5 color_1">$newTopicCount$</strong>篇主贴</p>','<p>今天共有<strong class="m_lr5 color_1">$newReportCount$</strong>位成员报到</p>'];var e=d.obj["data"];a.dynamicElem.innerHTML=GD.T(c.join("")).replace({newApplyCount:e.newApplyCount,newTopicCount:e.newTopicCount,newReportCount:e.newReportCount,newMemberCount:e.newMemberCount});a.dynamicElem=e=null;}});}});var NoticeApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(NoticeApp.prototype,{panelType:"NoticeApp",className:"homePost backBG_0 borWidth borColor_1",$init:function(){var c=document.createDocumentFragment();var b=GD.createElement("div",{className:"columnTitle backBG_1"},[["h2",{className:"C_T_Left"},[["img",{className:"i_01 icons",src:"http://x.9917.com/themes/css/q/img/b.gif"}],["q",{innerHTML:"圈子信息/公告："}],["span",{ref:"Title"}]]],["div",{className:"C_T_Right",ref:"T_R"}]]);addManageBtn(b.refs.T_R,this.panelType);var a=GD.createElement("div",{className:"homePostContent",innerHTML:"正在加载....",ref:"Cont"});c.appendChild(b);c.appendChild(a);this.panelDom.appendChild(c);this.Title=b.refs.Title;this.Cont=a;c=b=a=foot=null;},$onRender:function(){},$render:function(){var a=this;var b=GD.PathParse(g_clubInfo.NCid,"club")+"/_notice.js";var c=new GD.JsLoader();c.onload=function(){if(typeof _notice==="undefined"){this.onerror();}else{a.Cont.style.overflow="hidden";a.update(_notice.STitle,_notice.SText);}};c.onerror=function(){a.Cont.innerHTML="圈子开通啦，大家都来加入吧！";};c.load(b);b=null;},update:function(a,b){this.Title.innerHTML=GD.clearLabel(a)||"";this.Cont.innerHTML=b||"";},$dispose:function(){}});var BookSelfApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(BookSelfApp.prototype,{panelType:"BookSelfApp",className:"homeBook backBG_0 borWidth borColor_1 m_t6",$init:function(){var d=document.createDocumentFragment();var b=GD.createElement("div",{className:"columnTitle backBG_1"},[["h2",{className:"C_T_Left",innerHTML:'<img class="i_02 icons" src="http://x.9917.com/themes/css/q/img/b.gif" />圈子书架推荐'}],["div",{className:"C_T_Right",ref:"T_R"}]]);addManageBtn(b.refs.T_R,this.panelType);var c=GD.createElement("a",{title:"查看圈子内更多的作品",innerHTML:"查看更多的作品»",hideFocus:true});b.refs.T_R.appendChild(c);$(c).click(function(){Eagle.changeMenu("book","/q/book/index.html");return false;});c=null;b.refs=null;var a=GD.createElement("div",{className:"homeBookList"},[["div",{className:"homeBL_Top",innerHTML:'<span class="homeBL_T_left"></span><span class="homeBL_T_right"></span>'}],["div",{className:"homeBL_Center"},[["div",{className:"homeBL_C_frame"},[["ul",{className:"book_list clearfix",ref:"Cont",innerHTML:"<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>"}]]]]]]);d.appendChild(b);d.appendChild(a);this.panelDom.appendChild(d);this.Cont=a.refs.Cont;d=a=b=null;},$onRender:function(){},$render:function(){var a=this;var b={m:"getBookShelfList",cid:g_clubInfo.NCid};Ajax("/club/qAjax.frm",b,function(g){if(g&&g.data){var d=[],f;for(var e=0,c=g.data.length;e<c;e++){f=g.data[e];d.push(["<li>",'<a href="'+GD.getBookURL(f.bid)+'" hideFocus="true" title="" target="_blank"><img class="book_img" src="'+GD.getBookPic("s",f.bid)+'" /><em>'+f.bn.uniLeft(14)+"</em></a>","</li>"].join(""));}while(e<8){d.push("<li></li>");e++;}a.Cont.innerHTML=d.join("");delete a.Cont;a.Cont=f=e=null;}});},$dispose:function(){}});var TopicApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(TopicApp.prototype,{panelType:"TopicApp",className:"homeDiscuss backBG_0 borWidth borColor_1 m_t6",$init:function(){var frag=document.createDocumentFragment();var head=GD.createElement("div",{className:"columnTitle backBG_1"},[["h2",{className:"C_T_Left",innerHTML:'<img class="i_03 icons" src="http://x.9917.com/themes/css/q/img/b.gif" />讨论区最新帖子'}],["div",{className:"C_T_Right",ref:"T_R"},[["a",{href:"javascript:;",innerHTML:"刷新",title:"点击刷新获取最新帖子信息",hideFocus:true,ref:"Refresh"}],["span",{className:"m_lr5",innerHTML:"|"}]]]]);$(head.refs.Refresh).click(function(){this.$render();return false;}.bind(this));addManageBtn(head.refs.T_R,this.panelType);var tempAdd=GD.createElement("a",{innerHTML:"发表新帖",title:"点击发表新帖",hideFocus:true,href:"javascript:;"});head.refs.T_R.appendChild(tempAdd);$(tempAdd).click(function(){Eagle.appearTopic();return false;});var C=[],E="/q/topic/index.frm?cid="+g_clubInfo.NCid;C.push("<strong>版块：</strong>");C.push('<a href="'+E+'" hideFocus="true" onclick="Eagle.changeMenu(\'topic\',this.href);return false;"><span>全部版块</span></a>');if(typeof(Section)!=="undefined"){for(var i=0,len=Section.length;i<len;i++){if(Section[i].SState&&Section[i].SState==="0"){continue;}var G=Section[i]["NSectionid"];C.push('<span class="m_lr5">|</span>');C.push('<a href="'+E+"&NSectionid="+G+'" hideFocus="true" onclick="Eagle.changeMenu(\'topic\',this.href);return false;"><span>'+Section[i]["SName"]+"</span></a>");G=null;}}C.push('<span class="m_lr5">|</span>');C.push('<a href="'+E+'&NSectionid=0" hideFocus="true" onclick="Eagle.changeMenu(\'topic\',this.href);return false;"><span>未分版块帖</span></a>');var D=GD.$CE("div");D.className="columnList";with(D.style){width="710px";lineHeight="22px";height="auto";textAlign="left";paddingLeft="10px";paddingTop="5px";clear="both";}D.innerHTML=C.join("");var pagePanel=GD.createElement("div",{style:{clear:"both"}},[["div",{className:"pagination",ref:"pageBar"}],["div",{style:{clear:"both"}}]]);var cont=GD.createElement("div",{className:"Discuss backBG_2 borWidth borColor_2"},[["h2",{className:"theme",innerHTML:"帖子主题"}],["h2",{className:"author",innerHTML:"发帖人"}],["h2",{className:"restore",innerHTML:"回复/阅读"}]]);var foot=GD.createElement("div",{className:"discussList"},[["ul",{innerHTML:"<li class='loading_data' style='height:100px;'></li>",ref:"Cont"}]]);frag.appendChild(head);frag.appendChild(D);frag.appendChild(pagePanel);frag.appendChild(cont);frag.appendChild(foot);this.panelDom.appendChild(frag);this.Cont=foot.refs.Cont;this.pagePanel=pagePanel.refs.pageBar;D=frag=head=cont=foot=pagePanel=null;},pageHandler:function(b){if(!b.totalRowCount||!b.requestPageNum||!this.pagePanel){return false;}else{if(b.totalRowCount<=b.perPageRowCount){return false;}}function a(d){Eagle.changeMenu("topic","/q/topic/index.frm?styleId="+clubConfig.styleId+"&cid="+g_clubInfo.NCid+"&p="+d);}var c=$(this.pagePanel);c.pagination(b.totalRowCount,{callback:function(d){a(d+1);},current_page:b.requestPageNum-1,items_per_page:b.perPageRowCount,prev_show_always:false,next_show_always:false,reDraw:false,num_edge_entries:1,num_display_entries:8,skip_page_opt:{cot:'查看第<input name="" type="text" class="textbox_1 borWidth borColor_1" />页<button type="button" class="but_txt01">GO</button>',className:"jump",tagName:"div"}}).css({"margin-top":"8px","margin-right":"8px"});newPagination(b.totalPageCount,a,c);c=null;},$onRender:function(){},$render:function(){var a=this;var b={cid:g_clubInfo.NCid,m:"getTopicList"};GD.clearChildNodes(a.Cont);a.Cont.innerHTML="<li class='loading_data' style='height:100px;'></li>";Ajax("/club/qAjax.frm",b,function(c){if(c&&c.page){if(c.data){a.pageHandler(c.page);a.showData(c.data);}else{a.loadErr(a.getDefultData()||"暂无相关数据，<a href='javascript:;' hideFocus='true' onclick='Eagle.appearTopic();return false;'>点击发表帖子</a>");}}else{a.loadErr(c.msg);}a.pagePanel=null;},function(){a.loadErr();});b=null;},getDefultData:function(){if(GlobalTopData){var a=[];for(var b in GlobalTopData){a.push(new GD.T(["<li $bgClass$>",'<span class="discussTitle">','<label class="titleImg_9"></label>','<a href="$href$" hideFocus="true" style="$color$$font$" target="_blank">$title$$newImg$</a>',"</span>",'<span class="author">','<a href="$uHome$" title="" target="_blank" hideFocus="true">$uNickName$</a>',"</span>",'<span class="restore color_2">--</span>',"</li>"].join("")).replace({bgClass:(GlobalTopData.length%2==0&&b%2==0||GlobalTopData.length%2==1&&b%2==1)?"class='backBG_2'":"",href:GlobalTopData[b]["href"],color:GlobalTopData[b]["color"]?"color:'"+GlobalTopData[b]["color"]+"';":"",font:GlobalTopData[b]["bold"]=="1"?"font-weight:'bold';":"",title:GlobalTopData[b]["title"],newImg:GlobalTopData[b]["isnew"]=="1"?'<img src="http://x.9917.com/themes/img/icon/Animation/new1.gif" border="0" style="position:absolute;">':"",uHome:GD.getUserHome(GlobalTopData[b]["uid"]),uNickName:GlobalTopData[b]["uname"]}));}return a.join("");}else{return"";}},getOneTopic:function(e){function d(g){if(g=="1"){return'<label class="titleImg_5"></label>';}else{if(g=="2"){return'<label class="titleImg_7"></label>';}else{if(g=="3"){return'<label class="titleImg_6"></label>';}else{return"";}}}}function b(g){if(g=="1"){return'style="color:#db0070"';}else{if(g=="2"){return'style="color:#008bdb"';}else{if(g=="3"){return'style="color:#008b38"';}else{if(g=="5"){return'style="color:red"';}else{return'style="color:#000"';}}}}}function c(g,h){if(g=="1"){return'<label class="titleImg_2"></label>';}else{if(g=="2"){return'<label class="titleImg_3"></label>';}else{if(g=="3"){return'<label class="titleImg_2"></label><label class="titleImg_3"></label>';}else{if(h<=0){return'<label class="titleImg_0"></label>';}}}}}function f(g,h){var i="";i+=parseInt(g,10)>30?"<font>"+g+"</font><font>/</font>":g+"/";i+=parseInt(h,10)>100?"<font>"+h+"</font>":h;return i;}var a=['<span class="discussTitle">',parseInt(e.top,10)>0?'<label class="titleImg_1"></label>':"",c(e.le,e.top),'<a href="'+GD.getTopicURL(e.id)+'" target="_blank" hideFocus="true" '+b(e.ts)+">"+GD.clearLabel(e.tt)+"</a>",e.tp?d(e.tp):"","</span>",'<span class="author"><a href="'+GD.getUserHome(e.uid)+'" target="_blank" hideFocus="true" title="">'+e.nn+"</a></span>",'<span class="restore color_2">'+f(e.cm,e.as)+"</span>"];return a.join("");},showData:function(e){var f=document.createDocumentFragment();for(var d=0,b=e.length;d<b;d++){var a=GD.$CE("li");if(d%2==0){a.className="backBG_2";}a.innerHTML=this.getOneTopic(e[d]);f.appendChild(a);}GD.clearChildNodes(this.Cont);this.Cont.appendChild(f);var c=this.getDefultData();if(c){$(c).prependTo(this.Cont);}},loadErr:function(a){this.Cont.innerHTML=a||"服务繁忙，请稍候重试！";},$dispose:function(){}});var ReportApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(ReportApp.prototype,{panelType:"ReportApp",className:"homeMember backBG_0 borWidth borColor_1 m_t6",$init:function(){var d=document.createDocumentFragment();var b=GD.createElement("div",{className:"columnTitle backBG_1"},[["h2",{className:"C_T_Left"},[["img",{src:"http://x.9917.com/themes/css/q/img/b.gif",className:"i_04 icons"}],["q",{innerHTML:"最近报到成员"}],["span",{className:"color_1 m_lr5",ref:"Head"}]]],["div",{className:"C_T_Right",ref:"T_R"},[["button",{className:"mem_but m_r none",ref:"Report"}],["a",{href:"http://q.9917.com/topic/19507.html",title:"什么是报到？",innerHTML:"什么是报到，有何好处？",hideFocus:true,className:"m_l5",target:"_blank"}],["span",{className:"m_lr5",innerHTML:"|"}]]]]);addManageBtn(b.refs.T_R,this.panelType);var c=GD.createElement("a",{innerHTML:"查看更多»",hideFocus:true,title:"点击查看更多报到成员",href:"javascript:;"});b.refs.T_R.appendChild(c);$(c).click(function(){Eagle.changeMenu("member","/q/report/index.html");return false;});this.Report=b.refs.Report;var a=GD.createElement("div",{className:"reportMemberList"},[["ul",{innerHTML:'<li style="margin-left:10px;">正在加载...</li>',ref:"Cont"}]]);d.appendChild(b);d.appendChild(a);this.panelDom.appendChild(d);this.Cont=a.refs.Cont;this.Head=b.refs.Head;c=b=a=d=null;},refresh:function(){GD.winClose();$(this.Report).remove();this.$render(true);},showReport:function(){var a=this;$(this.Report).show().click(function(){if(!Eagle.getUserInfo()){return false;}Eagle.toReport(function(){a.refresh();});});},$onRender:function(){},$render:function(b){var a=this;var c="/profile/club/"+GD.PathParse(g_clubInfo.NCid)+"/_report_join.xml";ajaxManager.add({url:c,dataType:"text/xml",type:"get",ifModified:b?true:false,success:function(j){j=GD.toXML(j);var g=GD.checkXML(j);if(g&&g==true){var f=j.selectNodes("/r/rr/i");if(f&&f.length){var e=f.length,d=[],k,l=0;if(j.selectSingleNode("/r/rr").getAttribute("time")===g_clubInfo._serverDate){l=j.selectSingleNode("/r/rr").getAttribute("num");}a.Head.innerHTML="今日共有(<strong>"+l+"</strong>)位成员前来报到";e=Math.min(e,14);for(var h=0;h<e;h++){k=GD.xml2EnumObj(f[h]);d.push(["<li>",'<a href="'+GD.getUserHome(k.uid)+'" title="" class="member_48" target="_blank" hideFocus="true">','<img class="img48 borColor_1" src="'+GD.getUserPic("m",k.uid)+'" />',"<em>"+k.nickName+"</em>",k.ut=="1"?'<span class="authorIMG">作家</span>':"","</a>",'<em class="color_2">'+GD.getBeforTime(k.time,g_clubInfo._serverTime)+"</em>","</li>"].join(""));}a.Cont.innerHTML=d.join("");if(b){GD.setOnline(this.Cont,"","",{searchCond:".member_48",appendCont:"<div class='online'>在线</div>"});}else{Eagle.online(a.Cont);}}else{a.loadErr();}}else{a.loadErr();}}});},loadErr:function(){GD.clearChildNodes(this.Head);this.Cont.innerHTML='<li style="margin-left:10px;width:200px;">暂无报到成员</li>';Eagle.online();},$dispose:function(){}});var RightManageApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(RightManageApp.prototype,{panelType:"ManageMenuApp",className:"manageMenu",$init:function(){var a=GD.createElement("button",{className:"But_decorate",hideFocus:true});var b=GD.createElement("a",{hideFocus:true,href:"javascript:;",title:"进入圈子管理后台",innerHTML:"进入圈子管理后台",className:"manageInlet backBG_0 borWidth borColor_1"});this.panelDom.appendChild(a);this.panelDom.appendChild(b);$(a).click(function(){Eagle.UnloadConfirm.isEditing&&Eagle.topToolBar?$(Eagle.topToolBar.previewBtn).trigger("click"):Eagle.dressUpClub();return false;});$(b).click(function(){Eagle.changeMenu("manage");return false;});a=b=null;}});var RightModuleApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(RightModuleApp.prototype,{panelType:"RightModuleApp",className:"columnFrame borWidth borColor_1 backBG_0",$init:function(){var d=Eagle.defaultConfig.systemConfig["Module."+this.panelType]["items"];for(var b in d){var a=d[b];Eagle.checkIsOnLine(a);var c=Eagle.getPanelByType("",a.replace(/^Module\./,""));if(!c){c=Eagle.attachPanel(Eagle.defaultConfig.systemConfig[a],a);}this.addChild(c);}d=null;},$onRender:function(){},$render:function(){},$Complete:function(){var b=this;for(var c=0,a=this.modules.length;c<a;c++){this.modules[c].$onRender();}var d={m:"getInfos",cid:g_clubInfo.NCid,method:"get"};Ajax("/do/find/q/cache.do",d,function(o){var h=[],g=[],f=[],e=[],p=[];var k={MemberApp:{item1:[],item2:[]},RankApp:{item1:[],item2:[]},CommendApp:{item:[]}};function m(u,s,r){if(u){var w=u.length,v;for(var t=0,q=u.length;t<q;t++){v=u[t];if(v===null){w=t;continue;}if(t<w){s.push(v);}else{r.push(v);}}}}m(o.data1,k.MemberApp.item1,k.MemberApp.item2);m(o.data2,k.RankApp.item1,k.RankApp.item2);m(o.data3,k.CommendApp.item);for(var j=0,l=b.modules.length;j<l;j++){var n=b.modules[j];if(k[n.panelType]){n.$render(k[n.panelType]);}}});},$dispose:function(){}});var ClubApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(ClubApp.prototype,{panelType:"ClubApp",className:"clubInfo",$init:function(){var e=g_clubInfo.manageCache.master;var f=document.createDocumentFragment();var d=GD.createElement("h2",{innerHTML:"【圈子信息】<span>--------------------</span>"});var b=GD.createElement("dl",{},[["dt",{innerHTML:'<img class="img64 borColor_1" src="'+GD.getClubPic("m",g_clubInfo.NCid)+'" _clubLogo="m" />'}],["dd",{className:"clubName",innerHTML:g_clubInfo.SName.uniLeft(18),title:g_clubInfo.SName}],["dd",{innerHTML:"创建于:"+g_clubInfo.DCreate.substr(0,10)}],["dd",{innerHTML:"总访问量："+g_clubInfo.NAccess}]]);var a=[g_clubInfo.SApptype!="5"?'<li><img class="i_05 icons" src="http://x.9917.com/themes/css/q/img/b.gif" /><a href="javascript:;" hideFocus="true" title="" id="club_op_handler">加入此圈子</a></li>':"",'<li><img class="i_03 icons" src="http://x.9917.com/themes/css/q/img/b.gif" /><a href="javascript:;" hideFocus="true" title="" onclick="Eagle.changeMenu(\'topic\');return false;">进入讨论区</a><span class="color_1">('+g_clubInfo.NTopic+"篇帖子)</span></li>",(g_clubInfo.SApptype!="5"&&g_clubInfo.SApptype!="0")?'<li><img class="i_02 icons" src="http://x.9917.com/themes/css/q/img/b.gif" /><a href="javascript:;" hideFocus="true" title="" onclick="Eagle.changeMenu(\'book\');return false;">浏览圈子书架</a></li>':"",g_clubInfo.SApptype!="5"?'<li><img class="i_06 icons" src="http://x.9917.com/themes/css/q/img/b.gif" /><a href="javascript:;" hideFocus="true" title="" onclick="Eagle.changeMenu(\'member\');return false;">查看圈子成员</a><span class="color_1">('+g_clubInfo.NAmount+"人)</span></li>":""];var c=GD.createElement("ul",{innerHTML:a.join("")});f.appendChild(d);f.appendChild(b);f.appendChild(c);this.panelDom.appendChild(f);f=d=b=c=a=null;},$onRender:function(){},$render:function(){},$dispose:function(){}});var MemberApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(MemberApp.prototype,{panelType:"MemberApp",className:"recentlyCaller m_t15",$init:function(){var d=document.createDocumentFragment();var c=GD.createElement("div",{className:"Tab borColor_1"},[["h2",{},[["a",{href:"javascript:;",title:"",className:"current backBG_0 color_0 borWidth borColor_1",innerHTML:"最近访客",hideFocus:true,ref:"Tab_1"}],["a",{href:"javascript:;",title:"",className:"borWidth borColor_1",innerHTML:"最新加入",hideFocus:true,ref:"Tab_2"}],["span",{innerHTML:'<a href="javascript:;" title="" hideFocus="true" onclick="Eagle.changeMenu(\'member\');return false;">更多»</a>'}]]]]);var b=GD.createElement("ul",{className:"callerList",innerHTML:"<li>正在加载...</li>"});var a=GD.createElement("ul",{className:"callerList none",innerHTML:"<li>正在加载...</li>"});d.appendChild(c);d.appendChild(b);d.appendChild(a);this.panelDom.appendChild(d);this.Tabs=[c.refs.Tab_1,c.refs.Tab_2];this.Panels=[b,a];d=c=b=a=null;},$onRender:function(){slideTab({tabs:this.Tabs,panels:this.Panels,funs:[GD.emptyFn,(function(a){return function(){a.loadPanel();};})(this)],inited:0,commonClass:"",selectedClass:"current backBG_0 color_0",isRefresh:false});delete this.Tabs;this.Tabs=null;},loadPanel:function(){if(this.panelData){this.showData(this.panelData,this.Panels[1]);delete this.panelData;this.panelData=null;GD.setOnline(this.Panels[1],"","",{searchCond:".member_48",appendCont:"<div class='online'>在线</div>"});}},showData:function(e,d){if(e&&e.length){var b=[];for(var c=0,a=e.length;c<a;c++){b.push(this.template(e[c]));}d.innerHTML=b.join("");}else{d.innerHTML="暂无相关信息";}},$render:function(a){this.showData(a.item1,this.Panels[0]);Eagle.online(this.Panels[0]);this.panelData=a.item2;},template:function(a){return['<li><a href="'+GD.getUserHome(a.uid)+'" title="" class="member_48" target="_blank" hideFocus="true">','<img class="img48 borColor_1" src="'+GD.getUserPic("m",a.uid)+'" />',"<em>"+a.nn+"</em>",a.ut=="1"?'<span class="authorIMG">作家</span>':"","</a>",'<em class="color_2">'+GD.getBeforTime(a.ext,g_clubInfo._serverTime)+"</em></li>"].join("");},$dispose:function(){}});var InviteApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(InviteApp.prototype,{panelType:"InviteApp",className:"inviteFriend borWidth borColor_1 m_t15",$init:function(){var a=GD.createElement("p",{innerHTML:'<button type="button" class="iF_but" hideFocus="true"></button>'});var b=GD.createElement("p",{innerHTML:'<a href="javascript:;" hideFocus="true" title="邀请好友加入圈子就有奖励哦！">邀请好友加入圈子就有奖励哦！</a>'});this.panelDom.appendChild(a);this.panelDom.appendChild(b);a=b=null;}});var RankApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(RankApp.prototype,{panelType:"RankApp",className:"ranking borColor_1 m_t15",$init:function(){var d=document.createDocumentFragment();var c=GD.createElement("div",{className:"Tab borColor_1"},[["h2",{},[["a",{href:"javascript:;",hideFocus:true,className:"borWidth borColor_1",innerHTML:"周人气",ref:"Tab_2"}],["a",{href:"javascript:;",hideFocus:true,className:"current backBG_0 color_0 borWidth borColor_1",innerHTML:"周魅力",ref:"Tab_1"}],["span",{innerHTML:"排行榜"}]]]]);var b=GD.createElement("div",{className:"rankingList",innerHTML:"正在加载.."});var a=GD.createElement("div",{className:"rankingList none",innerHTML:"正在加载..."});d.appendChild(c);d.appendChild(b);d.appendChild(a);this.panelDom.appendChild(d);this.Tabs=[c.refs.Tab_1,c.refs.Tab_2];this.Panels=[b,a];d=c=b=a=null;},$onRender:function(){slideTab({tabs:this.Tabs,panels:this.Panels,funs:[GD.emptyFn,(function(a){return function(){a.loadPanel();};})(this)],inited:0,commonClass:"",selectedClass:"current backBG_0 color_0",isRefresh:false});delete this.Tabs;this.Tabs=null;},loadPanel:function(){if(this.panelData){this.showData(this.panelData,this.Panels[1],"人气");delete this.panelData;this.panelData=null;}},showData:function(f,e,d){if(f&&f.length){var b=[];for(var c=0,a=f.length;c<a;c++){b.push(this.template(f[c],c+1,d));}e.innerHTML=b.join("");}else{e.innerHTML="暂无相关信息";}},$render:function(b){var a=[];this.showData(b.item1,this.Panels[0],"魅力");this.panelData=b.item2;},template:function(c,e,d){var b=GD.getUserHome(c.uid),a=c.ext.split("-");return['<dl class="borColor_1">','<dt><a href="'+b+'" title="" target="_blank" hideFocus="true"><img class="img20 borColor_1"  src="'+GD.getUserPic("s",c.uid)+'" /></a></dt>','<dd><span class="top_'+e+'"></span><a href="'+b+'" title="" target="_blank" hideFocus="true">'+c.nn+"</a></dd>",'<dd class="color_2"><q>↑</q>'+a[1]+'<q class="m_r10"></q>总'+d+"："+a[0]+"</dd>","</dl>"].join("");},$dispose:function(){}});var CommendApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(CommendApp.prototype,{panelType:"CommendApp",className:"likeClub m_t15",$init:function(){var c=document.createDocumentFragment();var b=GD.createElement("h2",{innerHTML:"这个圈子的成员还喜欢去…"});var a=GD.createElement("div",{className:"likeClubList borColor_1 m_t6",innerHTML:"<dl>正在加载...</dl>"});c.appendChild(b);c.appendChild(a);this.panelDom.appendChild(c);this.Cont=a;c=b=a=null;},$onRender:function(){},$render:function(e){e=e.item;if(e.length){var b=[];for(var d=0,a=e.length;d<a;d++){var f=e[d],c=GD.getClubHome(f.dk);b.push(["<dl>",'<dt><a href="'+c+'" title="" target="_blank" hideFocus="true"><img class="img64 borColor_1" src="'+GD.getClubPic("m",f.cid)+'" /></a></dt>','<dd class="clubName"><a href="'+c+'" title="" hideFocus="true" target="_blank">'+f.cn.uniLeft(18)+"</a></dd>",'<dd>圈主：<a href="'+GD.getUserHome(f.uid)+'" title="" target="_blank" hideFocus="true">'+f.nn.uniLeft(14)+"</a></dd>",'<dd>成员：<span class="color_1">'+f.at+"</span>人</dd>","</dl>"].join(""));}this.Cont.innerHTML=b.join("");}else{this.Cont.innerHTML="<dl>暂无相关信息</dl>";}delete this.Cont;this.Cont=null;},$dispose:function(){}});var ManageApp=(function(c,b,a){CommonModule.apply(this,arguments);}).extend(CommonModule);GD.$extend(ManageApp.prototype,{panelType:"ManageApp",className:"clubElseAdmin m_t15",$init:function(){var h=document.createDocumentFragment();var d=[],a=g_clubInfo.manageCache,g=a.assistantList||[];d.push('<li><a _text="true" href="'+GD.getUserHome(a.master.NUserid)+'" title="" target="_blank" hideFocus="true">'+a.master.SNickname+'</a><span class="color_2">圈主</span></li>');for(var b=0,e=g.length;b<e;b++){d.push('<li><a _text="true" hideFocus="true" href="'+GD.getUserHome(g[b]["NUserid"])+'" title="'+g[b]["SNickname"]+'" target="_blank">'+g[b]["SNickname"]+'</a><span class="color_2">副圈主</span></li>');}var f=GD.$CE("h2");var j=GD.createElement("ul",{className:"elseAdminList borColor_1",innerHTML:d.join("")});if(g_clubInfo.isAdmin!==9&&g_clubInfo.isAdmin!==8&&g_clubInfo.SApptype!=="5"){var c=GD.$CE("a");c.href="javascript:;";c.hideFocus=true;c.innerHTML="申请副圈主";c.title="点击申请成为副圈主";$(c).click(function(){Eagle.applyManage();return false;});f.appendChild(c);c=null;}f.appendChild(GD.$CT("圈子管理员"));h.appendChild(f);h.appendChild(j);this.panelDom.appendChild(h);a=d=g=h=f=j=null;Eagle.online(this.panelDom);}});var TopToolBar=(function(c,b,a){Module.apply(this,arguments);}).extend(Module);GD.$extend(TopToolBar.prototype,{panelType:"TopToolBar",className:"dressHead",$init:function(){var c=document.createDocumentFragment();var b=GD.createElement("div",{className:"dress_l"},[["strong",{innerHTML:"圈子装扮"}],["span",{innerHTML:"(当前正在进行圈子装扮)",ref:"dressDes"}]]);var a=GD.createElement("div",{className:"dress_r"},[["button",{hideFocus:true,className:"but_revert m_r10",title:"使用默认皮肤及标题栏",ref:"revertDefault"}],["button",{hideFocus:true,className:"dressBut",innerHTML:"预览圈子装扮",ref:"preview",hideFocus:true}],["span",{innerHTML:"|"}],["button",{className:"d_but_close",ref:"exit",hideFocus:true}],["span",{}],["button",{className:"d_but_save",ref:"save",hideFocus:true}]]);c.appendChild(b);c.appendChild(a);this.panelDom.appendChild(c);this.previewBtn=a.refs.preview;this.exitBtn=a.refs.exit;this.saveBtn=a.refs.save;this.setDefault=a.refs.revertDefault;this.desElem=b.refs.dressDes;c=b=body=a=null;},generatePnl:function(){var a=GD.$CE("div");if(isIE6){a.style.position="absolute";a.style.top="0px";a.style.left="0px";}document.body.insertBefore(a,GD.domSort.getFirstChild(document.body));return a;},$onRender:function(){var a=this;a.currentMode="dress";$(this.previewBtn).click(function(){Eagle.UnloadConfirm.isEditing=false;if(a.currentMode=="dress"){a.currentMode="preview";Eagle.changeMenu("main");this.innerHTML="返回继续装扮";}else{a.currentMode="dress";Eagle.changeMenu("dress",true);this.innerHTML="预览圈子装扮";}Eagle.UnloadConfirm.isEditing=true;a.desElem.innerHTML=Eagle.currentPage==="main"?"(当前正在预览圈子装扮)":"(当前正在进行圈子装扮)";});$(this.exitBtn).click(function(){if(Eagle.clubDecorate.hasChanged){GD.InfoPanel.getInstance().update({content:"<div class='dialog_cont' style='margin-bottom:35px;color:#666;'>退出将不会保存您刚才对圈子所做的修改。是否确认退出？</div>",title:"空间设置",width:370,callBackArr:[{text:"确定",fun:function(){Eagle.refreshClub(Eagle.getClubHome());return true;}},{text:"取消",def:true}]});}else{a.exitHandler();GD.showInfo("正在处理，请稍候...",800);}});$(this.saveBtn).click(function(){if(Eagle.clubDecorate.hasChanged){Eagle.clubDecorate.save(a);}else{$(a.exitBtn).trigger("click");}});$(this.setDefault).click(function(){Eagle.clubDecorate.add({cg:2,id:2});Eagle.clubDecorate.add({cg:3,id:3});Eagle.clubDecorate.setTitleTextColor("");var b=GD.getIframe(Eagle.panelDoms.frame.attr("name"));if(/^\/q\/dressup\/diy_(skin|title)\.html$/.test(b.location.pathname)){b.location.reload();}a.currentTextColor=Eagle.clubDecorate.getTitleTextColor();}).hover(function(){$(this).addClass("but_revert_1").removeClass("but_revert");},function(){$(this).addClass("but_revert").removeClass("but_revert_1");});this.editTextElem=$("#editTextColor");this.palettePanel=$("#diy_palette");this.currentTextColor=Eagle.clubDecorate.getTitleTextColor();this.editTextElem.click(function(b){a.buildPalette();a.showPalette(b,this);});},buildPalette:function(){if(!this.editTextInit){this.editTextInit=true;var b=["#000000","#003300","#006600","#009900","#00CC00","#00FF00","#330000","#333300","#336600","#339900","#33CC00","#33FF00","#660000","#663300","#666600","#669900","#66CC00","#66FF00","#000033","#003333","#006633","#009933","#00CC33","#00FF33","#330033","#333333","#336633","#339933","#33CC33","#33FF33","#660033","#663333","#666633","#669933","#66CC33","#66FF33","#000066","#003366","#006666","#009966","#00CC66","#00FF66","#330066","#333366","#336666","#339966","#33CC66","#33FF66","#660066","#663366","#666666","#669966","#66CC66","#66FF66","#000099","#003399","#006699","#009999","#00CC99","#00FF99","#330099","#333399","#336699","#339999","#33CC99","#33FF99","#660099","#663399","#666699","#669999","#66CC99","#66FF99","#0000CC","#0033CC","#0066CC","#0099CC","#00CCCC","#00FFCC","#3300CC","#3333CC","#3366CC","#3399CC","#33CCCC","#33FFCC","#6600CC","#6633CC","#6666CC","#6699CC","#66CCCC","#66FFCC","#0000FF","#0033FF","#0066FF","#0099FF","#00CCFF","#00FFFF","#3300FF","#3333FF","#3366FF","#3399FF","#33CCFF","#33FFFF","#6600FF","#6633FF","#6666FF","#6699FF","#66CCFF","#66FFFF","#990000","#993300","#996600","#999900","#99CC00","#99FF00","#CC0000","#CC3300","#CC6600","#CC9900","#CCCC00","#CCFF00","#FF0000","#FF3300","#FF6600","#FF9900","#FFCC00","#FFFF00","#990033","#993333","#996633","#999933","#99CC33","#99FF33","#CC0033","#CC3333","#CC6633","#CC9933","#CCCC33","#CCFF33","#FF0033","#FF3333","#FF6633","#FF9933","#FFCC33","#FFFF33","#990066","#993366","#996666","#999966","#99CC66","#99FF66","#CC0066","#CC3366","#CC6666","#CC9966","#CCCC66","#CCFF66","#FF0066","#FF3366","#FF6666","#FF9966","#FFCC66","#FFFF66","#990099","#993399","#996699","#999999","#99CC99","#99FF99","#CC0099","#CC3399","#CC6699","#CC9999","#CCCC99","#CCFF99","#FF0099","#FF3399","#FF6699","#FF9999","#FFCC99","#FFFF99","#9900CC","#9933CC","#9966CC","#9999CC","#99CCCC","#99FFCC","#CC00CC","#CC33CC","#CC66CC","#CC99CC","#CCCCCC","#CCFFCC","#FF00CC","#FF33CC","#FF66CC","#FF99CC","#FFCCCC","#FFFFCC","#9900FF","#9933FF","#9966FF","#9999FF","#99CCFF","#99FFFF","#CC00FF","#CC33FF","#CC66FF","#CC99FF","#CCCCFF","#CCFFFF","#FF00FF","#FF33FF","#FF66FF","#FF99FF","#FFCCFF","#FFFFFF"];var d='<a hideFocus="true" style="background:$color$;" onclick="CurrentPalette.setColor(\'$color$\');return false;" title="$color$"></a>';var e=document.createDocumentFragment();for(var c=0,a=b.length;c<a;c++){e.appendChild(this.getColorTemplate(b[c]));}$("#diy_palette_panel").append(e);}},getColorTemplate:function(b){var a=this,c=GD.createElement("a",{style:{backgroundColor:b},title:b});$(c).click(function(){Eagle.clubDecorate.setTitleTextColor(b);a.currentTextColor=b;}).hover(function(){Eagle.clubDecorate.setTitleTextColor(b);},function(){Eagle.clubDecorate.setTitleTextColor(a.currentTextColor);});return c;},showPalette:function(b,d){var a=this,c=this.editTextElem.offset();this.palettePanel.show().css("position","absolute").css({left:c.left+a.editTextElem.width()+15,top:c.top-135+a.editTextElem.height()}).show();if(!this.hideHandler){this.hideHandler=function(e){return function(){e.hidePalette();};}(this);}$(document).bind("mouseup",a.hideHandler);},hidePalette:function(){$(document).unbind("mouseup",this.hideHandler);this.palettePanel.hide();},exitHandler:function(){this.resetStatus();GD.navBar.openNav();Eagle.UnloadConfirm.isEditing=false;Eagle.clubDecorate.hasChanged=false;Eagle.changeMenu("main");this.editTextElem.hide();},$render:function(){this.editTextElem.show();if(!isIE6){this.panelDom.style.display="";return;}if(!this.scrollHandler){this.scrollHandler=function(a){return function(){a.doScroll();};}(this);}this.doScroll();$(window).unbind("scroll",this.scrollHandler).bind("scroll",this.scrollHandler);},resetStatus:function(){this.currentMode="dress";this.previewBtn.innerHTML="预览圈子装扮";this.desElem.innerHTML="(当前正在进行圈子装扮)";this.clearScroll();},doScroll:function(){var a=GD.dom.getScrollTop(),b=this.panelDom;if(this._timer){clearTimeout(this._timer);}b.style.display="none";this._timer=setTimeout(function(){b.style.display="";b.style.top=a+"px";},120);},clearScroll:function(){this.panelDom.style.display="none";if(isIE6){this._timer?clearTimeout(this._timer):"";$(window).unbind("scroll",this.scrollHandler);}else{return;}}});