String.format=function(a){for(var b=1;b<arguments.length;b++){re=new RegExp("\\{"+(b-1)+"\\}","gi");a=a.replace(re,arguments[b]);}return a;};Number.formatDecimal=function(c,b){var c=parseInt(c).toString();var a="00000000000000000";if(c.length>b){return c;}else{return a.substr(0,b-c.length)+c;}};String.toJSON=function(str){var _isd=null;if(typeof str=="string"){try{eval("_isd="+str);}catch(e){}}return _isd;};String.toQueryString=function(c){var b=[],a;for(a in c){if(c.hasOwnProperty(a)){b.push(a+"="+c[a]);}}return b.join("&");};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){for(var a=0,b=this.length;a<b;a++){if(this[a]==c){return a;}}return -1;};}String.prototype.endsWith=function(a){return(this.toLowerCase().substring(this.length-a.length)==a.toLowerCase());};jQuery.fn.extend({"hitch":function(b,c,a){return jQuery.hitch(b,c,a);},"enter":function(b,a){return this.keypress(function(c){if(c.which==13){b(c);if(a==true){c.stopPropagation();}}});},"disable":function(a){return this.each(function(){if(a==true){$(this).attr("disabled",true).addClass("disabled");}else{$(this).removeAttr("disabled").removeClass("disabled");}});},"checked":function(a){return this.each(function(){this.checked=a;});},"moveTo":function(a,b){return this.each(function(){$(this).css("left",a).css("top",b);});},"resizeTo":function(a,b){return this.each(function(){$(this).width(a).height(b);});},"realWidth":function(){return this.width()+(parseInt(this.css("margin-left"))||0)+(parseInt(this.css("padding-left"))||0)+(parseInt(this.css("border-left"))||0)+(parseInt(this.css("border-right"))||0)+(parseInt(this.css("padding-right"))||0)+(parseInt(this.css("margin-right"))||0);},"realHeight":function(){return this.height()+(parseInt(this.css("margin-top"))||0)+(parseInt(this.css("padding-top"))||0)+(parseInt(this.css("border-top"))||0)+(parseInt(this.css("border-bottom"))||0)+(parseInt(this.css("padding-bottom"))||0)+(parseInt(this.css("margin-bottom"))||0);}});jQuery.byId=function(a){return $(String.format("#{0}",a));};jQuery.hitch=function(b,c,a){return(function(){var d=(a||[]).concat(jQuery.makeArray(arguments));if(typeof c=="string"&&typeof b[c]=="function"){return b[c].apply(b,d);}else{if(typeof c=="function"){return c.apply(b,d);}}});};jQuery.createElement=function(b,a,e){var d=document.createElement(b);$.each(a,function(f,g){d[f]=g;});function c(){d.onload=null;d.onreadystatechange=null;if($.isFunction(e)){e(d);}}if(jQuery.browser.msie){d.onreadystatechange=function(){if(d.readyState=="loaded"||d.readyState=="complete"){c();}};}else{d.onload=c;}return d;};