String.prototype.trim=function(){return this.replace(/^\s*|\s*$/g,'');};String.prototype.ltrim=function(){return this.replace(/^\s*/g,'');};String.prototype.rtrim=function(){return this.replace(/\s*$/g,'');};function AskQuestion(question,onyes,onno){var where_to=confirm(question);if(where_to==true){if(onyes&&onyes!=""){window.location=onyes;}}else{if(onno&&onno!=""){window.location=onno;}}};function SelectAllCheckbox(theElement){var theForm=theElement.form,z=0;for(i=0;i<theForm.elements.length;i++){if(theForm.elements[i].type=='checkbox'){theForm.elements[i].checked=theElement.checked;}}};function centerPopup(url,window_name,wwidth,wheight){if(!url||!window_name){alert('Invalid parameters for centerPopup()');return false;}if(!wwidth){var wwdith=500;}if(!wheight){var wheight=500;}if((screen.availWidth-100)<wwidth){wwidth=(screen.availWidth-100);}if((screen.availHeight-100)<wheight){wheight=(screen.availHeight-100);}window.open(url,window_name,'toolbar=no,width='+wwidth+',height='+wheight+',left='+(screen.availWidth/2-(wwidth/2))+',top='+(screen.availHeight/2-(wheight/2))+',scrollbars=yes');return null;};function openWin(newin,wwidth,wheight,wtop,wleft){options="resizable=yes,scrollbars=no,width="+wwidth+",height="+wheight+",top="+wtop+",left="+wleft;popupWin=window.open(newin,"_blank",options);};function openWin_sb(newin,wwidth,wheight,wtop,wleft){options="resizable=yes,scrollbars=yes,width="+wwidth+",height="+wheight+",top="+wtop+",left="+wleft;popupWin=window.open(newin,"_blank",options);};function diasable_all_fields(theform){if(document.all||document.getElementById){for(i=0;i<theform.length;i++){var tempobj=theform.elements[i];tempobj.disabled=true}}};function submitonce(theform){if(document.all||document.getElementById){for(i=0;i<theform.length;i++){var tempobj=theform.elements[i];if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset"){tempobj.disabled=true}}}}
