Array.prototype.remove=function(c,b){var a=this.slice((b||c)+1||this.length);this.length=c<0?this.length+c:c;return this.push.apply(this,a)};function substr(a,c,b){a+="";if(c<0){c+=a.length}if(b==undefined){b=a.length}else{if(b<0){b+=a.length}else{b+=c}}if(b<c){b=c}return a.substring(c,b)}function trim(e,d){var b,a=0,c=0;e+="";if(!d){b=" \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000"}else{d+="";b=d.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1")}a=e.length;for(c=0;c<a;c++){if(b.indexOf(e.charAt(c))===-1){e=e.substring(c);break}}a=e.length;for(c=a-1;c>=0;c--){if(b.indexOf(e.charAt(c))===-1){e=e.substring(0,c+1);break}}return b.indexOf(e.charAt(0))===-1?e:""}function is_numeric(a){return(typeof(a)==="number"||typeof(a)==="string")&&a!==""&&!isNaN(a)}(function(b){b.fn.exists=function(){return(this.length>0)};var a=function(){var c=function(){b("#loading_overlay").fadeIn("fast");b("#loading_overlay_box").fadeIn("fast")};return{_hide:function(){b("#loading_overlay_box").fadeOut("fast");b("#loading_overlay").css({cursor:"default"});b("#loading_overlay").fadeOut("fast")},_init:function(l){l=b.extend({msg:"",imgsrc:"/media/images/wait.gif"},l);if(b("#loading_overlay_box").exists()&&b("#loading_overlay").exists()){b("#loading_overlay_message").html(l.msg);b("#loading_overlay_img").attr("src",l.imgsrc);c()}else{var j=b(document).height();var h=b(window).width();var e=b("<div></div>");e.attr("id","loading_overlay");e.css({position:"fixed"});e.css({height:j,width:h});e.css({left:0,top:0,"z-index":1001,opacity:0.5});e.css({cursor:"wait","background-color":"#FFF"});e.hide();var d=b("<img/>");d.attr("src",l.imgsrc);d.attr("id","loading_overlay_img");d.css({width:"65px",height:"65px"});if(l.msg!=""){var k=b("<div></div>");k.attr("id","loading_overlay_message");k.html(l.msg)}var f=b("<div></div>");f.attr("id","loading_overlay_box");f.append(d);if(l.msg!=""){f.append(k)}f.hide();var g=b(window).width()/2-f.width()/2;var i=b(window).height()/2-f.height()/2;f.css({position:"fixed"});f.css({left:g,top:i,"z-index":1002});b("body").append(e);b("body").append(f);c()}}}}();b.extend({showLoading:a._init,hideLoading:a._hide})})(jQuery);
