
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 
// Generated Datetime : 11/26/2008 2:43:00 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**
var WG40 = { COLHEADER: "CH", COLFOOTER: "CF", BODY: "TB", COLHEADERGROUP: "CHG", COLFOOTERGROUP: "CFG", COLGROUP: "CG", GROUPBYBOX: "GBB", GROUPBYBOXLABEL: "GBBInfo", STATUSBOX: "Status", STATUSBAR: "Stat", STATUSBARRIGHT: "Stat2",  SLIDERBAR: "Slider", STATUSICON: "StatIcon", STATUSBARCOMMAND: "Stat3",  FREEZEBAR: "Freeze", HTMLDIV: "dv", HTMLTABLE: "tb", HTMLCELL: "td", HTMLROW: "tr" };function WebGrid(ve1941){ this.ClassName ="WebGrid"; this.Version ="6.0.7200"; this.BuildNumber ="10"; this.MajorVersion ="6.0"; this.RequiredFrameworkVersion ="3.0.5000.18"; this.XmlNamespace ="isnet.webui.webgrid"; ISControl.call(this,ve1941); IFlyPostBack.call(this,"WebGridRequest"); this.LayoutSettings =new WebGridLayoutSet(); this.FlyPostBackSettings =new FlyPostBackSettings(); this.BrowserPrintSettings =new BrowserPrintSettings(); this.RootTable =new WebGridTable(); this.StateRestorationLevel ="High"; this.CustomEditors =null; this.UtilizedCustomEditors =new ISArray(); this.ScriptDirectory ="/CommonLibrary/WebGrid/V6_0_7200/"; this.GridLines ="Both"; this.Enabled =true; this.Visible =true; this.Height =null; this.Width =null; this.SharedScriptDirectory ="/CommonLibrary/Shared/"; this.Name =ve1941; this.WebCombos =new ISArray(); this.TotalLoadedRows =0; this.TotalRows =0; this.GBBLabelClass =""; this.RowClass =""; this.LostFocusClass =""; this.EditFocusClass =""; this.CultureInfo =null; this.CustomStateString =""; this.EnableV3XAPISupport =false; this.IsPreviewMode =false; this.LanguageXml =null; this.ExportTitle =null; this.LastAutoFitWidth =-1; this.Tables =new Array(); this.DraggerStyle ="position: absolute; z-index: 299; cursor:default; display: none; background-color: RoyalBlue; color: White; filter: Alpha(Style=1, Opacity=90); vertical-align: middle"; this.ResizerStyle ="position: absolute; z-index: 299; width:2px; background-color:gray; display: none;"; this.SelectedHeaderBackColor ="black"; this.SelectedHeaderForeColor ="white"; this.IsOnBlur =false; this.NeedFocus =false; this.TempResizeID =0; this.GlobalResizeID =0; this.HidePadColumn =false; this.CustomEditors =new Array(); this.CustomRequestData =null; this.XmlHttp =null; this.XmlResp =null; this.XmlReq =null; this.NeedHeightResize =false; this.NeedWidthResize =false; this.CacheTBodyHeight =null; this.CacheTBodyWidth =null; this.CacheFrameHeight =null; this.CacheFrameWidth =null; this.Resizer =null; this.ColPointer =null; this.IsInProgress =false; this.LastRequestObj =null; this.TempLRO =null; this.LastSelObj =null; this.ActiveEditCell =null; this.NeedUpdate =false; this.NeedAdd =false; this.UpdatesXml =null; this.IsInEditMode =false; this.LastEditObj =null; this.TBObj =null; this.TBMLObj =null; this.LastAction =""; this.ValEngine =null; this.CalDDObj =null; this.ExportTypeList =new Array("HTML","PDF","XML","EXCEL","TIFF","RTF","TEXT"); this.ExportWndAttr ="toolbar=no, menubar=yes, scrollbars=yes, resizable=yes"; this.IsExitingEdit =false; this.LastError =""; this.EditCtlTopAdj =0; this.EditCtlLeftAdj =0; this.NextQueue =null; this.LastChkBox =null; this.FromContextMenu =false; this.PosLibVer =1; this.PosRelativeTo =null; this.CheckedRowContext =null; this.HeaderContext =null; this.ExportContext =null; this.EditControls =new Array(); this.ChildHeaderContainer =null; this.NeedAutoFitOnLoad =false;   this.FreezeConfig =null; this.FreezePaneActive =false; this.SkipFreezeLayout =false; this.FreezeScrollId =0; this.FrozenColumns =null; this.CacheFrozenWidth =0; this.FreezeScrollImmediate =false; this.LastFreezeScroll =0; this.WebResourceIdentifier ="G"; this.CurrentRowImage =null; this.BuiltInDropDown =true; this.IsStatusLocked =false; this.UseDefaultStyle =false; this.DefaultStyleMode ="Standard";   this.CurrentPageIndex =0; this.TotalPages =0; this.CurrentViewMode ="GridView"; this.ChartMode ="InteractiveUI";  if (typeof(ChartInteractiveUI)!="undefined") { this.ChartInteractiveUI =new ChartInteractiveUI(); this.ChartSettings =new ChartSettings(); } else { this.ChartInteractiveUI =null; this.ChartSettings =null; }  this.ChartDataCollection =new ISArray(); this.ChartFilterCollection =new ISArray(); this.ChartCategoryCollection =new ISArray(); this.ChartSeriesCollection =new ISArray(); this.CachePivotFilterCollection =new ISArray(); this.CachePivotFilterInfoCollection =new ISArray(); this.AllowPivotCharting =false; this.ChartContainer =null;   this.EnableSection508Standards =false;  this.OnInitialize =function() { if (this.IsPreviewMode) { WGUIEngine.HideNoDataBox(this); return; } if (this.FlyPostBackSettings !=null) { this.PostViewState =this.FlyPostBackSettings.PostViewState; this.PostHiddenFields =this.FlyPostBackSettings.PostHiddenFields; this.PostInputControls =this.FlyPostBackSettings.PostInputControls; } ISEvent.Raise(this.LayoutSettings.ClientSideEvents.OnInitialize,this.Id); this.ValEngine =IS.GetValidationEngine(); this.LayoutSettings.ScriptDirectory =this.ScriptDirectory;  this.CustomEditors =new Array(); for (var v3c727=0; v3c727<this.UtilizedCustomEditors.length; v3c727++) this.CustomEditors[this.UtilizedCustomEditors[v3c727].Name] =this.UtilizedCustomEditors[v3c727]; if (typeof (ISGetCultureInfo)=="function") this.CultureInfo =ISGetCultureInfo(this.LayoutSettings.Culture,false); if (this.CultureInfo ==null &&typeof(WGEditEngine)!="undefined") WGEditEngine.LoadDefaultCulture(this); this.SetStatus1("","ready","CommonText/Ready"); if (!this.LayoutSettings.StatusBarVisible &&IS.moz) var vcd386 =this.GetString("Ready"); var v40762 =this.TotalLoadedRows; var v00449 =this.TotalRows; if (v00449<v40762) { v40762 =v00449; this.TotalLoadedRows =v40762; }  if (this.IsClassicPaging()) { v40762 =this.GetCurrentPage(); v00449 =this.GetTotalPages(); } this.SetStatus2("","loaded",v40762,v00449); WG50Engine.ReflectNoDataStatus(this);   var v8fc21 =ISXml.GetNode(this.LayoutSettings.XmlNode,"//FocusCellStyle"); this.LayoutSettings.XmlNode.removeChild(v8fc21); var v6f753 =this.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); if (v6f753 &&v6f753.style.display =="none") v6f753.style.display ="block";  if (this.LayoutSettings.AllowColumnFreezing =="Yes") { if (this.RootTable.IsUseColumnSet) this.LayoutSettings.FreezePaneSettings.ActiveFrozenColumns =0;  WGUIEngine.InvalidateFreezeContainer(this); WGUIEngine.FreezePane(this,true); }  if (this.LayoutSettings.AllowContextMenu &&typeof(WebContextMenu)=="undefined" &&!this.IsInPreview) { this.LayoutSettings.AllowContextMenu =false; alert("Context menu feature is disabled because menu runtime system can't be loaded.\n" + "Ensure you have registered SmartWebResources in this web application."); }  if (this.DefaultStyleMode =="Elegant") { this.BuiltInDropDown =false; this.CalDDImg ="wg5_calendar.gif"; }   var v1d062 =this.FrameObj; if (IS.ie) { var v43e34 =v1d062.currentStyle; var v1c331 =v1d062.parentElement.style; var v7cd29 =parseFloat(v43e34.borderTopWidth);  if (v43e34.position !="absolute" &&v7cd29 >0) { v1c331.borderRightWidth =v43e34.borderRightWidth; v1c331.borderRightStyle =v43e34.borderRightStyle; v1c331.borderRightColor =v43e34.borderRightColor; v1c331.borderLeftWidth =v43e34.borderLeftWidth; v1c331.borderLeftStyle =v43e34.borderLeftStyle; v1c331.borderLeftColor =v43e34.borderLeftColor; v1c331.borderTopWidth =v43e34.borderTopWidth; v1c331.borderTopStyle =v43e34.borderTopStyle; v1c331.borderTopColor =v43e34.borderTopColor; v1c331.borderBottomWidth =v43e34.borderBottomWidth; v1c331.borderBottomStyle =v43e34.borderBottomStyle; v1c331.borderBottomColor =v43e34.borderBottomColor; v1d062.style.border ="none 0px"; } }   if (IS.ie) v6f753.style.setExpression("height","WGUI.TBGH(this)");  ISEvent.Raise(this.LayoutSettings.ClientSideEvents.OnAfterInitialize,this.Id);  WG50Engine.InitializeClientStorage(this); WG50Engine.DeserializeClientStorage(this); v6f753 =null; }; this.OnUnload =function() { WG50Engine.UnregisterBehaviour(this); Listener.Unload(this.FrameObj); Listener.Unload(this.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV));  for (var v10188 in this.Tables) { if (v10188 !=null &&typeof(v10188)=="string") { var v3d551 =this.Tables[v10188];  if (typeof(v3d551)!="function" &&v3d551 !=null) v3d551.OnUnload(); } }  if (this.ChartContainer &&this.ChartInteractiveUI) this.ChartInteractiveUI.OnUnload(); };  this.ResolveImagePathEx =function(v43814) { return this.ResolveImagePath(this.GetImagesFolder(),v43814); }; this.__getter =function(v26c61) { switch (v26c61) { case "Visible": return (this.FrameObj.style.display ==""); } }; this.ReBindingPostBackData =function() { WG50Engine.SetLastSelectedObject(this); WG50Engine.SetCheckedRowsData(this); WG50Engine.SetClientStorageData(this); }; this.PrepareAdditionalPostBackData =function() { WG50Engine.UpdateState(this); }; this.OnResponseError =function(v1a373) { WG50Engine.OnResponseError(this,v1a373); }; this.OnResponse =function(v1a373) { WG50Engine.OnResponse(this,v1a373); }; this.GetFocusControl =function() { var v37541 =document.getElementById(this.Id +"_Moz"); if (v37541) v37541.grid =this; return v37541; };  this.IsRightToLeft =function() { var veee12 =this.FrameObj.currentStyle.direction; return veee12 =="rtl"; }; this.EnsureActiveEditCellFocus =function() { if (typeof (WGEditEngine)!="undefined") WGEditEngine.EnsureActiveEditCellFocus(this); }; this.EditKeyboardHandler =function(v76d16) { WGEditEngine.EditControlKeyboardHandler(this,v76d16); }; this.GetRootTable =function() { return this.RootTable; }; this.GetMaxWidth =function() { var v1ef78 =this.GetRootTable().GetElement(WG40.BODY,WG40.HTMLTABLE).offsetWidth; var v75319 =v1ef78; var v10188; for (v10188 in this.Tables) { var vce743 =this.Tables[v10188]; if (typeof (vce743)!="function") v75319 =Math.max(v75319,vce743.GetMaxWidth()); } return v75319; }; this.GetRootTableWidth =function() { var v6e07 =this.GetRootTable().GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var v4af34 =v6e07.rows[0].cells[v6e07.rows[0].cells.length -1]; return v6e07.offsetWidth -v4af34.offsetWidth; }; this.GetPreferredRootTableWidth =function() { var v6e07 =this.GetRootTable().GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var v4af34 =v6e07.rows[0].cells[v6e07.rows[0].cells.length -1]; if (v4af34.style.width.indexOf("%")>0) return v6e07.offsetWidth -v4af34.offsetWidth; else return v6e07.offsetWidth; }; this.FixPadColumnWidth =function() { if (this.GetMaxWidth()>this.GetRootTableWidth()) { var ve9125 =this.GetMaxWidth()-this.GetRootTableWidth()+50; var v64298 =this.GetRootTable(); var v59c71 =v64298.GetElement(WG40.COLGROUP); var vcda47 =v59c71.childNodes[v59c71.childNodes.length -1]; vcda47.width =ve9125; var vb4d45 =vcda47.width; if (WG50Engine.HasVSBar(this.GetRootTable().GetElement(WG40.BODY,WG40.HTMLDIV))) vb4d45 +=17; v59c71 =v64298.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); vcda47 =v59c71.rows[0].cells[v59c71.rows[0].cells.length -1]; WG50Engine.SetColHeaderPaddingWidth(v64298,vcda47,vb4d45); vcda47.locked =true; } }; this.GetColumnByElement =function(vfb852) { return WG50Engine.GetColumnByElement(vfb852); }; this.GetCellByElement =function(vfb852) { return WG50Engine.GetCellByElement(vfb852); }; this.GetRowByElement =function(vfb852) { return WG50Engine.GetRowByElement(vfb852); }; this.GetElement =function(vadc71,v2ed89) { if (v2ed89 ==WG40.HTMLROW) { var v88c76 =this.GetElement(vadc71,WG40.HTMLCELL); return v88c76.parentElement; } else { return document.getElementById(v2ed89 +vadc71 +"_" +this.Name); } };  this.GetFreezeTableElement =function() { return this.GetElement(WG40.FREEZEBAR,WG40.HTMLTABLE); };  this.GetFreezeOuterDivElement =function() { var v10188 =this.GetFreezeTableElement(); var v88371 =v10188.rows[0].cells[0]; var va2d84 =v88371.children[0];  return va2d84; };  this.GetFreezeDivElement =function() { var va2d84 =this.GetFreezeOuterDivElement();  return va2d84.children[0]; }; this.SetStatus1 =function(v8fd59,v74f68,v57d29,v60e7) { if (this.LayoutSettings.StatusBarVisible) { if (v57d29 !="" &&!this.IsPreviewMode) { var v2fb37 =this.LayoutSettings.TextSettings.TextItems.GetItemByProperty("TextItem",v57d29); if (v2fb37) v8fd59 =v2fb37.TextValue; if (v8fd59 !="") { if (v8fd59 =="none") v8fd59 =""; } else { v8fd59 =this.GetString(v57d29); if (typeof (v8fd59)=="undefined" ||v8fd59 ==null) { var v01c10 =this; setTimeout(function() { v01c10.SetStatus1("",v74f68,v57d29,v60e7); },100); return; } } }  if (typeof(v60e7)!="undefined") v8fd59 =v8fd59.replace("{0}",v60e7); this.GetElement(WG40.STATUSBAR,WG40.HTMLCELL).innerText =v8fd59; } }; this.SetStatus2 =function(v8fd59,v74f68,v16b81,v16872) { if (this.LayoutSettings.StatusBarVisible) { if (v74f68 =="loaded") { v8fd59 =this.GetLoadedText(v74f68,v16b81,v16872); if (typeof (v8fd59)=="undefined") { var v01c10 =this; setTimeout(function() { v01c10.SetStatus2(v8fd59,v74f68,v16b81,v16872); },100); return; } } else { var v68072 =this.GetString(v74f68); if (v68072 !="") v8fd59 =v68072; } this.GetElement(WG40.STATUSBARRIGHT,WG40.HTMLCELL).innerText =v8fd59;  if (this.IsClassicPaging()) WGPageEngine.SynchronizeUI(this); } }; this.SendCustomRequest =function() { WG50Engine.ExecuteFlyPostback(this.Name,"Custom"); }; this.ClearSelectedObject =function(v14893) { if (v14893 &&this.LastSelObj !=null) { WGEventEngine.HighlightRow(this.LastSelObj.element,"","","Clear"); var v54c9 =wgGetRowHeader(this.LastSelObj.element); if (v54c9) v54c9.innerHTML ="&nbsp"; } this.LastSelObj =null; }; this.GetSelectedObject =function() { return this.LastSelObj; }; this.GetDefaultLanguageXml =function() { return document.getElementById("WGLang_default"); }; this.GetLanguageXml =function() { if (!IS.ie &&this.LanguageXml !=null) return this.LanguageXml; var v7a184 =this.GetDefaultLanguageXml(); var vc3071 =this.LayoutSettings.TextSettings.Language; if (vc3071 =="UseCulture") { var v11515 =document.getElementById("WGLang_" +this.LayoutSettings.Culture); if (!v11515) return v7a184; else return v11515; } else if (vc3071 =="UseCustom") { var v11515 =document.getElementById("WGLang_" +this.LayoutSettings.TextSettings.UseLanguage); if (!v11515) return v7a184; else return v11515; } return v7a184; }; this.GetString =function(v57d29) { var v1a373 =""; if (this.IsPreviewMode) return v57d29; var v2fb37 =this.LayoutSettings.TextSettings.TextItems.GetItemByProperty("TextItem",v57d29); if (v2fb37) v1a373 =v2fb37.TextValue; if (v1a373 =="") { var v11515 =this.GetLanguageXml(); if (!IS.ie &&!this.LanguageXml) { v11515 =ISMoz.ConvertToXmlObject(v11515); this.LanguageXml =v11515; } if ((!IS.ie &&v11515.xml =="")||(IS.ie &&v11515.readyState !="complete")) return null; var v40251 =ISXml.GetNode(v11515,"//" +v57d29); if (v40251) { v1a373 =v40251.text; } } return v1a373; }; this.GetLoadedText =function(v74f68,v16b81,v16872) { var v8fd59 =""; var v7ea62 =false; try { if (this.IsClassicPaging()) v8fd59 =this.GetString("CommonText/PagingStatus"); else v8fd59 =this.GetString("CommonText/Loaded"); if (v8fd59 ==null ||v8fd59 =="") v7ea62 =true; } catch (e) { v7ea62 =true; } if (v7ea62) { var vd0e61 =this; setTimeout(function() { vd0e61.GetLoadedText(v74f68,v16b81,v16872); },100); return; } if (this.IsClassicPaging()) { v8fd59 =v8fd59.replace("{0}",v16b81).replace("{1}",v16872); v16b81 =this.TotalLoadedRows; v16872 =this.TotalRows; } else { v8fd59 =v8fd59.replace("[n]",v16b81); v8fd59 =v8fd59.replace("[total]",v16872); } if (v16b81 ==0 ||v16872 ==0) WGUIEngine.ShowNoDataBox(this); else WGUIEngine.HideNoDataBox(this); return v8fd59; }; this.Refresh =function() { wgRefresh(this.Name); }; this.RefreshAll =function() { wgRefresh(this.Name,true); }; this.HasFocus =function() { return wgGetActiveGrid()==this.Name; }; this.GetCssMenuFile =function() { return this.LayoutSettings.ScriptDirectory +this.LayoutSettings.MenuCssFile; }; this.HasGroup =function() { var ve0e25 =false; for (vce743 in this.Tables) { var v10188 =this.Tables[vce743]; if (typeof (v10188)!="function" &&v10188.GroupedColumns.length>0) { ve0e25 =true; break; } } return ve0e25; }; this.ActivateEditMode =function(v88e32) { return WGEditEngine.ActivateEditMode(this,v88e32); }; this.ExitEditMode =function(vfce68) { return WGEditEngine.ExitEditMode(this.LastEditObj,vfce68); }; this.ValidateRow =function(vd0b52) { return WGEditEngine.ValidateRow(this,vd0b52); }; this.ExitEdit =function(v2fe87,v6424,v8313) { return WGEditEngine.ExitEdit(this,v2fe87,v6424,v8313); }; this.UpdateState =function() { }; this.ShowGroupByBox =function() { var v42c33 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (v42c33) { var v00449 =v42c33.parentElement; this.NeedHeightResize =true; v00449.style.display =""; if (IS.moz) { var vd1550 =this; window.setTimeout(function() { WGMozEngine.OnTableResize(vd1550); },100); } } }; this.HideGroupByBox =function() { var v42c33 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (v42c33) { var v00449 =v42c33.parentElement; this.NeedHeightResize =true; v00449.style.display ="none"; if (IS.moz) { var vd1550 =this; window.setTimeout(function() { WGMozEngine.OnTableResize(vd1550); },100); } } }; this.IsGroupByBoxShown =function() { var v42c33 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (v42c33) { var v00449 =v42c33.parentElement; return v00449.style.display ==""; } return false; }; this.ShowFilterBar =function() { var v5b090 =this.GetRootTable().GetFilterRow(); var v4f81 =new Array(); if (wgIsColumnSetRow(v5b090)) v4f81 =wgGetColumnSetRows(v5b090); else v4f81[0] =v5b090; this.LayoutSettings.Set("FilterBarVisible",true,true); for (var v3c727=0; v3c727<v4f81.length; v3c727++) v4f81[v3c727].style.display =""; if (IS.moz) { var vd1550 =this; window.setTimeout(function() { WGMozEngine.OnTableResize(vd1550); },100); } }; this.HideFilterBar =function() { var v5b090 =this.GetRootTable().GetFilterRow(); var v4f81 =new Array(); if (wgIsColumnSetRow(v5b090)) v4f81 =wgGetColumnSetRows(v5b090); else v4f81[0] =v5b090; this.LayoutSettings.Set("FilterBarVisible",false,true); for (var v3c727=0; v3c727<v4f81.length; v3c727++) v4f81[v3c727].style.display ="none"; if (IS.moz) { var vd1550 =this; window.setTimeout(function() { WGMozEngine.OnTableResize(vd1550); },100); } }; this.IsVisible =function() { return this.Get("Visible"); }; this.SetBusy =function() { if (this.LayoutSettings.StatusBarVisible) { var v43814 =document.getElementById("tdStatIcon_" +this.Name).childNodes[0]; v43814.style.visibility ="visible";  if (v43814.src.indexOf(this.LayoutSettings.ImageSettings.InProgressImage)==-1) v43814.src =this.ResolveImagePathEx(this.LayoutSettings.ImageSettings.InProgressImage); } if (this.LayoutSettings.InProgressUIBehavior =="ChangeCursorToHourGlass") { var v3e431 =document.getElementById(this.Name +"_ImgB"); if (!v3e431) { v3e431 =document.createElement("IMG"); v3e431.id =this.Name +"_ImgB"; v3e431.style.cssText ="z-index: 299; filter2:alpha(opacity=0); position:absolute; height:50px; width:50px;"; v3e431.src =this.ResolveImagePathEx("wg_blank.gif"); document.body.appendChild(v3e431); } v3e431.style.display =""; v3e431.style.cursor ="wait"; this.FrameObj.onmousemove =function() { WG50Engine.OnFrameMouseMove(v3e431); }; } }; this.SetIdle =function() { if (this.LayoutSettings.StatusBarVisible &&!this.IsStatusLocked) document.getElementById("tdStatIcon_" +this.Name).childNodes[0].style.visibility ="hidden"; if (this.LayoutSettings.InProgressUIBehavior =="ChangeCursorToHourGlass") { var v3e431 =document.getElementById(this.Name +"_ImgB");  if (v3e431 !=null) { v3e431.style.cursor ="default"; v3e431.style.display ="none"; this.FrameObj.onmousemove =null; } } };  this.ResetStatus =function(v33943) { if (this.IsStatusLocked ||v33943) { this.IsStatusLocked =false; this.IsUnhandledError =false; this.SetIdle(); this.SetStatus1("","ready","CommonText/Ready");  if (v33943) WGUIEngine.ShowNoDataBox(this); } };  this.ClearChildTables =function(v6c726) { if (v6c726) { var vec26 =this.Tables[v6c726].GetChildTables(); for (var v3c727=0; v3c727<vec26.length; v3c727++) { var v00f4 =this.Tables[vec26[v3c727].Id]; v00f4.SubTableIds =new Array(); } } else { var v64298 =this.GetRootTable(); var v59c71 =v64298.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var vf5d53 =v64298.GetElement(WG40.COLHEADER,WG40.HTMLDIV); if (!this.IsRightToLeft()) vf5d53.scrollLeft =0; else vf5d53.scrollLeft =vf5d53.scrollWidth; var vcda47 =v59c71.rows[0].cells[v59c71.rows[0].cells.length -1]; vcda47.locked =false; for (childTbl in this.Tables) { if (typeof (this.Tables[childTbl])!="function") this.Tables[childTbl].SubTableIds =new Array(); } } }; this.GetBlurRowStyle =function() { var vbcd24 =this.LayoutSettings.LostFocusClass; if (vbcd24 =="") return "background-color: gainsboro"; else return IS.GetCssText(this.Id,vbcd24); }; this.GetEditFocusStyle =function() { var vbcd24 =this.LayoutSettings.EditFocusClass; if (vbcd24 =="") return "background-color: white;"; else return IS.GetCssText(this.Id,vbcd24); }; this.GetXml =function() { return this.XmlDt; }; this.MarkEdit =function() { WGEditEngine.MarkEdit(this); }; this.GetCurSelImage =function() { return this.ResolveImagePathEx(this.LayoutSettings.ImageSettings.CurrentRowImage); }; this.Show =function() { if (IS.ie) this.FrameObj.parentElement.style.display =""; this.FrameObj.style.display ="";  WGUIEngine.AutoFitColumns(this.Name); if (this.NeedFocus) WG50Engine.FocusGrid(this,true); }; this.SetFocus =function() { WG50Engine.FocusGrid(this,true); }; this.Hide =function() { if (IS.ie) this.FrameObj.parentElement.style.display ="none"; else this.FrameObj.style.display ="none"; }; this.ExportGrid =function(v82562,v2c392,vcc656,v08b8) { WG50Engine.ExecuteFlyPostback(this.Name,"Export",new Array(v82562,v2c392,vcc656,v08b8)); }; this.GetActiveEditCell =function() { return this.ActiveEditCell; }; this.GetLastEditObject =function() { return this.LastEditObj; }; this.SetHeight =function(v3bb54) { WGUIEngine.SetHeight(this,v3bb54); };    this.FreezePane =function(vedb73) { if (typeof(vedb73)=="number") this.LayoutSettings.FreezePaneSettings.ActiveFrozenColumns =vedb73;  WGUIEngine.InvalidateFreezeContainer(this); WGUIEngine.FreezePane(this,true); };  this.UnfreezePane =function() { WGUIEngine.UnfreezePane(this); };  this.GetLastFrozenColumn =function() { if (this.FrozenColumns !=null) return this.FrozenColumns[this.FrozenColumns.length -1];  return null; };  this.GetLastHiddenColumnWidth =function() { if (this.FreezeConfig !=null &&this.FreezeConfig[0].length >0) return this.FreezeConfig[0][this.FreezeConfig[0].length -1].GetWidth();  return 0; };  this.GetImagesFolder =function() { return this.LayoutSettings.ImageSettings.Folder; }; this.SetStatusIcon =function(v10c57,v73a91) { if (this.LayoutSettings.StatusBarVisible) { var v43814 =document.getElementById("tdStatIcon_" +this.Name).childNodes[0];  if (v73a91) v43814.src =v10c57; else v43814.src =this.ResolveImagePathEx(this.LayoutSettings.ImageSettings[v10c57 +"Image"]);  v43814.style.visibility ="visible"; } };  this.ClearSelection =function() { this.ClearSelectedObject(true); };  this.IsClassicPaging =function() { return (this.LayoutSettings.PagingMode =="ClassicPaging"); };   this.ClearClientStorage =function() { for (var tableName in this.Tables) { var v10188 =this.Tables[tableName];  if (typeof(v10188)=="object") v10188.Storage.Clear(); } };}function WebGridFreezePaneSettings(){ this._Type ="WebGridFreezePaneSettings"; ISObject.call(this);  this.MaxFrozenColumns =2; this.ActiveFrozenColumns =0; this.SplitterLineColor ="Black"; this.SplitterLineWidth =1; this.ShowSplitterLine =true; this.ShowInContextMenu =false; this.AbsoluteScrolling =false;};function WebGridClientEvents(){ this._Type ="ClientEvents"; ISObject.call(this); this.OnBeforeRequest =""; this.OnResponse =""; this.OnColumnMove =""; this.OnColumnResize =""; this.OnColumnChanged =""; this.OnRowSelect =""; this.OnCellSelect =""; this.OnCellClick =""; this.OnCellDblClick =""; this.OnGroupExpand =""; this.OnGroupCollapse =""; this.OnChildRowExpand =""; this.OnChildRowCollapse =""; this.OnKeyDown =""; this.OnKeyUp =""; this.OnRowSelectorClick =""; this.OnEnterEditMode =""; this.OnExitEditMode =""; this.OnBeforeAdd =""; this.OnAfterAdd =""; this.OnBeforeUpdate =""; this.OnAfterUpdate =""; this.OnBeforeDelete =""; this.OnAfterDelete =""; this.OnAfterResponseProcess =""; this.OnUnhandledError =""; this.OnRowValidate =""; this.OnCalendarSelect =""; this.OnInitialize =""; this.OnRowContextMenu =""; this.OnEditKeyDown =""; this.OnFocus =""; this.OnLostFocus =""; this.OnButtonClick =""; this.OnCheckBoxClick =""; this.OnActionDispatched =""; this.OnSelfRefRowExpand =""; this.OnSelfRefRowCollapse =""; this.OnColumnGroup =""; this.OnColumnUngroup =""; this.OnColumnGroupChange =""; this.OnColumnSort =""; this.OnColumnFilter =""; this.OnBeforeRowSelect =""; this.OnBeforePrint =""; this.OnAfterPrint ="";  this.OnScroll =""; this.OnAfterInitialize ="";}function ColumnSetSettings(){ this._Type ="ColumnSetSettings"; ISObject.call(this); this.ShowHeaders ="Default"; this.RowCount =2; this.GridLines ="None"; this.GridLineColor =""; this.GridLineStyle ="NotSet";}function FocusStyle(){ this._Type ="FocusStyle"; ISObject.call(this); this.BorderStyle ="NotSet"; this.BorderWidth =null; this.BorderColor =""; this.CssClass =""; this.GetStyleText =function() { var vfa629 =this.BorderStyle; if (vfa629 =="NotSet") vfa629 =""; vfa629 =vfa629.toLowerCase(); if (this.CssClass =="") { if (this.BorderColor =="") this.BorderColor ="transparent"; if (this.BorderWidth ==null) this.BorderWidth ="0"; if (this.BorderStyle =="NotSet") this.BorderStyle ="none"; return "border: " +this.BorderColor +" " +this.BorderWidth +"px " +vfa629; } else { var vb0930 =IS.GetCssObject(null,this.CssClass); if (vb0930) { if (vb0930.borderColor =="") vb0930.borderColor ="transparent"; if (vb0930.borderWidth =="") vb0930.borderWidth ="0"; if (vb0930.borderStyle =="") vb0930.borderStyle ="none"; return "border: " +vb0930.borderLeftColor +" " +vb0930.borderLeftWidth +" " +vb0930.borderLeftStyle; } else return ""; } };}function GroupByBoxObject(){ this._Type ="GroupByBoxObject"; ISObject.call(this); this.InfoText ="Drag a column header here to group by that column."; this.ConnectorLineColor ="White"; this.ConnectorLineStyle ="Solid"; this.ContextMenu =true;}function WebGridImageSettings(){ this._Type ="ImageSettings"; ISObject.call(this); this.Folder ="/CommonLibrary/Images/"; this.CollapseImage ="wg_minus.gif"; this.ExpandImage ="wg_plus.gif"; this.FilterImage ="wg_filter.gif"; this.NewRowImage ="wg_newrow.gif"; this.SortAscImage =""; this.SortDescImage =""; this.InProgressImage ="wg5_progress_std.gif"; this.EditImage ="wg_edit.gif"; this.GotoImage ="wg_goto.gif"; this.CurrentRowImage ="wg_currow.gif"; this.ColumnPointerImage ="wg_colptr.gif"; this.MoreDataImage ="wg5_more.gif"; this.RefreshImage ="wg5_refresh.gif"; this.ExportImage ="wg5_export.gif"; this.PreviewRowCollapseImage ="wg_prcol.gif"; this.PreviewRowExpandImage ="wg_prexp.gif"; this.HelpImage ="wg5_help.gif";  this.FilteredImage ="wg5_filtered.gif"; this.UnfilteredImage ="wg5_unfiltered.gif"; this.RequiredImage ="wg5_required.gif"; this.SuccessImage ="wg5_success.gif"; this.WarningImage ="wg5_warning.gif"; this.FailedImage ="wg5_failed.gif"; this.ReadOnlyImage ="wg5_locked.gif";  this.SliderThumbImage ="wg5_sliderthumb.gif";}function WebGridLayoutSet(){ this._Type ="LayoutSet"; ISObject.call(this); this.VirtualLoadMode ="Default"; this.AllowContextMenu =true; this.Culture =null; this.EditOnClick =false; this.EditFocusCellStyle =null; this.EditTextboxStyle =null; this.ButtonStyle =null; this.AllowGrouping ="No"; this.VirtualPageSize =50; this.ClientSideEvents =new WebGridClientEvents(); this.SizeHeightBy =0; this.SizeWidthBy =0; this.AllowAddNew ="No"; this.AllowColumnSizing ="Yes"; this.AllowColumnMove ="No"; this.AllowEdit ="No"; this.MenuCssFile ="ISMenu.css"; this.AllowDelete ="No"; this.AllowFilter ="No"; this.AllowSelectColumns ="No"; this.AllowSorting ="No"; this.AutoWidth =false; this.AutoHeight =false; this.AlternatingColors =false; this.CellClickAction ="RowSelect"; this.PagingMode ="None"; this.CellPaddingDefault =4; this.CellSpacingDefault =0; this.ColumnHeaders ="Yes"; this.ColumnFooters ="No"; this.GridLines ="Both"; this.GridLineColor =null; this.GridLineStyle =null; this.HeaderClickAction ="SortSingle"; this.GroupByBoxVisible =false; this.GroupByBox =new GroupByBoxObject(); this.GroupRowInfoFormatDefault ="[caption]: [value]"; this.GroupRowInfoStyle =null; this.AlternatingRowStyle =null; this.RowHeaders ="Yes"; this.FocusCellStyle =new FocusStyle(); this.Hierarchical =false; this.ImageSettings =new WebGridImageSettings(); this.RowHeaderWidth =18; this.RowHeightDefault =null; this.HideColumnsWhenGrouped ="Yes"; this.Grid =null; this.StatusBarVisible =true; this.ScriptDirectory ="/CommonLibrary/WebGrid/V6_0_7200/"; this.AlwaysShowHelpButton =true; this.NewRowLostFocusAction ="NeverUpdate"; this.RowLostFocusAction ="AlwaysUpdate"; this.TextSettings =new WebGridTextSettings(); this.AllowExport ="No"; this.ChildRowEmptyAction ="ShowChildContent"; this.AlwaysUseCachedDataOnFirstLoad =false; this.CustomFilterString =""; this.ResetNewRowValuesOnError =true; this.InProgressUIBehavior ="DisplayMessageBox"; this.ColumnSetHeaders ="Yes"; this.PreviewRowStyle =null; this.LostFocusRowStyle =null; this.CheckedRowStyle =null; this.FilterRowStyle =null; this.QuickFilterBarStyle =null; this.SortedColumnStyle =null; this.RowHeaderStyle =null; this.TreeLines =true; this.ChildTableSpacing =4; this.HyperlinkStyle =null; this.ShowRefreshButton =true; this.AutoFitColumns =false; this.AutoFitColumnsBuffering =true; this.FilterBarVisible =true; this.ClientVisible =true; this.AutoColMinWidth =100; this.ScrollBarStyle =null; this.PromptBeforeDelete =false; this.ApplyFiltersKey ="ShiftEnter"; this.SelectedRowClass =""; this.CheckedRowClass =""; this.TextBoxClass =""; this.StatusBarCommandStyle =null; this.HelpURL =""; this.PersistRowChecker =false; this.UseRelativePositioning =true;  this.AllowColumnFreezing ="No"; this.FreezePaneSettings =new WebGridFreezePaneSettings(); this.AutoFilterSuggestion =false; this.RowHighlightType ="EntireRow"; this.ShowFilterStatus =false; this.VerboseEditingInformation =false; this.DisplayDetailsOnUnhandledError =true; this.RowChangedAction ="None"; this.FocusNewRowOnLastCell =false;  this.PagingSize =25; this.PagingStyleUI ="FirstPrevNextLast"; this.PagingDetectPartialGroupRows =false; this.PagingSliderWidth =120; this.PagingLatencyOnSlide =500; this.InitialView ="GridView"; this.ChartDisplayPosition ="Top"; this.ChartCustomContainerId ="";  this.MarkDefaultValuesAsDirty =true; this.AllowMultipleSelection ="No"; this.RestoreRowSelection ="Disabled"; this.ContextMenuAnimation =true; this.RestoreExpandedChildRows =false;}function PreviewRowSettings(){ this._Type ="PreviewRowSettings"; ISObject.call(this); this.Style =null; this.Indentation =18; this.Height =null; this.DataMember =""; this.Expandable =true; this.DefaultExpanded =true; this.LoadOnDemand =false;}function SelfReferencingSettings(){ this._Type ="SelfReferencingSettings"; ISObject.call(this); this.Enabled =false; this.FitColumnOnExpand =false; this.ChildDataMember =""; this.ParentDataMember =""; this.Table =null; this.ExpandColumnMember =""; this.ParentRootMode ="UseParentRootValue"; this.ParentRootValue =null; this.TreatOrphanRecordsAsRoot =true; this.LoadOnDemand =false; this.IsTreeViewSelectionMode =false; this.ExpandColumnInnerTextPadding =0;}function WebGridTextSettings(){ this._Type ="TextSettings"; ISObject.call(this); this.LocalizationFolder ="/CommonLibrary/WebGrid/V6_0_7200/Localization/"; this.Language ="UseDefault"; this.UseLanguage =""; this.TextItems =new ISArray();}function WebGridCell(v01184){ this._Type ="WebGridCell"; ISObject.call(this); this.Position =0; this.Text =""; this.CustomAttributes =""; this.CustomObjectAttributes =""; this.Tag =""; this.Value =null; this.Column =null; this.DataChanged =false; this.Image =""; this.TooltipText =""; this.ForceNoEdit =false; this.Name =""; this._UIState ="Unchanged"; this.CellElement =null; this.Row =v01184; this.Table =null; this.SubTable =null; this.Grid =null; this.IsPrimaryKey =false; this.IsForeignKey =false; this.Modified =false; this.OldValue =""; this.OldText =""; this.ContentMode ="Text"; }var pCell =WebGridCell.prototype;pCell.Setup =function(td){ if (td !=null) WG50Engine.EmulateAttributes(td); this.CellElement =td; this.Table =this.Row.Table; this.SubTable =this.Row.SubTable; this.Grid =this.Table.Grid; var colName =WG50Engine.GetColumnNameByCell(this.Table,td); this.Column =this.Table.GetColumn(colName); this.Name =colName; if (td.contentMode) this.ContentMode =td.contentMode; var text =td.innerText; if (this.ContentMode =="HTML") { var cnt =WGEventEngine.GetContentSpan(td); if (cnt) text =cnt.innerHTML; else text =td.innerHTML; if (text !="") { var regExp =new RegExp("\r\n","g"); text =text.replace(regExp,""); } } if (text ==" " ||text ==unescape("%A0")) text =""; if (this.Column.ColumnType =="ImageAndText" &&text.substring(0,1)==" ") text =text.substring(1); this.Text =text; if (this.Column.ColumnType =="ImageAndText") { var cnt =WGEventEngine.GetContentSpan(td); if (cnt) { if (cnt.children[0].tagName =="SPAN") this.Image =cnt.children[0].children[0].src; else if (cnt.children[0].tagName =="IMG") this.Image =cnt.children[0].src; } } if (this.Column.ColumnType !="CheckBox") { if (td.cellValue) this.Value =td.cellValue; else this.Value =this.Text; } else { this.Value =td.cellValue; } if (td.noEdit) this.ForceNoEdit =true; if (td.cellModified) this.Modified =true; var hasOldValue =(td.oldCellValue !="" &&typeof (td.oldCellValue)!="undefined");  this.OldText =(td.oldText ? td.oldText : ""); this.OldValue =(hasOldValue ? td.oldCellValue : ""); this.DataChanged =(td.cellModified ==true ||(hasOldValue &&this.Value !=this.OldValue));};pCell.SetDataChanged =function(){ this.DataChanged =this.Modified =true; this.CellElement.cellModified =true;};pCell.Synchronize =function(){ this.Setup(this.CellElement);};pCell.GetElement =function(){ return this.CellElement;};pCell.IsForeignColumn =function(x){ if (this.SubTable) { if (!x) x =this.SubTable.GetConstraintXml(); var nodes =ISXml.GetNodes(x,"//DataColumn"); for (var i=0; i<nodes.length; i++) { if (ISXml.GetAttribute(nodes[i],"name")==this.Column.Name) return true; } } return false;};pCell.IsActive =function(){ if (this.Grid.ActiveEditCell) { if (this.Grid.ActiveEditCell.rowElement ==this.CellElement) return true; } return false;};pCell.ActivateEdit =function(){ this.Select(); this.Grid.ActivateEditMode();};pCell.GetParentKeyValue =function(x){ if (this.IsForeignColumn(x)) { if (!x) x =this.SubTable.GetConstraintXml(); return ISXml.GetNodeText(x,"//DataColumn[@name='" +this.Column.Name +"']"); }; return null;};pCell.SetText =function(s,sameValue,ignoreEditType){ if (this.Column.IsRowChecker ||(this.Column.EditType =="NoEdit" &&!ignoreEditType)) return;  this.Text =s; if (sameValue) this.SetValue(s); if (this.Row._UIState !="Added") { var cell =this.CellElement; var hasNoBR =cell.innerHTML.indexOf("NOBR")>0; var cntSpan =WGEventEngine.GetContentSpan(cell);  if (cntSpan) hasNoBR =cntSpan.innerHTML.indexOf("NOBR")>0; var output =(hasNoBR ? "<NOBR>" : "")+(s =="" ? "&nbsp;" : _FixAmpChar(s))+(hasNoBR ? "</NOBR>" : ""); if (this.Column.ColumnType =="CheckBox") { var boolValue =false;  s =s.replace("\n","");  if (typeof(s)=="string" &&s.toLowerCase()=="true") boolValue =true;  if (typeof(s)=="boolean" &&s ==true) boolValue =true;  cell.cellValue =boolValue; cell.children[0].checked =boolValue; } else { if (cntSpan) cntSpan.innerHTML =output; else cell.innerHTML =output; } cell.cellModified =true; } this.DataChanged =true; this.Row.SetDataChanged();};pCell.SetValue =function(v){ this.Value =v; this.Modified =true; if (this.Row._UIState !="Added") { this.CellElement.cellValue =v; this.CellElement.cellModified =true; } this.Row.SetDataChanged();};pCell.SetForceNoEdit =function(v){ if (typeof (v)=="undefined") v =true; if (v) { this.ForceNoEdit =true; this.CellElement.noEdit ="True"; } else { this.ForceNoEdit =false; this.CellElement.removeAttribute("noEdit"); }  if (this.Column.ColumnType =="CheckBox") this.GetElement().children[0].disabled =v;};pCell.Select =function(isCellSelect,skipEvts){ if (!isCellSelect) WGEditEngine.HighlightEditCell(this.CellElement); else { var rowStyle =this.Table.GetSelRowStyle(); var focusStyle =this.Table.GetFocusCellStyle(); var selObj =this.Grid.GetSelectedObject();  if (!wgIsSameRow(selObj.GetRowElement(),this.Row.GetElement())) { var img =this.Grid.ResolveImagePathEx(this.Grid.LayoutSettings.ImageSettings.CurrentRowImage); WGEventEngine.SelectRow(this.Row.GetElement(),img); } WGEventEngine.HighlightCell(this.CellElement,rowStyle,focusStyle,"",skipEvts); }};pCell.ToXml =function(){ if (this.DataChanged) { if (this.SubTable) { var dcXml =this.SubTable.GetConstraintXml(); if (this.IsForeignColumn(dcXml)) { var parentKV =this.GetParentKeyValue(dcXml); if (parentKV) { this.Text =this.Value =parentKV; } } } var oldText =this.OldText; if (oldText !="") oldText =oldText.replace(/<BR>/g,"\n"); var value =this.Value; if (typeof (value)=="boolean") value =(value)? "True" : "False"; if (this.Modified &&this.Column !=null &&this.Column.DataType =="System.Boolean" &&value =="") value ="False"; var s ="<cell "; s +="modified='" +this.Modified +"' colName='" +ISXml.EncodeString(this.Column.Name)+"'>"; s +="<text>" +ISXml.EncodeString(this.Text)+"</text>"; s +="<value>" +ISXml.EncodeString(value)+"</value>"; s +="<oldtext>" +ISXml.EncodeString(oldText)+"</oldtext>"; s +="<oldvalue>" +ISXml.EncodeString(this.OldValue)+"</oldvalue>"; s +="</cell>"; return s; } return "";};pCell.GetAttribute =function(attributeName){ var el =this.GetElement(); var attr =el.attributes[attributeName];  if (attr !=null) return attr.value;  return "";};pCell.IsEditable =function(){ return WG50Engine.IsCellEditable(this.Column,this.GetElement());};pCell =null;function WebGridColumn(){ this._Type ="WebGridColumn"; ISObject.call(this); this.WebComboID =""; this.Name =""; this.Table =null; this.AggregateFunction ="None"; this.ButtonText =""; this.AllowGrouping ="Default"; this.AllowSizing ="Default"; this.AllowSorting ="Default"; this.Bound =true; this.DataMember =""; this.DefaultValue =""; this.Caption =""; this.GroupEmptyString ="(none)"; this.GroupRowValueFormatString =""; this.GroupRowInfoFormat =""; this.EditType ="TextBox"; this.GroupInterval ="Value"; this.HeaderImage =""; this.ColumnType ="Text"; this.HeaderTooltip =""; this.CellImage =""; this.NullText =""; this.ShowInSelectColumns ="Yes"; this.IsGrouped =false; this.IsSorted =false; this.Position =0; this.SortKeyField =""; this.FilterKeyField =""; this.SortOrder ="None"; this.Visible =true; this.DefaultVisible =true; this.Width =100; this.DataType ="System.String"; this.TextboxMaxlength =0; this.FooterText =""; this.FilterText =""; this.FilterType ="NotSet"; this.AllowMultiLine =false; this.DataFormatString =""; this.DefaultText =""; this.IsRowChecker =false; this.IsAutoWidth =false; this.FilterEditType ="SameAsEditType"; this.HyperlinkTarget ="Blank"; this.ButtonAutoPostback =false; this.ButtonPostbackMode ="OnTheFly"; this.HiddenDataMember =""; this.MaxHeight =null; this.ImageFormatString =""; this.HyperlinkDisplayText =""; this.HyperlinkFormatString =""; this.CustomEditorName =""; this.CustomEditorServerId =""; this.CustomEditorServerID =""; this.CustomEditorProperties =""; this.ForceVisible =false; this.AltElement =null;   this.IsFrozen =false; this.HiddenFromView =false; this.HiddenReason =""; this.ColGroupElement =null; this.ColGroupFooterElement =null; this.NewRowEditType ="SameAsEditType"; this.UseValueListForSorting ="Default"; this.HasValueList =false; this.InputRequired =false; this.InputRequiredErrorText =""; this.EditInfoText =""; this.EditInfoImage ="";   this.ShowInChartFieldList =true; this.CanAddToChartSeries =true; this.CanAddToChartFilter =true; this.CanAddToChartCategories =true; this.CanAddToChartData =true; this.TreatMarkupAsLiteralText =false; this.DefaultFilterType ="NotSet";  this.OnPropertiesInitialized =function(va7f50) { if (va7f50 =="OnInitialize") { this.Table =this.Parent; this.DefaultVisible =this.Visible; } }; this.GetDefault =function(vcfd85) { if (this[vcfd85] =="Default") { if (vcfd85 =="AllowSizing") vcfd85 ="AllowColumnSizing"; return this.Table.GetDefault(vcfd85); } else return this[vcfd85]; }; this.__getter =function(vcfd85) { switch (vcfd85) { case "AllowSorting": case "AllowGrouping": case "AllowSizing": case "UseValueListForSorting": return this.GetDefault(vcfd85); break; } }; this.__setter =function(vcfd85,v41a34,va7154) { switch (vcfd85) { case "Width": var v4fe84 =null; try { v4fe84 =this.GetElement(); } catch (e) { } if (v4fe84) { WGUIEngine.ResizeColumn(this.Table,v4fe84,v41a34); } break; } };  this.GetGrid =function() { return this.Table.GetGrid(); }; this.GetElement =function(v8bb91) { if (!this.Table.IsRootTable &&!v8bb91) { if (this.GetGrid().HeaderContext !=null) v8bb91 =WG50Engine.GetTR(this.GetGrid().HeaderContext); if (!v8bb91) { try { v8bb91 =this.Table.SubTableIds[0].GetElement(WG40.COLHEADER,WG40.HTMLTABLE); } catch (e) { } } } var v9e59 =this.Table.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v8bb91); if (v9e59) { var v0f396 =v9e59.rows[0]; if (this.Table.IsUseColumnSet) { var v1ae21 =this.Table.GetRowLayoutByColName(this.Name); var v3d663 =v1ae21.Row; if (this.Table.IsColumnSetHeaderVisible()) v3d663++; v0f396 =v9e59.rows[v3d663]; } var vd0d30 =wgGetCellByName(v0f396,this.Name);  if (!vd0d30 &&this.AltElement) return this.AltElement;  return vd0d30; } return null; }; this.Resize =function(v3bc68) { var v4fe84 =this.GetElement(); if (!v4fe84) return; var v4bb76 =v4fe84.parentElement; WGUIEngine.ResizeColumn(this.Table,v4fe84,v3bc68,!this.Table.IsRootTable,true); if (!this.Table.IsUseColumnSet) WGUIEngine.ReorderColumn(this.Table,v4bb76); WGUIEngine.FitColumns(this.Table,"Resize",v4fe84,v3bc68); }; this.ResizeBestFit =function() { WGUIEngine.ResizeBestFit(this.GetElement()); }; this.GetFilterEditType =function() { var vde970 =this.FilterEditType; if (vde970 =="SameAsEditType") vde970 =this.EditType; return vde970; };    this.GetWidth =function() { var v4fe84 =this.GetElement();  if (v4fe84 &&v4fe84.offsetWidth >0) return v4fe84.offsetWidth; else return parseFloat(this.Width); };  this.HideFromView =function(v3ab24,vd1944) { var vf1555 =this.GetElement(); var vb2383 =this.Table; var v6242 =vb2383.GetElement(WG40.COLGROUP,WG40.HTMLTABLE); var vb8d94 =WG50Engine.GetRealCellIndex(vf1555); if (!vd1944) vd1944 =new WebGridPartOption(true);  if (vd1944.Header &&!vb2383.Grid.EnableSection508Standards) vf1555.style.display ="none";  if (vd1944.Body) { if (IS.ie) v6242.children[vb8d94].style.display ="none";  else { var v50153 =vb2383.GetElement(WG40.BODY,WG40.HTMLTABLE); var v34191 =v50153.rows; this.ColGroupElement =v6242.removeChild(v6242.children[this.GetViewVisiblePosition()]); for (var v7b060=0; v7b060<v34191.length; v7b060++) { var v8bb91 =v34191[v7b060];  WG50Engine.EmulateAttributes(v8bb91);  if (wgIsRecordRow(v8bb91)) v8bb91.cells[vb8d94].style.display ="none"; } } }  if (vd1944.Footer) { if (vb2383.Get("ColumnFooters")=="Yes") { var vc8535 =vb2383.GetElement(WG40.COLFOOTERGROUP,null);  if (IS.ie) vc8535.children[vb8d94].style.display ="none"; else { var vefe57 =this.GetViewVisiblePosition(); var v44658 =vb2383.GetElement(WG40.COLFOOTER,WG40.HTMLTABLE); var vdd877 =v44658.rows[1].cells[vb8d94].style;  this.ColGroupFooterElement =vc8535.removeChild(vc8535.children[vefe57]); vdd877.visibility ="hidden"; vdd877.display ="none"; } } }  if (vd1944.FilterBar &&!vb2383.Grid.EnableSection508Standards) { if (vb2383.Get("AllowFilter")=="Yes") { var v8bb91 =vb2383.GetFilterRow(); if (v8bb91) { var v4b159 =v8bb91.cells[vb8d94]; v4b159.style.display ="none"; } } }  if (vd1944.AddNewRow &&!vb2383.Grid.EnableSection508Standards) { if (vb2383.Get("AllowAddNew")=="Yes") { var v59b62 =vb2383.GetNewRow();  if (v59b62 &&v59b62.cells.length >vb8d94) { var v31a39 =v59b62.cells[vb8d94]; v31a39.style.display ="none"; } } }  this.HiddenFromView =true; this.HiddenReason =v3ab24; };  this.HideFrozen =function(vd1944) { this.HideFromView("FreezePaneScroll",vd1944); };  this.Show =function(vd1944) { var vf1555 =this.GetElement(); var vb2383 =this.Table; var v6242 =vb2383.GetElement(WG40.COLGROUP,WG40.HTMLTABLE); var vb8d94 =WG50Engine.GetRealCellIndex(vf1555);  this.HiddenFromView =false; this.HiddenReason ="";  if (!vd1944) vd1944 =new WebGridPartOption(true);  if (vd1944.Header) vf1555.style.display ="";  if (vd1944.Body) { if (IS.ie) v6242.children[vb8d94].style.display ="";  else { var v50153 =vb2383.GetElement(WG40.BODY,WG40.HTMLTABLE); var v34191 =v50153.rows; v6242.insertBefore(this.ColGroupElement,v6242.children[this.GetViewVisiblePosition()]); for (var v7b060=0; v7b060<v34191.length; v7b060++) { var v8bb91 =v34191[v7b060];  WG50Engine.EmulateAttributes(v8bb91);  if (wgIsRecordRow(v8bb91)) v8bb91.cells[vb8d94].style.display =""; } } }  if (vd1944.Footer) { if (vb2383.Get("ColumnFooters")=="Yes") { var vc8535 =vb2383.GetElement(WG40.COLFOOTERGROUP,null);  if (IS.ie) vc8535.children[vb8d94].style.display =""; else { vc8535.insertBefore(this.ColGroupFooterElement,vc8535.children[this.GetViewVisiblePosition()]); var v44658 =vb2383.GetElement(WG40.COLFOOTER,WG40.HTMLTABLE); var vdd877 =v44658.rows[1].cells[vb8d94].style; vdd877.visibility ="visible"; vdd877.display =""; } } }  if (vd1944.FilterBar) { if (vb2383.Get("AllowFilter")=="Yes") { var v8bb91 =vb2383.GetFilterRow(); if (v8bb91) { var v4b159 =v8bb91.cells[vb8d94]; v4b159.style.display =""; } } }  if (vd1944.AddNewRow) { if (vb2383.Get("AllowAddNew")=="Yes") { var v59b62 =vb2383.GetNewRow();  if (v59b62 &&v59b62.cells.length >vb8d94) { var v31a39 =v59b62.cells[vb8d94]; v31a39.style.display =""; } } } };  this.GetViewPosition =function() { var vb2383 =this.Table; var ve076 =vb2383.Grid;  if (ve076.FreezePaneActive) { var v40e46 =vb2383.Columns; var v19194 =ve076.GetLastFrozenColumn().Position; var vd318 =WG50Engine.GetPreviousVisibleColumn(vb2383,ve076.GetLastFrozenColumn()); var vf8394 =0; var vb4a9 =0;  if (vd318 !=null) vb4a9 =vd318.Position; if (vb2383.Get("RowHeaders")=="Yes") vf8394++;  vf8394 +=vb2383.GroupedColumns.length;   for (var v7b060=v19194; v7b060<this.Position; v7b060++) { if (!v40e46[v7b060].HiddenFromView) vb4a9++; }  if (this.Position <v19194) return this.GetElement().cellIndex; else if (this.Position ==v19194) { if (this.HiddenFromView) return -1; else return vb4a9 +vf8394; }  return vb4a9 +vf8394; } else { return this.GetElement().cellIndex; } };  this.GetViewVisiblePosition =function() { var ve076 =this.Table.Grid; var v19194 =ve076.GetLastFrozenColumn().Position; var v29032 =this.GetViewPosition(); var vc2f64 =0; for (var v7b060=0; v7b060<v19194; v7b060++) { if (!this.Table.Columns[v7b060].Visible) vc2f64++; } for (var v7b060=v19194; v7b060<v29032; v7b060++) { var v9f06 =this.Table.Columns[v7b060];  if (!v9f06.Visible) vc2f64++; } return v29032 -vc2f64; };  this.IsOutsideScrollView =function() { var v3bc68 =this.GetScrollWidth(); var v95637 =this.Table.Grid.GetFreezeOuterDivElement(); return (v3bc68 >v95637.offsetWidth); };  this.GetScrollWidth =function() { var v70e58 =this.Table.Grid; var v95637 =v70e58.GetFreezeOuterDivElement(); var v3bc68 =0;  for (var v7b060=0; v7b060<=this.Position; v7b060++) { var v9f06 =this.Table.Columns[v7b060];  if (!v9f06.HiddenFromView) v3bc68 +=v9f06.GetWidth(); }  return v3bc68; };  this.GetNewRowEditType =function() { var v30736 =this.NewRowEditType; if (v30736 =="SameAsEditType") v30736 =this.EditType; return v30736; };}function WebGridPartOption(va6680){ this.Header =false; this.ColHeaderGroup =false; this.Body =false; this.ColFooterGroup =false; this.Footer =false; this.AddNewRow =false; this.FilterBar =false;  if (va6680) { this.Header =this.ColHeaderGroup =this.Body =this.ColFooterGroup = this.Footer =this.AddNewRow =this.FilterBar =true; }}function WebGridColumnSet(){ this._Type ="WebGridColumnSet"; ISObject.call(this); this.Position =0; this.Caption =""; this.CaptionImage =""; this.ColumnCount =3; this.HeaderStyle =null; this.Visible =true; this.Width =null; this.AllowSizing ="Yes"; this.Name =""; this.Layout =new ISArray(); this.GetRowLayout =function(vef016,vd8092) { for (var v2b016=0; v2b016<this.Layout.length; v2b016++) { if (this.Layout[v2b016].Row ==vef016 &&this.Layout[v2b016].Col ==vd8092) return this.Layout[v2b016]; } return null; };}function WebGridCustomEditor(){ this._Type ="WebGridCustomEditor"; ISObject.call(this); this.Name =""; this.Index =0; this.ControlType ="ServerControl"; this.Persistence ="GridLevel"; this.JavascriptFiles =""; this.JavascriptEncoded =false; this.ScriptFolder =""; this.Behavior =new WebGridCustomEditorBehavior(); this.ServerControlFullName =""; this.Grid =null; this.DDObj =null; this.BaseEditorType =""; this.HasDropdownButton =false; this.DropdownButtonWidth =16; this.DropdownButtonImageFile =""; this.DropdownButtonType ="Image"; this.Tag =""; this.ImplementationObject =null; this.baseEditor =null; this.OnPropertiesInitialized =function() { this.Grid =this.Parent; this.ScriptFolder =this.Grid.LayoutSettings.ScriptDirectory +"CustomEditors/" +this.ScriptFolder +"/"; try { this.ImplementationObject =eval("new " +this.Name +"_Editor()"); } catch (e) { alert("Can't find implementation object for CustomEditor '" +this.Name +"'"); } if (this.ImplementationObject !=null) { this.ImplementationObject.Grid =this.Grid; this.ImplementationObject.CustomEditor =this; this.ImplementationObject.OnInitialize(); } }}function WebGridCustomEditorBehavior(){ this._Type ="WebGridCustomEditorBehavior"; ISObject.call(this); this.BaseEditorType ="Textbox"; this.HasDropdownButton =false; this.DropdownButtonWidth =16; this.DropdownButtonImageFile =""; this.DropdownButtonType ="Image"; this.Tag =""; this.OnPropertiesInitialized =function() { this.Parent.BaseEditorType =this.BaseEditorType; this.Parent.HasDropdownButton =this.HasDropdownButton; this.Parent.DropdownButtonWidth =this.DropdownButtonWidth; this.Parent.DropdownButtonImageFile =this.DropdownButtonImageFile; this.Parent.DropdownButtonType =this.DropdownButtonType; }}function WebGridFilter(){ this._Type ="WebGridFilter"; this._UIState ="Unchanged"; ISObject.call(this); this.FilterText =""; this.FilterType ="NotSet"; this.Index =0; this.ColumnMember =""; this.Table =null; this.Name =""; this.OnPropertiesInitialized =function() { this.Name =this.ColumnMember; this.Table =this.Parent; if (this.XmlNode !=null) this.FilterText =ISXml.GetNodeText(this.XmlNode,"FilterText"); }; this.GetElementType =function(vafd35) { switch (vafd35) { case "FilterText": return "CDATA"; default: return "Attribute"; } }; this.GetElement =function() { var va7999 =this.Table.GetFilterRow(); if (va7999) { return wgGetCellByName(va7999,this.Name); } return null; };}function WebGridFormatCondition(){ this._Type ="WebGridFormatCondition"; ISObject.call(this); this.Name =""; this.Index =0; this.ColumnMember =""; this.Operator ="EqualTo"; this.Enabled =true; this.ConditionText =""; this.CustomConditionText =""; this.FormatStyle =null; this.TargetObject ="Row"; this.TargetColumnMember =""; this.Column =null; this.TargetColumn =null; this.Collection =new ISArray();}function WebGridGroup(){ this._Type ="WebGridGroup"; this._UIState ="Unchanged"; ISObject.call(this); this.GroupInterval ="Default"; this.GroupMode ="Default"; this.GroupRowValueFormatString =""; this.SortOrder ="None"; this.Index =0; this.ColumnMember =""; this.Table =null; this.Name =""; this.OnPropertiesInitialized =function() { this.Name =this.ColumnMember; this.Table =this.Parent; }; this.GetElement =function() { var v05a35 =WGUIEngine.GetGroupByBoxRow(this.Table.Grid.Id,this.Table.Name); var vf1a2 =this.Table.Grid; if (v05a35) { var v1ee92 =v05a35.childNodes[0].childNodes[0].childNodes[0].childNodes[0]; for (var v13c20=0; v13c20<v1ee92.cells.length; v13c20++) { WG50Engine.EmulateAttributes(v1ee92.cells[v13c20]); if (v1ee92.cells[v13c20].colName ==this.ColumnMember &&v1ee92.cells[v13c20].type =="GroupColumn") { return v1ee92.cells[v13c20]; } } } return null; };}function WebGridRow(v99a55,v77512){ this._Type ="WebGridRow"; ISObject.call(this); this.Table =v99a55; this.SubTable =v77512; this.ParentTableRow =null; this.ParentRow =null; this.KeyValues =null; this.Cells =null; this.Children =null; this.SelfRefChildren =null; this.ChildrenLoaded =false; this.DataSourceIndex =0; this.ChildNotExpandable =false; this.Expanded =false; this.Grid =null; this.Parent =null; this.Position =0; this.Selected =false; this.Visible =true; this.Height =null; this.Type ="Record"; this.DataChanged =false; this.KeyValue =null; this.ForceNoEdit =false; this.Checked =false; this.Name =""; this._UIState ="Unchanged"; this.Grid =null; this.GroupRowText =""; this.ParentConstraints =""; this.RowElement =null; this.ParentPos =""; this.TblSubId =null; this.GroupExpanded =false; this.ChildExpanded =false; this.PreviewRowExpanded =false; this.ChildrenLoaded =false; this.IsSelfRefRow =false; this.SelfRefExpanded =false; this.SelfRefLevel =0; this.SelfRefChildCount =0; this.SelfRefParentValue =null; this.RelNames =null; }var pRow =WebGridRow.prototype;pRow.Setup =function(el){ var table =this.Table; this.RowElement =el; this.Type =el.type; this.Grid =table.Grid; if (el.expanded &&el.expanded =="True") this.GroupExpanded =true; if (this.Type !="GroupHeader" &&table.ChildTables.length>0) { var hierRow =wgGetHierRecord(el); if (hierRow &&hierRow.childrenLoaded &&hierRow.childrenLoaded =="True") this.ChildrenLoaded =true; } if (el.noEdit &&el.noEdit =="True") this.ForceNoEdit =true; if (el.keyValue) this.KeyValue =el.keyValue; if (el.childExpanded &&el.childExpanded =="True") { this.ChildExpanded =true; this.ChildrenLoaded =true; } if (el.isRowChecked) this.Checked =true; if (el.srLevel) { this.SelfRefLevel =parseFloat(el.srLevel); this.IsSelfRefRow =true; } if (el.srRC) this.SelfRefRowCount =parseFloat(el.srRC); if (el.parentValue) this.SelfRefParentValue =el.parentValue; if (el.relNames) this.RelNames =el.relNames; if (table.HasMultiPrimaryKey) this.KeyValues =wgGetKeyValues(this.RowElement); if (el.srExpanded &&el.srExpanded =="True") this.SelfRefExpanded =true;  if (typeof(el.srRC)!="undefined") this.SelfRefChildCount =parseFloat(el.srRC); this.ParentPos =WGUIEngine.GetParentIndex(this.RowElement); if (this.Type =="GroupHeader") this.GroupRowText =el.innerText; if (this.Table.PreviewRowVisible) { var prc =WGUIEngine.GetPreviewRowExpandImageCell(el); if (prc) { if (prc.expanded =="True") this.PreviewRowExpanded =true; } } this.Position =parseFloat(el.position);};pRow.IsSelected =function(){ if (this.Grid.LastSelObj !=null) { if (this.Grid.LastSelObj.GetRowElement()==this.RowElement) return true; } return false;};pRow.GetElement =function(){ return this.RowElement;};pRow.Synchronize =function(){ this.Setup(this.RowElement);};pRow.GetCells =function(){ if (this._UIState =="Added") return this.Cells; var arr =new ISArray(); for (var i=0; i<this.Table.Columns.length; i++) { var c =this.GetCell(this.Table.Columns[i].Name); arr[arr.length] =c; } return arr;};pRow.GetCell =function(o){ var name =""; var idx =-1; var el; if (typeof (o)=="string") name =o; else idx =o; el =WG50Engine.GetCellEx(this.Table,this.RowElement,(name)? name : idx); if (el) { var cell =new WebGridCell(this); cell.Setup(el); return cell; } return null;};pRow.ExpandGroupRow =function(){ this.GroupExpanded =true; wgExpandGroupRow(this.RowElement);};pRow.CollapseGroupRow =function(){ this.GroupExpanded =false; wgCollapseGroupRow(this.RowElement);};pRow.ExpandChildRow =function(useSync){ if (useSync) this.Grid.XmlHttp.Asynchronous =false; this.ChildExpanded =true; wgExpandChildRow(this.RowElement); this.Grid.XmlHttp.Asynchronous =true;};pRow.CollapseChildRow =function(){ this.ChildExpanded =false; wgCollapseChildRow(this.RowElement);};pRow.ExpandSelfRefRow =function(){ if (!this.IsSelfRefRow) return; this.SelfRefExpanded =true; this.RowElement.srExpanded ="False"; WGUIEngine.ToggleSelfRefRow(null,this.RowElement,null,true);};pRow.CollapseSelfRefRow =function(){ if (!this.IsSelfRefRow) return; this.SelfRefExpanded =false; this.RowElement.srExpanded ="True"; WGUIEngine.ToggleSelfRefRow(null,this.RowElement,null,true);};pRow.Select =function(preventFocus){ if (typeof(preventFocus)=="undefined") preventFocus =false;  if (this.Table.IsRootTable) this.Table.SelectRow(this.RowElement,preventFocus); else this.SubTable.SelectRow(this.RowElement,preventFocus);};pRow.GetChildRow =function(pos,tblName){ if (!this.RowElement) return; if (!tblName &&this.Table.ChildTables.length ==0) return; this.Synchronize(); if (!this.ChildrenLoaded) return; if (!tblName) tblName =this.Table.ChildTables[0].Name; var tbl =this.Grid.Tables[tblName]; var tblSub =tbl.GetSubIdByParentKey(this.RelNames); if (tblSub) { return tblSub.GetRow(pos); }};pRow.GetChildRows =function(tblName){ if (!this.RowElement) return; if (!tblName &&this.Table.ChildTables.length ==0) return; this.Synchronize(); if (!this.ChildrenLoaded) return; if (!tblName) tblName =this.Table.ChildTables[0].Name; var tbl =this.Grid.Tables[tblName]; var tblSub =null;  if (typeof(this.RelNames)=="string") tblSub =tbl.GetSubIdByParentKey(this.RelNames); else { var hierRow =wgGetHierRecord(this.RowElement); var subId =hierRow.cells[hierRow.cells.length -1].children[0].children[0].children[0].subId; tblSub =tbl.GetSubIdById(subId); } if (tblSub) { var rows =new Array(); var rowCount =tblSub.GetRowsCount(); for (var i=0; i<rowCount; i++) { rows[rows.length] =tblSub.GetRow(i); } return rows; }};pRow.GetParentRow =function(){ if (this.SubTable) { var el =this.SubTable.GetParentRecordRow(); if (this.Table.Parent.IsRootTable) { if (this.Table.Parent.GroupedColumns.length>0) return this.Table.Parent.ToRowObject(el); else return this.Table.Parent.GetRow(parseFloat(el.position)); } else { var parent =this.Table.Parent; var subtbl =parent.GetSubTableById(wg_getTableSubId(el)); var row =new WebGridRow(parent,subtbl); row.Setup(el); return row; } } return null;};pRow.GetGroupChildRows =function(){ var groupRows =new Array(); var tr =this.RowElement; if (this.Type =="GroupHeader") { var cr,crType; var tb; var _tbl =this.Table; if (!this.Table.IsRootTable) _tbl =this.SubTable; tb =_tbl.GetElement(WG40.BODY,WG40.HTMLTABLE); cr =wgGetNextRow(tb,tr); if (cr) crType =cr.type; else crType ="GroupHeader"; if (crType =="GroupHeader") { while (cr &&(cr.type =="GroupTotalRow" ||(cr.hasParent =='True' &&(parseFloat(cr.groupIndex)-1 ==parseFloat(tr.groupIndex)) &&cr.parentIndex ==tr.position))) { groupRows[groupRows.length] =this.Table.ToRowObject(cr); cr =wgGetNextRow(tb,cr); while (cr &&(cr.type =="Record" ||cr.type =="PR" ||cr.type =="CSRecord" ||(cr.type =="GroupTotalRow" &&parseFloat(cr.groupIndex)-1>parseFloat(tr.groupIndex)) ||cr.type =="HierRecord" ||(cr.type =="GroupHeader" &&parseFloat(cr.groupIndex)-1>parseFloat(tr.groupIndex)))) cr =wgGetNextRow(tb,cr); } } else if (crType =="Record") { while (cr &&(cr.type =='Record')) { groupRows[groupRows.length] =this.Table.ToRowObject(cr); cr =wgGetNextRow(tb,cr); } } return groupRows; } return null;};pRow.GetNextRow =function(){ var nextPos =this.Position +1; if (this.Table.IsRootTable) return this.Table.GetRow(nextPos); else return this.SubTable.GetRow(nextPos);};pRow.GetPreviousRow =function(){ var prevPos =this.Position -1; if (prevPos<0) return; if (this.Table.IsRootTable) return this.Table.GetRow(prevPos); else return this.SubTable.GetRow(prevPos);};pRow.Update =function(useSync){ if (typeof (wgUpdateRow)=="undefined") { alert("WebGrid_Edit's library is not loaded. Make sure the grid has AllowEdit enabled."); return; } if (useSync) this.Grid.XmlHttp.Asynchronous =false; if (this._UIState =="Changed") wgUpdateRow(this); else if (this._UIState =="Added") wgAddNewRow(this); this.Grid.XmlHttp.Asynchronous =true;};pRow.Delete =function(useSync){ if (typeof (wgDeleteRow)=="undefined") { alert("WebGrid_Edit's library is not loaded. Make sure the grid has AllowEdit enabled."); return; } if (useSync) this.Grid.XmlHttp.Asynchronous =false; wgDeleteRow(this); this.Grid.XmlHttp.Asynchronous =true;};pRow.Validate =function(){ return WGEditEngine.ValidateRow(this.Grid,this.RowElement);};pRow.IsDirty =function(){ return wgIsRowDirty(this.RowElement);};pRow.SetDataChanged =function(){ if (this.DataChanged) return; this.DataChanged =true; if (this._UIState =="Unchanged") { this._UIState ="Changed"; this.RowElement.setAttribute("dataChanged","True"); this.RowElement.setAttribute("_UIState","Changed"); }};pRow.IsMarkedEdit =function(){ return (this.RowElement.markedEdit =="True");};pRow.CancelChanges =function(){ return WGEditEngine.CancelChanges(this.RowElement);};pRow.AcceptChanges =function(){ return WGEditEngine.AcceptChanges(this.RowElement);};pRow.BeginEdit =function(){ return WGEditEngine.ProcessInitialEdit(this.RowElement);};pRow.SetForceNoEdit =function(v){ if (typeof (v)=="undefined") v =true; if (v) { this.ForceNoEdit =true; this.RowElement.noEdit ="True"; } else { this.ForceNoEdit =false; this.RowElement.noEdit ="False"; this.RowElement.removeAttribute("noEdit"); }};pRow.Check =function(){ try { WGUIEngine.SetRowCheck(this.RowElement,true); } catch (e) { }};pRow.Uncheck =function(){ try { WGUIEngine.SetRowCheck(this.RowElement,false); } catch (e) { }};pRow.ExpandPreviewRow =function(){ if (!this.PreviewRowExpanded) WGUIEngine.TogglePreviewRow(this.RowElement);};pRow.CollapsePreviewRow =function(){ if (this.PreviewRowExpanded) WGUIEngine.TogglePreviewRow(this.RowElement);};pRow.ToXml =function(){ var keyValue =""; if (this.Table.HasMultiPrimaryKey) keyValue =ISXml.EncodeString(this.KeyValues); else keyValue =ISXml.EncodeString(this.KeyValue); var s ="<row keyValue=\"" +keyValue +"\">"; var cells =this.Cells; if (cells ==null) cells =this.GetCells(); for (var i=0; i<cells.length; i++) { if (cells[i]) s +=cells[i].ToXml(); } s +="</row>"; return s;};pRow.GetSelfRefChildRows =function(){ var rows =new Array(); var tr =this.GetElement(); var cr =null; var tb =this.Table.GetElement(WG40.BODY,WG40.HTMLTABLE,tr);  if (this.SelfRefChildCount >-1) { cr =wgGetNextRow(tb,tr); var outFromLevel =false; var alreadyIn =false; var isExpAll =false; var trLevel =this.SelfRefLevel; while (cr) { WG50Engine.EmulateAttributes(cr); if (cr.type =="GroupHeader" ||(cr.srLevel ==trLevel &&(cr.type !="HierRecord" &&cr.type !="CSRecord" &&cr.type !="PR"))) break; if ((!isExpAll &&cr.srLevel ==trLevel +1)) { if (cr.type =="HierRecord" &&cr.expanded !="True") { } else { var row =this.Table.ToRowObject(cr); rows.push(row); } alreadyIn =true; } else if (cr.srLevel ==trLevel) { if (alreadyIn) outFromLevel =true; } if (outFromLevel) break; cr =wgGetNextRow(tb,cr); } }  return rows;};pRow =null;function WebGridRowLayout(){ this._Type ="WebGridRowLayout"; ISObject.call(this); this.Name =""; this.Row =0; this.Col =0; this.ColumnMember =""; this.Width =100; this.Height =20; this.Spanned ="None"; this.Column =null; this.RowSpan =1; this.ColSpan =1; this.Collection =new ISArray();}function IWebGridPersistence(){ this.Type ="IWebGridPersistence"; ISObject.call(this);  this.Remove =function(){}; this.Add =function(){}; this.Contains =function(){}; this.IndexOf =function(){}; this.SerializeToXml =function(){}; this.Deserialize =function(){}; this.RefreshUI =function(){}; this.Clear =function(){};}function WebGridClientStorage(){ this._Type ="WebGridClientStorage"; this.Grid =null; this.Table =null;  ISObject.call(this);  this.SelectedRows =new IWebGridPersistence(); this.PendingChanges =new IWebGridPersistence(); this.ExpandedChildRows =new IWebGridPersistence();  this.Initialize =function() { if (typeof(WebGridPersistedRows)!="undefined") { this.SelectedRows =new WebGridPersistedRows(); this.SelectedRows.Table =this.Table; }  if (typeof(WebGridPersistedChildRows)!="undefined") { this.ExpandedChildRows =new WebGridPersistedChildRows(); this.ExpandedChildRows.Table =this.Table; } };  this.Clear =function() { this.SelectedRows.Clear(); };  this.SerializeToXml =function() { var v3c426 =this.Grid.XmlDt; var vd5851 =this.Table.XmlNode; var vf3695 =ISXml.CreateNodeOnly(v3c426,"Table",""); var v08465 =false;  ISXml.SetAttribute(vf3695,"Name",this.Table.Name);  var v82111 =this.SelectedRows.SerializeToXml(); if (v82111 !=null) { v08465 =true; vf3695.appendChild(v82111); }  var v25019 =this.ExpandedChildRows.SerializeToXml(); if (v25019 !=null) { v08465 =true; vf3695.appendChild(v25019); }  if (v08465) return vf3695; else return null; };  this.Deserialize =function(v22a1) { var v55512 =ISXml.GetNode(v22a1,"SelectedRows"); var v8e345 =ISXml.GetNode(v22a1,"ChildRows");  if (v55512 !=null) { this.SelectedRows.Deserialize(v55512); this.SelectedRows.RefreshUI(); }  if (v8e345 !=null) this.ExpandedChildRows.Deserialize(v8e345); };}function WebGridTable(){ this._Type ="WebGridTable"; ISObject.call(this); this.Name =""; this.Grid =null; this.IsRootTable =false; this.ParentTable =null; this.HasChildTable =false; this.TableLevel =null; this.Position =null; this.AllowAddNew ="Default"; this.ButtonStyle =null; this.AllowColumnSizing ="Default"; this.AllowColumnMove ="Default"; this.AllowEdit ="Default"; this.AllowDelete ="Default"; this.AllowFilter ="Default"; this.AllowSelectColumns ="Default"; this.AllowSorting ="Default"; this.AllowGrouping ="Default"; this.AutomaticSort =true; this.AutomaticFilter =true; this.CellClickAction ="NotSet"; this.CellPaddingDefault =-1; this.CellSpacingDefault =-1; this.ColumnHeaders ="Default"; this.ColumnFooters ="Default"; this.ColumnWidthDefault =100; this.GridLines ="Default"; this.GridLineColor =""; this.GridLineStyle =null; this.HeaderClickAction ="NotSet"; this.GroupRowInfoFormatDefault =""; this.GroupRowInfoStyle =null; this.RowHeaders ="Default"; this.FocusCellStyle =new FocusStyle(); this.Caption =""; this.DataKeyField =""; this.DataMember =""; this.CaptionImage =""; this.NewRowInfoText =""; this.GroupMode ="Collapsed"; this.RowStyle =null; this.SelectedRowStyle =null; this.HeaderStyle =null; this.FooterStyle =null; this.RowHeaderWidth =-1; this.RowHeightDefault =null; this.HideColumnsWhenGrouped ="Default"; this.NewRowStyle =null; this.ChildTables =new ISArray(); this.Layout =null; this.Columns =new ISArray(); this.Rows =null; this.TableHeaderStyle =null; this.TableHeaderVisible =false; this.GroupTotalVisible =false; this.GroupTotalStyle =null; this.GroupedColumns =new ISArray(); this.SortedColumns =new ISArray(); this.FilteredColumns =new ISArray(); this.RowLayout ="PlainColumn"; this.PreviewRowSettings =new PreviewRowSettings(); this.PreviewRowVisible =false; this.ColumnSets =new ISArray(); this.FormatConditions =null; this.ColumnSetSettings =new ColumnSetSettings(); this.SelfReferencingSettings =new SelfReferencingSettings(); this.IsUseColumnSet =false; this.SelectedRowClass =""; this.CheckedRowClass =""; this.HasMultiPrimaryKey =false; this.DataKeyFields =""; this.DataKeyFieldsCount =0; this.Id ="";  this.SubTableIds =new Array(); this.Formulas =new Array(); this.GridId =""; this.FilterMenu =null; this.FilterMenus =null; this.ColumnMenu =null; this.LastFo =null; this.LastAECIndex =-1; this.IsEditing =false; this.IsAdding =false; this.SubTableUpdates =new Array(); this.UniqueConstraints =""; this.FilterState ="NotSet";  this._LastFilters =new ISArray(); this.UseValueListForSorting ="No";  this.SelectedRows =new Array(); this.AllowMultipleSelection ="Default"; this.Storage =new WebGridClientStorage(); this.IsFilterDisabled =function() { if (this.FilteredColumns.length ==0 ||this.FilterState =="Disabled") return true;  return false; };  this.GetGrid =function() { if (this.Grid ==null) { var v7e285 =this; do { v7e285 =v7e285.Parent; if (v7e285 &&v7e285.GetType()=="WebGrid") { this.Grid =v7e285; break; } }while (v7e285 !=null); } return this.Grid; }; this.OnPropertiesInitialized =function() { var v32f79 =this.GetGrid(); v32f79.Tables[this.Name] =this; this.Id =this.Name; this.GridId =this.Grid.Id; this.Layout =v32f79.LayoutSettings; this.Storage.Grid =v32f79; this.Storage.Table =this; this.Storage.SelectedRows.Table =this; }; this.GetDefault =function(v42477) { if (this[v42477] =="Default" ||this[v42477] =="NotSet" ||this[v42477] =="" ||this[v42477] ==-1) return this.Grid.LayoutSettings[v42477]; else return this[v42477]; }; this.__getter =function(v42477) { switch (v42477) { case "CellClickAction": case "AllowSelectColumns": case "AllowColumnSizing": case "AllowColumnMove": case "AllowSorting": case "AllowGrouping": case "ColumnFooters": case "AllowAddNew": case "AllowEdit": case "AllowDelete": case "HideColumnsWhenGrouped": case "HeaderClickAction": case "SelectedRowClass": case "RowHeaders": case "RowHeaderWidth": case "AllowMultipleSelection": return this.GetDefault(v42477); break; case "AllowFilter": if (this.IsRootTable) return this.GetDefault(v42477); else return this.AllowFilter; break; } };  this.OnUnload =function() { if (this.FilterMenu !=null) this.FilterMenu.Destroy();  if (this.ColumnMenu !=null) this.ColumnMenu.Destroy(); }; this.HasNextSiblingGroupedColumns =function() { if (this.IsRootTable) return false; var v67996 =parseFloat(this.Position); var vcbf50 =this.GetParentTables(); if (v67996>=vcbf50.length -1) return false; for (var v4d210=v67996 +1; v4d210<vcbf50.length; v4d210++) { var v4cb47 =vcbf50[v4d210]; if (parseFloat(v4cb47.GroupedColumns.length)>0) return true; } return false; }; this.HasChildTableGroupedColumns =function() { var vc2179 =this.GetChildTables(); for (var v4d210=0; v4d210<vc2179.length; v4d210++) { if (vc2179[v4d210].GroupedColumns.length>0) return true; if (vc2179[v4d210].HasChildTableGroupedColumns()) return true; } return false; }; this.GetParentTables =function() { var v53f92 =new Array(); for (table in this.Grid.Tables) { var v22a64 =this.Grid.Tables[table]; if (typeof (v22a64)!="function" &&!v22a64.IsRootTable) { if (v22a64.Parent.Name ==this.Parent.Name) v53f92[v53f92.length] =v22a64; } } return v53f92; }; this.GetChildTables =function() { var vc2179 =new Array(); for (table in this.Grid.Tables) { var v22a64 =this.Grid.Tables[table]; if (typeof (v22a64)!="function" &&v22a64.Parent.Name ==this.Name) vc2179[vc2179.length] =v22a64; } return vc2179; }; this.GetParentTreeStructure =function() { var v77940 =this.Parent.Name; var v6fa58 =new Array(); while (v77940 !="") { var v64260 =this.Grid.Tables[v77940]; if (!v64260) return v6fa58; if (v64260.HasNextSiblingGroupedColumns()) v6fa58[v6fa58.length] ="Continuos"; else v6fa58[v6fa58.length] ="Last"; var v77940 =v64260.Parent.Name; if (v77940 !="" &&v64260.IsRootTable) break; } v6fa58.reverse(); return v6fa58; }; this.GetColumnGroupHeadersWidth =function() { var v4245 =0; if (!this.IsRootTable &&this.Parent.Get("RowHeaders")=="Yes") { v4245 +=26; } v4245 +=(this.GroupedColumns.length *16); if (this.Grid.LayoutSettings.Hierarchical) v4245 +=22; if (this.Get("RowHeaders")=="Yes") v4245 +=parseInt(this.Get("RowHeaderWidth")); if (this.IsPreviewRowVisible &&this.PreviewRowSettings.Expandable) v4245 +=parseInt(this.Get("RowHeaderWidth")); return v4245; }; this.GetParentHeadersWidth =function() { var v77657 =this; var v4245 =0; while (v77657) { var vea278 =null; if (!v77657.IsRootTable) vea278 =v77657.Parent.Name; var v64260; if (vea278 !="" &&vea278) { v64260 =this.Grid.Tables[vea278]; v4245 +=v64260.GetColumnGroupHeadersWidth(); if (v64260.Get("RowHeaders")=="Yes") v4245 -=parseInt(this.Get("RowHeaderWidth")); v77657 =v64260; } else v77657 =null; } return v4245; }; this.GetElement =function(ve9e97,vffe36,v48040) { if (ve9e97 ==WG40.COLHEADER ||ve9e97 ==WG40.COLFOOTER ||ve9e97 ==WG40.BODY) { if (vffe36 ==WG40.HTMLDIV) { if (this.IsRootTable) return document.getElementById(vffe36 +ve9e97 +"_" +this.Grid.Id +"_" +this.Id); else return document.getElementById(vffe36 +ve9e97 +"_" +this.Grid.Id +"_" +this.Id +"_" +WG50Engine.GetTableSubId(v48040)); } else { if (ve9e97 ==WG40.COLHEADER &&this.Grid.EnableSection508Standards) return this.GetElement(WG40.BODY,WG40.HTMLTABLE,v48040);  var v51693 =this.GetElement(ve9e97,WG40.HTMLDIV,v48040); return v51693.childNodes[0]; } } else { var v93712; if (ve9e97 ==WG40.COLGROUP) v93712 =this.GetElement(WG40.BODY,WG40.HTMLTABLE,v48040); else if (ve9e97 ==WG40.COLHEADERGROUP) v93712 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v48040); else if (ve9e97 ==WG40.COLFOOTERGROUP) v93712 =this.GetElement(WG40.COLFOOTER,WG40.HTMLTABLE,v48040); return v93712.childNodes[0]; } }; this.GetFilterRow =function(v48040) { if (!this.IsRootTable) return this.Grid.RootTable.GetFilterRow(); var v69042 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v48040); for (var v4d210=0; v4d210<v69042.rows.length; v4d210++) { WG50Engine.EmulateAttributes(v69042.rows[v4d210]); if (v69042.rows[v4d210].type &&v69042.rows[v4d210].type =="FilterRow") return v69042.rows[v4d210]; } return null; }; this.GetNewRow =function(v48040) { var v69042 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v48040); for (var v4d210=0; v4d210<v69042.rows.length; v4d210++) { WG50Engine.EmulateAttributes(v69042.rows[v4d210]); if (v69042.rows[v4d210].type &&v69042.rows[v4d210].type =="NewRow") return v69042.rows[v4d210]; } return null; }; this.GetSubTablePosById =function(va0272) { for (var v4d210=0; v4d210<this.SubTableIds.length; v4d210++) { if (this.SubTableIds[v4d210].SubId ==va0272) return v4d210; } return -1; }; this.GetMaxWidth =function() { var v3c988 =0; if (this.SubTableIds) { for (var v4d210=0; v4d210<this.SubTableIds.length; v4d210++) { var vee088 =this.SubTableIds[v4d210]; v3c988 =Math.max(v3c988,vee088.Width); } } return v3c988; }; this.GetContainer =function(ve5922) { var v69042 =WG50Engine.GetTable(ve5922); var vf4773 =WG50Engine.GetParentElement(v69042,2); return vf4773; }; this.SelectRow =function(v22a64,v8f434) { var v48040; var vc5b90 =null; if (typeof (v22a64)=="number") { if (this.Grid.EnableSection508Standards) { var v9d252 =this.GetRow(v22a64);  if (v9d252 !=null) v48040 =v9d252.GetElement(); } else v48040 =this.GetElement(WG40.BODY,WG40.HTMLTABLE).rows[v22a64]; } else v48040 =v22a64; WG50Engine.EmulateAttributes(v48040); if (wgIsRecordRow(v48040)||v48040.type =="FilterRow") vc5b90 =wgGetCellByPosition(v48040,0); else if (v48040.type =="NewRow") vc5b90 =v48040.cells[v48040.cells.length -1]; if (vc5b90) { WGEventEngine.ProcessMouseEvents(vc5b90);  if (!v8f434) vc5b90.focus(); } }; this.GetSelRowStyle =function() { var v2da43 =this.Get("SelectedRowClass"); return IS.GetCssText(this.Grid.Id,v2da43); }; this.GetFocusCellStyle =function() { if (this.FocusCellStyle.BorderStyle =="NotSet") return this.Grid.LayoutSettings.FocusCellStyle.GetStyleText(); else return this.FocusCellStyle.GetStyleText(); }; this.GetCheckedRowStyle =function() { var v33040 =this.CheckedRowClass; if (v33040 =="") v33040 =this.Grid.LayoutSettings.CheckedRowClass; if (v33040 =="") return ""; return IS.GetCssText(this.Grid.Id,v33040); }; this.GetColumn =function(v3d327) { return this.Columns.GetNamedItem(v3d327); }; this.IsFilterRowVisible =function() { var vab531 =this.GetFilterRow(); return (vab531.style.display ==""); }; this.GetFilterEditType =function(v6a463) { return this.GetColumn(v6a463).GetFilterEditType(); }; this.GetRowCheckerColumn =function() { var v16d20 =this.Columns; var vcf778 =""; for (var v4d210=0; v4d210<v16d20.length; v4d210++) { if (v16d20[v4d210].IsRowChecker) { vcf778 =v16d20[v4d210].Name; break; } } return vcf778; };  this.AddSelectedRow =function(ve5922,vb7e13) { if (!ve5922.isRowChecked) { ve5922.isRowChecked =true;  if (vb7e13) WGEventEngine.RedrawSelectedRowBorder(ve5922,"Clear");  this.SelectedRows.push(ve5922); } };  this.RemoveSelectedRow =function(ve5922,vf9523) { var va9a41 =this.GetCheckedRows();  for (var v4d210=0; v4d210<va9a41.length; v4d210++) { if (va9a41[v4d210] ==ve5922) { ve5922.isRowChecked =false; va9a41.splice(v4d210,1);  if (vf9523) WGEventEngine.HighlightRow(ve5922,"","","Clear");  return; } } };  this.ClearSelectedRows =function() { this.SelectedRows =null; this.SelectedRows =new Array(); }; this.GetCheckedRows =function() { var ve8521 =this.GetRowCheckerColumn(); if (this.Get("AllowMultipleSelection")=="Yes") { if (!ve8521 ||(ve8521 &&this.SelectedRows.length >0)) return this.SelectedRows; }  if (ve8521) { var v2a762 =new Array(); var v5f080 =new Array(); if (this.IsRootTable) { v5f080[0] =this.GetElement(WG40.BODY,WG40.HTMLTABLE); } else { for (var v4d210=0; v4d210<this.SubTableIds.length; v4d210++) { v5f080[v5f080.length] =this.SubTableIds[v4d210].GetElement(WG40.BODY,WG40.HTMLTABLE); } } for (var vb6f36=0; vb6f36<v5f080.length; vb6f36++) { var v69042 =v5f080[vb6f36]; for (var v4d210=0; v4d210<v69042.rows.length; v4d210++) { if (IS.moz) WG50Engine.EmulateAttributes(v69042.rows[v4d210]); if (v69042.rows[v4d210].type =="Record" &&v69042.rows[v4d210].isRowChecked) { v2a762[v2a762.length] =v69042.rows[v4d210]; } } } return v2a762; } }; this.GetAutoWidthColumn =function() { var v16d20 =this.Columns; for (var v4d210=0; v4d210<v16d20.length; v4d210++) { var v13d69 =v16d20[v4d210]; if (v13d69.IsAutoWidth) return v13d69; } return null; }; this.GetSubTableById =function(va0272) { for (var v4d210=0; v4d210<this.SubTableIds.length; v4d210++) { if (this.SubTableIds[v4d210].SubId ==va0272) return this.SubTableIds[v4d210]; } return null; }; this.GetColNameByRowLayout =function(va4522,vbd024,v33040) { var va5592 =this.ColumnSets[parseFloat(va4522)]; var v4cd67 =null; for (var v4d210=0; v4d210<va5592.Layout.length; v4d210++) { var v89176 =va5592.Layout[v4d210]; if (v89176.Row ==vbd024 &&v89176.Col ==v33040) { v4cd67 =v89176; break; } } if (v4cd67) return v4cd67.ColumnMember; return null; }; this.GetRowLayoutByColName =function(va1c77) { var vefb70 =this.ColumnSets; for (var v4d210=0; v4d210<vefb70.length; v4d210++) { var va5592 =vefb70[v4d210]; for (var vb6f36=0; vb6f36<va5592.Layout.length; vb6f36++) { if (va5592.Layout[vb6f36].ColumnMember ==va1c77) return va5592.Layout[vb6f36]; } } return null; }; this.GetRowLayoutByIndex =function(v34f13,vbd024,v33040) { var va5592 =this.ColumnSets[v34f13]; for (var v4d210=0; v4d210<va5592.Layout.length; v4d210++) { var v89176 =va5592.Layout[v4d210]; if (v89176.Row ==vbd024 &&v89176.Col ==v33040) return v89176; } return null; }; this.GetColHeaderSpanCount =function() { var v50341 =0; if (!this.IsRootTable) v50341++; v50341 +=this.GroupedColumns.length; if (this.Layout.Hierarchical) v50341++; if (this.Layout.RowHeaders =="Yes") v50341++; if (this.PreviewRowVisible &&this.PreviewRowSettings.Expandable) v50341++; return v50341; }; this.GetCSCellPosByIndex =function(va5592,vbd024,v33040,v04726) { var vefb70 =this.ColumnSets; var v50341 =0; for (var v4d210=0; v4d210<va5592; v4d210++) { var vbeb8 =vefb70[v4d210]; if (vbeb8.Visible) v50341 +=parseInt(vbeb8.ColumnCount); } if (v04726) { var v89176 =this.GetRowLayoutByIndex(va5592,vbd024,v33040); var vb0425 =v89176.ColSpan; if (vb0425 &&parseInt(vb0425)>1) v50341 +=parseInt(vb0425)-1; } return v50341 +parseInt(v33040); }; this.GetCSHeaderCellPosByIndex =function(v3bc26) { var vefb70 =this.ColumnSets; var v50341 =0; var va5592 =v3bc26.pos; for (var v4d210=0; v4d210<va5592; v4d210++) { var vbeb8 =vefb70[v4d210]; if (vbeb8.Visible) v50341 +=parseInt(vbeb8.ColumnCount); } return v50341; }; this.GetCSHeaderWidth =function(v34f13) { var va5592 =this.ColumnSets[v34f13]; var v4245 =0; for (var v4d210=0; v4d210<va5592.ColumnCount; v4d210++) { var v89176 =this.GetRowLayoutByIndex(v34f13,0,v4d210); v4245 +=parseInt(v89176.Width); } return v4245; }; this.GetColumnSetByPos =function(v34f13) { return this.ColumnSets[v34f13]; }; this.UpdateRowLayoutWidth =function(v83b43,v33040,v4245) { var va5592 =this.GetColumnSetByPos(v83b43); var v7f751 =va5592.Layout; for (var v4d210=0; v4d210<v7f751.length; v4d210++) { var v89176 =v7f751[v4d210]; if (v89176.Col ==v33040) { v89176.Set("Width",v4245,true); } } }; this.GetParentRow =function(ve5922) { var v48040; try { var v69042 =WG50Engine.GetTable(ve5922); var vb7395 =WG50Engine.GetParentElement(v69042,4); v69042 =WG50Engine.GetTable(vb7395); v48040 =wgGetPreviousRow(v69042,vb7395); v48040 =wgGetRootRow(v48040); } catch (e) { v48040 =null; } ; return v48040; }; this.GetRecursiveParentRowPosition =function(ve5922) { var vb7395 =this.GetParentRow(ve5922); var vfef85 =WGUIEngine.GetParentIndex(vb7395); var vcec89 =""; while (vb7395 !=null) { WG50Engine.EmulateAttributes(vb7395); vcec89 +=vb7395.position +"_"; vb7395 =this.GetParentRow(vb7395); if (!vb7395 ||!vb7395.type) vb7395 =null; } if (vcec89 !="") vcec89 =vcec89.substring(0,vcec89.length -1); if (vfef85 !="") vcec89 +="_" +vfef85; return vcec89; }; this.CreateFormula =function(vcf778,ved737) { var vc0263 =false; for (var v4d210=0; v4d210<this.Formulas.length; v4d210++) { if (this.Formulas[v4d210].colName ==vcf778) { vc0263 =true; break; } } if (!vc0263) { this.Formulas[this.Formulas.length] =new wgFormula(this.GridId,this.Id,vcf778,ved737); } else { alert("The formula for column '" +vcf778 +"' is already exist."); } }; this.Refresh =function() { if (this.IsRootTable) this.GetGrid().Refresh(); else WG50Engine.ExecuteFlyPostback(this.GetGrid().Name,"ChildTableRefresh",this.Id); }; this.GetDataKeyFieldsCount =function() { return this.DataKeyFieldsCount; }; this.GetTableElementRowsCount =function(v04994) { var v3bc26 =this.GetElement(WG40.BODY,WG40.HTMLTABLE,v04994); if (v3bc26) { return v3bc26.rows.length; } }; this.GetRowsCount =function() { var v50341 =this.GetTableElementRowsCount(); var v5d931 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); if (v50341 ==0) return 0; var v48040 =v5d931.rows[v50341 -1]; var v9f939 =wgGetRootRow(v48040);  if (this.GroupedColumns.length ==0) return parseFloat(v9f939.position)+1; else return parseFloat(v9f939.recordIndex)+1; }; this.ToRowObject =function(v48040) { var veca93 =new WebGridRow(this); veca93.Setup(v48040); if (!this.IsRootTable) { var v0e221 =WG50Engine.GetTableSubId(v48040); veca93.SubTable =this.GetSubTableById(v0e221); } return veca93; }; this.GetRow =function(v34f13) { if (this.IsRootTable) { var v5d931 =null;  if (this._tableCache) v5d931 =this._tableCache; else { v5d931 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); this._tableCache =v5d931; }  var v48040 =wgGetRowByPositionExact(v5d931,v34f13,v34f13); if (!v48040) return null; var veca93 =new WebGridRow(this); veca93.Setup(v48040); return veca93; } return null; }; this.GetRowByKeyValue =function(v17c74) { if (this.IsRootTable) { var v5d931 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var v48040 =null; for (var v4d210=0; v4d210<v5d931.rows.length; v4d210++) { var vbd024 =v5d931.rows[v4d210]; WG50Engine.EmulateAttributes(vbd024); if (wgIsRecordRow(vbd024)&&vbd024.keyValue ==v17c74) { v48040 =vbd024; break; } } if (!v48040) return null; var veca93 =new WebGridRow(this); veca93.Setup(v48040); return veca93; } else { var v48040 =null; for (var v4d210=0; v4d210<this.SubTableIds.length; v4d210++) { var vee088 =this.SubTableIds[v4d210]; var vbd024 =vee088.GetRowByKeyValue(v17c74); if (vbd024) return vbd024; } } return null; }; this.GetRowByGroup =function(vc1657,vab626,ve047) { if (this.IsRootTable) { var v5d931 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var v48040 =wgGetRowByGroup(v5d931,vc1657,vab626,ve047); if (!v48040) return null; var veca93 =new WebGridRow(this); veca93.Setup(v48040); return veca93; } }; this.GetSubIdByParentKey =function(v72013) { for (var v4d210=0; v4d210<this.SubTableIds.length; v4d210++) { if (this.SubTableIds[v4d210].RelNames ==v72013) return this.SubTableIds[v4d210]; } }; this.GetSubIdById =function(va0272) { for (var v4d210=0; v4d210<this.SubTableIds.length; v4d210++) { if (this.SubTableIds[v4d210].SubId ==va0272) return this.SubTableIds[v4d210]; } };  this.NewRow =function(vf4b18) { var v48040 =new WebGridRow(this,vf4b18); var v3ed80 =new ISArray(); for (var v4d210=0; v4d210<this.Columns.length; v4d210++) { var vc5b90 =new WebGridCell(v48040); vc5b90.Name =this.Columns[v4d210].Name; vc5b90.Column =this.Columns[v4d210]; v3ed80[v3ed80.length] =vc5b90; } v48040.Cells =v3ed80; v48040._UIState ="Added"; v48040.Grid =this.Grid; return v48040; }; this.GetSelfRefParent =function(ve5922) { var v69042 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); return WGUIEngine.GetSelfRefParent(v69042,ve5922); }; this.GetGroupRows =function() { var v69042 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var ve5922 =v69042.rows[0]; var v68818 =ve5922; var va9a41 =new Array(); if (v69042.rows.length ==0) return null; while (v68818) { if (v68818.type =="GroupHeader" &&v68818.groupIndex =="0") { var vbd024 =this.ToRowObject(v68818); va9a41[va9a41.length] =vbd024; } v68818 =wgGetNextRow(v69042,v68818); } return va9a41; };  this.UpdateUI =function() { WGUIEngine.UpdateUI(this); }; this.IsColumnSetHeaderVisible =function() { var v26247 =this.ColumnSetSettings.ShowHeaders; if (v26247 =="Default") v26247 =this.Layout.ColumnSetHeaders; return v26247 =="Yes"; };  this.GotoFilterRow =function() { var v04994 =this.GetFilterRow(); var v48040 =WG50Engine.GetRowByElement(v04994);  v48040.Select(); };  this.GotoNewRow =function(v4f790) { var v04994 =this.GetNewRow(v4f790); var v48040 =WG50Engine.GetRowByElement(v04994);  v48040.Select(); }; this.SetFilterStatus =function(vf0073) { WGUIEngine.ToggleFilter(this,vf0073); };}function WebGridTextItem(){ this._Type ="WebGridTextItem"; ISObject.call(this); this.Name =""; this.TextItem =""; this.TextValue =""; this.Collection =new ISArray();}function WebComboEditor(){ this._Type ="WebComboEditor"; ISObject.call(this); this.Id ="";}function BrowserPrintSettings(){ this._Type ="BrowserPrintSettings"; ISObject.call(this); this.GridLayout ="AsDisplayedInBrowser"; this.PrintStatusBar =true;}function wgGetActiveGrid(){ return wg_Global.ActiveGrid;}function wgGetGridById(v3389){ return ISGetObject(v3389);}function wg_getGridNameByRow(vf359){ return WG50Engine.GetGridNameByRow(vf359);}function wg_getTableNameByRow(v6f69){ return WG50Engine.GetTableNameByRow(v6f69);}function wg_getTableSubId(v6859){ return WG50Engine.GetTableSubId(v6859);}function wg_getTable(v5319){ return WG50Engine.GetTable(v5319);}function wgGetTable(vef29){ return WG50Engine.GetTable(vef29);}function wgDoResize(v08c9,vcd010){ if (!v08c9) WG50Engine.OnResize(); else WG50Engine._OnResize(vcd010);}function wgMouseCoord(vd0d29,v8b220){ this.x =vd0d29; this.y =v8b220; return this;}function wgHeaderInfo(){ this.AllowLeftInsert =false; this.AllowRightInsert =false; this.PosLeft =0; this.PosRight =0; this.Type =null; this.Element =null; this.ProperPosition =null; this.PosTop =0; return this;}function wgFormula(vcd795,v4b557,vb6218,ve6c31){ this.isValid =true; this.nonValidMsg =null; this.colName =vb6218; this.gridId =vcd795; this.tblName =v4b557; this.formula =ve6c31; this.affectedColumns =new Array(); this.skipErrorMessage =false; this.table =null; this.valueOnError =0; var v72d65 =ve6c31.indexOf("["); var v46189 =0; while (v72d65>=0) { v46189 =ve6c31.indexOf("]",v72d65); this.affectedColumns[this.affectedColumns.length] =ve6c31.substring(v72d65 +1,v46189); v72d65 =ve6c31.indexOf("[",v46189); } this.table =ISGetObject(this.gridId).Tables[this.tblName]; for (var v1f071=0; v1f071<this.affectedColumns.length; v1f071++) { var v15263 =this.table.GetColumn(this.affectedColumns[v1f071]); if (!v15263 ||!v15263.Visible) { this.isValid =false; break; } } this.GetResult =function(v05014) { if (this.isValid) { var v5e587 =this.formula; for (var v1f071=0; v1f071<this.affectedColumns.length; v1f071++) { var v34d21 =wgGetCellByName(v05014,this.affectedColumns[v1f071]); var v15263 =this.table.GetColumn(wgGetColNameByCell(v34d21)); var vfc679 =v34d21.innerText; if (v15263.DataFormat !="") vfc679 =wgGetUnMask(ISGetObject(this.gridId),v15263,v34d21); v5e587 =v5e587.replace(new RegExp(this.affectedColumns[v1f071],"g"),vfc679); } v5e587 =v5e587.replace(/[\[\]]/g,""); var v63031; try { v63031 =eval(v5e587); } catch (e) { v63031 =this.valueOnError; } return v63031; } else { if (!this.skipErrorMessage) alert("Formula is not valid because one of the specified column is not exist or not visible."); } return null; }; this.ProcessResult =function(v05014,v2d966) { if (this.IsCellAccounted(v2d966)) { var v63031 =this.GetResult(v05014); var v34d21 =wgGetCellByName(v05014,this.colName); var v15263 =this.table.GetColumn(wgGetColNameByCell(v34d21)); if (v15263.DataFormat !="") { v34d21.cellValue =v63031; v34d21.innerText =wgGetMask(ISGetObject(this.gridId),null,String(v63031),this.table,v34d21); } } }; this.IsCellAccounted =function(v2d966) { var vb6218 =wgGetColNameByCell(v2d966); for (var v1f071=0; v1f071<this.affectedColumns.length; v1f071++) { if (vb6218 ==this.affectedColumns[v1f071]) return true; } return false; }; return this;}function wgGetChildTableByRow(vc736,v81015){ var v95e50 =WG50Engine.GetTable(vc736); var vc4536 =wgGetNextRow(v95e50,vc736); var v92493 =vc4536.cells[vc4536.cells.length -1]; var vcdf35 =v92493.childNodes[0]; var v28253 =document.getElementById("dvTB_" +vcdf35.gridId +"_" +v81015 +"_" +vcdf35.subId).childNodes[0]; return v28253;}function wgMoveColArgs(v75d89,va3255,v45027,v4ac58,v71152,v3c518){ this.table =v75d89; this.c1 =va3255; this.c2 =v45027; this.tr =v4ac58; this.cdt =v71152; this.th =v3c518; return this;}function wgShowHelp(v9a581){ var vfdf45 =ISGetObject(v9a581); var v5a934 =vfdf45.LayoutSettings.HelpURL; if (v5a934 =="")
 v5a934 ="http://www.intersoftpt.com/WebGrid/Help.aspx";
 window.open(v5a934,null,"toolbar=no, menubar=no, scrollbars=yes, resizable=yes");}function wgGetCellCount(v5960){ if (v5960) { var v92464; var v26344 =0; if (v5960.tagName =="TR") v92464 =v5960.cells; else if (v5960.tagName =="TD") v92464 =v5960; for (var v9bd79=0; v9bd79<v92464.length; v9bd79++) { WG50Engine.EmulateAttributes(v92464[v9bd79]); if (v92464[v9bd79].type =="Cell" ||v92464[v9bd79].type =="GroupCell" ||v92464[v9bd79].type =="FilterColumn") v26344++; } } return v26344;}function wgGetCellByPosition(vef256,v72392){ if (vef256) { var vb9820; var v51d23 =-1; if (vef256.tagName =="TR") vb9820 =vef256.cells; else if (vef256.tagName =="TD") vb9820 =vef256; for (var vbd864=0; vbd864<vb9820.length; vbd864++) { WG50Engine.EmulateAttributes(vb9820[vbd864]); if (vb9820[vbd864].type =="Cell" ||vb9820[vbd864].type =="GroupCell" ||vb9820[vbd864].type =="FilterColumn") { v51d23++; } if (v72392 ==v51d23) return vb9820[vbd864]; } } return null;}function wgGetCellByName(v0f469,v00c0){ if (v0f469) { var vfe311; var vacd71 =-1; var v7ad68; if (v0f469.tagName =="TR") { vfe311 =v0f469.cells; v7ad68 =v0f469; } else if (v0f469.tagName =="TD") { v7ad68 =v0f469.parentElement; vfe311 =v0f469; } var v50c71 =WG50Engine.GetTable(v0f469); if (v50c71) { var vefb40 =ISGetObject(v50c71.gridId).Tables[v50c71.tblName]; if (vefb40.IsUseColumnSet) { return wgGetCSCellByName(v7ad68,v00c0); } var v2e647 =vefb40.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v0f469).rows[0]; var v70529 =-1; for (var vfc490=0; vfc490<v2e647.cells.length; vfc490++) { vfe311 =v2e647.cells; WG50Engine.EmulateAttributes(vfe311[vfc490]); if ((vfe311[vfc490].type =="Column")&&vfe311[vfc490].colName ==v00c0) { v70529 =vfc490; break; } } if (v70529>=0) { return v0f469.cells[v70529]; } } } return null;}function wgGetCellPosByName(v8c061,v66e49){ if (v8c061) { var v7895; var va7e70 =-1; if (v8c061.tagName =="TR") v7895 =v8c061.cells; else if (v8c061.tagName =="TD") v7895 =v8c061; for (var vcab87=0; vcab87<v7895.length; vcab87++) { WG50Engine.EmulateAttributes(v7895[vcab87]); if ((v7895[vcab87].type =="Cell" ||v7895[vcab87].type =="GroupCell")) { if (v7895[vcab87] ==v66e49) { va7e70++; return va7e70; } else va7e70++; } } } return null;}function wgGetRowByPosition(vca297,va6318){ return vca297.rows[va6318];}function wgGetRowByPositionExact(v4a516,v19128,vaa757,v7374){ if (!vaa757) vaa757 =0; for (var ve6b80=vaa757; ve6b80<v4a516.rows.length; ve6b80++) { WG50Engine.EmulateAttributes(v4a516.rows[ve6b80]); if (wgIsRecordRow(v4a516.rows[ve6b80])&&v4a516.rows[ve6b80].position ==v19128) { var v80a58 =(typeof (v4a516.rows[ve6b80].srLevel)=="string"); if (!v80a58) return v4a516.rows[ve6b80]; else { if (!v7374) { if (v4a516.rows[ve6b80].srLevel =="0") return v4a516.rows[ve6b80]; } else return v4a516.rows[ve6b80]; } } } return null;}function wgGetRootRow(vabb72){ if (!vabb72) return; WG50Engine.EmulateAttributes(vabb72); if (wgIsColumnSetRow(vabb72)) return wgGetColumnSetRow(vabb72); else if (vabb72.type =="PR") return wgGetPreviewRowParent(vabb72); else return vabb72;}function wgGetColNameByCell(v15166){ var v6c855 =v15166.parentElement; var v4c647 =WG50Engine.GetTable(v6c855); var v71591 =ISGetObject(v4c647.gridId); var v75527 =v71591.Tables[v4c647.tblName]; var v37d4 =v75527.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v6c855).rows[0].cells; var vaee6 =false; if (!v75527.IsUseColumnSet) { if (IS.ie &&v75527.IsRootTable &&v71591.FreezePaneActive &&v71591.FreezeConfig !=null &&(wgIsRecordRow(v6c855)||v15166.style.display =="none")) vaee6 =true;  for (var vf022=0; vf022<v37d4.length; vf022++) { var v70a84 =v37d4[vf022].cellIndex; var v7eb79 =v15166.cellIndex;  if (!IS.ie) WGMozEngine.EmulateAttributes(v37d4[vf022]);  if (vaee6) v70a84 =WG50Engine.GetRealCellIndex(v37d4[vf022]);  if (v15166.style.display =="none") v7eb79 =WG50Engine.GetRealCellIndex(v15166);  if (v37d4[vf022].type =="Column" &&v70a84 ==v7eb79) return v37d4[vf022].colName; } } else { if (typeof (v15166.cs)=="undefined") return null; return v75527.GetColNameByRowLayout(v15166.cs,v15166.r,v15166.c); }}function wgExpandGroupRow(vce185,v8d915){ if (v8d915) { _wgExpAllGR(vce185); return; } if (vce185.type =="GroupHeader" &&vce185.expanded =="False") { var v4b52 =ISGetObject(WG50Engine.GetTable(vce185).gridId); WGUIEngine.ChangeImage(v4b52,wgGetCellByPosition(vce185,0).childNodes[0],vce185.expanded); WGUIEngine.ToggleGroupRow(null,vce185); }}function _wgExpAllGR(v17341){ wgExpandGroupRow(v17341); var v5ad57 =WG50Engine.GetTable(v17341); var v61254 =wgGetNextRow(v5ad57,v17341); while (v61254) { if (v61254.groupIndex ==v17341.groupIndex &&v61254.style.display =="" &&v61254.childrenLoaded !="False") wgExpandGroupRow(v61254); v61254 =wgGetNextRow(v5ad57,v61254); }}function wgCollapseGroupRow(v4d277,v2db63){ if (v2db63) { _wgColAllGR(v4d277); return; } if (v4d277.type =="GroupHeader" &&v4d277.expanded =="True") { var v60877 =ISGetObject(WG50Engine.GetTable(v4d277).gridId); WGUIEngine.ChangeImage(v60877,wgGetCellByPosition(v4d277,0).childNodes[0],v4d277.expanded); WGUIEngine.ToggleGroupRow(null,v4d277); }}function _wgColAllGR(v3de32){ wgCollapseGroupRow(v3de32); var vb8596 =WG50Engine.GetTable(v3de32); var v73873 =wgGetNextRow(vb8596,v3de32); while (v73873) { if (v73873.groupIndex ==v3de32.groupIndex) wgCollapseGroupRow(v73873); v73873 =wgGetNextRow(vb8596,v73873); }}function wgExpandChildRow(vfa352){ var vfae16 =ISGetObject(WG50Engine.GetTable(vfa352).gridId); var vf2182 =WGHierEngine.GetCellExpander(vfa352);  if (vfa352.childNotExpandable !="True") { WGHierEngine.ChangeImage(vfae16,vf2182,"False"); WGHierEngine.ToggleRow(null,vfa352); }}function wgCollapseChildRow(v1fe52){ var v02e52 =ISGetObject(WG50Engine.GetTable(v1fe52).gridId); var v12b52 =WGHierEngine.GetCellExpander(v1fe52); WGHierEngine.ChangeImage(v02e52,v12b52,"True"); WGHierEngine.ToggleRow(null,v1fe52);}function wgRefreshHierPosition(v4367,v73031,v01d69,v43d8,v73a36){ if (v73a36) WGHierEngine.RefreshHierPosition(v4367,v73031,v01d69,v43d8); else { if (!v01d69) return; var vc7952 =v01d69.rowIndex; var v17752 =v43d8; var v44584 =v4367.Tables[v73031.tblName]; for (var v8e05=vc7952; v8e05<v73031.rows.length; v8e05++) { var vf6914 =v73031.rows[v8e05]; if (vf6914.type =="Record") { vf6914.position =vf6914.recordIndex =v43d8; v43d8++; } } }}function wgGetSelectedObjectFromEvent(v0b312){ if (v0b312) { var vd6937 =v0b312.srcElement; if (vd6937.tagName !="TD") { origEl =vd6937; vd6937 =_wgGetTDElement(vd6937); } if (!vd6937) return null; var vd5099 =vd6937.parentElement; var v0917 =WG50Engine.GetTable(vd5099); var v83876 =ISGetObject(v0917.gridId); var v99179 =v83876.Tables[v0917.tblName]; var ve3e82 =v99179.Get("CellClickAction"); var v94627; if (ve3e82 =="RowSelect") { v94627 =new SelectedObject(v0917.tblName,v0917.gridId,vd6937); v94627.type ="Row"; v94627.rowIndex =vd5099.rowIndex; } else if (ve3e82 =="CellSelect") { v94627 =new SelectedObject(v0917.tblName,v0917.gridId,vd6937); v94627.type ="Cell"; v94627.rowIndex =vd5099.rowIndex; v94627.cellIndex =wgGetCellPosByName(vd5099,vd6937); } return v94627; } return null;}function wgIsColumnSetRow(ve1548){ if (typeof (ve1548.csRowPos)!="undefined") return true; return false;}function wgGetPreviewRow(v1c968){ var vdb448 =WG50Engine.GetTable(v1c968); var v7bf57 =wgGetNextRow(vdb448,v1c968); while (v7bf57 &&v7bf57.type !="PR") v7bf57 =wgGetNextRow(vdb448,v7bf57); return v7bf57;}function wgGetPreviewRowCell(v21e51){ for (var v2d468=0; v2d468<v21e51.cells.length; v2d468++) { if (v21e51.cells[v2d468].type =="PRCell") return v21e51.cells[v2d468]; } return null;}function wgIsValidCell(v32c51){ if (!v32c51) return false; if (v32c51.type =="Cell" ||v32c51.type =="GroupCell" ||v32c51.type =="ECell" ||v32c51.type =="PRExp" ||v32c51.type =="PRCell" ||v32c51.type =="FilterColumn") return true; return false;}function wgIsValidClickableCell(v5ec51){ if (!v5ec51) return false; if (v5ec51.type =="RowSelector" ||wgIsValidCell(v5ec51)) return true; return false;}function wgIsValidRow(vcce51){ if (!vcce51) return false; if (vcce51.type =="NewRow" ||vcce51.type =="PR" ||vcce51.type =="CSRecord" ||vcce51.type =="Record" ||vcce51.type =="FilterRow") return true; return false;}function wgGetPreviewRowParent(va497){ if (va497.type !="PR") return va497; var vc8551 =WG50Engine.GetTable(va497); var vb066 =wgGetGridById(vc8551.gridId); var v8ab93 =vb066.Tables[vc8551.tblName]; if (!v8ab93.IsUseColumnSet) return wgGetPreviousRow(vc8551,va497); else return wgGetColumnSetRow(wgGetPreviousRow(vc8551,va497)); return null;}function wgIsSameRow(v93762,vd1d65){ if ((v93762 ==null &&vd1d65 !=null)||(v93762 !=null &&vd1d65 ==null)) return false; var v69443 =WG50Engine.GetTable(v93762); var vb1355 =WG50Engine.GetTable(vd1d65); if (v69443 ==vb1355) { var ve3496 =wgGetGridById(v69443.gridId); var vd349 =ve3496.Tables[v69443.tblName]; if (!vd349.IsUseColumnSet) { if (!vd349.PreviewRowVisible) return v93762 ==vd1d65; else return wgGetPreviewRowParent(v93762)==wgGetPreviewRowParent(vd1d65); } else { if (!vd349.PreviewRowVisible) return wgIsSameColumnSetRow(v93762,vd1d65); else return wgIsSameColumnSetRow(wgGetPreviewRowParent(v93762),vd1d65); } } else return false; return false;}function wgIsSameColumnSetRow(vf3d37,v4df53){ if (vf3d37.type =="PR") { var vc9382 =WG50Engine.GetTable(vf3d37); vf3d37 =wgGetPreviousRow(vc9382,vf3d37); } if (v4df53.type =="PR") { var v4f474 =WG50Engine.GetTable(v4df53); v4df53 =wgGetPreviousRow(v4f474,v4df53); } var vccd30 =wgGetColumnSetRow(vf3d37); var v5b532 =wgGetColumnSetRow(v4df53); if (vccd30 ==v5b532) return true; return false;}function wgIsRecordRow(v36c9){ if (v36c9.type =="Record" ||v36c9.type =="CSRecord") return true; return false;}function wgGetHierRecord(vdd667){ var vde39 =WG50Engine.GetTable(vdd667); var v33892 =wgGetGridById(vde39.gridId); var v58352 =v33892.Tables[vde39.tblName]; var v0e318 =0; if (v58352.IsUseColumnSet) v0e318 +=v58352.ColumnSetSettings.RowCount -1; if (v58352.PreviewRowVisible) v0e318 +=1; v0e318 +=1; var v92e10 =wgGetRootRow(vdd667); for (var vf7e44=0; vf7e44<v0e318; vf7e44++) v92e10 =wgGetNextRow(vde39,v92e10); if (v92e10 &&v92e10.type =="HierRecord") return v92e10; return null;}function wgGetRowByGroup(v4d03,vaa290,vf4871,v4d945){ var vca267 =0; if (v4d945) vca267 =v4d945.rowIndex; for (var v4d621=vca267; v4d621<v4d03.rows.length; v4d621++) { var v62c53 =v4d03.rows[v4d621]; WG50Engine.EmulateAttributes(v62c53); if (v62c53.type =="GroupHeader" &&v62c53.groupIndex ==vaa290 &&v62c53.position ==vf4871) return v62c53; } return null;}function wgSetSelectedObject(v51383,v57236){ var vf5459 =ISXml.CreateXmlDocument(); vf5459.loadXML(v57236); var v96a70 =vf5459.selectSingleNode("//Object"); var vfb756 =v96a70.getAttribute("parentIndex"); var v6a548 =wgGetGridById(v51383); var vb7054 =v6a548.Tables[v96a70.getAttribute("tblName")]; var va7177 =null; var v84530; if (vb7054.IsRootTable) { v84530 =vb7054.GetElement(WG40.BODY,WG40.HTMLTABLE); } else { var veed42 =v96a70.getAttribute("tblSubId"); var v86083 =vb7054.GetSubTableById(veed42); v84530 =v86083.GetElement(WG40.BODY,WG40.HTMLTABLE); } if (vfb756 !="") { var v0ad53 =vfb756.split("_"); for (var v41677=0; v41677<v0ad53.length; v41677++) { var vd4831 =wgGetRowByGroup(v84530,v41677,v0ad53[v41677],va7177); if (vd4831) { if (vd4831.childrenLoaded =="True") { wgExpandGroupRow(vd4831); } } va7177 =vd4831; } } var v2d73 =wgGetRowByPositionExact(v84530,parseFloat(v96a70.getAttribute("pos")),(va7177 ? va7177.rowIndex +1 : null),true); if (v2d73) { var v6f760 =null; if (v2d73.srLevel) { if (v2d73.currentStyle.display =="none") { var vc6e6 =wgGetPreviousRow(v84530,v2d73); var v50d40 =new Array(); while (vc6e6) { if (vc6e6.srRC>0 &&vc6e6.srLevel<v2d73.srLevel) v50d40[v50d40.length] =vc6e6; vc6e6 =wgGetPreviousRow(v84530,vc6e6); if (!vc6e6) break; if (vc6e6.srLevel ==0) { v50d40[v50d40.length] =vc6e6; break; } } v50d40 =v50d40.reverse(); for (var v41677=0; v41677<v50d40.length; v41677++) { WGUIEngine.ToggleSelfRefRow(WGUIEngine.GetSelfRefImage(vb7054,v50d40[v41677])); } } } if (vb7054.Get("CellClickAction")=="RowSelect") v6f760 =wgGetCellByPosition(v2d73,0); else if (vb7054.Get("CellClickAction")=="CellSelect") { if (!vb7054.IsUseColumnSet) { if (vb7054.LastAECIndex !=-1) v6f760 =v2d73.cells[vb7054.LastAECIndex]; else v6f760 =wgGetCellByPosition(v2d73,0); } else { if (vb7054.LastCSIndex) v6f760 =wgGetCSCellByPosition(v2d73,vb7054.LastCSIndex[0],vb7054.LastCSIndex[1],vb7054.LastCSIndex[2]); }  if (v6f760 ==null) v6f760 =wgGetCellByPosition(v2d73,0); } if (v6f760) { WGEventEngine.ProcessMouseEvents(v6f760,true); WGEventEngine.EnsureCellVisible(v6a548,v6f760); } }}function wgExpandSelfRefRow(v47b3){ var v1f419 =WG50Engine.GetTable(v47b3); var v6e95 =wgGetGridById(v1f419.gridId).Tables[v1f419.tblName]; v47b3.srExpanded ="False"; WGUIEngine.ToggleSelfRefRow(WGUIEngine.GetSelfRefImage(v6e95,v47b3));}function wgCollapseSelfRefRow(vfdb39){ var v79439 =WG50Engine.GetTable(vfdb39); var v5c515 =wgGetGridById(v79439.gridId).Tables[v79439.tblName]; vfdb39.srExpanded ="True"; WGUIEngine.ToggleSelfRefRow(WGUIEngine.GetSelfRefImage(v5c515,vfdb39));}function wgToggleSelfRefRow(v3d239){ if (v3d239.srExpanded =="True") wgCollapseSelfRefRow(v3d239); else wgExpandSelfRefRow(v3d239);}function wgGetKeyValues(v14e30){ var vf3839 =WG50Engine.GetTable(v14e30); var v12315 =wgGetGridById(vf3839.gridId); var vea298 =v12315.Tables[vf3839.tblName]; if (vea298.HasMultiPrimaryKey) { var vc5046 =vea298.GetDataKeyFieldsCount(); var v0f840 =new Array(); for (var v3cb34=0; v3cb34<vc5046; v3cb34++) { v0f840[v0f840.length] =v14e30.getAttribute("keyValue" +v3cb34); } return v0f840; } return null;}function wgIsFilterRow(v2b330){ return v2b330.type =="FilterRow";}function wgIsNewRow(v1e414){ return v1e414.type =="NewRow";}function wgRemoveRow(va8869,v99582){ var vfa714 =wgGetHierRecord(v99582); var vd7e3 =null; if (va8869.PreviewRowVisible) vd7e3 =wgGetPreviewRow(v99582); if (vfa714 &&vfa714.type !="HierRecord") vfa714 =null; if (wgIsColumnSetRow(v99582)) { var v6a450 =wgGetColumnSetRows(v99582); for (var v9c611=0; v9c611<v6a450.length; v9c611++) { v6a450[v9c611].removeNode(true); } } else { v99582.removeNode(true); } if (vd7e3) vd7e3.removeNode(true); if (vfa714) vfa714.removeNode(true);}function wgGetGridByElement(vb145){ return WG50Engine.GetGridByElement(vb145);}function wgGetTableByElement(v2275){ return WG50Engine.GetTableByElement(v2275);}function wgGetColumnByElement(va125){ return WG50Engine.GetColumnByElement(va125);}function wgGetCellByElement(v4dc5){ return WG50Engine.GetCellByElement(v4dc5);}function wgGetRowByElement(v7885){ WG50Engine.EmulateAttributes(v7885); return WG50Engine.GetRowByElement(v7885);}var WG50Engine = { Initialized: false, Create: function(vdc678) { var v2d742 =new WebGrid(vdc678); WG50Engine.AssignProperties(v2d742); WG50Engine.RegisterBehaviour(v2d742); WG50Engine.InitializeMozilla(v2d742);  v2d742.IsInit =true; return v2d742; }, AssignProperties: function(vacc78) { if (vacc78 ==null) return; if (!vacc78.IsInit) { var v4ba78 =ISXml.GetNode(vacc78.XmlDt,"//WebGrid"); if (v4ba78 ==null) v4ba78 =vacc78.XmlDt.documentElement; if (v4ba78 !=null) {  IS.SetPropertiesRecursive(vacc78,v4ba78); vacc78.LayoutSettings.StatusBarCommandStyle =DynamicStyleEngine.Assign(ISXml.GetNode(vacc78.XmlDt,"//StatusBarCommandStyle")); } } }, RegisterBehaviour: function(v0e433) { window.attachEvent("onload",function() { WG50Engine.OnGridLoad(v0e433); }); window.attachEvent("onunload",function() { if (WG50Engine !=null) WG50Engine.OnWindowUnload(v0e433.Id); }); if (!WG50Engine.Initialized) { var v61597 =document.body; Listener.Add(v61597,"onresize",WG50Engine.OnResize); window.attachEvent("onload",WG50Engine.OnWindowLoad); window.attachEvent("onbeforeprint",WG50Engine.OnBeforePrint); window.attachEvent("onafterprint",WG50Engine.OnAfterPrint); v61597.attachEvent("onmousemove",WG50Engine.OnBodyMouseMove); v61597.attachEvent("onmouseup",WG50Engine.OnBodyMouseUp); v61597.attachEvent("onmousedown",WG50Engine.OnBodyMouseDown); WG50Engine.Initialized =true; } WG50Engine.RegisterFrameBehaviour(v0e433); WG50Engine.RegisterRootTableBehaviour(v0e433); WG50Engine.RegisterStatusBarBehaviour(v0e433); v0e433.XmlHttp =ISXmlHttpEngine.Create(v0e433,function() { WG50Engine.OnResponse(v0e433); }); },  RegisterStatusBarBehaviour: function(v93617) { if (v93617.LayoutSettings.StatusBarVisible) { var v65f33 =v93617.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); Listener.Add(v65f33,"onmouseover",function() { WGUIEngine.OnStyleChanged(v93617); }); Listener.Add(v65f33,"onmouseout",function() { WGUIEngine.OnStyleChanged(v93617); }); Listener.Add(v65f33,"onmousedown",function() { WGUIEngine.OnStyleChanged(v93617); }); Listener.Add(v65f33,"onmouseup",function() { WGUIEngine.OnStyleChanged(v93617); }); } }, RegisterFrameBehaviour: function(v49917) { v49917.FrameObj.attachEvent("onbeforedeactivate",function() { WG50Engine.OnBeforeDeactivate(v49917.Id); }); v49917.FrameObj.attachEvent("onactivate",function() { WG50Engine.OnActivate(v49917.Id); }); v49917.FrameObj.attachEvent("onmouseover",function() { WG50Engine.OnFrameMouseOver(v49917); }); v49917.FrameObj.attachEvent("onfocus",function() { WG50Engine.OnFrameFocus(v49917); }); v49917.FrameObj.attachEvent("oncontextmenu",function() { WG50Engine.OnFrameMouseUp(v49917);   if (IS.safari) return false; }); v49917.FrameObj.attachEvent("onmouseup",function() { WG50Engine.OnFrameMouseUp(v49917); }); }, InitializeMozilla: function(v48317) { if (!IS.ie) { v48317.FrameObj.style.MozUserFocus ="normal"; v48317.FrameObj.attachEvent("onblur",function() { WGMozEngine.OnBlur(v48317); });  var vca417 =v48317.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); WGMozEngine.EmulateAttributes(vca417.childNodes[0]); window.attachEvent("onresize",function() { WG50Engine.OnResize(); }); if (typeof (WebPaneManager)=="undefined") WGMozEngine.OnResize(v48317,true); WGMozEngine.FormatRootTable(v48317); WGMozEngine.PreloadImages(v48317);  if (IsGecko30()&&typeof(WGEditEngine)=="object") WGEditEngine.PreloadCalendar(v48317); } },  ReflectNoDataStatus: function(v0f288) { var v90b17 =v0f288.TotalLoadedRows; var ve5656 =v0f288.TotalRows; if (ve5656<v90b17) v90b17 =ve5656;  if (!v0f288.LayoutSettings.StatusBarVisible) { if (v90b17 ==0 ||ve5656 ==0) WGUIEngine.ShowNoDataBox(v0f288); else WGUIEngine.HideNoDataBox(v0f288); } }, RegisterRootTableBehaviour: function(v56b44) { var v72188 =v56b44.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); Listener.Add(v72188,"onresize",function() { WG50Engine.OnTableResize(v72188); }); Listener.Add(v72188,"onscroll",function() { WG50Engine.OnTableScroll(v56b44); }); if (v56b44.IsInProgress &&!IS.ie) { var vbb595 =v56b44.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); WGMozEngine.EmulateAttributes(vbb595.childNodes[0]); WGMozEngine.OnTableResize(v56b44); }  if (v56b44.LayoutSettings.AllowColumnFreezing =="Yes") { var v51d21 =v56b44.GetFreezeOuterDivElement(); Listener.Add(v51d21,"onscroll",WGUIEngine.OnFreezeScroll,v56b44); }  if (IS.safari) { Listener.Add(document.body,"oncontextmenu",function() { if (v56b44.FrameObj.contains(event.srcElement)) { var v89563 =event.srcElement;  if (v89563.tagName =="TEXTAREA" ||v89563.tagName =="SELECT") return; if (v89563.tagName =="INPUT" &&v89563.type =="checkbox" &&v89563.className !="DefChkBox") return;  if (v89563.tagName =="INPUT" &&v89563.type =="text") return;  event.returnValue =false; event.cancelBubble =true; return false; } } ); } }, UnregisterGrid: function(v41563) { v41563.FrameObj.detachEvent("onbeforedeactivate",function() { WG50Engine.OnBeforeDeactivate(v41563.Id); }); v41563.FrameObj.detachEvent("onactivate",function() { WG50Engine.OnActivate(v41563.Id); }); v41563.FrameObj.detachEvent("onmouseover",function() { WG50Engine.OnFrameMouseOver(v41563); }); v41563.FrameObj.detachEvent("onfocus",function() { WG50Engine.OnFrameFocus(v41563); }); v41563.FrameObj.detachEvent("oncontextmenu",function() { WG50Engine.OnFrameMouseUp(v41563); }); v41563.FrameObj.detachEvent("onmouseup",function() { WG50Engine.OnFrameMouseUp(v41563); }); if (IS.ie) Listener.Unload(v41563.FrameObj.parentElement);  Listener.Unload(v41563.FrameObj); Listener.Unload(v41563.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); if (v41563.LayoutSettings.StatusBarVisible) { var v26927 =v41563.GetElement(WG40.STATUSBARCOMMAND,WG40.HTMLCELL); Listener.Unload(v26927); } if (IS.moz) v41563.FrameObj.detachEvent("onblur",function() { WGMozEngine.OnBlur(v41563); }); }, UnregisterGridBody: function(v0b347) { Listener.Unload(v0b347.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); v0b347.RootTable._tableCache =null; v0b347.RootTable._colIndexCache =null; v0b347.RootTable._colIndexCache2 =null; v0b347.RootTable._headerRowCache =null;  if (v0b347.LayoutSettings.AllowColumnFreezing =="Yes") { var vcb463 =v0b347.GetFreezeOuterDivElement();  if (vcb463 !=null) Listener.Unload(vcb463); } }, UnregisterBehaviour: function(vd2f47) { WG50Engine.UnregisterGrid(vd2f47); }, OnGridLoad: function(v5ee47) { if (!IS.ie) { var v57447 =v5ee47.FrameObj.style.height; v5ee47.FrameObj.style.height ="0px"; v5ee47.FrameObj.style.height =v57447; WGMozEngine.OnTableResize(v5ee47);  if (v5ee47.LayoutSettings.AllowColumnFreezing =="Yes") { WGUIEngine.InvalidateFreezeContainer(v5ee47); } } },  OnOuterFrameResize: function() {  }, EmulateAttributes: function(vc3847) { if (!IS.ie) WGMozEngine.EmulateAttributes(vc3847); }, SetMenuCssFile: function(ve7f47,v62424) { if (typeof (Menu)!="undefined") ve7f47.cssFile =v62424; }, OnBeforePrint: function() { var v76483 =WG50Engine.GetWebGrids(); for (var grid in v76483) { var v5c493 =v76483[grid]; if (typeof (v5c493)=="function") continue; var vb5140 =v5c493.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); if (ISEvent.Raise(v5c493.LayoutSettings.ClientSideEvents.OnBeforePrint,v5c493.Id)) { vb5140.style.display =""; if (v5c493.BrowserPrintSettings.GridLayout =="AsDisplayedInBrowser") vb5140.style.overflow ="hidden"; else vb5140.style.overflow ="visible"; if (!v5c493.BrowserPrintSettings.PrintStatusBar) { var v6e690 =v5c493.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v6e690) v6e690.style.display ="none"; } } } }, OnAfterPrint: function() { var v08a38 =WG50Engine.GetWebGrids(); for (var grid in v08a38) { var v55e72 =v08a38[grid]; if (typeof (v55e72)=="function") continue; var v49f25 =v55e72.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); if (ISEvent.Raise(v55e72.LayoutSettings.ClientSideEvents.OnAfterPrint,v55e72.Id)) { v49f25.style.overflow ="auto"; if (!v55e72.BrowserPrintSettings.PrintStatusBar) { var v56493 =v55e72.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v56493) v56493.style.display =""; } } } }, OnFrameMouseUp: function(v83a13) { if (event.type =="contextmenu" ||event.button ==2) { var v80d94 =event.srcElement; if (v80d94 &&v80d94.tagName) { if (v80d94.tagName =="INPUT" ||v80d94.tagName =="IMG" ||v80d94.tagName =="SELECT" ||v80d94.tagName =="TEXTAREA") return true; } var v27e51 =v83a13.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v27e51 &&v27e51.contains(v80d94)) return false; event.cancelBubble =true; event.returnValue =false; return false; } }, OnBeforeDeactivate: function(va544,va9f9) { var vf2213 =ISGetObject(va544); if (vf2213.IsOnBlur) return; try { var vb9261 =event.srcElement; var ve5977 =event.toElement; if ((vb9261.tagName =="DIV" &&(vb9261.id ==va544 +IS.FRAMESUFFIX)&&ve5977.tagName =="BODY") ||(ve5977.tagName =="BODY" &&vb9261.tagName =="TD")) { window.setTimeout(function() { vf2213.EnsureActiveEditCellFocus(); },200); return; } var ve0e58 =vf2213.FrameObj; if (!ve0e58.contains(ve5977)) { var vf4617 =WGUIEngine.IsWebGridElement(vf2213,ve5977); if (!vf4617) { WG50Engine.OnBlur(vf2213,ve5977); wg_Global.ActiveGrid =null; } } } catch (e) { } }, OnActivate: function(v8b288) { var v5f488 =wgGetActiveGrid(); if (!v5f488 ||v8b288 !=v5f488) { wg_Global.ActiveGrid =v8b288; WG50Engine.FocusGrid(ISGetObject(v8b288)); } }, OnWindowLoad: function() { var vc6924 =WG50Engine.GetWebGrids(); for (var v57319=0; v57319<vc6924.length; v57319++) { var va2a48 =vc6924[v57319]; var v94064 =va2a48.FrameObj; if (va2a48.NeedFocus) { WG50Engine.FocusGrid(va2a48,true); va2a48.NeedFocus =false; }  if (IsGecko30()) WG50Engine.InitializeMozilla(va2a48); for (var vf0761=0; vf0761<va2a48.WebCombos.length; vf0761++) { if (typeof (wcGetComboById)!="function") break; va2a48.WebCombos[vf0761].Id =va2a48.WebCombos[vf0761].Id.replace(/\$/g,"_"); var v07868 =wcGetComboById(va2a48.WebCombos[vf0761].Id); if (v07868) { v07868.FrameObj.style.display ="none"; v94064.insertAdjacentElement("beforeEnd",v07868.FrameObj); if (v07868.MajorVersion =="4.0" &&typeof(WGEditEngine)=="function") WGEditEngine.ApplyWebCombo40ElegantStyle(va2a48,v07868); } } if (va2a48.LayoutSettings.AutoFitColumns) WGUIEngine.AutoFitColHeaders(va2a48);  if (va2a48.IsClassicPaging()&&va2a48.LayoutSettings.PagingStyleUI =="Slider") WGPageEngine.CreateSliderBar(va2a48);  if (va2a48.LayoutSettings.InitialView =="PivotChartView" ||va2a48.LayoutSettings.InitialView =="PivotChartViewExclusive") va2a48.SwitchToPivotChartView(); else if (va2a48.LayoutSettings.InitialView =="Both") WGChartEngine.SetChartElementVisibility(va2a48,true,true);  setTimeout(function() { if (va2a48.CurrentViewMode =="PivotChartView") { WGChartEngine.SetGridElementVisibility(va2a48,false,true); } } ,100); } WG50Engine.OnResize(); }, OnWindowUnload: function(vce635) { var va8d99 =document.body; va8d99.onresize =null; window.detachEvent("onload",WG50Engine.OnWindowLoad); window.detachEvent("onload",function() { WG50Engine.OnGridLoad(vce635); }); window.detachEvent("onresize",function() { WG50Engine.OnResize(); }); va8d99.detachEvent("onmousemove",WG50Engine.OnBodyMouseMove); va8d99.detachEvent("onmouseup",WG50Engine.OnBodyMouseUp); va8d99.detachEvent("onmousedown",WG50Engine.OnBodyMouseDown); }, OnBodyMouseMove: function() { WGUIEngine.OnBodyMouseMove(); }, OnBodyMouseUp: function() { WGUIEngine.OnBodyMouseUp(); }, OnBodyMouseDown: function() { WGUIEngine.OnBodyMouseDown(); }, OnFrameMouseMove: function(v8ee35) { v8ee35.style.left =plGetCurX()-25; v8ee35.style.top =plGetCurY()-25; }, OnFrameMouseOver: function() { if (event.button ==0) { var vb2635 =event.srcElement; if (vb2635 &&((vb2635.tagName =="TD" &&vb2635.currentStyle.textOverflow =="ellipsis")||vb2635.tagName =="NOBR" ||(vb2635.tagName =="SPAN" &&typeof (vb2635.content)!="undefined"))) { if (wg_Global.TTId !=0) clearTimeout(wg_Global.TTId); wg_Global.TTId =setTimeout(function() { WGUIEngine.ShowToolTip(vb2635); },wg_Global.ToolTipDelay); } } }, OnFrameFocus: function(vea918) { if (vea918.IsOnBlur) return; if (!IS.ie) { if (!vea918.HasFocus()) WG50Engine.FocusGrid(vea918,true); } if (!vea918.LastSelObj) { if (IS.safari) return;  var vcd218 =vea918.GetRootTable(); if (vcd218.GetElement(WG40.BODY,WG40.HTMLTABLE).rows.length>0) vcd218.SelectRow(0); } else { if (vea918.ActiveEditCell) { vea918.EnsureActiveEditCellFocus(); } else { try { if (vea918.LastSelObj.type =="Row") { var va6b17 =wgGetCellByPosition(vea918.LastSelObj.element,0); va6b17.setActive(); } else { vea918.LastSelObj.element.setActive(); } } catch (e) { } } } }, OnTableResize: function(v31493) { var v44f10 =ISGetObject(v31493.childNodes[0].gridId); if (v44f10.LayoutSettings.AutoWidth) WG50Engine.ResizeTable(v31493.childNodes[0]); if (v44f10.FreezePaneActive &&!v44f10.IsInProgress) { var va6166 =WGUIEngine.GetFreezeVisibleColumnOffset(v44f10,0);  if (va6166 >0) { WGUIEngine.SetFreezeScrollBarPosition(v44f10,va6166,true);  if (WGUIEngine.GetFreezeScrollBarPosition(v44f10)!=va6166) { setTimeout(function() { WGUIEngine.SetFreezeScrollBarPosition(v44f10,va6166,true); } ,100); } } }  if (IS.moz) WGMozEngine.OnResize(v44f10); }, OnTableScroll: function(v95a40,vb4433,v77a8) { var v8cc93 =v95a40.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); var v3086 =v8cc93.scrollTop +v8cc93.offsetHeight; WG50Engine.EmulateAttributes(v8cc93.childNodes[0]); var vbfd19 =ISGetObject(v8cc93.childNodes[0].gridId); var v29055 =vbfd19.Tables[v8cc93.childNodes[0].tblName]; var v35c4 =v29055.GetElement(WG40.COLHEADER,WG40.HTMLDIV); if (vbfd19.LayoutSettings.AutoFitColumns) v35c4.scrollLeft =0; if (v35c4.scrollLeft !=v8cc93.scrollLeft ||vb4433) { var v4e710 =v8cc93.scrollLeft;  if (vb4433) v4e710 =v77a8;  WG50Engine.ResizeTable(v8cc93.childNodes[0]); v35c4.scrollLeft =v4e710; if (v29055.Get("ColumnFooters")=="Yes") { var v4da30 =v29055.GetElement(WG40.COLFOOTER,WG40.HTMLDIV); v4da30.scrollLeft =v4e710; } } if (vbfd19.LastEditObj) { var v9458 =vbfd19.LastEditObj.element; vbfd19.ExitEditMode(); }  if (!ISEvent.Raise(vbfd19.LayoutSettings.ClientSideEvents.OnScroll,vbfd19.Id)) return;  if (v8cc93.scrollSource !="_OnFreezeScroll") {  if (vbfd19.LayoutSettings.AllowColumnFreezing =="Yes" &&!vbfd19.FreezePaneActive) { v8cc93.scrollSource ="OnTableScroll"; WGUIEngine.SetFreezeScrollBarPosition(vbfd19,v8cc93.scrollLeft); setTimeout(function(){v8cc93.scrollSource =null;},10); } }  var vb1486 =(WG50Engine.HasVSBar(v8cc93)&&!IS.opera ? 17 : 0)+v8cc93.scrollHeight; if (v8cc93.scrollHeight<v8cc93.offsetHeight) return; if (v3086 +2>=vb1486) { if (v29055.GroupedColumns.length>0) return; if (!vbfd19.IsInProgress &&vbfd19.LayoutSettings.PagingMode =="VirtualLoad") WG50Engine.ExecuteFlyPostback(v8cc93.childNodes[0].gridId,"More"); }  }, OnResize: function() { if (WG40.ForceBogusResize) WG50Engine._OnResize(); if (wg_Global.GlobalResizeID !=0) { clearTimeout(wg_Global.GlobalResizeID); wg_Global.GlobalResizeID =0; } else WG50Engine._OnResize();  wg_Global.GlobalResizeID =setTimeout("WG50Engine._OnResize()",50); }, _OnResize: function(v9de15) { var vea859 =WG50Engine.GetWebGrids(); for (var v4ac43=0; v4ac43<vea859.length; v4ac43++) { var va3b74 =vea859[v4ac43]; if (IS.ie) { if (va3b74.LayoutSettings.AutoHeight) { va3b74.NeedHeightResize =true; WGUIEngine.GetGridHeight(va3b74.FrameObj); } else { if (va3b74.FrameObj.style.height !="") { if (va3b74.FrameObj.style.height.indexOf("%")>0) { va3b74.CacheTBodyHeight =null; } } } if (va3b74.LayoutSettings.AutoWidth) { va3b74.NeedWidthResize =true; WGUIEngine.GetGridWidth(va3b74.FrameObj); } } else { WGMozEngine.OnResize(va3b74); } if (va3b74.LayoutSettings.AutoFitColumns &&va3b74.FrameObj.style.width.indexOf("%")>=0) { if (va3b74.TempResizeID !=0) clearTimeout(va3b74.TempResizeID); setTimeout("WGUIEngine.AutoFitColumns('" +va3b74.Name +"')",500); }  if (va3b74.LayoutSettings.AllowColumnFreezing =="Yes") { WGUIEngine.InvalidateFreezeContainer(va3b74); }  if (v9de15 &&va3b74.CacheTBodyHeight ==null) { WGUIEngine.GetTableBodyHeight(va3b74.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); } } }, OnPreFlyPostback: function(vf9954) { if ((vf9954.LastEditObj ||vf9954.ActiveEditCell)&&!vf9954.IsExitingEdit) { var vb2198 =vf9954.LastEditObj; var vcbf62 =vf9954.ActiveEditCell; var v9c28 =vf9954.Tables[((vb2198)? vb2198.tblName : vcbf62.tblName)]; var v4c988 =v9c28.Get("AllowEdit")=="Yes"; var v58669; if (vb2198) v58669 =vb2198.cellElement.parentElement; else v58669 =vcbf62.rowElement; if (v4c988 &&v58669.type =="Record") { if (vb2198) WGEditEngine.ExitEditMode(vb2198); } } }, OnPostFlyPostback: function(v18c54) { v18c54.IsInProgress =true; v18c54.SetBusy(); }, FocusGrid: function(vd7a29,v34130) { var vffe90 =vd7a29.LastSelObj; if (vd7a29.IsOnBlur) return; if (!vd7a29.Get("Visible")) return; if (!ISEvent.Raise(vd7a29.LayoutSettings.ClientSideEvents.OnFocus,vd7a29.Id)) return; if (v34130) wg_Global.ActiveGrid =vd7a29.Name; if (WG50Engine.IsSelectedObjectValid(vffe90)) { var v7cd11 =vd7a29.Tables[vffe90.tblName]; var v79712 =v7cd11.Get("CellClickAction"); if (vffe90.type =="Row" ||v79712 =="RowSelect") { WGEventEngine.RedrawSelectedRowBorder(vffe90.GetRowElement(),""); var v01f33 =vd7a29.ActiveEditCell; if (v01f33 &&wgIsSameRow(v01f33.rowElement,vffe90.GetRowElement())) { WGEditEngine.HighlightEditCell(v01f33.element,"Redraw"); vd7a29.EnsureActiveEditCellFocus(); } else { var va1913 =wgGetCellByPosition(vffe90.element,0); va1913.setActive(); } } else { var v7cd11 =vd7a29.Tables[vffe90.tblName]; WGEventEngine.HighlightCell(vffe90.element,v7cd11.GetSelRowStyle(),v7cd11.GetFocusCellStyle(),"",true); vffe90.element.setActive(); } } else { if (v34130) { wg_Global.ActiveGrid =vd7a29.Name; var v40e49 =vd7a29.GetRootTable().GetElement(WG40.BODY,WG40.HTMLTABLE); if (v40e49.rows.length>0) { if (IS.safari) return;  if (wgIsRecordRow(v40e49.rows[0])) { WGEventEngine.ProcessMouseEvents(wgGetCellByPosition(v40e49.rows[0],0),true); wgGetCellByPosition(v40e49.rows[0],0).setActive(); } } } } }, GetWebGrids: function() { var vfc41 =new Array(); for (var v58269=0; v58269<IS.RuntimeObjects.length; v58269++) { var vcef82 =IS.RuntimeObjects[v58269]; if (typeof(vcef82)=="object" &&vcef82.ClassName =="WebGrid" &&vcef82.Version =="6.0.7200") vfc41[vfc41.length] =vcef82; } return vfc41; }, GetGridByElement: function(v94156) { var vfd120 =WG50Engine.GetGridNameByRow(v94156); var v0d079 =ISGetObject(vfd120); return v0d079; }, GetTableByElement: function(v24475) { var v47f40 =WG50Engine.GetTableNameByRow(v24475); var vdb988 =WG50Engine.GetGridNameByRow(v24475); var v27f16 =ISGetObject(vdb988); var v07863 =v27f16.Tables[v47f40]; return v07863; }, GetColumnByElement: function(v5e995) { var v25e75 =wgGetColNameByCell(v5e995); var v18f58 =v5e995.parentElement; if (v25e75) { var v80d34 =ISGetObject(WG50Engine.GetGridNameByRow(v18f58)); var v19d4 =v80d34.Tables[WG50Engine.GetTableNameByRow(v18f58)]; return v19d4.Columns.GetNamedItem(v25e75); } return null; }, GetCellByElement: function(v7a314) { var vb0d31 =WG50Engine.GetTR(v7a314); if (vb0d31) { var v28937 =WG50Engine.GetRowByElement(vb0d31); if (v28937) { var v94c20 =wgGetColNameByCell(v7a314); return v28937.GetCell(v94c20); } } return null; }, GetRowByElement: function(vfbc86) { var v2a214 =WG50Engine.GetTR(vfbc86); if (v2a214) { var v24977 =WG50Engine.GetTableNameByRow(v2a214); var vcde68 =WG50Engine.GetGridNameByRow(v2a214); var ve1627 =ISGetObject(vcde68); var vf6f78 =ve1627.Tables[v24977]; if (vf6f78.IsUseColumnSet) v2a214 =wgGetRootRow(v2a214); return vf6f78.ToRowObject(v2a214); } return null; }, IsSelectedObjectValid: function(vc486) { if (vc486) { if (vc486.element) { try { var v4d370 =vc486.GetRowElement(); var v8ec56 =vc486.element; if (vc486.type =="Row") { if (v4d370.rowIndex !=-1) { return true; } } else { if (v8ec56.cellIndex !=-1) return true; } } catch (e) { return false; } } } return false; }, GetTableSubId: function(ve156) { if (ve156.tagName =="TR" ||ve156.tagName =="TD") return WG50Engine.GetTable(ve156).subId; else if (ve156.tagName =="TABLE") return ve156.subId; }, GetGridNameByRow: function(vf1489) { return WG50Engine.GetTable(vf1489).gridId; }, GetTableNameByRow: function(va3189) { return WG50Engine.GetTable(va3189).tblName; }, GetTable: function(vabc25) { var vd2389 =vabc25.parentElement; while (vd2389 &&vd2389.tagName !="TABLE") { vd2389 =vd2389.parentElement; } if (vd2389 &&!IS.ie) WGMozEngine.EmulateAttributes(vd2389); return vd2389; }, ResizeTable: function(va670) { var v16625 =ISGetObject(va670.gridId); var ve0d35 =v16625.Tables[va670.tblName]; var v56f39 =ve0d35.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var vb2a34 =v56f39.rows[0].cells[v56f39.rows[0].cells.length -1]; if (WG50Engine.HasVSBar(va670.parentElement)||(v16625.LayoutSettings.AllowColumnFreezing =="Yes" &&!v16625.FreezePaneActive)) { if (!v16625.IsRightToLeft()) { if (!vb2a34.locked) WG50Engine.SetColHeaderPaddingWidth(ve0d35,vb2a34,'17px'); } } else { if (!vb2a34.locked) WG50Engine.SetColHeaderPaddingWidth(ve0d35,vb2a34,'100%'); } if (v16625.LayoutSettings.Hierarchical) { if (v16625.GetMaxWidth()>v16625.FrameObj.offsetWidth) { if (!vb2a34.locked) { v16625.FixPadColumnWidth(); } } else { var v21c22 =v16625.GetRootTable(); var vc3819 =v21c22.GetElement(WG40.COLGROUP); var v14545 =vc3819.childNodes[vc3819.childNodes.length -1]; v14545.width ="100%"; WG50Engine.SetColHeaderPaddingWidth(ve0d35,vb2a34,'100%'); vb2a34.locked =false; } } }, FindTBody: function(v0ab56,v3483) { var v69436 =v0ab56.RootTable.GetElement(WG40.BODY,WG40.HTMLTABLE); var v9c593 =v69436.getElementsByTagName("tbody"); for (var v69d9=0; v69d9<v9c593.length; v69d9++) { if (v9c593[v69d9].id ==v3483.id) return v9c593[v69d9]; } return null; },  GetCommandElement: function(v92911,v6ce82,v3d261) { var va0d56 =v92911.GetElement(WG40.STATUSBOX,WG40.HTMLDIV);  if (va0d56 ==null) return;  var v2e03 =va0d56.children[0]; var vd8c76 =v2e03.rows[0].cells;  for (var v4aa2=0; v4aa2<vd8c76.length; v4aa2++) { var vda065 =vd8c76[v4aa2];  if (IS.GetAttr(vda065,"type")==v6ce82) { return vda065.children[0].rows[0].cells[v3d261]; } }  return null; }, HasVSBar: function(v5c731) { if (v5c731.offsetHeight !=v5c731.clientHeight) return true; else return false; }, HasHSBar: function(vb0166) { if (vb0166.offsetWidth !=vb0166.clientWidth) return true; else return false; }, SetColHeaderPaddingWidth: function(v48950,v4d91,v51195) { if (v48950.IsUseColumnSet) { var v43366 =v48950.GetElement(WG40.COLHEADERGROUP); var v4d161 =v43366.childNodes[v43366.childNodes.length -1]; v4d161.width =v51195; } else { v4d91.style.width =v51195; } if (v48950.Get("ColumnFooters")=="Yes") { var v43366 =v48950.GetElement(WG40.COLFOOTERGROUP); var v4d161 =v43366.childNodes[v43366.childNodes.length -1]; v4d161.width =v51195; } }, GetTD: function(v87e22) { if (!v87e22) return null; while (v87e22.tagName !="TD") { try { v87e22 =v87e22.parentElement; if (!v87e22) return null; } catch (e) { return null; } } return v87e22; },  GetTDorTH: function(v9715) { if (!v9715) return null; while (v9715.tagName !="TD" &&v9715.tagName !="TH") { try { v9715 =v9715.parentElement; if (!v9715) return null; } catch (e) { return null; } } return v9715; }, GetTR: function(vf7f5) { while (vf7f5 &&vf7f5.tagName !="TR") vf7f5 =vf7f5.parentElement; return vf7f5; },  GetFirstRecordRowIndex: function(vb4a41) { var vaf25 =vb4a41.rows[0];  while (vaf25 !=null &&vaf25.type !="Record") vaf25 =vb4a41.rows[vaf25.rowIndex+1];  if (vaf25 !=null) return vaf25.rowIndex; else return -1; },  GetColGroupIndex: function(v0d661,v9c159) { var vc7c77 =v0d661.Grid;  if (vc7c77.FreezePaneActive) { if (IS.ie) cellIndex =WG50Engine.GetRealCellIndex(v9c159); else { if (vc7c77.FreezeConfig !=null) cellIndex =v9c159.cellIndex -vc7c77.FreezeConfig[0].length; else cellIndex =v9c159.cellIndex; } } else cellIndex =v9c159.cellIndex;  return cellIndex; }, GetParentElement: function(v1f080,vb0a69) { var v6e397 =v1f080.parentElement; for (var v85229=0; v85229<vb0a69 -1; v85229++) v6e397 =v6e397.parentElement; return v6e397; }, GetNextRow: function(v64852,v9948) { if (v9948.rowIndex ==v64852.rows.length -1) return null; var ve9216 =v64852.rows[v9948.rowIndex +1]; if (ve9216) WG50Engine.EmulateAttributes(ve9216); return ve9216; }, GetPreviousRow: function(v0c836,veb848) { if (veb848.rowIndex ==0) return null; var vc3736 =v0c836.rows[veb848.rowIndex -1]; if (vc3736) WG50Engine.EmulateAttributes(vc3736); return vc3736; }, GetChildNodes: function(vc3d72,v79217) { var v1de36 =vc3d72.childNodes[0]; for (var v02948=0; v02948<v79217 -1; v02948++) v1de36 =v1de36.childNodes[0]; return v1de36; }, ExecuteFlyPostback: function(v97d66,v7c615,v07155) { var vef48 =ISGetObject(v97d66); var v50687 =vef48.XmlHttp; var v92f54 =""; var v86283 =v97d66; if (vef48.IsPreviewMode) { alert("Not supported in Preview mode!"); return; } vef48.XmlReq =ISXmlHttpEngine.CreateRequestXml(vef48.GetType()); WG50Engine.OnPreFlyPostback(vef48); var vf4797 =ISXml.GetNode(vef48.XmlReq,"//request"); vef48.RequestId =0; if (vef48.IsInProgress) { if (v7c615 =="More" &&vef48.LastAction =="AddRow") return; if ((v7c615 =="UpdateRow" &&vef48.LastAction =="LoadChild") ||(v7c615 =="RowChanged" &&vef48.LastAction =="UpdateRow")) { vef48.NextQueue = [ v7c615, v07155 ]; return; } if (vef48.LayoutSettings.InProgressUIBehavior =="DisplayMessageBox") alert(vef48.GetString("MessageBoxText/InProgress")); return; } if (!ISEvent.Raise(vef48.LayoutSettings.ClientSideEvents.OnBeforeRequest,v86283,v7c615,v07155)) return; vf4797.setAttribute("id",v86283); vef48.TempLRO =v07155; switch (v7c615) { case "More": if (!WGDataEngine.PrepareMore(vef48,vf4797,v86283)) return false; break; case "LoadGroup": if (!WGDataEngine.PrepareLoadGroup(vef48,vf4797,v86283,v07155)) return false; break; case "ColumnSort": if (!WGDataEngine.PrepareColumnSort(vef48,vf4797,v86283,v07155)) return false; break; case "Group": if (!WGDataEngine.PrepareGroup(vef48,vf4797,v86283,v07155,"Group")) return false; break; case "Ungroup": if (!WGDataEngine.PrepareGroup(vef48,vf4797,v86283,v07155,"Ungroup")) return false; break; case "ChangeGroup": if (!WGDataEngine.PrepareGroup(vef48,vf4797,v86283,v07155,"ChangeGroup")) return false; break; case "ColumnFilter": if (!WGDataEngine.PrepareFilter(vef48,vf4797,v86283,v07155)) return false; break; case "LoadChild": if (!WGHierEngine.PrepareLoadChild(vef48,vf4797,v86283,v07155)) return false; break; case "ColumnChange": if (!WGDataEngine.PrepareColumnChange(vef48,vf4797,v86283,v07155)) return false; break; case "Refresh": if (!WGDataEngine.PrepareRefresh(vef48,vf4797,v86283)) return false; break; case "RefreshAll": if (!WGDataEngine.PrepareRefreshAll(vef48,vf4797,v86283)) return false; break; case "Custom": if (!WGDataEngine.PrepareCustomAction(vef48,vf4797,v86283)) return false; break; case "AddRow": if (!WGEditEngine.PrepareAddRow(vef48,vf4797,v86283,v07155)) return false; break; case "UpdateRow": if (!WGEditEngine.PrepareUpdateRow(vef48,vf4797,v86283,v07155)) return false; break; case "DeleteRow": if (!WGEditEngine.PrepareDeleteRow(vef48,vf4797,v86283,v07155)) return false; break; case "Export": if (!WGDataEngine.PrepareExport(vef48,vf4797,v86283,v07155)) return false; break; case "ButtonClick": if (!WGDataEngine.PrepareButtonClick(vef48,vf4797,v86283,v07155)) return false; break; case "ChildTableRefresh": if (!WGHierEngine.PrepareRefreshChildTable(vef48,vf4797,v07155)) return false; break; case "LoadSelfRefChild": if (!WGDataEngine.PrepareLoadSelfReferencingChild(vef48,vf4797,v86283,v07155)) return false; break;  case "LoadPreviewRow": if (!WGDataEngine.PrepareLoadPreviewRow(vef48,vf4797,v86283,v07155)) return false;  break;  case "RowChanged": if (!WGDataEngine.PrepareRowChanged(vef48,vf4797,v86283,v07155)) return false;  break;  case "PagingNext": case "PagingPrev": case "PagingTo": if (!WGPageEngine.PreparePaging(vef48,vf4797,v86283,v7c615,v07155)) return false;  break;  case "Charting":  if (!WGChartEngine.PrepareCharting(vef48,vf4797,v86283,v07155)) return false;   break;   case "RetrievePivotData":  if (!WGChartEngine.PreparePivotDataRetrieval(vef48,vf4797,v86283,v07155)) return false;  break; } vef48.LastRequestObj =v07155; vef48.LastAction =v7c615;  if (vf4797 !=null &&vef48.IsClassicPaging()) vf4797.setAttribute("totalPages",vef48.GetTotalPages()); var v93596 =vef48.XmlHttp.Asynchronous; v50687.Send(); if (v93596) { WG50Engine.OnPostFlyPostback(vef48); } }, OnResponseError: function(v57a41,ve714) { v57a41.LastError =ve714; if (!ISEvent.Raise(v57a41.LayoutSettings.ClientSideEvents.OnUnhandledError,v57a41.Name,v57a41.LastAction,v57a41.LastRequestObj,v57a41.LastError)) return; var vd9721 =ve714; var vdcd95 =v57a41.XmlHttp.XmlHttp; if (vd9721.indexOf("Server Error")>=0 ||vd9721.indexOf("Stack Trace")>=0 ||(vdcd95 !=null &&vdcd95.status ==500)) { if (v57a41.LayoutSettings.DisplayDetailsOnUnhandledError) WGUIEngine.DisplayErrorBox(v57a41,ve714,v57a41.GetString("MessageBoxText/UnhandledError")); } else { if (vd9721 !="") { var v1f740 =IS.GetFormAction(vd9721); window.location =v1f740; return; } else { v57a41.LastError ="Unable to communicate with server.";  if (v57a41.LayoutSettings.DisplayDetailsOnUnhandledError) WGUIEngine.DisplayErrorBox(v57a41,v57a41.LastError,"Unhandled exception."); } } v57a41.IsInProgress =false; v57a41.SetIdle(); v57a41.SetStatus1("","readyerror","CommonText/ReadyError"); v57a41.SetStatusIcon("Failed"); v57a41.IsStatusLocked =true; v57a41.IsUnhandledError =true; }, OnResponse: function(v28271,veef72) { var vcf613 =v28271.XmlResp; var va3f43 =ISXml.GetNodeText(vcf613,"//status"); if (!ISEvent.Raise(v28271.LayoutSettings.ClientSideEvents.OnResponse,v28271.Id,va3f43)) return; if (va3f43 =="Error") { alert(ISXml.GetNodeText(vcf613,"//error")); WG50Engine.HandleCommonError(v28271); v28271.SetStatus1("","ready","CommonText/Ready"); v28271.SetIdle(); v28271.IsInProgress =false; return; } var v60044 =ISXml.GetNodeText(vcf613,"//action"); if (!ISEvent.Raise(v28271.LayoutSettings.ClientSideEvents.OnActionDispatched,v28271.Id,v60044)) return; switch (v60044) { case "More": WGDataEngine.ResponseMore(v28271,vcf613); break; case "LoadGroup": WGDataEngine.ResponseLoadGroup(v28271,vcf613); break; case "ColumnSort": WGDataEngine.ResponseColumnSort(v28271,vcf613); break; case "Group": case "Ungroup": case "ChangeGroup": case "ColumnChange": WGDataEngine.ResponseGroup(v28271,vcf613); break; case "ColumnFilter": WGDataEngine.ResponseFilter(v28271,vcf613); break; case "LoadChild": WGHierEngine.ResponseLoadChild(v28271,vcf613); break; case "Refresh": WGDataEngine.ResponseRefresh(v28271,vcf613); break; case "RefreshAll": WGDataEngine.ResponseRefreshAll(v28271,vcf613); break; case "Custom": if (typeof (wgCustomActionResponse)=="function") wgCustomActionResponse(v28271,vcf613); break; case "AddRow": WGEditEngine.ResponseAddRow(v28271,vcf613); break; case "UpdateRow": WGEditEngine.ResponseUpdateRow(v28271,vcf613); break; case "DeleteRow": WGEditEngine.ResponseDeleteRow(v28271,vcf613); break; case "Export": WGDataEngine.ResponseExport(v28271,vcf613); break; case "ButtonClick": WGDataEngine.ResponseButtonClick(v28271,vcf613); break; case "ChildTableRefresh": WGHierEngine.ResponseRefreshChildTable(v28271,vcf613); break; case "LoadSelfRefChild": WGDataEngine.ResponseLoadSelfReferencingChild(v28271,vcf613); break;  case "LoadPreviewRow": WGDataEngine.ResponseLoadPreviewRow(v28271,vcf613);  break;  case "Paging": WGPageEngine.ResponsePaging(v28271,vcf613);  break;  case "Charting": case "RetrievePivotData": WGChartEngine.ResponseCharting(v28271,vcf613);  break;  } v28271.IsInProgress =false; WG50Engine.ReflectNoDataStatus(v28271); var va3e15 =vcf613.selectSingleNode("//clientScripts"); if (va3e15) { var v7d862 =va3e15.text; if (v7d862 !="") { var v1e536 =v7d862.split(");"); for (var vea265=0; vea265<v1e536.length; vea265++) { if (v1e536[vea265] !="") { var v4c166 =v1e536[vea265]; if (v4c166.indexOf("(")>=0) v4c166 +=")"; eval(v4c166); } } } } if (!ISEvent.Raise(v28271.LayoutSettings.ClientSideEvents.OnAfterResponseProcess,v28271.Name,v60044,v28271.LastRequestObj,vcf613)) return; v28271.LastRequestObj =null; v28271.TempLRO =null; v28271.IsUnhandledError =false; v28271.IsStatusLocked =false; v28271.SetIdle(); if (v28271.NextQueue) { WG50Engine.ExecuteFlyPostback(v28271.Name,v28271.NextQueue[0],v28271.NextQueue[1]); v28271.NextQueue =null; } }, OnBlur: function(ve8882,vff130) { var va7d43 =ve8882.LastSelObj; ve8882.IsOnBlur =true; if (!ISEvent.Raise(ve8882.LayoutSettings.ClientSideEvents.OnLostFocus,ve8882.Name)) return; if ((ve8882.LastEditObj ||ve8882.ActiveEditCell)&&!ve8882.IsExitingEdit) { var v75b11 =ve8882.LastEditObj; var v3a281 =ve8882.ActiveEditCell; var v66b84; if (v75b11) v66b84 =v75b11.cellElement.parentElement; else v66b84 =v3a281.rowElement; if (wgIsRowDirty(v66b84)||wgIsRowMarkedEdit(v66b84)) { var v4cd6 =ve8882.ExitEdit(3)[2]; if (!v4cd6) { if (v66b84.type =="NewRow") { WGEditEngine.HighlightEditCell(v3a281.element,"Clear",v3a281.element); WGEditEngine.InitializeNewRow(ve8882,v66b84); } WGEventEngine.SelectRow(v66b84,ve8882.GetCurSelImage()); } try { vff130.focus(); } catch (e) { } } else { ve8882.ExitEditMode(true); } } if (va7d43) { if (va7d43.type =="Row") WGEventEngine.RedrawSelectedRowBorder(va7d43.GetRowElement(),"",true); else { WGEventEngine.HighlightCell(va7d43.element,ve8882.GetBlurRowStyle(),"0px","",true); } } var v10160 =function() { ve8882.IsOnBlur =false; }; window.setTimeout(v10160,50); }, RemoveAttribute: function(vc2837,vf5e9) { for (var ve0418=0; ve0418<vc2837.attributes.length; ve0418++) { if (vf5e9.indexOf(vc2837.attributes[ve0418].name)==-1) { vc2837.removeAttribute(vc2837.attributes[ve0418].name); ve0418--; } } }, SetLastSelectedObject: function(vf6b4) { var vc4e73 =vf6b4.XmlDt; var v6c779 =vc4e73.documentElement; var vc5518 =vf6b4.LastSelObj; if (vc5518 &&vc5518.element) { var vfaf52 =ISXml.GetNode(vc4e73,"//selectedObject"); if (vfaf52) v6c779.removeChild(vfaf52); var v24649 =vc4e73.createNode(1,"selectedObject",""); var v2c984 =vc5518.GetRowElement(); if (!v2c984 ||v2c984.rowIndex ==-1 ||v2c984.type =="NewRow" ||v2c984.type =="FilterRow") return; v2c984 =wgGetRootRow(v2c984); v24649.setAttribute("tblName",vc5518.tblName); v24649.setAttribute("type",vc5518.type); v24649.setAttribute("rowIndex",v2c984.position); v24649.setAttribute("cellIndex",vc5518.cellIndex); v24649.setAttribute("parentIndex",WGUIEngine.GetParentIndex(v2c984)); ISXml.CreateCDATA(vc4e73,v24649,"keyValue",(v2c984.keyValue ? v2c984.keyValue : "")); var v9f667 =vf6b4.Tables[vc5518.tblName]; if (v9f667.HasMultiPrimaryKey &&v2c984.type =="Record") { var vbf28 =wgGetKeyValues(v2c984); v24649.setAttribute("keyCount",vbf28.length); for (var vc0658=0; vc0658<vbf28.length; vc0658++) { ISXml.CreateCDATA(vc4e73,v24649,"keyValue" +vc0658,vbf28[vc0658]); } } v6c779.appendChild(v24649); } else { ISXml.RemoveNode(v6c779,"selectedObject"); } }, UpdateState: function(v2ff9) { var v3384 =v2ff9.StateRestorationLevel; var v3c646 =v2ff9.GetXml().xml; if (v3384 !="High") { var v6f256 =ISXml.CreateXmlDocument(); ISXml.LoadXml(v6f256,v2ff9.XmlDt.xml); var vb1c20 =ISXml.GetNode(v6f256,"//LayoutSettings"); var v68893 ="TotalLoadedRows,TotalRows,CurrentPageIndex,TotalPages"; for (var v6607=0; v6607<vb1c20.childNodes.length; v6607++) { vb1c20.removeChild(vb1c20.childNodes[v6607]); v6607--; } if (v3384 =="Low") { var ve8168 ="Name,DataMember,IsRootTable,DataKeyField"; var v66379 ="FilterBarVisible,Culture,Hierarchical"; var vcdd5 = "Name,IsGrouped,IsSorted,Visible,Width,EditType,WebComboID,ColumnType,FilterEditType"; var v76485 = [ "BrowserPrintSettings", "FlyPostBackSettings", "UtilizedCustomEditors", "WebCombos" ]; var v4e963 = [ "PreviewRowSettings", "ColumnSetSettings", "SelfReferencingSettings", "FocusCellStyle" ]; WG50Engine.RemoveAttribute(v6f256.documentElement,v68893); WG50Engine.RemoveAttribute(vb1c20,v66379); for (sTbl in v2ff9.Tables) { var v19643 =v2ff9.Tables[sTbl]; var vb4c93 =null; if (typeof (v19643)=="function") continue; if (v19643.IsRootTable) vb4c93 =v6f256.selectSingleNode("//RootTable"); else vb4c93 =v6f256.selectSingleNode("//WebGridTable[@Name='" +v19643.Id +"']"); WG50Engine.RemoveAttribute(vb4c93,ve8168); for (var tNode in v4e963) ISXml.RemoveNode(vb4c93,v4e963[tNode]); var v6d599 =vb4c93.selectNodes("Columns/WebGridColumn"); for (var vb9230=0; vb9230<v6d599.length; vb9230++) WG50Engine.RemoveAttribute(v6d599[vb9230],vcdd5); } for (var node in v76485) ISXml.RemoveNode(v6f256.documentElement,v76485[node]); } v3c646 =v6f256.xml; v6f256 =null; } v2ff9.CustomStateString =v3c646; var vc5b50 =document.getElementById(v2ff9.xmlInputHiddenUniqueID); if (vc5b50 ==null) vc5b50 =document.getElementById(v2ff9.xmlInputHiddenUniqueID.replace(/:/g,"_")); if (vc5b50 ==null) vc5b50 =document.getElementById(v2ff9.xmlInputHiddenUniqueID.replace(/\$/g,"_")); if (vc5b50 !=null) vc5b50.value =escape(v3c646); }, HandleCommonError: function(vfd964) { switch (vfd964.LastAction) { case "AddRow": var v59d93 =vfd964.LayoutSettings.ResetNewRowValuesOnError; var v98343 =vfd964.LastSelObj.GetRowElement(); var va8394 =vfd964.LastRequestObj.RowElement; if (v59d93 ||(va8394 &&!wgIsSameRow(v98343,va8394))) { try { WGEditEngine.InitializeNewRow(vfd964,va8394); if (wgIsSameRow(v98343,va8394)) WGEventEngine.SelectRow(va8394,vfd964.GetCurSelImage()); } catch (e) { } ; } break; case "UpdateRow": var va8394 =vfd964.LastRequestObj; WGEditEngine.CancelChanges(va8394.RowElement); break; } }, SetCheckedRowsData: function(v73c14) { var v53648 =v73c14.XmlDt; for (table in v73c14.Tables) { var vf6922 =v73c14.Tables[table]; if (typeof (vf6922)=="function") continue; var v0dc79 =vf6922.GetRowCheckerColumn(); if (v0dc79 ||vf6922.Get("AllowMultipleSelection")=="Yes") { var va3c76 =v73c14.LayoutSettings.RestoreRowSelection; var vfdf57 =vf6922.GetCheckedRows(); if (vfdf57.length>0) { var vbdc66 =vf6922.XmlNode; ISXml.RemoveNode(vbdc66,"checkedRows"); var v6f941 =ISXml.GetNode(vbdc66,"checkedRows"); if (!v6f941) v6f941 =ISXml.CreateNodeOnly(v53648,"checkedRows",""); for (var vee774=0; vee774<vfdf57.length; vee774++) { var v7d283 =ISXml.CreateNode(v53648,v6f941,"rowKV",""); if (vf6922.HasMultiPrimaryKey) { var vea857 =wgGetKeyValues(vfdf57[vee774]); for (var vd2f86=0; vd2f86<vea857.length; vd2f86++) { ISXml.CreateCDATA(v53648,v7d283,"keyValue" +vd2f86,vea857[vd2f86]); } } else { ISXml.CreateCDATA(v53648,v7d283,"keyValue",vfdf57[vee774].keyValue); }  if (va3c76 !="Disabled") { if ((va3c76 =="RootTableOnly" &&vf6922.IsRootTable)||(va3c76 =="ChildTableOnly" &&!vf6922.IsRootTable)||va3c76 =="All") { if (!vf6922.Storage.SelectedRows.Contains(vfdf57[vee774])) vf6922.Storage.SelectedRows.Add(vfdf57[vee774]); } } }  if (va3c76 =="Disabled") vbdc66.appendChild(v6f941); } else { var vbdc66 =vf6922.XmlNode; ISXml.RemoveNode(vbdc66,"checkedRows"); } } } }, ReplaceXmlNode: function(v4f070,v38138,vd0b20) { var vc1750 =v38138.indexOf("<" +v4f070 +">"); var vc1629 =v38138.indexOf("</" +v4f070 +">"); if (vc1750>=0 &&vc1629>=0 &&vc1629>vc1750) { var v45a53 =v38138.substring(0,vc1750); var vaec27 =v38138.substring(vc1629 +v4f070.length +3); return v45a53 +"<" +v4f070 +">" +vd0b20 +"</" +v4f070 +">" +vaec27; } }, OnViewChanged: function(vb3f25,v08817,vd6a5,v6ea92) { var v16189 =vb3f25.Grid;  switch (v08817) { case "ColumnSort": case "ColumnFilter": case "Refresh": if (vb3f25.IsRootTable) { if (v16189.FreezePaneActive &&v16189.FrozenColumns !=null) { if (!vd6a5) { vd6a5 =new WebGridPartOption(); vd6a5.Body =true; }  if (v16189.RequireInvalidateFreezeContainer) { WGUIEngine.InvalidateFreezeContainer(v16189); v16189.RequireInvalidateFreezeContainer =false; }  WGUIEngine.FormatFreezePane(v16189); WGUIEngine.ProcessFreezeLayout(v16189,true,vd6a5); } else if (v16189.LayoutSettings.AllowColumnFreezing =="Yes" &&!v16189.FreezePaneActive) { WGUIEngine.InvalidateFreezeContainer(v16189); WGUIEngine.SetFreezeScrollBarPosition(v16189,0,true,false,true); } } break;  case "ColumnGroup": case "RefreshAll": case "Paging": if (typeof(v6ea92)=="undefined") { if (v16189.FreezePaneActive &&v16189.FrozenColumns !=null) { if (!vd6a5) vd6a5 =new WebGridPartOption(true); WGUIEngine.FreezePane(v16189,true); WGUIEngine.InvalidateFreezeContainer(v16189); } else if (v16189.LayoutSettings.AllowColumnFreezing =="Yes" &&!v16189.FreezePaneActive) { WGUIEngine.InvalidateFreezeContainer(v16189); WGUIEngine.SetFreezeScrollBarPosition(v16189,0,true,false,true); } } break; case "AddRow": case "UpdateRow": { if (v16189.FreezePaneActive &&v16189.FrozenColumns !=null) { if (!vd6a5) { vd6a5 =new WebGridPartOption(); vd6a5.Footer =true; }  WGUIEngine.ProcessFreezeLayout(v16189,true,vd6a5); } } }   if (vb3f25.Get("AllowMultipleSelection")=="Yes") WG50Engine.ClearAllTableSelection(v16189);  if (v16189.LayoutSettings.RestoreRowSelection !="Disabled") vb3f25.Storage.SelectedRows.RefreshUI(v6ea92); },  ClearAllTableSelection: function(vd3464) { for (var table in this.Tables) { if (table !=null &&typeof(table)=="string") { var v80680 =this.Tables[table];  if (typeof(v80680)!="function" &&v80680 !=null) v80680.ClearSelectedRows(); } } },  GetRealCellIndex: function(vbac19) { var va680 =vbac19.parentElement; var vc676 =0;  for (var v9d457=0; v9d457<va680.cells.length; v9d457++) { if (va680.cells[v9d457] ==vbac19) return vc676;  vc676++; }  return -1; },  GetCellEx: function(v62e50,v19d83,v44e62) { var v1c919 =v62e50._tableCache;  if (v1c919 ==null) v1c919 =v62e50.GetElement(WG40.BODY,WG40.HTMLTABLE,v19d83);  var v3cf15 =-1; var v24c24 =null;  if (!v1c919) return null;  if (typeof(v44e62)=="string") { if (v62e50.IsUseColumnSet) return wgGetCSCellByName(v19d83,v44e62);  if (v62e50.IsRootTable) { if (v62e50._colIndexCache &&typeof(v62e50._colIndexCache[v44e62])=="number") { v3cf15 =v62e50._colIndexCache[v44e62]; } else { if (v62e50._headerRowCache) v24c24 =v62e50._headerRowCache; else { v24c24 =v62e50.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v19d83).rows[0]; v62e50._headerRowCache =v24c24; } } } else v24c24 =v62e50.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v19d83).rows[0];  if (v24c24) { var v23318 =v24c24.cells.length;  for (var vff588=0; vff588<v23318; vff588++) { vb3839 =v24c24.cells[vff588]; WG50Engine.EmulateAttributes(vb3839); if ((vb3839.type =="Column")&&vb3839.colName ==v44e62) { if (!v62e50._colIndexCache) v62e50._colIndexCache =[];  v62e50._colIndexCache[v44e62] =vff588;  v3cf15 =vff588; break; } } } }  else { var v01c28 =v19d83.cells; var vcb654 =-1;  for (var vff588=0; vff588<v01c28.length; vff588++) { var vb3839 =v01c28[vff588]; var v54042 =""; WG50Engine.EmulateAttributes(vb3839); v54042 =vb3839.type;  WG50Engine.EmulateAttributes(vb3839); if (v54042 =="Cell" ||v54042 =="GroupCell" ||v54042 =="FilterColumn") vcb654++; if (v44e62 ==vcb654) { v3cf15 =vff588; break; } } }  if (v3cf15>=0) return v19d83.cells[v3cf15];  return null; },  GetColumnNameByCell: function(v15a35,v12130) { var vd1141 =v12130.parentElement; var vd2432 =v15a35.Grid; var v63a65 =null; var vd5631 =false; if (!v15a35.IsUseColumnSet) { var vd1b76 =null; var v78057 =v12130.cellIndex;  if (IS.ie &&v15a35.IsRootTable &&vd2432.FreezePaneActive &&vd2432.FreezeConfig !=null && (wgIsRecordRow(vd1141)||v12130.style.display =="none")) vd5631 =true;  if (v15a35.IsRootTable) { if (!vd5631 &&v15a35._colIndexCache2 &&typeof(v15a35._colIndexCache2["index" +v78057])=="string") { return v15a35._colIndexCache2["index" +v78057]; } else { if (v15a35._headerRowCache) v63a65 =v15a35._headerRowCache; else { v63a65 =v15a35.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vd1141).rows[0]; v15a35._headerRowCache =v63a65; } } } else v63a65 =v15a35.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vd1141).rows[0];  if (v63a65) vd1b76 =v63a65.cells;  for (var v8b578=0; v8b578<vd1b76.length; v8b578++) { var va0763 =vd1b76[v8b578]; var vb1065 =va0763.cellIndex;  if (IS.moz) WGMozEngine.EmulateAttributes(va0763);  if (vd5631) vb1065 =WG50Engine.GetRealCellIndex(va0763);  if (v12130.style.display =="none") v78057 =WG50Engine.GetRealCellIndex(v12130);  if (va0763.type =="Column" &&vb1065 ==v78057) { if (!vd5631) { if (!v15a35._colIndexCache2) v15a35._colIndexCache2 =[];  v15a35._colIndexCache2["index" +v78057] =va0763.colName; }  return va0763.colName; } } } else { if (typeof (v12130.cs)=="undefined") return null; return v15a35.GetColNameByRowLayout(v12130.cs,v12130.r,v12130.c); } },  IsCellEditable: function(vead74,v57849,vdf418) { if (!v57849) return false;  var v99755 =v57849.parentElement; var vbfe40 =false;  if (typeof(vdf418)=="number") vbfe40 =true;  if (wgIsFilterRow(v99755)) return vead74.GetFilterEditType()!="NoEdit";  else if (wgIsRecordRow(v99755)) return vead74.EditType !="NoEdit" &&v57849.noEdit !="true" && (!vbfe40 ||(vbfe40 &&vdf418 <v99755.cells.length));  else if (wgIsNewRow(v99755)) return vead74.GetNewRowEditType()!="NoEdit";  return false; },  SetClientStorageData: function(v4832) { var ve9c46 =v4832.XmlDt; var v51c88 =ISXml.CreateNodeOnly(ve9c46,"Storage",""); var v7c155 =false; for (var tableName in v4832.Tables) { var v6d064 =v4832.Tables[tableName];  if (typeof(v6d064)=="object") { var vd8141 =v6d064.Storage.SerializeToXml();  if (vd8141 !=null) { v7c155 =true; v51c88.appendChild(vd8141); } } }  ISXml.RemoveNode(v4832.XmlNode,"Storage");  if (v7c155) { v4832.XmlNode.appendChild(v51c88); } },  InitializeClientStorage: function(vded21) { for (var tableName in vded21.Tables) { var v3d485 =vded21.Tables[tableName];  if (typeof(v3d485)=="object") v3d485.Storage.Initialize(); } },  DeserializeClientStorage: function(v7455) { var vf5221 =ISXml.GetNode(v7455.XmlDt,"//Storage");  if (vf5221 !=null) { for (var tableName in v7455.Tables) { var vcc977 =v7455.Tables[tableName];  if (typeof(vcc977)=="object") { var ve917 =ISXml.GetNode(vf5221,"//Table[@Name='" +tableName +"']");  if (ve917 !=null) vcc977.Storage.Deserialize(ve917); } } } },  FindNearestRootGroupRow: function(v55760,vef896,v54140,vd7e52) { var v8ad41 =vef896.GetElement(WG40.BODY,WG40.HTMLTABLE,v54140); var vd5086 =v55760; var vc1a74 =new Array(); if (v8ad41.rows.length ==0) return null; while (vd5086) { if (vd5086.type =="GroupHeader" &&vd5086.groupIndex =="0") return vd5086; else if (vd5086.type =="GroupHeader" &&vd7e52) wgExpandGroupRow(vd5086); vd5086 =wgGetPreviousRow(v8ad41,vd5086); } return null; },  GetPreviousVisibleColumn: function(ve6e51,v2a845) { for (var vc2232=v2a845.Position; vc2232 >-1; vc2232--) { var v95635 =ve6e51.Columns[vc2232];  if (v95635 !=null &&v95635.Visible) return v95635; }  return null; } };var wg_Global = { Resizer: null, Dragger: null, IsHeaderDragged: false, MouseMoved: false, MouseCoord: null, TargetHeader: null, ColSizeTarget: null, ColDragTarget: null, ColPointer: null, MoveColEventArgs: null, IsMouseDown: false, ToolTipDelay: 50, TTId: 0, SortAscImage: "wg5_sortasc.gif", SortDescImage: "wg5_sortdesc.gif", SelectColumnImage: "wg5_selectcolumns.gif", GroupImage: "wg5_groupby.gif", GroupByBoxImage: "wg5_gbb.gif", EditImage: "wg5_edit.gif", CopyImage: "wg5_copy.gif", DeleteImage: "wg5_deleterow.gif", UpdateImage: "wg5_updaterow.gif", CancelImage: "wg5_cancel.gif", FilterRowImage: "wg5_filterbar.gif",  FreezePaneImage: "wg5_freeze.gif",  RemoveColumnImage: "wg5_removecolumn.gif",  BestFitImage: "wg5_bestfit.gif",  ApplyFilterImage: "wg5_applyfilter.gif",  ClearFilterImage: "wg5_clearfilter.gif",  ShowChildImage: "wg5_drillinto.gif",  HideChildImage: "wg5_drillout.gif",  NewRowImage: "wg5_newrow.gif",  PasteImage: "wg5_paste.gif",  RefreshImage: "wg5_refresh.gif",  ExportImage: "wg5_export.gif",  HelpImage: "wg5_help.gif",  LoadMoreImage: "wg5_more.gif", ColumnContext: null, RowContext: null, ExportContext: null, EventContext: null, LastSelObj: null, SelectorObj: null, CalDDImg: "CalendarDD.gif", CalFile: "ISCalendar.htm", CalPopObj: null, CalFrObj: null, LastValRowObj: null, LastRowCtx: null, NoDisplayUpdate: false, PendingUpdates: null, ActiveGrid: null, TempResizeID: 0, IsResizing: false, FilterType: new Array( [ "NotSet", 0 ], [ "GTET", 1 ], [ "GT", 2 ], [ "ET", 3 ], [ "NET", 9 ], [ "LTET", 4 ], [ "LT", 5 ], [ "Like", 6 ], [ "NotLike", 11 ], [ "Contain", 16 ], [ "NotContain", 17 ], [ "Between", 7 ], [ "NotBetween", 10 ], [ "IsNull", 12 ], [ "NotIsNull", 13 ], [ "IsEmpty", 14 ], [ "NotIsEmpty", 15 ]), FilterTypeEnum: new Array("NotSet","GreaterThanOrEqualTo","GreaterThan","EqualTo","LessThanOrEqualTo","LessThan","Like", "Between","NoFilter","NotEqualTo","NotBetween","NotLike","IsNull","NotIsNull", "IsEmpty","NotIsEmpty","Contain","NotContain" ), ErrorBox: null, LastKeyDownProcessed: false, IsDragObjectValid: false, GlobalResizeID: 0 };function InitWG60(v79f89,v4b392){ var veeb89 =WG50Engine.Create(v79f89); veeb89.NeedFocus =v4b392; veeb89.OnInitialize();  if (IS.OnAJAXInitialization) { if (veeb89.WebCombos.length >0 ||veeb89.IsClassicPaging()) setTimeout(WG50Engine.OnWindowLoad,50);  if (!IS.ie) WG50Engine.OnGridLoad(veeb89); }}var posLib2 = { getLeftAbs: function(v00754,v20f11) { if (!IS.ie) { var vb2635 =ISPosLib.getLeftNonIE(v00754); if (v20f11) { if (v20f11.PosRelativeTo) { vb2635 +=ISPosLib.getLeftNonIE(v20f11.PosRelativeTo); } } return vb2635; } if (v20f11 &&v20f11.LayoutSettings.UseRelativePositioning) { return ISPosLib.getLeft(v00754); } var vb2635 =v00754.style.posLeft; var v1c458 =v00754.parentElement; vb2635 +=ISPosLib.getBorderLeftWidth(v00754); if (v1c458) { if (v1c458.style.position.toLowerCase()=="absolute") vb2635 +=v1c458.style.posLeft; } if (v20f11) { if (v20f11.PosRelativeTo) { vb2635 +=ISPosLib.getLeft(v20f11.PosRelativeTo); } } return vb2635; }, getTopAbs: function(vbd226,vf1850) { if (!IS.ie) { var vcdd90 =ISPosLib.getTopNonIE(vbd226); if (vf1850) { if (vf1850.LayoutSettings.UseRelativePositioning) { return vcdd90; } if (vf1850.PosRelativeTo) { vcdd90 +=ISPosLib.getTopNonIE(vf1850.PosRelativeTo); } if (vf1850.FrameObj.style.position !="absolute") return 0; } if (vbd226.style.position =="absolute" ||vbd226.style.position =="relative") return vcdd90; else return 0; } if (vf1850 &&vf1850.LayoutSettings.UseRelativePositioning) { return ISPosLib.getTop(vbd226); } var vcdd90 =vbd226.style.posTop; var vb9d43 =vbd226.parentElement; vcdd90 +=ISPosLib.getBorderTopWidth(vbd226); if (vb9d43) { if (vb9d43.style.position.toLowerCase()=="absolute") vcdd90 +=vb9d43.style.posTop; } if (vf1850) { if (vf1850.PosRelativeTo) { vcdd90 +=ISPosLib.getLeft(vf1850.PosRelativeTo); } } return vcdd90; } };function WebGridCoreDestructor(){ wg_Global =null; delete wg_Global; delete WG50Engine; window.detachEvent("onunload",WebGridCoreDestructor); IS.RegisterUnloadVariables("WG50Engine");}window.attachEvent("onunload",WebGridCoreDestructor);if (typeof(Sys)!="undefined") Sys.Application.notifyScriptLoaded();