1var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; 2if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } 3{ 4 let window = _____WB$wombat$assign$function_____("window"); 5 let self = _____WB$wombat$assign$function_____("self"); 6 let document = _____WB$wombat$assign$function_____("document"); 7 let location = _____WB$wombat$assign$function_____("location"); 8 let top = _____WB$wombat$assign$function_____("top"); 9 let parent = _____WB$wombat$assign$function_____("parent"); 10 let frames = _____WB$wombat$assign$function_____("frames"); 11 let opener = _____WB$wombat$assign$function_____("opener"); 12 13function JCommentsEvents(){} 14function JCommentsInput(){} 15function JCommentsIndicator(){this.init();} 16function JCommentsForm(id,editor){this.init(id,editor);} 17function JCommentsEditor(textarea,resizable){this.init(textarea,resizable);} 18function JComments(oi,og,r){this.init(oi,og,r);} 19 20JCommentsEvents.prototype = { 21 add: function(o,e,f){if(o.addEventListener){o.addEventListener(e,f,false);return true;}else if(o.attachEvent){var r=o.attachEvent("on"+e,f);return r;}else{return false;}}, 22 remove: function(o,e,f){if(o.removeEventListener){o.removeEventListener(e,f,false);}else if(o.detachEvent){o.detachEvent( "on"+e,o[e+f] );o[e+f]=null;o["e"+e+f]=null;}}, 23 cancel: function(e){if(e.stopPropagation){e.cancelBubble=true;e.preventDefault();e.stopPropagation();}e.returnValue=false;return false;}, 24 target: function(e){var t;if(!e)e=window.event;if(e.target)t=e.target;else if(e.srcElement)t=e.srcElement;if(t.nodeType==3)t=t.parentNode;return t;} 25}; 26 27JCommentsInput.prototype = { 28 register: function(el){if(el){var th=this,events=new JCommentsEvents();events.add(el,'focus',function(e){return th.onFocus(e);});events.add(el,'blur',function(e){return th.onBlur(e);});}}, 29 unregister: function(el){if(el){var th=this,events=new JCommentsEvents();events.remove(el,'focus',function(e){return th.onFocus(e);});events.remove(el,'blur',function(e){return th.onBlur(e);});}}, 30 onFocus: function(e){var t=JCommentsEvents.prototype.target(e);if(t!=null){t.className=t.className.replace('error','')+' selected';}}, 31 onBlur: function(e){var t=JCommentsEvents.prototype.target(e);if(t!=null){t.className=t.className.replace('error','').replace('selected').replace(/^\s+/g,"");}} 32}; 33 34JCommentsEditor.prototype = { 35 ta: null, 36 l10n: {}, 37 tags: {}, 38 smiles: {}, 39 events: null, 40 counter: null, 41 focused: false, 42 resizable: true, 43 44 init: function(textareaID, r) { 45 this.ta=JComments.prototype.$(textareaID); 46 this.panelElements={}; 47 this.l10n={counterPre:'',counterPost:' symbols left',enterValue: 'Enter value'}; 48 this.resizable=r; 49 this.events=new JCommentsEvents(); 50 this.defaultHeight=this.ta.clientHeight; 51 this.defaultRows=this.ta.rows; 52 if(this.resizable){this.addGrippie();} 53 this.isWebkit=/webkit/.test(navigator.userAgent.toLowerCase()); 54 55 var th = this; 56 this.events.add(document,!window.opera&&document.all?'keydown':'keypress',function(e){return th.onKeyPress(e);}); 57 this.events.add(this.ta,'click',function(e){return th.storeCaret(this.ta);}); 58 this.events.add(this.ta,'select',function(e){return th.storeCaret(this.ta);}); 59 this.events.add(this.ta,'change',function(e){th.onChange(); return th.storeCaret(this.ta);}); 60 this.events.add(this.ta,'keyup',function(e){return th.onChange();}); 61 this.events.add(this.ta,'focus',function(e){return th.focused=true;}); 62 this.events.add(this.ta,'blur',function(e){return th.focused=false;}); 63 }, 64 onKeyPress: function(e) { 65 if (!this.focused){return;} 66 var r=false,k=String.fromCharCode(e.keyCode?e.keyCode:e.charCode),t=null; 67 for(var id in this.tags){ 68 t=this.tags[id]; 69 if(!t.key||k.toUpperCase()!=t.key.toUpperCase())continue; 70 if(t.ctrl&&!e[t.ctrl+"Key"])continue; 71 this.insertTag(id); 72 return this.events.cancel(e); 73 } 74 return e.returnValue; 75 }, 76 defined: function(v){return (typeof(v)!="undefined");}, 77 clear: function(){this.ta.value='';if(this.defaultHeight){this.ta.style.height=this.defaultHeight+'px';}this.updateCounter();},
78 focus: function(){this.ta.focus();}, 79 storeCaret: function(){var ta=this.ta;if(ta.createTextRange)ta.caretPos=document.selection.createRange().duplicate();}, 80 getElementPos: function(e){var p={left:0,top:0,right:0,bottom:0};while(e!=null){p.left+=e.offsetLeft;p.top+=e.offsetTop;e=e.offsetParent;}p.right+=p.left;p.bottom+=p.top;return p;}, 81 getSelection: function(){var ta=this.ta,s='';if(document.selection&&document.selection.createRange){s=document.selection.createRange().text;}else{s=ta.value.substr(ta.selectionStart,ta.selectionEnd-ta.selectionStart);}return s;}, 82 insertText: function(text) { 83 var ta=this.ta; 84 if(this.defined(ta.caretPos)&&ta.createTextRange){ta.focus();var sel=document.selection.createRange();sel.text=sel.text+text;ta.focus();} 85 else if(this.defined(ta.selectionStart)){ 86 var ss=ta.value.substr(0, ta.selectionStart); 87 var se=ta.value.substr(ta.selectionEnd),sp=ta.scrollTop; 88 ta.value=ss+text+se; 89 if(ta.setSelectionRange){ta.focus();ta.setSelectionRange(ss.length+text.length,ss.length+text.length);} 90 ta.scrollTop=sp; 91 } else {ta.value+=text;ta.focus(ta.value.length-1);} 92 }, 93 surroundText: function(t1,t2) { 94 var ta=this.ta; 95 if (this.defined(ta.caretPos) && ta.createTextRange){ 96 var cp=ta.caretPos,tl=cp.text.length; 97 cp.text=cp.text.charAt(cp.text.length-1)==' '?t1+cp.text+t2+' ':t1+cp.text+t2; 98 if(tl==0){cp.moveStart("character",-t2.length);cp.moveEnd("character",-t2.length);cp.select();} 99 else{ta.focus(cp);} 100 }else if(this.defined(ta.selectionStart)){ 101 var ss=ta.value.substr(0,ta.selectionStart),se=ta.value.substr(ta.selectionEnd); 102 var sl=ta.value.substr(ta.selectionStart,ta.selectionEnd-ta.selectionStart); 103 var nc=ta.selectionStart,sp=ta.scrollTop; 104 ta.value=ss+t1+sl+t2+se; 105 if(ta.setSelectionRange){ 106 if(sl.length==0){ta.setSelectionRange(nc+t1.length,nc+t1.length);} 107 else{ta.setSelectionRange(nc,nc+t1.length+sl.length+t2.length);} 108 ta.focus(); 109 } 110 ta.scrollTop=sp; 111 }else{ta.value+=t1+t2;ta.focus(ta.value.length-1);} 112 }, 113 insertTag: function(id) {var tag=this.tags[id],ta=this.ta,s='';if(!tag)return;s=this.getSelection();if(s.length>0){this.surroundText(tag.open,tag.close);}}, 114 115 initTags: function(){ 116 if (this.bbc==null||this.bbc.length==0){ 117 this.bbc={}; 118 this.bbc['b']={id:'bbcode-b',open:'[b]',close:'[/b]',key:'B',ctrl:'ctrl',hint:'Bold'}; 119 this.bbc['i']={id:'bbcode-i',open:'[i]',close:'[/i]',key:'I',ctrl:'ctrl',hint:'Italic'}; 120 this.bbc['u']={id:'bbcode-u',open:'[u]',close:'[/u]',key:'u',ctrl:'ctrl',hint:'Underline'}; 121 this.bbc['s']={id:'bbcode-s',open:'[s]',close:'[/s]',key:null,ctrl:null,hint:'Strikeout'}; 122 this.bbc['img']={id:'bbcode-img',open:'[img]',close:'[/img]',key:null,ctrl:null,hint:'Image'}; 123 this.bbc['url']={id:'bbcode-url',open:'[url]',close:'[/url]',key:null,ctrl:null,hint:'Link'}; 124 this.bbc['hide']={id:'bbcode-hide',open:'[hide]',close:'[/hide]',key:null,ctrl:null,hint:'Hidden'}; 125 this.bbc['quote']={id:'bbcode-quote',open:'[quote]',close:'[/quote]',key:'Q',ctrl:'ctrl',hint:'Quote'}; 126 this.bbc['list']={id:'bbcode-list',open:'[list][*]',close:'[/list]',key:'L',ctrl:'ctrl',hint:'List'}; 127 } 128 }, 129 130 createButton: function(i,t,c,f){ 131 var e=document.createElement('a');e.style.display='block';e.setAttribute('href','#'); 132 if(i){e.setAttribute('id',i);}if(t){e.setAttribute('title',t);}if(c){e.className=c;} 133 var ee=e;e.onclick=(f!=null?function(){f(ee); return false;}:function(){return false;}); 134 return e; 135 }, 136 137 addButton: function(id,h,p) { 138 if(this.ta){ 139 this.initTags(); 140 var tag=this.bbc[id],th=this; 141 if(!tag){return;} 142 if(this.bbcPanel==null){ 143 this.bbcPanel=document.createElement('span'); 144 this.bbcPanel.className='bbcode'; 145 this.bbcPanel.style.display='block'; 146 this.ta.parentNode.insertBefore(this.bbcPanel,this.ta); 147 } 148 var f=function(){var s=th.getSelection();if(s.length>0){th.surroundText(tag.open,tag.close);}else{var v=prompt(p,'');if(null!=v && ''!=v){th.insertText(tag.open+v+tag.close);}}return false;}; 149 tag.e=this.createButton(tag.id,(h!=null?h:tag.hint),tag.
149id,f); 150 this.bbcPanel.appendChild(tag.e); 151 this.tags[tag.id]=tag; 152 } 153 }, 154 155 initSmiles: function(p){this.smilesPath=p; 156 if(this.ta){ 157 this.smilesPanel=document.createElement('div');this.smilesPanel.className=this.bbcPanel?'smilespanel':'smiles'; 158 if(this.bbcPanel){ 159 this.smilesPanel.setAttribute('style','display: none;'); 160 this.smilesPanel.onclick=function(){this.style.display='none';}; 161 var jc=this,f=function(e){ 162 var sp=jc.smilesPanel,p=jc.getElementPos(e); 163 if(sp){var sps=sp.style;sps.display=(sps.display=='none'||sps.display==''?'block':'none');sps.left=p.left+"px";sps.top=p.bottom+e.offsetHeight+"px";sps.zIndex=99;} 164 return false; 165 }; 166 this.bbcPanel.appendChild(this.createButton(null,null,'bbcode-smile',f)); 167 } 168 this.ta.parentNode.insertBefore(this.smilesPanel, this.bbcPanel?this.bbcPanel:this.ta); 169 } 170 }, 171 172 addSmile: function(code,image){ 173 if(this.ta){ 174 if(!this.smilesPath||!this.smilesPanel){return;} 175 var th=this,e=document.createElement('img'); 176 e.setAttribute('src',this.smilesPath+'/'+image); 177 e.setAttribute('alt',code); 178 e.className='smile'; 179 e.onclick=function(){th.insertText(' '+code+' ');}; 180 this.smilesPanel.appendChild(e); 181 } 182 }, 183 addCounter: function(m,pre,post,className){ 184 if(this.ta){ 185 if(pre!=null){this.l10n.counterPre=pre;}if(post!=null){this.l10n.counterPost=post;} 186 var ch=document.createElement('span');ch.className=className!=null?className:''; 187 var t1=document.createTextNode(this.l10n.counterPre+' '),t2=document.createTextNode(' '+this.l10n.counterPost); 188 var c=document.createElement('span');ch.appendChild(t1);ch.appendChild(c);ch.appendChild(t2); 189 if(this.resizable){if(this.grippie!=null){this.grippie.appendChild(ch);}} 190 else{var d=document.createElement('div');d.className='counterpanel';this.ta.parentNode.insertBefore(d,this.ta.nextSibling);d.appendChild(ch);} 191 this.counter={e:c,max:m}; 192 this.updateCounter(); 193 } 194 }, 195 addGrippie: function() { 196 this.offset=null;this.dragging=false; 197 this.grippie=document.createElement('div');this.grippie.className='grippie'; 198 this.ta.parentNode.insertBefore(this.grippie,this.ta.nextSibling); 199 var th=this;this.events.add(this.grippie,'mousedown',function(e){return th.onMouseDown(e);}); 200 }, 201 updateCounter: function(){if(this.counter!=null){var ta=this.ta,e=this.counter.e;try{var n=document.createElement(e.tagName),v=this.counter.max-ta.value.length;n.innerHTML=(v>=0)?v:0;e.parentNode.replaceChild(n,e);this.counter.e=n;}catch(ex){}}}, 202 mousePosition: function(e){var px=0,py=0;if(!e){e=window.event;}if(e.pageX||e.pageY){px=e.pageX;py=e.pageY;}else if(e.clientX||e.clientY){px=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;py=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}return {x:px,y:py};}, 203 onChange: function(){this.updateCounter();if(this.ta&&!this.isWebkit){var l=this.ta.value.split('\n');this.ta.rows=(l.length<this.defaultRows)?this.defaultRows:l.length+1;}return false;}, 204 onMouseDown: function(e){this.offset=this.mousePosition(e).y;this.height=this.ta.clientHeight;this.dragging=true;var th=this;this.events.add(document,'mousemove',function(e){return th.onMouseMove(e);});this.events.add(document,'mouseup',function(e){return th.onMouseUp(e);});return false;}, 205 onMouseUp: function(e){this.dragging=false;}, 206 onMouseMove: function(e){if(this.dragging)this.ta.style.height=Math.max(this.defaultHeight, this.height+this.mousePosition(e).y-this.offset)+'px';return false;} 207}; 208 209JCommentsForm.prototype = { 210 id:null, 211 form: null, 212 events: null, 213 editor: null, 214 elements: {}, 215 store: new Array('name','email','homepage'), 216 fadeTimer: null, 217 218 init: function(id,editor){var f=this;this.id=id;this.form=this.$(id);this.editor=editor;this.events=new JCommentsEvents();this.setElements(new Array('name','email','homepage','comment'));this.restoreValues();this.setCaptcha();}, 219 setCaptcha: function(){this.captchaImage=this.$(this.id+'-captcha-image');this.register('captcha');}, 220 setEditor: function(e){this.editor=e;}, 221 setElements: function(e){for(i=0;i<e.length; i++){try{this.register(e[i]);}catch(e){}}}, 222 $:function(e){return JComments.prototype.$(e);}, 223 register: function(n){var f=this,e=this.$(this.id+'-'+n);if(e){this.elements[n]=e;JCommentsInput.prototype.register(e);this.events.add(e,!window.opera&&document.all?'keydown':'keypress',function(e){return f.keypress(e);});}}, 224 message: function(m,c){ 225 clearTimeout(this.fadeTimer);var fe=this.$('comments-form-message'); 226 if(!fe){fe=JComments.prototype.createElement('div','comments-form-message',''); 227 if(this.form){JComments.prototype.moveElement(fe,this.form,this.form.firstChild);}else{return;}} 228 if(!c){c='info';}fe.className='comments-form-message-'+c; 229 fe.innerHTML=m; fe.style.display='block';JComments.prototype.setOpacity(fe.id,100); 230 this.fadeTimer=setTimeout(function(){JComments.prototype.fade('comments-form-message', 100, 0, 1000);}, 3000); 231 }, 232 error: function(m,n,c){var e=this.elements[n];if(e){e.focus();e.className='error';if(c)e.value='';}this.message(m,'error');}, 233 clear: function(n){ 234 if(n==null){if(this.form!=null){this.form.reset();}return;} 235 switch(n){ 236 case 'comment':if(this.editor!=null){this.editor.clear();}break; 237 case 'captcha':var cim=this.captchaImage,cin=this.elements['captcha'];if(cim){cim.src=cim.src.replace(/&ac=\d+/g, '&ac='+new String(Math.floor(Math.random()*100000)));}if(cin){cin.value='';}break; 238 default:var e=this.elements[n];if(e){e.value='';}break; 239 } 240 },
241 focus:function(n){var e;if(n==null){for(var nm in this.elements){e=this.elements[nm];if(e){e.focus();break;}}}else{e=this.elements[n];if(e){e.focus();}}}, 242 keypress: function(e){if(e.ctrlKey &&(e.keyCode==13||(e.type=='keypress'&&e.keyCode==10))){this.submit();e.returnValue=false;return this.events.cancel(e);}return this.keypressed(e);}, 243 add: function(n,i,v){if(this.form!=null){var e=document.createElement('input');e.setAttribute('type', 'hidden');e.setAttribute('name', n);e.setAttribute('id', i);e.setAttribute('value', v);this.form.appendChild(e);}}, 244 remove: function(i){var e=this.$(i);if(e){e.value=0;e.parentNode.removeChild(e);}}, 245 setText: function(n,t){if(n=='comment'){if(this.editor!=null){this.editor.clear();this.editor.insertText(t);}}else{var e=this.elements[n];if(e){e.value=t;}}}, 246 insertText: function(n,t){if(n=='comment'){if(this.editor!=null){this.editor.insertText(t);}}else{var e=this.elements[n];if(e){e.value+=t;}}}, 247 storeValues: function(){for(var i=0;i<this.store.length; i++){try{var el=JComments.prototype.$(this.id+'-'+this.store[i]);if(el){JComments.prototype.setCookie(this.store[i],encodeURIComponent(el.value),14);}}catch(e){}}}, 248 restoreValues: function(){for(var i=0;i<this.store.length; i++){try{var el=JComments.prototype.$(this.id+'-'+this.store[i]);if(el){el.value=decodeURIComponent(JComments.prototype.getCookie(this.store[i]));}}catch(e){}}}, 249 submit: function(){}, 250 keypressed: function(e){} 251}; 252 253JCommentsIndicator.prototype = { 254 e: null, 255 init: function(){if(this.e==null){this.e=document.createElement('div');this.e.className='busy';}}, 256 move: function(p,b){if(p){if(this.e.parentNode){this.e.parentNode.removeChild(this.e);}if(b){p.insertBefore(this.e,b);}else{p.appendChild(this.e);}}}, 257 show: function(){this.e.style.display='block';}, 258 hide: function(){this.e.style.display='none';}, 259 start: function(p,b){this.move(p,b);this.show();}, 260 stop: function(){this.hide();} 261}; 262 263JComments.prototype = { 264 265 oi:null, 266 og:null, 267 debug: false, 268 requestURI: '', 269 oldRequestURI: '', 270 busy: null, 271 form: null, 272 cache: {}, 273 mode:'add', 274 readyList: [], 275 isReady: false, 276 277 init: function(oi,og,r){var ua=navigator.userAgent.toLowerCase();this.browser={safari: /webkit/.test(ua),opera: /opera/.test(ua),msie: /msie/.test(ua) && !(/opera/.test(ua)),mozilla: /mozilla/.test(ua) && !(/(compatible|webkit)/.test(ua))};this.oi=oi;this.og=og;this.busy=new JCommentsIndicator();this.requestURI=r;var th=this;jtajax.startLoading=function(){th.busy.show();};jtajax.finishLoading=function(){th.busy.hide();};}, 278 setForm: function(f){this.form=f;this.form_id=f.id;this.setMode('add',null);var jc=this;this.form.submit=function(){jc.saveComment();};this.form.keypressed=function(e){if(e.keyCode==27&&jc.mode=='reply'){jc.restoreForm(false);}};this.formLoaded();}, 279 setList: function(l){this.list_id=l;}, 280 setMode: function(m,i){var b=this.$('comments-form-cancel'),jc=this;if(b!=null){b.style.display=(m!='add')?'':'none';b.onclick=(m=='edit'?function(){jc.cancelEdit(i);}:(m=='reply'?function(){jc.cancelReply();}:null));}this.mode=m;}, 281 $: function(id){if(!id){return null;}var e=document.getElementById(id);if(!e&&document.all){e=document.all[id];}return e;}, 282 ajax: function(f,a,fid){var r,prevURI;try{prevURI=jtajax.options.url;jtajax.setup({url:this.requestURI});r=jtajax.call(f,a,'post',fid);jtajax.options.url=prevURI;}catch(e){jtajax.options.url=prevURI;}return r;}, 283 284 initOnReady : function(){if(this.isReadyInited) return;this.isReadyInited=1;var jc=this; 285 if(this.browser.mozilla||this.browser.opera){JCommentsEvents.prototype.add(document, 'DOMContentLoaded',jc.ready);} 286 else if(this.browser.msie) {(function(){try{document.documentElement.doScroll('left');}catch(e){setTimeout(arguments.callee, 50);return;}jc.ready();})();} 287 else if(this.browser.safari){(function(){if(jc.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}jc.ready();})();} 288 JCommentsEvents.prototype.add(window, 'load', function(){jc.ready(jc);}); 289 }, 290 291 onReady: function(f){if(this.isReady){f();}else{var jc=this;
291jc.readyList.push(f);jc.initOnReady();}}, 292 ready: function(){var jc=window.jcomments;if(jc.isReady||jc.readyList==null) return;jc.isReady=1;for(var i=0,len=jc.readyList.length;i<len;i++){try{jc.readyList[i]();}catch(e){}}jc.readyList=null;}, 293 294 setAntiCache: function(c,p,f){this.aca=c;this.acp=p;this.acf=f;this.onReady(this.loadComments);}, 295 loadComments: function(){var jc=window.jcomments;var l=document.location.href,lc=true,i=l.lastIndexOf('#comment-');jc.clear('captcha');if(jc.aca){if(i!=0){var c=l.substring(i+9,l.length);if(!isNaN(c)){lc=false;jc.showComment(c);}}}if(jc.acp){if(lc==true){jc.showPage(jc.oi,jc.og,0);}}if(jc.acf){if(l.lastIndexOf('#addcomment')!=-1){jc.showForm(jc.oi,jc.og,'comments-form-link');}}}, 296 297 setCookie: function(n,v,d){var e='';if(d){var dt=new Date();dt.setTime(dt.getTime()+(d*24*60*60*1000));e="; expires="+dt.toGMTString();}document.cookie = "jc_"+n+"="+v+e+"; path=/";}, 298 getCookie: function(n){var re=new RegExp( "(\;|^)[^;]*(" + "jc_"+n + ")\=([^;]*)(;|$)" );var r=re.exec(document.cookie);return r != null ? r[3] : '';}, 299 removeCookie: function(n){this.setCookie(n,"",-1);}, 300 301 scrollTo: function(n){if(n!=null){var e=this.$(n);if(e){t=e.offsetTop;for(var p=e.offsetParent;p;p=p.offsetParent){t+=p.offsetTop;}scrollTo(0,t);}}}, 302 scrollToList: function(){this.scrollTo(this.list_id);}, 303 scrollToForm: function(id){this.scrollTo(this.form_id);}, 304 scrollToComment: function(id){this.scrollTo('comment-'+id);}, 305 306 moveElement: function(e,p,b){if(e){if(p){if(e.parentNode){e.parentNode.removeChild(e);}if(b){p.insertBefore(e,b);}else{p.appendChild(e);}}}}, 307 createElement: function(t,i,c){var e=document.createElement(t);if(i){e.setAttribute('id',i);}if(c){e.className=c;}return e;}, 308 309 fade: function(id,s,e,m){var speed=Math.round(m/100),timer=0;if(s>e){for(i=s;i>=e;i--){setTimeout("JComments.prototype.setOpacity('"+id+"',"+i+")",(timer*speed));timer++;}var o=JComments.prototype.$(id);if(o){setTimeout(function(){o.style.display='none';},((s-e)*speed));}}else if(s<e){for(i=s;i<=e;i++){setTimeout("JComments.prototype.setOpacity('"+id+"',"+i+")",(timer*speed));timer++;}}}, 310 setOpacity: function(id,opacity){var e=this.$(id);if(e){var s=e.style;s.opacity=(opacity/100);s.MozOpacity=(opacity/100);s.KhtmlOpacity=(opacity / 100);s.filter="alpha(opacity="+opacity+")";}}, 311 error:function(m,n,c){if(this.form!=null){this.form.error(m,n,c);}}, 312 message:function(m,c){if(this.form!=null){this.form.message(m,'info');}}, 313 clear:function(n){if(this.form!=null){this.form.clear(n);}}, 314 insertText:function(t){if(this.form!=null){this.form.insertText('comment',t);}else{var jc=this;window.setTimeout(function(){jc.insertText(t);},500);return;}}, 315 316 busyList: function(){if(this.list_id){var l=this.$(this.list_id);if(l){this.busy.move(l.parentNode,l);}}}, 317 busyForm: function(){if(this.form_id){var f=this.$(this.form_id);if(f){this.busy.move(f.parentNode,f);}}}, 318 busyComment: function(i){this.busy.move(this.$('comment-item-'+i),null);}, 319 320 saveComment: function(i){var f='';if(this.mode!='edit'){f='JCommentsAddComment';this.busyForm();if(this.form){this.form.storeValues();}this.busy.show();}else{f='JCommentsSaveComment';this.busy.show();}return this.ajax(f,null, this.form_id);}, 321 editComment: function(i){this.busyComment(i);var a=arguments;if(this.form==null){a=new Array(i,1);}return this.ajax('JCommentsEditComment', a);}, 322 cancelEdit: function(i){if((!this.cache[i])||(this.cache[i]=='')){this.$('comment-body-'+i).innerHTML=this.cache[i];this.cache[i]='';}if(this.form){this.form.remove('comment-id-hidden-'+i);this.restoreForm(true);}var t=this.$('comment-toolbar-'+i);if(t){t.style.display='';}return this.ajax('JCommentsCancelComment',arguments);}, 323 cancelReply: function(){if(this.form){this.form.remove('comment-parent-id-hidden');this.restoreForm(false);}}, 324 quoteComment: function(i){var a=arguments;if(this.form==null){a=new Array(i,1);}return this.ajax('JCommentsQuoteComment',a);}, 325 publishComment: function(i){if(this.form){this.restoreForm();}this.busyComment(i); return this.ajax('JCommentsPublishComment',arguments);}, 326 deleteComment: function(i){this.busyComment(i); return this.ajax('JCommentsDeleteComment',arguments);}, 327 jump2email: function(i){return this.ajax('JCommentsJump2email',arguments);}, 328 updateList: function(t,m){if(this.list_id){var l=this.$(this.list_id);if(!l){l=this.$('comments');m='a';}switch(m){case 'a':l.innerHTML=l.innerHTML+t;break;case 'p':l.innerHTML=t+l.innerHTML;break;case 'r':l.parentNode.innerHTML=t;break;}}}, 329 updateTree: function(t,r){var l;if(r==null){l=this.$('comments');if(l){l.innerHTML=t;}return;}l=this.$('comments-list-'+r);if(!l){var p=this.$('comment-item-'+r);if(p){this.busyComment(r);l=this.createElement('div','comments-list-'+r,'comments-list');l.innerHTML=t;p.parentNode.insertBefore(l,p.nextSibling);}}
329else{l.innerHTML=l.innerHTML+t;}this.restoreForm(true);}, 330 updateComment: function(id,t){if(t==''){var c=this.$('comment-item-'+id);c.parentNode.removeChild(c);var l=this.$('comments-list-'+id);if(l){l.parentNode.removeChild(l);} return;}this.$('comment-body-'+id).innerHTML=t;var te=this.$('comment-toolbar-'+id);if(te){te.style.display='';}if(this.form){this.form.remove('comment-id-hidden-'+id);this.restoreForm(true);}}, 331 voteComment: function(i){var v=this.$('comment-vote-holder-'+i);if(v){v.innerHTML='';this.busy.start(v,null);}return this.ajax('JCommentsVoteComment',arguments);}, 332 updateVote: function(i,t){this.busy.stop();var c=this.$('comment-vote-holder-'+i);if(c){c.innerHTML=t;}}, 333 showComment: function(id){return this.ajax('JCommentsShowComment',arguments);}, 334 showPage: function(i,g,p){if(this.form){this.restoreForm();}var l=this.$(this.list_id);if(!l){l=this.$(this.list_id+'-0');if(l){this.list_id=this.list_id+'-0';}}this.busyList();return this.ajax('JCommentsShowPage',arguments);}, 335 showForm: function(i,g,t){if(this.form){this.moveElement(this.form.form,this.$(t));return;}this.busyForm(); return this.ajax('JCommentsShowForm',arguments);}, 336 showEdit: function(id,n,e,h,t){ 337 var jc=this; 338 if(this.form==null){window.setTimeout(function(){jc.showEdit(id,n,e,h,t);},500);return;} 339 if((!this.cache[id])||(this.cache[id]=='')){this.cache[id]=this.$('comment-body-'+id).innerHTML;} 340 this.busy.stop(); 341 var f=this.form,ff=this.form.form,c=this.$('comment-item-'+id); 342 if(ff!=null&&c!=null){ 343 f.add('id','comment-id-hidden-'+id,id);f.setText('name', n);f.setText('email', e);f.setText('homepage', h);f.setText('comment', t); 344 var d=this.$('comments-inline-edit'); 345 if(d){d.parentNode.removeChild(d);}else{d=this.createElement('div','comments-inline-edit','comments-inline-edit');}c.appendChild(d);this.moveElement(ff,d); 346 this.setMode('edit',id);var te=this.$('comment-toolbar-'+id);if(te){te.style.display='none';} 347 this.scrollTo('comments-inline-edit'); 348 this.form.focus('comment'); 349 } 350 }, 351 showReply: function(id,q){ 352 this.busyComment(id); 353 var jc=this,c=this.$('comment-item-'+id),d=this.$('comments-inline-edit'); 354 if(d){d.parentNode.removeChild(d);}else{d=this.createElement('div','comments-inline-edit','comments-inline-edit');}c.appendChild(d); 355 if(!this.form){ 356 var t='comments-inline-edit',h=this.$('comments-form-link');if(h){t='comments-form-link';} 357 this.showForm(this.oi, this.og,t);var pid=id;this.formLoaded=function(){var f=jc.form;if(f!=null){f.add('parent','comment-parent-id-hidden',pid);}jc.setMode('reply',pid);jc.moveElement(jc.form.form,jc.$('comments-inline-edit'));jc.form.focus();if(q){jc.quoteComment(id);}}; 358 }else{ 359 var f=this.form,ff=this.form.form,p=this.$('comment-parent-id-hidden'); 360 if(ff!=null&&c!=null){if(!p){f.add('parent','comment-parent-id-hidden',id);}else{p.value=id;}this.moveElement(ff,d);this.setMode('reply',id);this.form.focus();if(q){this.quoteComment(id);}} 361 } 362 }, 363 formLoaded: function(){}, 364 restoreForm: function(c){var f=this.form;if(f!=null){var ff=this.form.form,jc=this;this.busy.stop(); 365 if(ff!=null){if(c){f.clear(null);}f.restoreValues();var a=this.$('addcomments'),p=this.$('comment-parent-id-hidden');if(p){p.value=0;} 366 this.moveElement(ff,a.parentNode,a);var d=this.$('comments-inline-edit');if(d){d.parentNode.removeChild(d);}this.setMode('add',null);} 367 }}, 368 369 subscribe: function(o,g){return this.ajax('JCommentsSubscribe',arguments);}, 370 unsubscribe: function(o,g){return this.ajax('JCommentsUnsubscribe',arguments);}, 371 updateSubscription: function(m,t){var e=this.$('comments-subscription');if(e){var jc=this;e.innerHTML=t;e.onclick=m?function(){jc.unsubscribe(jc.oi,jc.og);return false;}:function(){jc.subscribe(jc.oi,jc.og);return false;};e.blur();}}, 372 go: function(l){window.open(l);return;} 373}; 374 375} 376
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.