function JCommentsEvents(){}function JCommentsInput(){}function JCommentsIndicator(){this.init()}function JCommentsForm(B,A){this.init(B,A)}function JCommentsEditor(A,B){this.init(A,B)}function JComments(B,C,A){this.init(B,C,A)}JCommentsEvents.prototype={add:function(C,B,A){if(C.addEventListener){C.addEventListener(B,A,false);return true}else{if(C.attachEvent){return C.attachEvent("on"+B,A)}else{return false}}},remove:function(C,B,A){if(C.removeEventListener){C.removeEventListener(B,A,false)}else{if(C.detachEvent){C.detachEvent("on"+B,C[B+A]);C[B+A]=null;C["e"+B+A]=null}}},cancel:function(A){if(A.stopPropagation){A.cancelBubble=true;A.preventDefault();A.stopPropagation()}A.returnValue=false;return false},target:function(B){var A;if(!B){B=window.event}if(B.target){A=B.target}else{if(B.srcElement){A=B.srcElement}}if(A.nodeType==3){A=A.parentNode}return A}};JCommentsInput.prototype={register:function(B){if(B){var C=this,A=new JCommentsEvents();A.add(B,"focus",function(D){return C.onFocus(D)});A.add(B,"blur",function(D){return C.onBlur(D)})}},unregister:function(B){if(B){var C=this,A=new JCommentsEvents();A.remove(B,"focus",function(D){return C.onFocus(D)});A.remove(B,"blur",function(D){return C.onBlur(D)})}},onFocus:function(B){var A=JCommentsEvents.prototype.target(B);if(A!=null){A.className=A.className.replace("error","")+" selected"}},onBlur:function(B){var A=JCommentsEvents.prototype.target(B);if(A!=null){var C=A.className.replace("error","");C=C.replace("error","");C=C.replace("selected","");A.className=C.replace(/^\s+/g,"")}}};JCommentsEditor.prototype={ta:null,l10n:{},tags:{},smiles:{},events:null,counter:null,focused:false,resizable:true,init:function(C,B){this.ta=JComments.prototype.$(C);this.panelElements={};this.l10n={counterPre:"",counterPost:" symbols left",enterValue:"Enter value"};this.resizable=B;this.events=new JCommentsEvents();this.defaultHeight=this.ta.clientHeight;this.defaultRows=this.ta.rows;if(this.resizable){this.addGrippie()}this.isWebkit=/webkit/.test(navigator.userAgent.toLowerCase());var A=this;this.events.add(document,!window.opera&&document.all?"keydown":"keypress",function(D){return A.onKeyPress(D)});this.events.add(this.ta,"click",function(D){A.closeSmiles();return A.storeCaret(this.ta)});this.events.add(this.ta,"select",function(D){return A.storeCaret(this.ta)});this.events.add(this.ta,"change",function(D){A.onChange();return A.storeCaret(this.ta)});this.events.add(this.ta,"keyup",function(D){return A.onChange()});this.events.add(this.ta,"focus",function(D){A.closeSmiles();return A.focused=true});this.events.add(this.ta,"blur",function(D){return A.focused=false})},onKeyPress:function(D){if(!this.focused){return}var C=false,A=String.fromCharCode(D.keyCode?D.keyCode:D.charCode),B=null;for(var E in this.tags){B=this.tags[E];if(!B.key||A.toUpperCase()!=B.key.toUpperCase()){continue}if(B.ctrl&&!D[B.ctrl+"Key"]){continue}this.insertTag(E);return this.events.cancel(D)}return D.returnValue},defined:function(A){return(typeof(A)!="undefined")},clear:function(){this.ta.value="";if(this.defaultHeight){this.ta.style.height=this.defaultHeight+"px"}this.updateCounter()},focus:function(){this.ta.focus()},storeCaret:function(){var A=this.ta;if(A.createTextRange){A.caretPos=document.selection.createRange().duplicate()}},getElementPos:function(B){var A={left:0,top:0,right:0,bottom:0};while(B!=null){A.left+=B.offsetLeft;A.top+=B.offsetTop;B=B.offsetParent}A.right+=A.left;A.bottom+=A.top;return A},getSelection:function(){var A=this.ta,B="";if(document.selection&&document.selection.createRange){B=document.selection.createRange().text}else{B=A.value.substr(A.selectionStart,A.selectionEnd-A.selectionStart)}return B},insertText:function(F){var A=this.ta;if(this.defined(A.caretPos)&&A.createTextRange){A.focus();var E=document.selection.createRange();E.text=E.text+F;A.focus()}else{if(this.defined(A.selectionStart)){var B=A.value.substr(0,A.selectionStart);var D=A.value.substr(A.selectionEnd),C=A.scrollTop;A.value=B+F+D;if(A.setSelectionRange){A.focus();A.setSelectionRange(B.length+F.length,B.length+F.length)}A.scrollTop=C}else{A.value+=F;A.focus(A.value.length-1)}}},surroundText:function(F,E){var D=this.ta;if(this.defined(D.caretPos)&&D.createTextRange){var H=D.caretPos,I=H.text.length;H.text=H.text.charAt(H.text.length-1)==" "?F+H.text+E+" ":F+H.text+E;if(I==0){H.moveStart("character",-E.length);H.moveEnd("character",-E.length);H.select()}else{D.focus(H)}}else{if(this.defined(D.selectionStart)){var J=D.value.substr(0,D.selectionStart),G=D.value.substr(D.selectionEnd);var B=D.value.substr(D.selectionStart,D.selectionEnd-D.selectionStart);var C=D.selectionStart,A=D.scrollTop;D.value=J+F+B+E+G;if(D.setSelectionRange){if(B.length==0){D.setSelectionRange(C+F.length,C+F.length)}else{D.setSelectionRange(C,C+F.length+B.length+E.length)}D.focus()}D.scrollTop=A}else{D.value+=F+E;D.focus(D.value.length-1)}}},insertTag:function(D){var A=this.tags[D],B=this.ta,C="";if(!A){return}C=this.getSelection();if(C.length>0){this.surroundText(A.open,A.close)}},initTags:function(){if(this.bbc==null||this.bbc.length==0){this.bbc={};this.bbc.b={id:"bbcode-b",open:"[b]",close:"[/b]",key:"B",ctrl:"ctrl",hint:"Bold"};this.bbc.i={id:"bbcode-i",open:"[i]",close:"[/i]",key:"I",ctrl:"ctrl",hint:"Italic"};this.bbc.u={id:"bbcode-u",open:"[u]",close:"[/u]",key:"u",ctrl:"ctrl",hint:"Underline"};this.bbc.s={id:"bbcode-s",open:"[s]",close:"[/s]",key:null,ctrl:null,hint:"Strikeout"};this.bbc.img={id:"bbcode-img",open:"[img]",close:"[/img]",key:null,ctrl:null,hint:"Image"};this.bbc.url={id:"bbcode-url",open:"[url]",close:"[/url]",key:null,ctrl:null,hint:"Link"};this.bbc.hide={id:"bbcode-hide",open:"[hide]",close:"[/hide]",key:null,ctrl:null,hint:"Hidden"};this.bbc.quote={id:"bbcode-quote",open:"[quote]",close:"[/quote]",key:"Q",ctrl:"ctrl",hint:"Quote"};this.bbc.list={id:"bbcode-list",open:"[list][*]",close:"[/list]",key:"L",ctrl:"ctrl",hint:"List"}}},createButton:function(D,C,G,E,B){var F;if(B==null||B==""){F=document.createElement("a");F.style.display="block";F.setAttribute("href","#")}else{F=document.createElement("img");if(C){F.setAttribute("alt",C)}F.setAttribute("src",B);if(!G){G="custombbcode"}}if(D){F.setAttribute("id",D)}if(C){F.setAttribute("title",C)}if(G){F.className=G}var A=F;F.onclick=(E!=null?function(){E(A);return false}:function(){return false});return F},addButton:function(B,F,C,D,G,H,E){if(this.ta){this.initTags();var J=this.bbc[B],A=this;if(!J){if(D&&G){this.bbc[B]={id:B,open:D,close:G,key:null,ctrl:null,hint:F};J=this.bbc[B]}else{return}}if(this.bbcPanel==null){this.bbcPanel=document.createElement("span");this.bbcPanel.className="bbcode";this.bbcPanel.style.display="block";this.ta.parentNode.insertBefore(this.bbcPanel,this.ta)}var I=function(){var L=A.getSelection();if(L.length>0){A.surroundText(J.open,J.close)}else{var K=prompt(C,"");if(null!=K&&""!=K){A.insertText(J.open+K+J.close)}}return false};J.e=this.createButton(J.id,(F!=null?F:J.hint),(H?H:J.id),I,E);this.bbcPanel.appendChild(J.e);this.tags[J.id]=J}},initSmiles:function(C){this.smilesPath=C;if(this.ta){this.smilesPanel=document.createElement("div");if(this.bbcPanel){document.body.appendChild(this.smilesPanel);this.smilesPanel.id="comments-form-smilespanel";this.smilesPanel.setAttribute("style","display:none;top:0;left:0;position:absolute;");this.smilesPanel.onclick=function(){this.style.display="none"};var A=this,B=function(G){var E=A.smilesPanel,F=A.getElementPos(G);if(E){var D=E.style;D.display=(D.display=="none"||D.display==""?"block":"none");D.left=F.left+"px";D.top=F.bottom+G.offsetHeight+"px";D.zIndex=99}return false};this.bbcPanel.appendChild(this.createButton(null,null,"bbcode-smile",B))}else{this.smilesPanel.className="smiles";this.ta.parentNode.insertBefore(this.smilesPanel,this.ta)}}},closeSmiles:function(){if(this.smilesPanel&&this.bbcPanel){this.smilesPanel.style.display="none"}},addSmile:function(B,D){if(this.ta){if(!this.smilesPath||!this.smilesPanel){return}var A=this,C=document.createElement("img");C.setAttribute("src",this.smilesPath+"/"+D);C.setAttribute("alt",B);C.className="smile";C.onclick=function(){A.insertText(" "+B+" ")};this.smilesPanel.appendChild(C)}},addCounter:function(B,C,I,G){if(this.ta){if(C!=null){this.l10n.counterPre=C}if(I!=null){this.l10n.counterPost=I}var A=document.createElement("span");A.className=G!=null?G:"";var E=document.createTextNode(this.l10n.counterPre+" "),D=document.createTextNode(" "+this.l10n.counterPost);var H=document.createElement("span");A.appendChild(E);A.appendChild(H);A.appendChild(D);if(this.resizable){if(this.grippie!=null){this.grippie.appendChild(A)}}else{var F=document.createElement("div");F.className="counterpanel";this.ta.parentNode.insertBefore(F,this.ta.nextSibling);F.appendChild(A)}this.counter={e:H,max:B};this.updateCounter()}},addGrippie:function(){this.offset=null;this.dragging=false;this.grippie=document.createElement("div");this.grippie.className="grippie";this.ta.parentNode.insertBefore(this.grippie,this.ta.nextSibling);var A=this;this.events.add(this.grippie,"mousedown",function(B){return A.onMouseDown(B)})},updateCounter:function(){if(this.counter!=null){var B=this.ta,D=this.counter.e;try{var E=document.createElement(D.tagName),A=this.counter.max-B.value.length;E.innerHTML=(A>=0)?A:0;D.parentNode.replaceChild(E,D);this.counter.e=E}catch(C){}}},mousePosition:function(C){var B=0,A=0;if(!C){C=window.event}if(C.pageX||C.pageY){B=C.pageX;A=C.pageY}else{if(C.clientX||C.clientY){B=C.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;A=C.clientY+document.body.scrollTop+document.documentElement.scrollTop}}return{x:B,y:A}},onChange:function(){this.updateCounter();if(this.ta&&!this.isWebkit){var A=this.ta.value.split("\n");this.ta.rows=(A.length<this.defaultRows)?this.defaultRows:A.length+1}return false},onMouseDown:function(B){this.offset=this.mousePosition(B).y;this.height=this.ta.clientHeight;this.dragging=true;var A=this;this.events.add(document,"mousemove",function(C){return A.onMouseMove(C)});this.events.add(document,"mouseup",function(C){return A.onMouseUp(C)});return false},onMouseUp:function(A){this.dragging=false},onMouseMove:function(A){if(this.dragging){this.ta.style.height=Math.max(this.defaultHeight,this.height+this.mousePosition(A).y-this.offset)+"px"}return false}};JCommentsForm.prototype={id:null,form:null,events:null,editor:null,elements:{},store:new Array("name","email","homepage"),fadeTimer:null,init:function(C,A){var B=this;this.id=C;this.form=this.$(C);this.editor=A;this.events=new JCommentsEvents();this.setElements(new Array("name","email","homepage","title","comment"));this.restoreValues();this.clear("captcha");this.setCaptcha()},setCaptcha:function(){this.captchaImage=this.$(this.id+"-captcha-image");this.register("captcha")},setEditor:function(A){this.editor=A},setElements:function(A){for(i=0;i<A.length;i++){try{this.register(A[i])}catch(A){}}},$:function(A){return JComments.prototype.$(A)},register:function(C){var A=this,B=this.$(this.id+"-"+C);if(B){this.elements[C]=B;JCommentsInput.prototype.register(B);this.events.add(B,!window.opera&&document.all?"keydown":"keypress",function(D){return A.keypress(D)})}},error:function(A,C){var B=this.elements[C];if(B){B.focus();B.className="error"}},clear:function(D){if(D==null){if(this.form!=null){this.form.reset()}return}switch(D){case"comment":if(this.editor!=null){this.editor.clear()}break;case"captcha":var B=this.captchaImage,A=this.elements.captcha;if(B){B.src=B.src.replace(/&ac=\d+/g,"&ac="+new String(Math.floor(Math.random()*100000)))}if(A){A.value=""}break;default:var C=this.elements[D];if(C){C.value=""}break}},focus:function(C){var B;if(C==null){for(var A in this.elements){B=this.elements[A];if(B){B.focus();break}}}else{B=this.elements[C];if(B){B.focus()}}},keypress:function(A){if(A.ctrlKey&&(A.keyCode==13||(A.type=="keypress"&&A.keyCode==10))){this.submit();A.returnValue=false;return this.events.cancel(A)}return this.keypressed(A)},add:function(D,B,A){if(this.form!=null){var C=document.createElement("input");C.setAttribute("type","hidden");C.setAttribute("name",D);C.setAttribute("id",B);C.setAttribute("value",A);this.form.appendChild(C)}},remove:function(A){var B=this.$(A);if(B){B.value=0;B.parentNode.removeChild(B)}},setText:function(C,A){if(C=="comment"){if(this.editor!=null){this.editor.clear();this.editor.insertText(A)}}else{var B=this.elements[C];if(B){B.value=A}}},insertText:function(C,A){if(C=="comment"){if(this.editor!=null){this.editor.insertText(A)}}else{var B=this.elements[C];if(B){B.value+=A}}},storeValues:function(){for(var A=0;A<this.store.length;A++){try{var B=JComments.prototype.$(this.id+"-"+this.store[A]);if(B){JComments.prototype.setCookie(this.store[A],encodeURIComponent(B.value),14)}}catch(C){}}},restoreValues:function(){for(var A=0;A<this.store.length;A++){try{var B=JComments.prototype.$(this.id+"-"+this.store[A]);if(B){if(B.type&&B.type=="hidden"){return}else{B.value=decodeURIComponent(JComments.prototype.getCookie(this.store[A]))}}}catch(C){}}},submit:function(){},keypressed:function(A){}};JCommentsIndicator.prototype={e:null,init:function(){if(this.e==null){this.e=document.createElement("div");this.e.className="busy"}},move:function(B,A){if(B){if(this.e.parentNode){this.e.parentNode.removeChild(this.e)}if(A){B.insertBefore(this.e,A)}else{B.appendChild(this.e)}}},show:function(){this.e.style.display="block"},hide:function(){this.e.style.display="none"},start:function(B,A){this.move(B,A);this.show()},stop:function(){this.hide()}};JComments.prototype={oi:null,og:null,debug:false,requestURI:"",oldRequestURI:"",busy:null,form:null,cache:{},mode:"add",readyList:[],isReady:false,init:function(D,E,C){var A=navigator.userAgent.toLowerCase();this.browser={safari:/webkit/.test(A),opera:/opera/.test(A),msie:/msie/.test(A)&&!(/opera/.test(A)),mozilla:/mozilla/.test(A)&&!(/(compatible|webkit)/.test(A))};this.oi=D;this.og=E;this.busy=new JCommentsIndicator();this.requestURI=C;var B=this;jtajax.startLoading=function(){B.busy.show()};jtajax.finishLoading=function(){B.busy.hide()}},reinit:function(B,D){this.oi=B;this.og=D;var A=this.$("object_id");if(A){A.value=B}var C=this.$("object_group");if(C){C.value=D}this.showPage(B,D,0)},setForm:function(B){this.form=B;this.form_id=B.id;this.setMode("add",null);var A=this;this.form.submit=function(){A.saveComment()};this.form.keypressed=function(C){if(C.keyCode==27&&A.mode=="reply"){A.restoreForm(false)}};this.formLoaded()},setList:function(A){this.list_id=A},setMode:function(B,D){var A=this.$("comments-form-cancel"),C=this;if(A!=null){A.style.display=(B!="add")?"":"none";A.onclick=(B=="edit"?function(){C.cancelEdit(D)}:(B=="reply"?function(){C.cancelReply()}:null))}this.mode=B},$:function(B){if(!B){return null}var A=document.getElementById(B);if(!A&&document.all){A=document.all[B]}return A},ajax:function(C,A,F){var B,E;try{E=jtajax.options.url;jtajax.setup({url:this.requestURI});B=jtajax.call(C,A,"post",F);jtajax.options.url=E}catch(D){jtajax.options.url=E}return B},initOnReady:function(){if(this.isReadyInited){return}this.isReadyInited=1;var A=this;if(this.browser.mozilla||this.browser.opera){JCommentsEvents.prototype.add(document,"DOMContentLoaded",A.ready)}else{if(this.browser.msie){(function(){try{document.documentElement.doScroll("left")}catch(B){setTimeout(arguments.callee,50);return}A.ready()})()}else{if(this.browser.safari){(function(){if(A.isReady){return}if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return}A.ready()})()}}}JCommentsEvents.prototype.add(window,"load",function(){A.ready(A)})},onReady:function(B){if(this.isReady){B()}else{var A=this;A.readyList.push(B);A.initOnReady()}},ready:function(){var B=window.jcomments;if(B.isReady||B.readyList==null){return}B.isReady=1;for(var C=0,A=B.readyList.length;C<A;C++){try{B.readyList[C]()}catch(D){}}B.readyList=null},setAntiCache:function(C,B,A){this.aca=C;this.acp=B;this.acf=A;this.onReady(this.loadComments)},loadComments:function(){var B=window.jcomments;var A=document.location.href,D=true,C=A.lastIndexOf("#comment-");B.clear("captcha");if(B.aca){if(C!=0){var E=A.substring(C+9,A.length);if(!isNaN(E)){D=false;B.showComment(E)}}}if(B.acp){if(D){B.showPage(B.oi,B.og,0)}}if(B.acf){if(A.lastIndexOf("#addcomment")!=-1){B.showForm(B.oi,B.og,"comments-form-link")}}},setCookie:function(E,A,D){var C="";if(D){var B=new Date();B.setTime(B.getTime()+(D*24*60*60*1000));C="; expires="+B.toGMTString()}document.cookie="jc_"+E+"="+A+C+"; path=/"},getCookie:function(C){var A=new RegExp("(;|^)[^;]*(jc_"+C+")=([^;]*)(;|$)");var B=A.exec(document.cookie);return B!=null?B[3]:""},removeCookie:function(A){this.setCookie(A,"",-1)},scrollTo:function(D){if(D!=null){var C=this.$(D),A=0;if(C){A=C.offsetTop;for(var B=C.offsetParent;B;B=B.offsetParent){A+=B.offsetTop}scrollTo(0,A)}}},scrollToList:function(){this.scrollTo(this.list_id)},scrollToForm:function(A){this.scrollTo(this.form_id)},scrollToComment:function(A){this.scrollTo("comment-"+A)},moveElement:function(C,B,A){if(C){if(B){if(C.parentNode){C.parentNode.removeChild(C)}if(A){B.insertBefore(C,A)}else{B.appendChild(C)}}}},createElement:function(B,A,D){var C=document.createElement(B);if(A){C.setAttribute("id",A)}if(D){C.className=D}return C},fade:function(G,B,D,A){var C=Math.round(A/100),F=0;if(B>D){for(i=B;i>=D;i--){setTimeout("JComments.prototype.setOpacity('"+G+"',"+i+")",(F*C));F++}var E=JComments.prototype.$(G);if(E){setTimeout(function(){E.style.display="none"},((B-D)*C))}}else{if(B<D){for(i=B;i<=D;i++){setTimeout("JComments.prototype.setOpacity('"+G+"',"+i+")",(F*C));F++}}}},setOpacity:function(D,A){var C=this.$(D);if(C){var B=C.style;B.opacity=(A/100);B.MozOpacity=(A/100);B.KhtmlOpacity=(A/100);B.filter="alpha(opacity="+A+")"}},clear:function(A){if(this.form!=null){this.form.clear(A)}},insertText:function(B){if(this.form!=null){this.form.insertText("comment",B)}else{var A=this;window.setTimeout(function(){A.insertText(B)},500)}},busyList:function(){if(this.list_id){var A=this.$(this.list_id);if(A){this.busy.move(A.parentNode,A)}}},busyForm:function(){if(this.form_id){var A=this.$(this.form_id);if(A){this.busy.move(A.parentNode,A)}}},busyComment:function(A){this.busy.move(this.$("comment-item-"+A),null)},saveComment:function(A){var B="";if(this.mode!="edit"){B="JCommentsAddComment";this.busyForm();if(this.form){this.form.storeValues()}this.busy.show()}else{B="JCommentsSaveComment";this.busy.show()}return this.ajax(B,null,this.form_id)},editComment:function(B){this.busyComment(B);var A=arguments;if(this.form==null){A=new Array(B,1)}return this.ajax("JCommentsEditComment",A)},cancelEdit:function(B){if((!this.cache[B])||(this.cache[B]=="")){this.$("comment-body-"+B).innerHTML=this.cache[B];this.cache[B]=""}if(this.form){this.form.remove("comment-id-hidden-"+B);this.restoreForm(true)}var A=this.$("comment-toolbar-"+B);if(A){A.style.display=""}return this.ajax("JCommentsCancelComment",arguments)},cancelReply:function(){if(this.form){this.form.remove("comment-parent-id-hidden");this.restoreForm(false)}},quoteComment:function(B){var A=arguments;if(this.form==null){A=new Array(B,1)}return this.ajax("JCommentsQuoteComment",A)},publishComment:function(A){if(this.form){this.restoreForm()}this.busyComment(A);return this.ajax("JCommentsPublishComment",arguments)},deleteComment:function(A){this.busyComment(A);return this.ajax("JCommentsDeleteComment",arguments)},jump2email:function(A){return this.ajax("JCommentsJump2email",arguments)},updateList:function(C,A){if(this.list_id){var B=this.$(this.list_id);if(!B){B=this.$("comments");A="a"}switch(A){case"a":B.innerHTML=B.innerHTML+C;break;case"p":B.innerHTML=C+B.innerHTML;break;case"r":B.parentNode.innerHTML=C;break}}},updateTree:function(B,C){var A;if(C==null){A=this.$("comments");if(A){A.innerHTML=B}return}A=this.$("comments-list-"+C);if(!A){var D=this.$("comment-item-"+C);if(D){this.busyComment(C);A=this.createElement("div","comments-list-"+C,"comments-list");A.innerHTML=B;D.parentNode.insertBefore(A,D.nextSibling)}}else{A.innerHTML=A.innerHTML+B}this.restoreForm(true)},updateComment:function(E,B){if(B==""){var D=this.$("comment-item-"+E);D.parentNode.removeChild(D);var A=this.$("comments-list-"+E);if(A){A.parentNode.removeChild(A)}return}this.$("comment-body-"+E).innerHTML=B;var C=this.$("comment-toolbar-"+E);if(C){C.style.display=""}if(this.form){this.form.remove("comment-id-hidden-"+E);this.restoreForm(true)}},voteComment:function(B){var A=this.$("comment-vote-holder-"+B);if(A){A.innerHTML="";this.busy.start(A,null)}return this.ajax("JCommentsVoteComment",arguments)},updateVote:function(B,A){this.busy.stop();var C=this.$("comment-vote-holder-"+B);if(C){C.innerHTML=A}},showComment:function(A){return this.ajax("JCommentsShowComment",arguments)},showPage:function(B,C,D){if(this.form){this.restoreForm()}var A=this.$(this.list_id);if(!A){A=this.$(this.list_id+"-0");if(A){this.list_id=this.list_id+"-0"}}this.busyList();return this.ajax("JCommentsShowPage",arguments)},showForm:function(B,C,A){if(this.form){this.moveElement(this.form.form,this.$(A));return}this.busyForm();return this.ajax("JCommentsShowForm",arguments)},showEdit:function(B,C,H,F,L,E){var K=this;if(this.form==null){window.setTimeout(function(){K.showEdit(B,C,H,F,L,E)},500);return}if((!this.cache[B])||(this.cache[B]=="")){this.cache[B]=this.$("comment-body-"+B).innerHTML}this.busy.stop();var G=this.form,A=this.form.form,J=this.$("comment-item-"+B);if(A!=null&&J!=null){G.add("id","comment-id-hidden-"+B,B);G.setText("name",C);G.setText("email",H);G.setText("homepage",F);G.setText("title",L);G.setText("comment",E);var I=this.$("comments-inline-edit");if(I){I.parentNode.removeChild(I)}else{I=this.createElement("div","comments-inline-edit","comments-inline-edit")}J.appendChild(I);this.moveElement(A,I);this.setMode("edit",B);var D=this.$("comment-toolbar-"+B);if(D){D.style.display="none"}this.scrollTo("comments-inline-edit");this.form.focus("comment")}},showReply:function(D,B){this.busyComment(D);this.cancelReport();var J=this,I=this.$("comment-item-"+D),H=this.$("comments-inline-edit");if(H){H.parentNode.removeChild(H)}else{H=this.createElement("div","comments-inline-edit","comments-inline-edit")}I.appendChild(H);if(!this.form){var K="comments-inline-edit",E=this.$("comments-form-link");if(E){K="comments-form-link"}this.showForm(this.oi,this.og,K);var F=D;this.formLoaded=function(){var L=J.form;if(L!=null){L.add("parent","comment-parent-id-hidden",F)}J.setMode("reply",F);J.moveElement(J.form.form,J.$("comments-inline-edit"));J.form.focus();if(B){J.quoteComment(D)}}}else{var G=this.form,A=this.form.form,C=this.$("comment-parent-id-hidden");if(A!=null&&I!=null){if(!C){G.add("parent","comment-parent-id-hidden",D)}else{C.value=D}this.moveElement(A,H);this.setMode("reply",D);this.form.focus();if(B){this.quoteComment(D)}}}},formLoaded:function(){},restoreForm:function(G){var D=this.form;if(D!=null){var C=this.form.form,B=this;this.busy.stop();if(C!=null){if(G){D.clear(null)}D.restoreValues();var A=this.$("addcomments"),E=this.$("comment-parent-id-hidden");if(E){E.value=0}this.moveElement(C,A.parentNode,A);var F=this.$("comments-inline-edit");if(F){F.parentNode.removeChild(F)}this.setMode("add",null)}}},reportComment:function(E){this.busyComment(E);this.cancelReply();var B=this,D=this.$("comment-item-"+E),C=this.$("comments-inline-report");if(C){C.parentNode.removeChild(C)}else{C=this.createElement("div","comments-inline-report","comments-inline-report")}D.appendChild(C);var A=new Array(E,"comments-inline-report");return this.ajax("JCommentsShowReportForm",A)},saveReport:function(A){this.ajax("JCommentsReportComment",null,"comments-report-form");return true},cancelReport:function(){var A=this.$("comments-inline-report");if(A){A.innerHTML=""}},closeReport:function(A){this.cancelReport();this.showMessage(A,"info","comments-inline-report")},error:function(A,B,C){if(this.form!=null){this.form.error(C)}if(!B||B==""){B=this.form_id}this.showMessage(A,"error",B)},message:function(A,B){if(!B||B==""){B=this.form_id}this.showMessage(A,"info",B)},showMessage:function(A,E,D){clearTimeout(this.fadeTimer);var C=this.$("comments-form-message");var B=this.$(D);if(C){C.parentNode.removeChild(C)}C=JComments.prototype.createElement("div","comments-form-message","");if(B){JComments.prototype.moveElement(C,B,B.firstChild)}else{alert(A);return}if(!E){E="info"}C.className="comments-form-message-"+E;C.innerHTML=A;C.style.display="block";JComments.prototype.setOpacity(C.id,100);this.fadeTimer=setTimeout(function(){JComments.prototype.fade("comments-form-message",100,0,1000)},6000)},subscribe:function(B,A){return this.ajax("JCommentsSubscribe",arguments)},unsubscribe:function(B,A){return this.ajax("JCommentsUnsubscribe",arguments)},updateSubscription:function(A,C){var D=this.$("comments-subscription");if(D){var B=this;D.innerHTML=C;D.onclick=A?function(){B.unsubscribe(B.oi,B.og);return false}:function(){B.subscribe(B.oi,B.og);return false};D.blur()}},go:function(A){window.open(A);return false}};
