/*======================================================================*\ || #################################################################### || || # vBulletin 3.7.0 || # ---------------------------------------------------------------- # || || # Copyright ©2000-2008 Jelsoft Enterprises Ltd. All Rights Reserved. || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || #################################################################### || \*======================================================================*/ vBulletin.events.systemInit.subscribe(function(){if(vBulletin.elements.vB_Lightbox_Container){for(var B=0;B=A){return true}else{console.warn("Checked status for %d, found %d",A,this.status);return false}};vB_Lightbox.prototype.countdown=function(A){if(!this.active){this.set_status(1,"countdown");this.cursor=YAHOO.util.Dom.getStyle(this.element,"cursor");this.element.style.cursor="wait";this.timeout=setTimeout("Lightboxes['"+this.uniqueid+"'].load_lightbox();",1500)}};vB_Lightbox.prototype.halt=function(A){if(this.status<2){this.set_status(0,"halt")}clearTimeout(this.timeout);this.element.style.cursor=this.cursor};vB_Lightbox.prototype.load_lightbox=function(B){if(this.check_status(0)&&!YAHOO.util.Connect.isCallInProgress(this.ajax_req)){this.set_status(2,"load_lightbox 1");if(B){YAHOO.util.Event.stopEvent(B)}if(this.timeout){clearTimeout(this.timeout);this.element.style.cursor=this.cursor}if(this.html==null){var A=this.element.getAttribute("href");this.ajax_req=YAHOO.util.Connect.asyncRequest("POST",A,{success:this.handle_ajax_response,failure:this.handle_ajax_error,scope:this,timeout:vB_Default_Timeout},A.substr(A.indexOf("?")+1)+"&securitytoken="+SECURITYTOKEN+"&ajax=1&uniqueid="+this.uniqueid)}else{this.set_status(3,"load_lightbox 2");this.show_lightbox()}}};vB_Lightbox.prototype.handle_ajax_error=function(A){vBulletin_AJAX_Error_Handler(A)};vB_Lightbox.prototype.handle_ajax_response=function(C){if(C.responseXML&&this.check_status(2)){var E=C.responseXML.getElementsByTagName("error");if(E.length){this.set_status(0,"handle_ajax_response - error");if(E[0].firstChild.nodeValue=="notimage"){console.warn("Attempted to load non-image (.%s) into lightbox. Aborted.",C.responseXML.getElementsByTagName("extension")[0].firstChild.nodeValue)}else{alert(E[0].firstChild.nodeValue.replace(/<(\/|[a-z]+)[^>]+>/g,""))}return false}var B=C.responseXML.getElementsByTagName("link");if(B.length){this.set_status(3,"handle_ajax_response - success");this.show_overlay();this.link=B[0].firstChild.nodeValue;this.imageloader=new Image();YAHOO.util.Event.on(this.imageloader,"load",this.show_lightbox,this,true);var D=new Array("date","time","name","html");for(var A=0;AC.w-this.minborder){A=C.w-this.minborder;A=(AC.h-this.minborder){B=C.h-this.minborder;B=(B