String.prototype.pad=function(s,l){l=l||2;return this.length<l?new Array(1+l-this.length).join(s)+this:this};String.prototype.rpad=function(s,l){l=l||2;return this.length<l?this+new Array(1+l-this.length).join(s):this};Number.prototype.pad=function(s,l){return(this+'').pad(s,l)};Number.prototype.rpad=function(s,l){return(this+'').rpad(s,l)};function time(){return Math.round(new Date().getTime()/1000);}function urlencode(str){str=escape(str);return str.replace(/[*+\/@]|%20/g,function(s){switch(s){case"*":s="%2A";break;case"+":s="%2B";break;case"/":s="%2F";break;case"@":s="%40";break;case"%20":s="+";break;}return s;});}try{console.log("");}catch(e){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){};}}
