String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};String.prototype.lpad=function(a,b){var c=this;while(c.length<b){c=a+c}return c};String.prototype.rpad=function(a,b){var c=this;while(c.length<b){c=c+a}return c};String.prototype.pad=function(a,c,b){c=String(c);return c||(c=" "),(a-=this.length)>0?(c=new Array(Math.ceil(a/c.length)+1).join(c)).substr(0,b=!b?a:b==1?0:Math.ceil(a/2))+this+c.substr(0,a-b):this};function isNull(a){return(a==null)}function goBack(a){window.location=a}function isValidFile(e,f,c,b){if(isObjEmpty(e)){c.innerHTML=b;e.value="";e.focus();return false}var a;a=e.value.split(".");len=a.length;var d=new RegExp(f,"ig");if(!a[len-1].match(d)){c.innerHTML=b;e.value="";e.focus();return false}c.innerHTML="";return true}function isObjEmpty(a){if(a.value.trim()==""||isNull(a.value)){return true}return false}function getEl(a){return document.getElementById(a)}function popupWindow(b,c,a){if(c==undefined){c=screen.width*0.8}if(a==undefined){a=screen.height*0.8}mywindow=window.open(b,"Jeywin","location=0, width="+c+",height="+a+", status=0,toolbar=0, scrollbars=1");mywindow.moveTo(100,100)}function closeWindow(){window.close()}function redirectParentWindow(a){if(window.opener&&!window.opener.closed){window.opener.location=a}}function toggleDisplay(b,a){if(getEl(b)){if(a==undefined){if(getEl(b).style.display=="none"){a=""}else{a="none"}}getEl(b).style.display=a}}function getMonth(b){var a=new Array();a[1]="Jan";a[2]="Feb";a[3]="Mar";a[4]="Apr";a[5]="May";a[6]="Jun";a[7]="Jul";a[8]="Aug";a[9]="Sep";a[10]="Oct";a[11]="Nov";a[12]="Dec";return a[b]}function padLZero(b,a){if(b<10){b="0"+b}return b}function in_array(e,d,c){var b="",a=!!c;if(a){for(b in d){if(d[b]===e){return true}}}else{for(b in d){if(d[b]==e){return true}}}return false}function doClear(a){if(a.value==a.defaultValue){a.value=""}}function setText(a){if(a.value==""){a.value=a.defaultValue}}function selectText(a){if(a&&a.value){a.select()}};
