/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.5
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2017 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| #        www.vbulletin.com | www.vbulletin.com/license.html        # ||
|| #################################################################### ||
\*======================================================================*/
newcommenturl="";comment_postid=0;function do_widget_paging(A){if(A=="back"){new_page=parseInt(document.getElementById("current_page").value)-1}else{if(A=="first"){new_page=1}else{if(A=="last"){new_page=parseInt(document.getElementById("last_page").value)}else{new_page=parseInt(document.getElementById("current_page").value)+1}}}per_page=5;if(document.getElementById("per_page").value!=undefined){per_page=parseInt(document.getElementById("per_page").value)}load_html("node_comments_block","ajax.php?do=get_comments&nodeid="+document.getElementById("nodeid").value+"&page="+new_page+"&per_page="+per_page+"&this_url="+document.getElementById("this_url").value,"",null,null);return false}function refreshPage(){document.location=(newcommenturl?newcommenturl:THIS_URL)}function clearDiv(A){if(document.getElementById(A)!=undefined){document.getElementById(A).innerHTML=""}}function sendForm(I,D,H,E,F,K){var B=vB_Editor[D].prepare_submit(0,MIN_CHARS);if(!B){return false}var J=false;if(fetch_object("allow_ajax_qr")==undefined||!AJAX_Compatible){J=true}else{if(fetch_object("allow_ajax_qr").value==false){J=true}}if(J){var A=YAHOO.util.Dom.get("form_widget_comments");A.submit();return false}postvars="do=postreply&ajax=1&parseurl=1&threadid="+THREADID;if(comment_postid>0){postvars+="&postid="+comment_postid}if(document.getElementById(I)!=undefined&&document.getElementById(I).value!=""){postvars+="&title="+PHP.urlencode(document.getElementById(I).value)}if(document.getElementById(H)!=undefined&&document.getElementById(H).value!=""){postvars+="&username="+PHP.urlencode(document.getElementById(H).value)}if(document.getElementById(E)!=undefined&&document.getElementById(E).value!=""&&document.getElementById(F)!=undefined&&document.getElementById(F).value!=""){postvars+="&humanverify[input]="+PHP.urlencode(document.getElementById(E).value);postvars+="&humanverify[hash]="+PHP.urlencode(document.getElementById(F).value);if(document.getElementById("recaptcha_challenge_field")!=undefined&&document.getElementById("recaptcha_challenge_field").value!=""){postvars+="&recaptcha_challenge_field="+PHP.urlencode(document.getElementById("recaptcha_challenge_field").value)}if(document.getElementById("recaptcha_response_field")!=undefined&&document.getElementById("recaptcha_response_field").value!=""){postvars+="&recaptcha_response_field="+PHP.urlencode(document.getElementById("recaptcha_response_field").value)}}else{if(document.getElementById("humanverify")&&document.getElementById(F)){postvars+="&humanverify[input]="+PHP.urlencode(document.getElementById("humanverify").value);postvars+="&humanverify[hash]="+PHP.urlencode(document.getElementById(F).value)}}var C=fetch_object("return_node");if(C!="undefined"&&C.value!=""){postvars+="&return_node="+C.value}var G=fetch_object("fb_dopublish");if(G!=null&&G.checked==1){postvars+="&fb_dopublish=1"}if(vB_Editor[D]!=undefined){postvars+="&message="+PHP.urlencode(vB_Editor[D].textarea_backup.value)}if(ajax_last_post!=""){postvars+="&ajax_lastpost="+ajax_last_post}else{postvars+="&ajax_lastpost=0"}YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("newreply.php?do=postreply"),{success:function(W){if(W.responseXML){YAHOO.util.Dom.setAttribute("qc_error_div","class","hidden");YAHOO.util.Dom.get("qc_error_list").innerHTML="&nbsp;";var N="";var V="";var S=W.responseXML.getElementsByTagName("errors");var Q=(S&&S.length>0)?S[0]:null;if(Q){while(Q.hasChildNodes()==true){if(Q.firstChild.nodeName=="error"){V+=(Q.firstChild.firstChild.nodeValue?Q.firstChild.firstChild.nodeValue:Q.firstChild.firstChild.nodeTypedValue)+"\n\n"}Q.removeChild(Q.firstChild)}}if(V!=""){YAHOO.util.Dom.get("qc_error_list").innerHTML=V;YAHOO.util.Dom.removeClass("qc_error_div","hidden")}else{if(fetch_tag_count(W.responseXML,"updatepost")){vB_Editor[D].write_editor_contents("");ajax_last_post=W.responseXML.getElementsByTagName("time")[0].firstChild.nodeValue;var O=W.responseXML.getElementsByTagName("postbit")[0].firstChild.nodeValue;var T=W.responseXML.getElementsByTagName("updatepost")[0].firstChild.nodeValue;var R=YAHOO.util.Dom.get("comments_"+T);R.parentNode.replaceChild(string_to_node(O),R);PostBit_Init(YAHOO.util.Dom.get("comments_"+T),T);R.scrollIntoView(false)}else{ajax_last_post=W.responseXML.getElementsByTagName("time")[0].firstChild.nodeValue;N=W.responseXML.getElementsByTagName("newrows")[0].firstChild.nodeValue;vB_Editor[D].write_editor_contents("");if(fetch_tag_count(W.responseXML,"postbit")){var U="comment";var P=W.responseXML.getElementsByTagName("postbit");var L=parseInt(YAHOO.util.Dom.get("comments_block_count").innerHTML);YAHOO.util.Dom.get("comments_block_count").innerHTML=L+parseInt(N);YAHOO.util.Dom.get("comments_top_count").innerHTML=L+parseInt(N);if(YAHOO.util.Dom.get("comments_block_count").innerHTML>1){U="comments"}YAHOO.util.Dom.get("comments_block_text").innerHTML=vbphrase[U];YAHOO.util.Dom.get("comments_top_text").innerHTML=vbphrase[U];for(i=0;i<P.length;i++){var Y=document.createElement("div");Y.innerHTML=P[i].firstChild.nodeValue;var M=Y.getElementsByTagName("div")[0];var X=YAHOO.util.Dom.get("node_comments");if(M){var O=X.appendChild(M);PostBit_Init(O,P[i].getAttribute("postid"))}}}}}}},timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&"+postvars);return false}function sendForm_Simple(B,C,A){postvars="do=postreply&ajax=1&quickreply=1&parseurl=1";if(comment_postid>0){postvars+="&postid="+comment_postid}if(document.getElementById(B)!=undefined&&document.getElementById(B).value!=""){postvars+="&title="+escape(document.getElementById(B).value)}if(vB_Editor[C]!=undefined){postvars+="&message="+escape(vB_Editor[C].get_editor_contents())}load_html("node_comments_hide","newreply.php?ajax=1&threadid="+THREADID,postvars,null,A);return false}vB_XHTML_Ready.subscribe(init_qr);function init_qr(){YAHOO.util.Event.on("qr_preview","click",qr_advanced,this,true)}function qr_advanced(C){YAHOO.util.Event.stopEvent(C);if(vB_Editor.vB_Editor_QR.prepare_submit(0,0)){var B=YAHOO.util.Dom.get("form_widget_comments");var A=new vB_Hidden_Form(B.action);A.add_variable("preview",1);A.add_variables_from_object(B);A.submit_form()}return true}function hide_errors(){YAHOO.util.Dom.addClass("qc_error_div","hidden")};