function LoadingButton_SetImage(B,A){$("#"+B).attr("src",A)}$.fn.loadingButton=function(A){return new LoadingButton(this,A)
};var LoadingButton=function(B,A){this.init(B,A)};LoadingButton.prototype.init=function(C,B){var D=this;
this.settings=B;this.btn=$(C);this.btnId=this.btn.attr("id");this.ldrId=this.btnId+"_Loader";
this.ldr=$("#"+this.ldrId);this.imgId=this.btnId+"_LoaderImg";var A=this.btn.attr("onclick");
this.isValidated=((""+A).indexOf("WebForm_DoPostBack")>-1);C.bind("click",function(){return D.onClick()
});var E=C.position();this.ldr.css("z-index",2000);this.ldr.css("height",this.btn.outerHeight());
this.ldr.css("width",this.btn.outerWidth());this.ldr.css("top",E.top);this.ldr.css("left",E.left);
this.copyCss(this.btn,this.ldr,"position");this.copyCss(this.btn,this.ldr,"float");
this.copyCss(this.btn,this.ldr,"marginTop");this.copyCss(this.btn,this.ldr,"marginBottom");
this.copyCss(this.btn,this.ldr,"marginLeft");this.copyCss(this.btn,this.ldr,"marginRight")
};LoadingButton.prototype.onClick=function(){try{if(typeof Page_IsValid=="undefined"||!this.isValidated||Page_IsValid==true){this.ldr.show();
this.btn.hide();var B=setTimeout("LoadingButton_SetImage('"+this.imgId+"', '"+this.settings.loadingImage+"')",10);
return true}}catch(A){return false}return false};LoadingButton.prototype.copyCss=function(C,B,A){B.css(A,C.css(A))
}
