
function trimStr(str){str=str.replace("/^\s+/g","");return str.replace("/\s+$/g","");}
function printForm(){AgatToolbar.printForm();}
function setValue(ControlID,value){try{var elem=AgatUtils.getElementByID(ControlID);if(elem!=undefined){tfsCurrentControl=elem;return $(elem).tfsValue(value);}}
catch(e){}}
function getValue(ControlID){try{var elem=AgatUtils.getElementByID(ControlID);if(elem!=undefined)
return $(elem).tfsValue();}
catch(e){}}
function tfsSetValue(ControlID,value){return setValue(ControlID,value);}
function tfsGetValue(ControlID){return getValue(ControlID);}
function tfsAlert(msg,title,pMsgboxStyle){if(title){msg=title+"\n"+msg;}
alert(msg);}
function tfsDoBind(ControlID){AgatBind.tfsDoBind(ControlID);}
function tfsCallServer(url,data,functionCallBack,context,method,user,password){AgatBind.tfsCallServer(url,data,functionCallBack,context,method,user,password);}
function tfsLock(ControlID){try{var elem=AgatUtils.getElementByID(ControlID);if(elem!=undefined)
$(elem).tfsDisable();}
catch(e){}}
function tfsUnLock(ControlID){try{var elem=AgatUtils.getElementByID(ControlID);if(elem!=undefined)
$(elem).tfsEnable();}
catch(e){}}
function tfsResetFields(fields){var fieldsArray=fields.split(";");var fieldsString="";var flag="";var i=0;for(i=0;i<fieldsArray.length;i++){fieldsString=fieldsString+flag+"#"+fieldsArray[i];flag=",";}
$(fieldsString).tfsClear();}
function showCalendar(elem){}
function tfsGetElementById(ControlID){try{return AgatUtils.getElementByID(ControlID);}
catch(e){}
return undefined;}
function tfsGetElementById(ControlID){try{return AgatUtils.getElementByID(ControlID);}
catch(e){}
return undefined;}
function showLookUpWindow(elem){AgatLookupWindow.show($(elem).prev().prev(),true);}
function tfsShowWizardStep(StepIndex,enable){AgatWizard.showStep(StepIndex,enable);}
function tfsEnableWizardStep(StepIndex){AgatWizard.enableStep(StepIndex);}
function tfsDisableWizardStep(StepIndex){AgatWizard.disableStep(StepIndex);}
function defaultShowMessage(str){if(str!='')
alert(str);window.close();}