function createXMLHttpRequest_coc(){var _1=null;try{_1=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser does not support the XMLHttpRequest Object!");}return _1;}var xhr=createXMLHttpRequest_coc();function coc(id,_3){$("submit-comments-on-comments-"+id).disabled=true;Element.show("loading-comments-on-comments-"+id);var _4=escape(document.getElementById("comments-on-comments-"+id).value);xhr.open("get",_3+"comments_on_comments.php?id="+id+"&action=add&content="+_4+"&path="+_3);xhr.onreadystatechange=handleResponse_coc;xhr.send(null);return false;}function coc_delete(_5,_6,_7){var _8=confirm("Are you sure you want to delete this comment?");if(_8){xhr.open("get",_7+"comments_on_comments.php?id="+_5+"&comment_id="+_6+"&action=delete&content=na&path="+_7);xhr.onreadystatechange=handleResponse_coc;xhr.send(null);}}function coc_show_more_comments(_9){list=$("list-comments-on-comments-"+_9);list.removeChild($("viewall-comments-on-comments-"+_9));listchilds=list.childNodes;listchildscount=listchilds.length;for(i=0;i<listchildscount;i++){listchilds[i].style.display="block";}}function handleResponse_coc(){if(xhr.readyState==4){var _a=xhr.responseText.split("|");if(_a[0].replace(/^\s+|\s+$/g,"")=="done"){if(_a[1].replace(/^\s+|\s+$/g,"")){switch(_a[2].replace(/^\s+|\s+$/g,"")){case "add":list=document.getElementById("list-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));viewall=document.getElementById("viewall-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));if(viewall){list.removeChild(viewall);}newcomment=document.createElement("li");newcomment.innerHTML=_a[3].replace(/^\s+|\s+$/g,"");list.appendChild(newcomment);if(viewall){list.appendChild(viewall);}break;case "delete":list=document.getElementById("list-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));list.removeChild(document.getElementById("element-comments-on-comments-"+_a[6].replace(/^\s+|\s+$/g,"")));break;}}else{alert("?");}Element.hide("loading-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));}else{if(_a[0].replace(/^\s+|\s+$/g,"")=="error"){switch(_a[2].replace(/^\s+|\s+$/g,"")){case "wait":list=document.getElementById("list-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));newcomment=document.createElement("li");newcomment.innerHTML="<font color=red><strong>Spamming? <img src='http://www.yebber.com/wp-includes/images/smilies/icon_smile.gif'/><br/>You are commenting too fast, please slow down.</strong></font>";list.appendChild(newcomment);break;case "blank":list=document.getElementById("list-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));newcomment=document.createElement("li");newcomment.innerHTML="<font color=red><strong>What is a comment without words?</strong></font>";list.appendChild(newcomment);break;case "tooshort":list=document.getElementById("list-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));newcomment=document.createElement("li");newcomment.innerHTML="<font color=red><strong>Comment is too short!</strong></font>";list.appendChild(newcomment);break;}$("submit-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,"")).disabled=false;Element.hide("loading-comments-on-comments-"+_a[1].replace(/^\s+|\s+$/g,""));}else{}}}}