function display_post(a){if(AJAX_Compatible){vB_PostLoader[a]=new vB_AJAX_PostLoader(a);vB_PostLoader[a].init()}else{pc_obj=fetch_object("postcount"+this.postid);openWindow("showthread.php?"+(SESSIONURL?"s="+SESSIONURL:"")+(pc_obj!=null?"&postcount="+PHP.urlencode(pc_obj.name):"")+"&p="+a+"#post"+a)}return false}var vB_PostLoader=new Array();function vB_AJAX_PostLoader(a){this.postid=a;this.post=YAHOO.util.Dom.get("post_"+this.postid)}vB_AJAX_PostLoader.prototype.init=function(){if(this.post){postid=this.postid;pc_obj=fetch_object("postcount"+this.postid);YAHOO.util.Connect.asyncRequest("POST","showpost.php?p="+this.postid,{success:this.display,failure:this.handle_ajax_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&ajax=1&postid="+this.postid+(pc_obj!=null?"&postcount="+PHP.urlencode(pc_obj.name):""))}};vB_AJAX_PostLoader.prototype.handle_ajax_error=function(a){vBulletin_AJAX_Error_Handler(a)};vB_AJAX_PostLoader.prototype.display=function(c){if(c.responseXML){var b=c.responseXML.getElementsByTagName("postbit");if(b.length){var a=string_to_node(b[0].firstChild.nodeValue);this.post.parentNode.replaceChild(a,this.post);PostBit_Init(a,this.postid)}else{openWindow("showthread.php?"+(SESSIONURL?"s="+SESSIONURL:"")+(pc_obj!=null?"&postcount="+PHP.urlencode(pc_obj.name):"")+"&p="+this.postid+"#post"+this.postid)}}};
