tcJones={type:"blog",url:document.location.pathname,TopWin:function(){return tcTopWin(this.type)},TopJones:function(){return tcView.topJones(this.type)},getNid:function(){return vIclAttr.nid},getBid:function(){return vIclAttr.bid},getTid:function(){return vIclAttr.tid},getIid:function(){return this.getBid()+","+this.getTid()},getChildQS:function(b,a){return"nid="+this.getNid()+"&iid="+b+"&viewer="+vIclAttr.viewer+"&page="+iclString(a)},getLoadedId:function(a){return"LD:loaded:"+a},getExpandId:function(a){return"LD:expand:"+a},getBlogId:function(a){return"LD:blog:"+a},getTopicsId:function(a){return"LD:topics:"+a},isBlogExpanded:function(b){var a=iclElt(this.getExpandId(b));return a&&a.className=="a_open"},isBlogLoaded:function(a){return iclElt(this.getLoadedId(a))},expandBlog:function(c,a){var b=iclElt(this.getExpandId(c));if(b){b.className=a?"a_open":"a_close"}},openFront:function(a,b){this.openView(a,{iid:""});this.getTidFrame().iclScrollToTop()},openBlog:function(i,d){tcReset(i);var g=tcTool.decodePage(vIclAttr.tcpage);if(g.name!="tid"){i=this.getTidFrame();if(i){i.tcJones.openBlog(0,d)}return}var c=d.iid.split(","),f=c[0];if(this.isBlogExpanded(f)){if(d.force!="open"){this.expandBlog(f,false)}if(d.focus){this.focusBlog(f)}return}else{if(d.force=="close"){return}}var b=iclElt(this.getBlogId(f)),h=iclElt(this.getTopicsId(f));if(b&&h){if(!this.isBlogLoaded(f)){h.innerHTML="<div class=s2_aload>&nbsp;</div>";this.loadBlog(d)}this.expandBlog(f,true)}},openView:function(c,a){tcReset(c);var b=this.TopJones();if(b!=this){return b.openView(0,a)}if(!(c=iclElt("det_frame"))){return 0}c.src=this.url+"?"+this.getChildQS(a.iid,"det");return 1},loadBlog:function(a){this.loadTid("blog",a)},loadIndex:function(a){this.loadTid("body",a)},getTidFrame:function(){var a=this.TopJones();if(a!=this){return a.getTidFrame()}return iclFindFrame("tid",1)},loadTid:function(c,b){var a=this.getChildQS(b.iid,"tid")+"&div="+c;if(b.focus){a+="&focus="+b.focus}this.getTidFrame().AwfLoad("load",a,{url:this.url})},focusBlog:function(a){this.getTidFrame().iclScrollElt(this.getBlogId(a),true)},uTid:function(c){var b,d,e=iclString(c.iid);if(e>""){b=c.iid.split(",");d=b[0];b=this.getBlogId(d)}else{b="LD:body";d=0}this.getTidFrame().iclSetEltHtm(b,c.htm);if(c.focus&&d){this.focusBlog(d)}},editTopic:function(d,c){tcReset(d);var b=this.getChildQS(c,""),a=tcIpf.show(0,1,{"class":"edit file"});return a?a.AwfExec("edit_topic",b,{url:this.url}):0},report:function(a){return tcTool.report(a,{iid:"blog,"+this.getIid()})},share:function(b,a){return tcTool.share(b,{iid:"blog,"+this.getIid()})},rank:function(a,b){this.Post(a,"rank&rank="+b)},SetFormMsg:function(b){var a=this.TopJones();if(a!=this){return a.SetFormMsg(b)}var c=iclGetFrameWin("det_frame");if(c&&c.iclElt&&(c=c.iclElt("det_form_msg"))){c.style.display=b?"block":"none";c.innerHTML=b}},uTopic:function(a,c){var b=this.TopJones();if(b!=this){return b.uTopic(a,c)}this.uSec("tid",c.tid);this.uSec("det",c.det)},uSec:function(c,d){var a,b;if(d&&(a=iclFindFrame(c,1))&&(b=a.iclElt(d.id))){a.iclSetEltHtm(b,d.htm);if(d.scroll){a.iclScrollElt(b,1)}}},AddNote:function(d,b){iclCancelEvent(d);var a=b.elements.who_nick,c="add_note&text="+encodeURIComponent(b.elements.text.value)+"&who_nid="+b.elements.who_nid.value;if(a){c+="&who_nick="+encodeURIComponent(a.value)}this.Post(d,c)},AdmNote:function(d,c,b){var a=b?"akn":"del";this.Post(d,a+"_note&note="+c)},Post:function(a,b){iclCancelEvent(a);b=this.getChildQS(this.getIid(),0)+"&op="+b;return AwfExec("post",b,{url:this.url})},onIclEvent:function(n,f){var j=tcTool.decodePage(vIclAttr.tcpage),c=this.getNid();switch(n){case"ipf":if(j.name=="det"){var a=f.visible,i=iclElt("LD:topic:view");if(i){i.style.visibility=a?"hidden":"visible"}}break;case"T!blog.set":var g=f.action,d=f.nid,k=f.bid,h=f.tid;if(j.name!="blog"||d!=c){break}if(h){var b=k+","+h,m,l;switch(g){case"add":m=k;l=b;break;case"set":m=l=b;break;case"del":m=l=k;break;default:return}this.loadBlog({iid:m});this.openView(0,{iid:l})}else{this.loadIndex({iid:k})}break}return 1},onIclDrag:function(g,c){switch(g){case"start":var b=c.src.id.split("-"),f=b[0];return{iid:f,dragMode:"vertical"};case"over":return true;case"end":var h=c.tgt,d=c.data.iid;if(!c.dragged){this.openView(0,{iid:d})}else{if(h){var b=h.id.split("-");this.onDrag(d,b[0])}}return true}return false},onDrag:function(c,d){var b=this.TopJones();if(b!=this){return b.onDrag(c,d)}var a=this.getChildQS(c,0)+"&tgt="+d;AwfExec("drag",a,{url:this.url});return 1}};function onIclEvent(a,b){return tcJones.onIclEvent(a,b)}function onIclDrag(b,a){return tcJones.onIclDrag(b,a)};
