images=[path+"components/com_chronocomments/images/rating-plus-on.png",path+"components/com_chronocomments/images/rating-plus.png",path+"components/com_chronocomments/images/rating-minus-on.png",path+"components/com_chronocomments/images/rating-minus.png",path+"components/com_chronocomments/images/rep-score-left.png",path+"components/com_chronocomments/images/rep-score-right.png",path+"components/com_chronocomments/images/arrow.gif",path+"components/com_chronocomments/images/button.gif",path+"components/com_chronocomments/images/arrow.png",path+"components/com_chronocomments/images/avatar1.png",path+"components/com_chronocomments/images/button.png",path+"components/com_chronocomments/images/comment-header-bg.png",path+"components/com_chronocomments/images/rep-score-center.png",path+"components/com_chronocomments/images/bg-box-bottom.png",path+"components/com_chronocomments/images/bg-box-bottom.gif",path+"components/com_chronocomments/images/bg-box-top.png",path+"components/com_chronocomments/images/bg-box-top.gif",path+"components/com_chronocomments/images/bg-box-body.png",path+"components/com_chronocomments/images/bg-box-body.gif",path+"components/com_chronocomments/loaderb.gif",path+"components/com_chronocomments/loaderw.gif"];new Asset.images(images);function showbox(a){Yourbox=new PBBAcpBox();Yourbox.alert(a)}function showPlus(b){var a=document.getElementById(b);a.style.backgroundImage="url("+path+"components/com_chronocomments/images/rating-plus-on.png)";return false}function hidePlus(b){var a=document.getElementById(b);a.style.backgroundImage="url("+path+"components/com_chronocomments/images/rating-plus.png)";return false}function showMinus(b){var a=document.getElementById(b);a.style.backgroundImage="url("+path+"components/com_chronocomments/images/rating-minus-on.png)";return false}function hideMinus(b){var a=document.getElementById(b);a.style.backgroundImage="url("+path+"components/com_chronocomments/images/rating-minus.png)";return false}function showShadow(d){idLeft=d+"_l";idCenter=d+"_c";idRight=d+"_r";var c=document.getElementById(idLeft);var a=document.getElementById(idCenter);var b=document.getElementById(idRight);c.style.backgroundPosition="0px -22px";a.style.backgroundPosition="-6px -22px";b.style.backgroundPosition="-729px -22px";return false}function hideShadow(d){idLeft=d+"_l";idCenter=d+"_c";idRight=d+"_r";var c=document.getElementById(idLeft);var a=document.getElementById(idCenter);var b=document.getElementById(idRight);c.style.backgroundPosition="0px 0px";a.style.backgroundPosition="-6px 0px";b.style.backgroundPosition="-728px 0px";return false}function showCommentForm(a){$("post_"+a).setStyle("display","none");document.getElementById("post_"+a+"_form").style.display="block";return false}function hideCommentForm(a){$("post_"+a).setStyle("display","block");document.getElementById("post_"+a+"_form").style.display="none";return false}function toggleForm(){($("post_x1_form").getStyle("display")=="none")?$("post_x1_form").setStyle("display","block"):$("post_x1_form").setStyle("display","none")}function addPlus(b){var a="index2.php?option=com_chronocomments&task=ratepos&commentid="+b;new Ajax(a,{method:"get",update:$("chrono_comments_AJAX_response_temp"),onComplete:function(){if($("chrono_comments_AJAX_response_temp").getText()=="pos1"){$("score"+b).setText((($("score"+b).getText().toInt()+1)>0)?"+"+($("score"+b).getText().toInt()+1):($("score"+b).getText().toInt()+1))}if($("chrono_comments_AJAX_response_temp").getText()=="pos0guest"){alert(GUEST_CANT_VOTE)}if($("chrono_comments_AJAX_response_temp").getText()=="pos0owner"){alert(OWNER_CANT_VOTE)}}}).request()}function addMinus(b){var a="index2.php?option=com_chronocomments&task=rateneg&commentid="+b;new Ajax(a,{method:"get",update:$("chrono_comments_AJAX_response_temp"),onComplete:function(){if($("chrono_comments_AJAX_response_temp").getText()=="neg1"){$("score"+b).setText((($("score"+b).getText().toInt()-1)>0)?"+"+($("score"+b).getText().toInt()-1):($("score"+b).getText().toInt()-1))}if($("chrono_comments_AJAX_response_temp").getText()=="neg0guest"){alert(GUEST_CANT_VOTE)}if($("chrono_comments_AJAX_response_temp").getText()=="neg0owner"){alert(OWNER_CANT_VOTE)}}}).request()}function unpublishComment(b){var a="index2.php?option=com_chronocomments&task=unpublish&commentid="+b;new Ajax(a,{method:"get",update:$("chrono_comments_AJAX_response_temp"),onComplete:function(){if($("chrono_comments_AJAX_response_temp").getText()=="unpublish1"){alert(UNPUBLISHED_SUCCESS)}}}).request()}function editCommentForm(a){$("edit_"+a).setStyle("display","none");document.getElementById("edit_"+a+"_form").style.display="block";return false}function hideeditCommentForm(a){$("edit_"+a).setStyle("display","block");document.getElementById("edit_"+a+"_form").style.display="none";return false}function submiteditCommentForm(a){var b={loading:new Fx.Style("ccloading","opacity",{duration:200}),success:new Fx.Style("ccsuccess","opacity",{duration:200}),fail:new Fx.Style("ccfail","opacity",{duration:200})};var c=function(f){var e=new Fx.Style("ccloading","opacity",{duration:100});var d=new Fx.Style("ccresponse","opacity",{duration:100});e.start(0,0).chain(function(){(b[f]).start(0,1);(function(){(b[f]).start(1,0)}).delay(4000);(function(){d.start(1,0)}).delay(4000)})};if($("edit_ccname_"+a).value.trim()==""){alert(ENTER_NAME);$("edit_ccname_"+a).focus()}else{if($("edit_"+a+"_text").value.trim()==""){alert(ENTER_COMMENT);$("edit_"+a+"_text").focus()}else{$("edit_ccform_"+a).send({onRequest:function(){var d=new Fx.Style("ccresponse","opacity",{duration:100});$("post_"+a+"_form_loading").setStyle("display","block")},onComplete:function(){$("post_"+a+"_form_loading").setStyle("display","none");if(this.response.text=="NOTAUTH"){}else{newDiv=new Element("div",{"class":"comment-item",id:"commentID"+a}).setHTML(this.response.text);$("commentID"+a).getLast().injectInside(newDiv);$("commentID"+a).replaceWith(newDiv)}},onFailure:function(){$("post_"+a+"_form_loading").setStyle("display","none")}})}}}function submitCommentForm(b){var c={loading:new Fx.Style("ccloading","opacity",{duration:200}),success:new Fx.Style("ccsuccess","opacity",{duration:200}),fail:new Fx.Style("ccfail","opacity",{duration:200})};var d=function(g){var f=new Fx.Style("ccloading","opacity",{duration:100});var e=new Fx.Style("ccresponse","opacity",{duration:100});f.start(0,0).chain(function(){(c[g]).start(0,1);(function(){(c[g]).start(1,0)}).delay(4000);(function(){e.start(1,0)}).delay(4000)})};var a=/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/;if($("ccname_"+b).value.trim()==""){alert(ENTER_NAME);$("ccname_"+b).focus()}else{if($("ccname_"+b).value.trim().length>50){alert(NAME_LENGTH);$("ccname_"+b).focus()}else{if($("post_"+b+"_text").value.trim()==""){alert(ENTER_COMMENT);$("post_"+b+"_text").focus()}else{if((!hideemail)&&($chk($("ccemail_"+b)))&&(($("ccemail_"+b).value.trim()=="")||(!(a.test($("ccemail_"+b).value.trim()))))){alert(ENTER_EMAIL);$("ccemail_"+b).focus()}else{if((!hideurl)&&($chk($("ccurl_"+b)))&&(!$("ccurl_"+b).value.trim().test("http://"))){alert(URL_HTTP);$("ccurl_"+b).focus()}else{$("ccform_"+b).send({onRequest:function(){var e=new Fx.Style("ccresponse","opacity",{duration:100});$("post_"+b+"_form_loading").setStyle("display","block")},onComplete:function(){$("post_"+b+"_form_loading").setStyle("display","none");if(this.response.text=="NOTAUTH"){}else{if(this.response.text=="NOTAUTH_CAPTCHA"){showbox(WRONG_CODE);$("post_"+b+"_form_loading").setStyle("display","none");if(captcha=="1"){new Asset.image(path+"components/com_chronocomments/chrono_verification.php?imtype="+imtype+"&anticache="+$random(1,99999),{onload:function(){this.setProperty("id","comment_captcha_img");this.setProperty("class","comment_captcha_img");var e=0;var h=new Array();$$("img.comment_captcha_img").each(function(i){h[e]=i;e=e+1});for(var f=0;f<e;f++){var g=this.clone();h[f].replaceWith(g)}}})}}else{if(CommentPublished){if(CommentVerified){newDiv=new Element("div",{"class":"reply"}).setHTML(this.response.text);if(b!="x1"){newDiv.injectAfter($("commentID"+b).getLast());$("post_"+b).setStyle("display","block");hideCommentForm(b);cleanCommentForm(b)}else{newDiv.getFirst().injectInside($("allcomments"));cleanCommentForm(b)}if(captcha=="1"){new Asset.image(path+"components/com_chronocomments/chrono_verification.php?imtype="+imtype+"&anticache="+$random(1,99999),{onload:function(){this.setProperty("id","comment_captcha_img");this.setProperty("class","comment_captcha_img");var e=0;var h=new Array();$$("img.comment_captcha_img").each(function(i){h[e]=i;e=e+1});for(var f=0;f<e;f++){var g=this.clone();h[f].replaceWith(g)}}})}}else{showbox(NOT_VERIFIED);if(b!="x1"){hideCommentForm(b)}$("post_"+b+"_form_loading").setStyle("display","none");cleanCommentForm(b)}}else{showbox(NOT_PUBLISHED);if(b!="x1"){hideCommentForm(b)}$("post_"+b+"_form_loading").setStyle("display","none");cleanCommentForm(b)}}}},onFailure:function(){$("post_"+b+"_form_loading").setStyle("display","none")}})}}}}}}function cleanCommentForm(a){$("post_"+a+"_text").value="";$("ccname_"+a).value="";if((!hideemail)&&($chk($("ccemail_"+a)))){$("ccemail_"+a).value=""}if((!hideurl)&&($chk($("ccurl_"+a)))){$("ccurl_"+a).value="http://"}if(captcha=="1"){$("comment_captcha_"+a).value=""}}function nextComments(c,a){var b="index2.php?option=com_chronocomments&task=nextcomments&component="+c+"&pageid="+a+"&anticache="+$random(1,99999);new Ajax(b,{method:"get",onRequest:function(){$("allcomments").setHTML('<br /><br /><br /><br /><br /><br /><div style="text-align:center; height: 200px;"><img src="'+path+"components/com_chronocomments/loader"+loadercolor+'.gif" /></div><br /><br />')},onComplete:function(){$("allcomments").setHTML(new Element("div").setHTML(this.response.text).getFirst().innerHTML);$("paginationlinks").replaceWith(new Element("div").setHTML(this.response.text).getLast())}}).request()}function prevComments(c,a){var b="index2.php?option=com_chronocomments&task=prevcomments&component="+c+"&pageid="+a+"&anticache="+$random(1,99999);new Ajax(b,{method:"get",update:$("allcomments"),onRequest:function(){$("allcomments").setHTML('<br /><br /><br /><br /><br /><br /><div style="text-align:center; height: 200px;"><img src="'+path+"components/com_chronocomments/loader"+loadercolor+'.gif" /></div><br /><br />')},onComplete:function(){$("allcomments").setHTML(new Element("div").setHTML(this.response.text).getFirst().innerHTML);$("paginationlinks").replaceWith(new Element("div").setHTML(this.response.text).getLast())}}).request()}function navigateComments(d,b,a){var c="index2.php?option=com_chronocomments&task=navigatecomments&component="+d+"&pageid="+b+"&pagenum="+a+"&anticache="+$random(1,99999);new Ajax(c,{method:"get",update:$("allcomments"),onRequest:function(){$("allcomments").setHTML('<br /><br /><br /><br /><br /><br /><div style="text-align:center; height: 200px;"><img src="'+path+"components/com_chronocomments/loader"+loadercolor+'.gif" /></div><br /><br />')},onComplete:function(){$("allcomments").setHTML(new Element("div").setHTML(this.response.text).getFirst().innerHTML);$("paginationlinks").replaceWith(new Element("div").setHTML(this.response.text).getLast())}}).request()}var form_name="ccform_x1";var text_name="text";var load_draft=false;var upload=false;var bbcode=new Array();var bbtags=new Array("[b]","[/b]","[i]","[/i]","[u]","[/u]","[quote]","[/quote]","[code]","[/code]","[list]","[/list]","[li]","[/li]","[img]","[/img]","[url]","[/url]","[flash=]","[/flash]","[size=]","[/size]");var imageTag=false;var help_line={b:"Bold text: [b]text[/b]",i:"Italic text: [i]text[/i]",u:"Underline text: [u]text[/u]",q:"Quote text: [quote]text[/quote]",c:"Code display: [code]code[/code]",l:"List: [list]text[/list]",o:"Ordered list: [list=]text[/list]",p:"Insert image: [img]http://image_url[/img]",w:"Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]",a:"Inline uploaded attachment: [attachment=]filename.ext[/attachment]",s:"Font colour: [color=red]text[/color]  Tip: you can also use color=#FF0000",f:"Font size: [size=85]small text[/size]",e:"List: Add list element",d:"Flash: [flash=width,height]http://url[/flash]"};var panels=new Array("options-panel","attach-panel","poll-panel");var show_panel="options-panel";