
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 
// Generated Datetime : 7/7/2010 7:33:45 PM
// Copyright (c) 2005 Intersoft Solutions.
// Unauthorized decryption/reproduction of any codes contained herein is strictly prohibited and will result in severe civil and criminal penalties .
//**Start Encode**
function FormatValidatorEvaluateIsValid(v7a00,vd9f57){ var vf0a89 =window.event; if (vf0a89 &&vd9f57 !=true) { if (vf0a89.type =="change" ||vf0a89.type =="blur") { var vd3d99 =ISGetObject(GetControlToValidateFV(v7a00)); if (vd3d99) { if (vd3d99.DisplayFormat) { if (!vd3d99.DisplayFormat.IsValidateOnChange)return true; } else return false; } else return false; } } var v0c813 =ISGetObject(GetControlToValidateFV(v7a00)); if (v0c813 ==null) return true; var v0e937 =ValidatorTrim(v0c813.HtmlObj.value); var ve1120 =wi01372.m8ac30(v7a00,v0e937); if (vd9f57 !=true) { if (!ve1120) { if (vf0a89) { vf0a89.cancelBubble =true; vf0a89.returnValue =false; } } } if (wi01372._c !=null) { vd3d99 =wi01372._c; var v28f49 =vd3d99.DisplayFormat.WindowInfo; if (!ve1120) { WindowEngine.Show(v28f49); if (vd3d99.DisplayFormat.Events) ISEvent.Raise(vd3d99.DisplayFormat.Events.OnValidateError,vd3d99.Id); if ((IS.safari ||IS.opera)&&vf0a89 !=null &&vf0a89.srcElement ==vd3d99.HtmlObj) setTimeout("ISGetObject('" +vd3d99.Id +"').SetFocus();",10); } else WindowEngine.Hide(v28f49); } return ve1120;};function GetControlToValidateFV(v4ac84){ var v0270 =v4ac84.controltovalidate; if (v0270 ==null) v0270 =v4ac84.id.replace("_fv",""); return v0270;};function DisplayFormat(){ this._cId =this.Events =this.WindowInfo =this.XmlDt =null; this.xmlInputHiddenUniqueID =this.Format =this.FormatType =""; this.Enabled =false; this.IsValidateOnChange =true; this.ClientData =new ISClientData(); this.ClientData.IsValid =true; this._cX =this._cY =null; this._IsRuntimeValid =true;};var pDispF =DisplayFormat.prototype;pDispF.Validate =function(){ return FormatValidatorEvaluateIsValid(document.getElementById(this._cId +IS.FormatValidatorSuffix),true);};pDispF.GetData =function(){ return wi01372.mb3551(ISGetObject(this._cId));};var wi01372 = { _c: null, m3935:function(v2b981) { if (!v2b981.IsInitFV) { var v0fb97 =document.getElementById(v2b981.Id +IS.FormatValidatorSuffix); if (v0fb97 ==null) return; var vb2180 =ISXml.GetElementById(v0fb97.id +IS.XmlSuffix); if (vb2180) { var vbf210 =new DisplayFormat(); vbf210.XmlDt =vb2180; if (v0fb97.style.height ==null ||v0fb97.style.height =="") v0fb97.style.height ="22px"; wi01372.ma3932(vbf210,v2b981); var va4863 =v2b981.CultureInfo.NumberFormatInfo; vbf210._DecSprt =GetDecimalSeparator(va4863,vbf210.Format); vbf210._Sym =GetSymbol(va4863,vbf210.Format); vbf210._cId =v2b981.Id; v2b981.DisplayFormat =vbf210; wi01372.m18a5(v2b981); if (vbf210.FormatType =="DateTime" &&!v2b981.Nullable) { var v65729 =IS.GetValidationEngine(); if (vbf210.Format.indexOf("h")<0 &&vbf210.Format.indexOf("H")<0 &&vbf210.Format.indexOf("m")<0 &&vbf210.Format.indexOf("f")<0) { with (vbf210.ClientData) { Format =v2b981.CultureInfo.DateTimeFormatInfo.StandarFormat.ShortDate; Type =vbf210.FormatType.toLowerCase(); OldValue =NewValue =v2b981.Value; IsValid =true; } v65729.Validate(vbf210.ClientData,v2b981.CultureInfo); if (vbf210.ClientData.IsValid) { if (wi01372.md4244(v2b981,vbf210)) { v2b981.Value =vbf210.ClientData.FormattedValue; v2b981.DateDataSource ="DisplayFormat"; } } } } } } v2b981.IsInitFV =true; }, m18a5:function(va0016) { Listener.Add(va0016.HtmlObj,"onkeydown",wi01372.m29551,va0016); Listener.Add(va0016.HtmlObj,"onkeyup",wi01372.m74b87,va0016); Listener.Add(va0016.HtmlObj,"onfocus",wi01372.m8c727,va0016); Listener.Add(va0016.HtmlObj,(IS.ie ? "onbeforedeactivate" : "onblur"),wi01372.m86585,va0016); }, mb3b7:function(v50a16) { Listener.Remove(v50a16.HtmlObj,"onkeydown",wi01372.m29551,v50a16); Listener.Remove(v50a16.HtmlObj,"onkeyup",wi01372.m74b87,v50a16); Listener.Remove(v50a16.HtmlObj,"onfocus",wi01372.m8c727,v50a16); Listener.Remove(v50a16.HtmlObj,(IS.ie ? "onbeforedeactivate" : "onblur"),wi01372.m86585,v50a16); }, m45514:function(v44391) { var vbde36 =v44391.DisplayFormat; if (vbde36 !=null &&vbde36.FormatType !="Number" &&v44391.Value !=null &&typeof (v44391.Value)=="string" &&v44391.Value !="") { with (vbde36.ClientData) { OldValue =NewValue =v44391.Value; Format =vbde36.Format; Type =vbde36.FormatType.toLowerCase(); IsValid =true; } var v58499 =IS.GetValidationEngine(); v58499.Validate(vbde36.ClientData,v44391.CultureInfo); if (vbde36.ClientData.IsValid) v44391.Value =vbde36.ClientData.FormattedValue; else v44391.Value =v44391.Text; } }, md4244:function(vfd027,v60248) { if (v60248.FormatType =="DateTime" &&v60248.ClientData !=null) { if (v60248.ClientData.IsValid) { var v1b291 =vfd027.IsDateInRange(v60248.ClientData.DateData,v60248.Format.indexOf("H")>-1 ||v60248.Format.indexOf("h")>-1); v60248.ClientData.IsValid =v1b291; return v1b291; } else return false; } else return true; }, ma3932:function(v14d47,v20057) { if (v14d47 ==null ||v14d47.XmlDt ==null)return; var v89411 =v14d47.XmlDt.selectSingleNode("//FormatValidator"); if (v89411 !=null) { IS.SetProperties(v14d47,v89411); with (v89411) { v14d47.Events =ISEvent.Register(v20057.HtmlObj,selectSingleNode("ClientSideEvents")); v14d47.WindowInfo =WindowEngine.Register(selectSingleNode("WindowInfo")); v14d47.WindowInfo.IsRelFromOffsetControl =true; } } }, maef97:function(vdaf47) { if (vdaf47 ==null ||vdaf47.XmlDt ==null)return; var vfd747 =vdaf47.XmlDt.selectSingleNode("//FormatValidator"); if (vfd747 !=null) { IS.SetPropertiesToXml(vdaf47,vfd747); with (vfd747) { WindowEngine.AssignPropertiesToXml(vdaf47.WindowInfo,selectSingleNode("//WindowInfo")); } } }, m8ac30:function(v5e886,vcd377) { var v26547 =ISGetObject(GetControlToValidateFV(v5e886)); if (v26547 ==null) { v26547 =new ISControl(v5e886.controltovalidate); v26547.ClassName ="Common"; } if (v26547 ==null) return false; wi01372.m3935(v26547); var vb1557 =v26547.DisplayFormat; if (!vb1557.Enabled) return false; wi01372._c =v26547; var v35014 =v26547.EditFormat; var v43593 =IS.GetValidationEngine(); if (v35014) { if (v35014.Enabled &&v26547.Value !=null) vcd377 =v26547.Value; } else { if ((vb1557.FormatType !="Number" &&vcd377 !=null &&typeof (vcd377)=="object" &&vcd377.constructor ==Date)||(vb1557.FormatType =="Number" &&vcd377 !=null &&typeof (vcd377)=="number")) { with (vb1557.ClientData) { OldValue =NewValue =vb1557.FormatType !="Number" ? IS.GetFullCommonDateTimeFormat(vcd377): vcd377.toString(); Format =vb1557.Format; Type =vb1557.FormatType.toLowerCase(); IsValid =true; } v43593.Validate(vb1557.ClientData,v26547.CultureInfo); vcd377 =vb1557.ClientData.FormattedValue; if (vb1557.ClientData.IsValid) { if (wi01372.md4244(v26547,vb1557)) { v26547.DateDataSource ="DisplayFormat"; } } } } if (vb1557.Events) if (!ISEvent.Raise(vb1557.Events.OnBeforeValidate,v26547.Id,vcd377)) return false; var v2f472 =true; if (v26547.Nullable) { vb1557.ClientData.IsValid =false; if (vcd377 ==null ||vcd377 =="") { vb1557.ClientData.IsValid =true; vb1557.ClientData.OldValue =vb1557.ClientData.NewValue =vb1557.ClientData.FormattedValue =""; v2f472 =false; } } if (v2f472) { with (vb1557.ClientData) { OldValue =NewValue =vcd377; Format =vb1557.Format; Type =vb1557.FormatType.toLowerCase(); IsValid =true; } if (vb1557.FormatType =="Number") { vb1557.ClientData.OldValue =vb1557.ClientData.NewValue =v43593.UnMask(vb1557.ClientData,v26547.CultureInfo); if (vb1557.ClientData.OldValue =="") vb1557.ClientData.OldValue =vb1557.ClientData.NewValue =vcd377; with (vb1557.ClientData) { Format =vb1557.Format; Type =vb1557.FormatType.toLowerCase(); IsValid =true; } } v43593.Validate(vb1557.ClientData,v26547.CultureInfo); if (vb1557.ClientData.IsValid) { if (wi01372.md4244(v26547,vb1557)) v26547.DateDataSource ="DisplayFormat"; }  if (vb1557.ClientData.IsValid ==false &&v35014 !=null) { vcd377 =v26547.Text; with (vb1557.ClientData) { OldValue =NewValue =vcd377; Format =vb1557.Format; Type =vb1557.FormatType.toLowerCase(); IsValid =true; } if (vb1557.FormatType =="Number") { vb1557.ClientData.OldValue =vb1557.ClientData.NewValue =v43593.UnMask(vb1557.ClientData,v26547.CultureInfo); with (vb1557.ClientData) { Format =vb1557.Format; Type =vb1557.FormatType.toLowerCase(); IsValid =true; } } v43593.Validate(vb1557.ClientData,v26547.CultureInfo); if (vb1557.ClientData.IsValid) { if (wi01372.md4244(v26547,vb1557)) v26547.DateDataSource ="DisplayFormat"; } } }  if (!IS.ie)vb1557._IsRuntimeValid =vb1557.ClientData.IsValid;  if (vb1557.ClientData.IsValid) { v26547.Text =vb1557.ClientData.FormattedValue; v26547.Value =vb1557.ClientData.OldValue; v26547.DateDataSource ="DisplayFormat"; } if (vb1557.Events)if (!ISEvent.Raise(vb1557.Events.OnAfterValidate,v26547.Id,vcd377,vb1557.ClientData.IsValid))return false; return vb1557.ClientData.IsValid; }, m29551:function() { var v2ef22 =window.event; var vbca46 =this; if (!vbca46 ||vbca46.ReadOnly) return false; if (!vbca46.Enabled ||vbca46.ReadOnly) { if (v2ef22 !=null) { v2ef22.cancelBubble =true; v2ef22.returnValue =false; } return false; }  if (vbca46.EditFormat ==null &&vbca46.DynamicEditFormat ==null)  { if (v2ef22.keyCode ==ISKeyboardKey.TAB ||v2ef22.keyCode ==ISKeyboardKey.ENTER) return true; var v0c166 =vbca46.DisplayFormat; if (v0c166.FormatType =="Number") { if (!ISKeyboardKey.IsNumber()&&!ISKeyboardKey.IsDirection()&&ISKeyboardKey.DELETE !=v2ef22.keyCode &&ISKeyboardKey.BACKSPACE !=v2ef22.keyCode) { var vf8558 =ISKeyboardKey.GetChar(null,null,vbca46.DecimalSeparator); var vefc93 =vbca46.HtmlObj; if (vf8558 ==v0c166._DecSprt) { if (vefc93.value.indexOf(vf8558)!=vefc93.value.lastIndexOf(vf8558)) { v2ef22.cancelBubble =true; v2ef22.returnValue =false; vbca46._IsRuntimeCancelEvent =true; return false; } v0c166._OldDecSprtIdx =vefc93.value.indexOf(vf8558); } else { if (vf8558 ==v0c166._Sym &&v0c166._Sym !="") { vbca46.SetValue(vf8558 +vefc93.value.replace(vf8558,"")); v2ef22.returnValue =false; v2ef22.cancelBubble =true; vbca46._IsRuntimeCancelEvent =true; return false; } else { if (vf8558 =="-") { if (vefc93.value !="") vbca46.SetValue(vefc93.value.indexOf("-")>-1 ? vefc93.value.replace(vf8558,""): "-" +vefc93.value); else { vefc93.value ="-"; vbca46.SetValue("-"); } v2ef22.returnValue =false; v2ef22.cancelBubble =true; vbca46._IsRuntimeCancelEvent =true; return false; } else { if (vf8558 =="+") { vbca46.SetValue(vefc93.value.replace("-","")); v2ef22.returnValue =false; v2ef22.cancelBubble =true; vbca46._IsRuntimeCancelEvent =true; return false; } else { if (v2ef22.keyCode !=ISKeyboardKey.SPACE &&v2ef22.keyCode !=ISKeyboardKey.ESC) { v2ef22.returnValue =false; v2ef22.cancelBubble =true; vbca46._IsRuntimeCancelEvent =true; return false; } } } } } } } } }, m74b87:function() { var v79997 =window.event; var v08b35 =this; if (!v08b35 ||v08b35.ReadOnly) return false; if (!v08b35.Enabled ||v08b35.ReadOnly) { if (v79997 !=null) { v79997.cancelBubble =true; v79997.returnValue =false; } return false; }  if (v08b35.EditFormat ==null &&v08b35.DynamicEditFormat ==null)  { if (v79997.keyCode ==ISKeyboardKey.TAB) return true; var v7b318 =v08b35.DisplayFormat; if (v7b318.FormatType =="Number") { var vfb923 =ISKeyboardKey.GetChar(); var vf7115 =v08b35.HtmlObj; var nIdx,nIdx1; if (vfb923 ==v7b318._DecSprt) { if (v7b318._OldDecSprtIdx >-1) { nIdx =vf7115.value.indexOf(vfb923); if (nIdx >-1 &&nIdx <v7b318._OldDecSprtIdx) v7b318._OldDecSprtIdx++; v08b35.SetValue(vf7115.value.substr(0,v7b318._OldDecSprtIdx)+vf7115.value.substr(v7b318._OldDecSprtIdx +1)); v7b318._OldDecSprtIdx =-1; } if (vf7115.value.indexOf(vfb923)==0) v08b35.SetValue("0" +vf7115.value); } nIdx =vf7115.value.indexOf(v7b318._Sym); nIdx1 =vf7115.value.indexOf("-"); if (nIdx >0 &&nIdx1 <0) v08b35.SetValue(v7b318._Sym +vf7115.value.replace(v7b318._Sym,"")); if (nIdx1 >0) v08b35.SetValue("-" +vf7115.value.replace("-","")); } } }, m8c727:function(v97118) { var vf7f46 =this; if (!vf7f46 ||vf7f46.ReadOnly) return false; if (!vf7f46.Enabled ||vf7f46.ReadOnly) { if (window.event !=null) { window.event.cancelBubble =true; window.event.returnValue =false; } return false; } vf7f46.IsDirty =false; if (vf7f46.DisplayFormat) { var v76612 =vf7f46.DynamicEditFormat; if (v76612) { if (v76612.Enabled) return true; } var v2f322 =vf7f46.DisplayFormat; if (v2f322.Enabled) { var v01452 =vf7f46.EditFormat; if (v01452) { if (v01452.Enabled) return; } if (!v2f322._IsRuntimeValid) { if (vf7f46.HighLight) wi5fa76.m00068(vf7f46.Id); } else { if (v2f322.ClientData.IsValid ||!v2f322.IsValidateOnChange) { vf7f46.Text =vf7f46.HtmlObj.value; vf7f46.SetValue(vf7f46.Value); WindowEngine.Hide(v2f322.WindowInfo); } else { WindowEngine.Show(v2f322.WindowInfo); if (vf7f46.HighLight) wi5fa76.m00068(vf7f46.Id); if (v2f322.Events) ISEvent.Raise(v2f322.Events.OnValidateError,vf7f46.Id); } } } } }, mae357:function(v77f77,vc8380,vd3960) { if (vc8380 ==null) return true; var v9ae2 =document.getElementById(v77f77.Id +IS.FormatValidatorSuffix); var vf6791 =v77f77.DisplayFormat; var v3cc8 =v77f77.EditFormat;  if (v3cc8 ==null) v3cc8 =v77f77.DynamicEditFormat;  var v31656 =new RegExp("\\s+","g"); if (!v77f77.Nullable &&vc8380.replace(v31656,"")=="") vc8380 =vf6791.ClientData.NewValue; var vd6680 =vc8380.replace(v31656,"")!="" ? vf6791.ClientData.FormattedValue : ""; var v39532 =false; if (v77f77.Events !=null &&v77f77._OldText !=v77f77.Text) { if (!ISEvent.Raise(v77f77.Events.OnBeforeValueChanged,v77f77.Id,v77f77.Value,v77f77.Text,vc8380,vd6680)) { v77f77.SetValue(v77f77.Text,vd3960); v39532 =true; } }  if (!IS.ie) v9ae2.isvalid =vf6791._IsRuntimeValid =true;  if (!v39532) { if (v3cc8 ==null) { v77f77.Value =vc8380; } v77f77.HtmlObj.value =v77f77.Text =vd6680; WindowEngine.Hide(vf6791.WindowInfo); if (v77f77.Events !=null &&v77f77._OldText !=v77f77.Text) if (!ISEvent.Raise(v77f77.Events.OnAfterValueChanged,v77f77.Id,v77f77.Value,v77f77.Text)) return false; } return true; }, m86585:function(v21623) { var ve6368 =this; if (!ve6368 ||ve6368.ReadOnly) return false; if (!ve6368.Enabled ||ve6368.ReadOnly) { if (window.event !=null) { window.event.cancelBubble =true; window.event.returnValue =false; } return false; } if (ve6368.DisplayFormat) { var vf4328 =ve6368.DisplayFormat; if (vf4328.Enabled) { var v87863 =document.getElementById(ve6368.Id +IS.FormatValidatorSuffix); var v95c65 =ve6368.HtmlObj; if (!ve6368.IsDirty) ve6368.IsDirty =v95c65.value !=ve6368.Value; if (ve6368.IsDirty) { wi01372.m8ac30(document.getElementById(ve6368.Id +IS.FormatValidatorSuffix),v95c65.value); if (vf4328.ClientData.IsValid) return wi01372.mae357(ve6368,vf4328.ClientData.OldValue,true); else { if (!vf4328.IsValidateOnChange) { WindowEngine.Hide(vf4328.WindowInfo); ve6368.Text =ve6368.Value =v95c65.value;  v87863.isvalid =vf4328._IsRuntimeValid =true;  return true; } WindowEngine.Show(vf4328.WindowInfo); if (vf4328.Events) ISEvent.Raise(vf4328.Events.OnValidateError,ve6368.Id);  if (!IS.ie) { v87863.isvalid =vf4328._IsRuntimeValid =false; wie0739.med210(ve6368);  if ((IS.moz &&v21623 !=null &&v21623.constructor ==Event)) { v21623.cancelBubble =true; v21623.returnValue =false; } else { window.event.cancelBubble =true; window.event.returnValue =false; } setTimeout("ISGetObject('" +ve6368.Id +"').SetFocus();",10);  }  return false; } } else { if (!vf4328.IsValidateOnChange) { ve6368.Value =v95c65.value; if (ve6368.EditFormat ==null) ve6368.Text =v95c65.value; else v95c65.value =ve6368.Text;  if (!IS.ie) v87863.isvalid =vf4328._IsRuntimeValid =true;  return true; } v95c65.value =ve6368.Text; } } } }, mb3551:function(v97a43) { var v21c7 =v97a43.DisplayFormat; v97a43.DisplayFormat.Validate(); var vb3b48 =v97a43.DisplayFormat.ClientData; if (vb3b48.IsValid) { switch (v21c7.FormatType) { case "DateTime": var vb8497 =vb3b48.DateData; if (vb8497 !=null) return new Date(parseFloat(vb8497.Year),parseFloat(vb8497.Month),parseFloat(vb8497.Day),parseFloat(vb8497.Hour24),parseFloat(vb8497.Minute),parseFloat(vb8497.Second)); break; case "Number": var va4088 =IS.GetValidationEngine(); var v06345 =vb3b48; with (v06345) { Type =v21c7.FormatType.toLowerCase(); Format =v21c7.Format; OldValue =NewValue =v97a43.Text; PromptChar =null; IsValid =true; } va4088.UnMask(v06345,v97a43.CultureInfo); if (v06345.IsValid) return parseFloat(v06345.FormattedValue); break; }; } return v97a43.Value; } };function FormatValidatorDestructor(){ var vc2b84 =delete wi01372;}window.attachEvent("onunload",FormatValidatorDestructor);if (typeof (Sys)!="undefined") Sys.Application.notifyScriptLoaded();