
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 
// Generated Datetime : 6/16/2006 11:49:46 AM
// 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", STATUSICON : "StatIcon", STATUSBARCOMMAND : "Stat3", HTMLDIV: "dv", HTMLTABLE: "tb", HTMLCELL: "td", HTMLROW: "tr"};function WebGrid(vf3b44){ this.ClassName ="WebGrid"; this.Version ="4.0.6200"; this.BuildNumber ="9"; this.MajorVersion ="4.0"; this.RequiredFrameworkVersion ="2.0.5000.18"; this.XmlNamespace ="isnet.webui.webgrid"; ISControl.call(this,vf3b44); 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/V4_0_6200/"; this.GridLines ="Both"; this.Enabled =true; this.Visible =true; this.Height =null; this.Width =null; this.SharedScriptDirectory ="/CommonLibrary/Shared/"; this.Name =vf3b44; 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.EditControls =new Array(); this.ChildHeaderContainer =null; this.NeedAutoFitOnLoad =false;  this.OnInitialize =function() { if (this.IsPreviewMode) { wgf1447.m5c661(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 v5ff87=0; v5ff87<this.UtilizedCustomEditors.length; v5ff87++) this.CustomEditors[this.UtilizedCustomEditors[v5ff87].Name] =this.UtilizedCustomEditors[v5ff87];  if (typeof(ISGetCultureInfo)=="function") this.CultureInfo =ISGetCultureInfo(this.LayoutSettings.Culture,false);  this.SetStatus1("","ready","CommonText/Ready"); var v88b54 =this.TotalLoadedRows; var vb6923 =this.TotalRows;  if (vb6923 <v88b54)v88b54 =vb6923; this.SetStatus2("","loaded",v88b54,vb6923);  var v1141 =ISXml.GetNode(this.LayoutSettings.XmlNode,"//FocusCellStyle"); this.LayoutSettings.XmlNode.removeChild(v1141);  var vc9d66 =this.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); if (vc9d66 &&vc9d66.style.display =="none") vc9d66.style.display ="block";  vc9d66 =null; }; this.OnUnload =function() { wg30210.m7f014(this); Listener.Unload(this.FrameObj); Listener.Unload(this.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); }; this.__getter =function(vb1724) { switch (vb1724) { case "Visible": return (this.FrameObj.style.display ==""); } };  this.ReBindingPostBackData =function() { wg30210.m62028(this); wg30210.m29927(this); };  this.PrepareAdditionalPostBackData =function() { wg30210.m78a83(this);  };  this.OnResponseError =function(v58893) { wg30210.m1251(this,v58893); };  this.OnResponse =function(v58893) { wg30210.m3d291(this,v58893); };  this.GetFocusControl =function() { var v3d622 =document.getElementById(this.Id +"_Moz"); v3d622.grid =this; return v3d622; };   this.IsRightToLeft =function() { var v48836 =this.FrameObj.currentStyle.direction; return v48836 =="rtl"; };  this.EnsureActiveEditCellFocus =function() { if (typeof(wg99e67)!="undefined") wg99e67.me9338(this); };  this.EditKeyboardHandler =function(v95533) { wg99e67.m16b99(this,v95533); };  this.GetRootTable =function() { return this.RootTable; };  this.GetMaxWidth =function() { var ve3b44 =this.GetRootTable().GetElement(WG40.BODY,WG40.HTMLTABLE).offsetWidth; var ve4193 =ve3b44; var vcc026; for (vcc026 in this.Tables) { var v01713 =this.Tables[vcc026]; ve4193 =Math.max(ve4193,v01713.GetMaxWidth()); }  return ve4193; };  this.GetRootTableWidth =function() { var v41f26 =this.GetRootTable().GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var v05863 =v41f26.rows[0].cells[v41f26.rows[0].cells.length-1]; return v41f26.offsetWidth -v05863.offsetWidth; }; this.GetPreferredRootTableWidth =function() { var v41f26 =this.GetRootTable().GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var v05863 =v41f26.rows[0].cells[v41f26.rows[0].cells.length-1]; if (v05863.style.width.indexOf("%")>0) return v41f26.offsetWidth -v05863.offsetWidth; else return v41f26.offsetWidth; };   this.FixPadColumnWidth =function() { if (this.GetMaxWidth()>this.GetRootTableWidth()) { var vf4010 =this.GetMaxWidth()-this.GetRootTableWidth()+50; var veee1 =this.GetRootTable(); var vf3067 =veee1.GetElement(WG40.COLGROUP); var vca640 =vf3067.childNodes[vf3067.childNodes.length-1]; vca640.width =vf4010; var vebd9 =vca640.width;  if (wg30210.m1bc52(this.GetRootTable().GetElement(WG40.BODY,WG40.HTMLDIV))) vebd9 +=17; vf3067 =veee1.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); vca640 =vf3067.rows[0].cells[vf3067.rows[0].cells.length-1]; wg30210.me6313(veee1,vca640,vebd9); vca640.locked =true; } };  this.GetColumnByElement =function(v61113){return wg30210.mcd887(v61113); }; this.GetCellByElement =function(v61113){return wg30210.mfd249(v61113); }; this.GetRowByElement =function(v61113){return wg30210.m62624(v61113); };  this.GetElement =function(v1f758,va1b50) { if (va1b50 ==WG40.HTMLROW) { var vc0c60 =this.GetElement(v1f758,WG40.HTMLCELL); return vc0c60.parentElement; } else { return document.getElementById(va1b50 +v1f758 +"_" +this.Name); } }; this.SetStatus1 =function(v22838,v50530,v5c677) { if (this.LayoutSettings.StatusBarVisible) { if (v5c677 !="" &&!this.IsPreviewMode) { var vd4f97 =this.LayoutSettings.TextSettings.TextItems.GetItemByProperty("TextItem",v5c677); if (vd4f97)v22838 =vd4f97.TextValue;  if (v22838 !="") { if (v22838 =="none")v22838 =""; } else  { v22838 =this.GetString(v5c677);  if (typeof(v22838)=="undefined" ||v22838 ==null) { var vc5147=this; setTimeout(function(){vc5147.SetStatus1("",v50530,v5c677);},100 ); return; }  } }  this.GetElement(WG40.STATUSBAR,WG40.HTMLCELL).innerText =v22838; } };  this.SetStatus2 =function(v22838,v50530,vcea7,vfd886) { if (this.LayoutSettings.StatusBarVisible) { if (v50530 =="loaded") { v22838 =this.GetLoadedText(v50530,vcea7,vfd886); if (typeof(v22838)=="undefined") { var vc5147=this; setTimeout(function(){vc5147.SetStatus2(v22838,v50530,vcea7,vfd886);},100 ); return; } } else  { var v8e565 =this.GetString(v50530); if (v8e565 !="") v22838 =v8e565; } this.GetElement(WG40.STATUSBARRIGHT,WG40.HTMLCELL).innerText =v22838; } };  this.SendCustomRequest =function() { wg30210.mb0d0(this.Name,"Custom"); };  this.ClearSelectedObject =function(v8c333) { if (v8c333 &&this.LastSelObj !=null) { wga3a74.m74878(this.LastSelObj.element,"","","Clear"); var v1f847 =wgGetRowHeader(this.LastSelObj.element); if (v1f847) v1f847.innerHTML ="&nbsp"; }  this.LastSelObj =null; };  this.GetSelectedObject =function() { return this.LastSelObj; };  this.GetDefaultLanguageXml =function() { return document.getElementById("WGLang_default"); };  this.GetLanguageXml =function() { if (IS.moz &&this.LanguageXml !=null) return this.LanguageXml;  var vbde92 =this.GetDefaultLanguageXml(); var v6f810 =this.LayoutSettings.TextSettings.Language;  if (v6f810 =="UseCulture") { var va442 =document.getElementById("WGLang_" +this.LayoutSettings.Culture); if (!va442)return vbde92; else return va442; } else if (v6f810 =="UseCustom") { var va442 =document.getElementById("WGLang_" +this.LayoutSettings.TextSettings.UseLanguage); if (!va442)return vbde92; else return va442; } return vbde92; }; this.GetString =function(v5c677) { var v58893 ="";  if (this.IsPreviewMode)return v5c677;  var vd4f97 =this.LayoutSettings.TextSettings.TextItems.GetItemByProperty("TextItem",v5c677); if (vd4f97)v58893 =vd4f97.TextValue; if (v58893 =="") { var va442 =this.GetLanguageXml(); if (IS.moz &&!this.LanguageXml) { va442 =ISMoz.ConvertToXmlObject(va442); this.LanguageXml =va442; }  if ((IS.moz &&va442.xml =="")||(IS.ie &&va442.readyState !="complete")) return null;  var v02997 =ISXml.GetNode(va442,"//" +v5c677); if (v02997)v58893 =v02997.text; } return v58893; };  this.GetLoadedText =function(v50530,vcea7,vfd886) { var v22838 =""; try  { v22838 =this.GetString("CommonText/Loaded"); if (v22838 ==null)v22838 =v22838.substring(0,1); }catch(e) { var v1593=this; setTimeout(function(){v1593.GetLoadedText(v50530,vcea7,vfd886);},100); return; }  v22838 =v22838.replace("[n]",vcea7); v22838 =v22838.replace("[total]",vfd886);  if (vcea7 ==0 ||vfd886==0) wgf1447.m36498(this); else wgf1447.m5c661(this); return v22838; };  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 ve8d32 =false; for(v01713 in this.Tables) { var vcc026 =this.Tables[v01713]; if (vcc026.GroupedColumns.length >0) { ve8d32 =true; break; } }  return ve8d32; };  this.ActivateEditMode =function(v0d186) { return wg99e67.me5245(this,v0d186); };  this.ExitEditMode =function(v55467) { return wg99e67.md6792(this.LastEditObj,v55467); };  this.ValidateRow =function(vb7c47) { return wg99e67.mc5488(this,vb7c47); };  this.ExitEdit =function(vc1a11,v9f667,va3813) { return wg99e67.m47135(this,vc1a11,v9f667,va3813); };  this.UpdateState =function() { };  this.ShowGroupByBox =function() { var vd7d81 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (vd7d81) { var vb6923 =vd7d81.parentElement; this.NeedHeightResize =true; vb6923.style.display ="";  if (IS.moz) { var vfe524 =this; window.setTimeout(function(){wg62d36.m3405(vfe524);},100); } } };  this.HideGroupByBox =function() { var vd7d81 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (vd7d81) { var vb6923 =vd7d81.parentElement; this.NeedHeightResize =true; vb6923.style.display ="none";  if (IS.moz) { var vfe524 =this; window.setTimeout(function(){wg62d36.m3405(vfe524);},100); } } };  this.IsGroupByBoxShown =function() { var vd7d81 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (vd7d81) { var vb6923 =vd7d81.parentElement; return vb6923.style.display ==""; } return false; };  this.ShowFilterBar =function() { var va9f92 =this.GetRootTable().GetFilterRow(); var v3df14 =new Array(); if (wgIsColumnSetRow(va9f92)) v3df14 =wgGetColumnSetRows(va9f92); else v3df14[0] =va9f92;  this.LayoutSettings.Set("FilterBarVisible",true,true);  for(var v5ff87=0;v5ff87<v3df14.length;v5ff87++) v3df14[v5ff87].style.display =""; if (IS.moz) { var vfe524 =this; window.setTimeout(function(){wg62d36.m3405(vfe524);},100); } }; this.HideFilterBar =function() { var va9f92 =this.GetRootTable().GetFilterRow(); var v3df14 =new Array(); if (wgIsColumnSetRow(va9f92)) v3df14 =wgGetColumnSetRows(va9f92); else v3df14[0] =va9f92; this.LayoutSettings.Set("FilterBarVisible",false,true);  for(var v5ff87=0;v5ff87<v3df14.length;v5ff87++) v3df14[v5ff87].style.display ="none";  if (IS.moz) { var vfe524 =this; window.setTimeout(function(){wg62d36.m3405(vfe524);},100); } };  this.IsVisible =function() { return this.Get("Visible"); };  this.SetBusy =function() { if (this.LayoutSettings.StatusBarVisible) document.getElementById("tdStatIcon_" +this.Name).childNodes[0].style.visibility ="visible"; if (this.LayoutSettings.InProgressUIBehavior =="ChangeCursorToHourGlass") { var vc5a78 =document.getElementById(this.Name +"_ImgB"); if (!vc5a78) { vc5a78 =document.createElement("IMG"); vc5a78.id =this.Name +"_ImgB"; vc5a78.style.cssText ="z-index: 299; filter2:alpha(opacity=0); position:absolute; height:50px; width:50px;"; vc5a78.src =this.LayoutSettings.ImageSettings.Folder +"wg_blank.gif"; document.body.appendChild(vc5a78); } vc5a78.style.display =""; vc5a78.style.cursor ="wait"; this.FrameObj.onmousemove =function(){wg30210.ma3647(vc5a78);}; }  };  this.SetIdle =function() { if (this.LayoutSettings.StatusBarVisible) document.getElementById("tdStatIcon_" +this.Name).childNodes[0].style.visibility ="hidden";  if (this.LayoutSettings.InProgressUIBehavior =="ChangeCursorToHourGlass") { var vc5a78 =document.getElementById(this.Name +"_ImgB"); vc5a78.style.cursor ="default"; vc5a78.style.display ="none"; this.FrameObj.onmousemove =null; } };  this.ClearChildTables =function(v4e437) {  if (v4e437) { var v7537 =this.Tables[v4e437].GetChildTables(); for (var v5ff87=0; v5ff87<v7537.length; v5ff87++) { var vbea36 =this.Tables[v7537[v5ff87].Id]; vbea36.SubTableIds =new Array(); } } else  { var veee1 =this.GetRootTable(); var vf3067 =veee1.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var vb3a26 =veee1.GetElement(WG40.COLHEADER,WG40.HTMLDIV);  if (!this.IsRightToLeft()) vb3a26.scrollLeft =0; else vb3a26.scrollLeft =vb3a26.scrollWidth;  var vca640 =vf3067.rows[0].cells[vf3067.rows[0].cells.length-1]; vca640.locked =false;  for (childTbl in this.Tables) { this.Tables[childTbl].SubTableIds =new Array(); } } };  this.GetBlurRowStyle =function() { var v28260 =this.LayoutSettings.LostFocusClass; if (v28260 =="") return "background-color: gainsboro"; else return IS.GetCssText(this.Id,v28260); };  this.GetEditFocusStyle =function() { var v28260 =this.LayoutSettings.EditFocusClass; if (v28260 =="") return "background-color: white;"; else return IS.GetCssText(this.Id,v28260); };  this.GetXml =function() { return this.XmlDt; };  this.MarkEdit =function() { wg99e67.m50543(this); };  this.GetCurSelImage =function() { return this.LayoutSettings.ImageSettings.Folder +this.LayoutSettings.ImageSettings.CurrentRowImage; }; this.Show =function() { this.FrameObj.style.display =""; wgf1447.m4d236(this.Name); if (this.NeedFocus)wg30210.ma4d64(this,true); };  this.SetFocus =function() { wg30210.ma4d64(this,true); };  this.Hide =function() { this.FrameObj.style.display ="none"; }; this.ExportGrid =function(vd7f17,v9dd69,vb1d94,v3c482) { wg30210.mb0d0(this.Name,"Export",new Array(vd7f17,v9dd69,vb1d94,v3c482)); }; this.GetActiveEditCell =function() { return this.ActiveEditCell; };  this.GetLastEditObject =function() { return this.LastEditObj; };  this.SetHeight =function(ve0323) { wgf1447.m0bd0(this,ve0323); };}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 ="";}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 vde751 =this.BorderStyle; if (vde751 =="NotSet")vde751 =""; vde751 =vde751.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 " +vde751; } else { var v55532 =IS.GetCssObject(null,this.CssClass); if (v55532) { if (v55532.borderColor =="")v55532.borderColor ="transparent"; if (v55532.borderWidth =="")v55532.borderWidth ="0"; if (v55532.borderStyle =="")v55532.borderStyle ="none"; return "border: " +v55532.borderColor +" " +v55532.borderWidth +"px " +v55532.borderStyle; } 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 ="wg_inprogress.gif"; this.EditImage ="wg_edit.gif"; this.GotoImage ="wg_goto.gif"; this.CurrentRowImage ="wg_currow.gif"; this.ColumnPointerImage ="wg_colptr.gif"; this.MoreDataImage ="wg_more2.gif"; this.RefreshImage ="wg_refresh2.gif"; this.ExportImage ="wg_export.gif"; this.PreviewRowCollapseImage ="wg_prcol.gif"; this.PreviewRowExpandImage ="wg_prexp.gif"; this.HelpImage ="syshelp16.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/V4_0_6200/"; 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 =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;}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/V3_5_5000/Localization/"; this.Language ="UseDefault"; this.UseLanguage =""; this.TextItems =new ISArray();}function WebGridCell(v8be74){ 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 =v8be74; 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";  this.Setup =function(v5c891) { this.CellElement =v5c891; this.Table =this.Row.Table; this.SubTable =this.Row.SubTable; this.Grid =this.Table.Grid;  var v14076 =wgGetColNameByCell(v5c891); this.Column =this.Table.GetColumn(v14076); this.Name =v14076;  if (v5c891.contentMode) this.ContentMode =v5c891.contentMode;  var vac243 =v5c891.innerText; if (this.ContentMode =="HTML") { var v95d87 =wga3a74.m48577(v5c891); if (v95d87) vac243 =v95d87.innerHTML; else vac243 =v5c891.innerHTML;  if (vac243 !="") { var vf017 =new RegExp("\r\n","g"); vac243 =vac243.replace(vf017,""); } }  if (vac243 ==" ")vac243 =""; if (this.Column.ColumnType =="ImageAndText" &&vac243.substring(0,1)==" ")vac243 =vac243.substring(1); this.Text =vac243;  if (this.Column.ColumnType =="ImageAndText") { var v95d87 =wga3a74.m48577(v5c891); if (v95d87) { if (v95d87.children[0].tagName =="SPAN") this.Image =v95d87.children[0].children[0].src; else if (v95d87.children[0].tagName =="IMG") this.Image =v95d87.children[0].src; } } if (this.Column.ColumnType !="CheckBox") { if (v5c891.cellValue) this.Value =v5c891.cellValue; else this.Value =this.Text; } else { this.Value =v5c891.cellValue; }  if (v5c891.noEdit) this.ForceNoEdit =true;  if (v5c891.cellModified) this.Modified =true; var vd847 =(v5c891.oldCellValue !="" &&typeof(v5c891.oldCellValue)!="undefined"); this.OldText =(v5c891.oldText ? v5c891.oldText : ""); this.OldValue =(vd847 ? v5c891.oldCellValue : "");  this.DataChanged =(v5c891.cellModified ==true ||(vd847 &&this.Value !=this.OldValue));  };  this.SetDataChanged =function() { this.DataChanged =this.Modified =true; this.CellElement.cellModified =true; };  this.Synchronize =function() { this.Setup(this.CellElement); };  this.GetElement =function() { return this.CellElement; };  this.IsForeignColumn =function(vace71) { if (this.SubTable) { if (!vace71) vace71 =this.SubTable.GetConstraintXml();  var vd3726 =ISXml.GetNodes(vace71,"//DataColumn"); for (var v35539=0; v35539<vd3726.length; v35539++) { if (ISXml.GetAttribute(vd3726[v35539],"name")==this.Column.Name) return true; } } return false; };  this.IsActive =function() { if (this.Grid.ActiveEditCell) { if (this.Grid.ActiveEditCell.rowElement ==this.CellElement) return true; } return false; };  this.ActivateEdit =function() {  this.Select(); this.Grid.ActivateEditMode(); };  this.GetParentKeyValue =function(vace71) { if (this.IsForeignColumn(vace71)) { if (!vace71) vace71 =this.SubTable.GetConstraintXml();  return ISXml.GetNodeText(vace71,"//DataColumn[@name='" +this.Column.Name +"']"); }; return null; };  this.SetText =function(v2ec81,ve3093) { this.Text =v2ec81; if (ve3093) this.SetValue(v2ec81);  if (this.Row._UIState !="Added") { var v0c552 =this.CellElement.innerHTML.indexOf("NOBR")>0; var v46653 =wga3a74.m48577(this.CellElement); if (v46653) v0c552 =v46653.innerHTML.indexOf("NOBR")>0;  var vd9e74 =(v0c552 ? "<NOBR>" : "")+(v2ec81 =="" ? "&nbsp;" : _FixAmpChar(v2ec81))+(v0c552 ? "</NOBR>" : ""); if (v46653) v46653.innerHTML =vd9e74; else this.CellElement.innerHTML =vd9e74; this.CellElement.cellModified =true; } this.DataChanged =true; this.Row.SetDataChanged(); };  this.SetValue =function(v8fa80) { this.Value =v8fa80; this.Modified =true;  if (this.Row._UIState !="Added") { this.CellElement.cellValue =v8fa80; this.CellElement.cellModified =true; } this.Row.SetDataChanged(); };  this.SetForceNoEdit =function(v8fa80) { if (typeof(v8fa80)=="undefined")v8fa80 =true;  if (v8fa80) { this.ForceNoEdit =true; this.CellElement.noEdit ="True"; } else { this.ForceNoEdit =false; this.CellElement.removeAttribute("noEdit"); } };  this.Select =function(vd7444,v23114) { if (!vd7444) wg99e67.m04261(this.CellElement); else { var v18299 =this.Table.GetSelRowStyle(); var v94145 =this.Table.GetFocusCellStyle(); wga3a74.m08f13(this.CellElement,v18299,v94145,"",v23114); } };  this.ToXml =function() { if (this.DataChanged) { if (this.SubTable) { var v74b75 =this.SubTable.GetConstraintXml(); if (this.IsForeignColumn(v74b75)) { var v67233 =this.GetParentKeyValue(v74b75); if (v67233) { this.Text =this.Value =v67233; } } }  var v32e2 =this.OldText; if (v32e2 !="")v32e2 =v32e2.replace(/<BR>/g,"\n"); var v41f78 =this.Value; if (typeof(v41f78)=="boolean")v41f78 =(v41f78)? "True" : "False";  if (this.Modified &&this.Column !=null &&this.Column.DataType =="System.Boolean" &&v41f78 =="") v41f78 ="False";  var v2ec81 ="<cell "; v2ec81 +="modified='" +this.Modified +"' colName='" +this.Column.Name +"'>"; v2ec81 +="<text>" +ISXml.EncodeString(this.Text)+"</text>"; v2ec81 +="<value>" +ISXml.EncodeString(v41f78)+"</value>"; v2ec81 +="<oldtext>" +ISXml.EncodeString(v32e2)+"</oldtext>"; v2ec81 +="<oldvalue>" +ISXml.EncodeString(this.OldValue)+"</oldvalue>"; v2ec81 +="</cell>"; return v2ec81; } return ""; }; }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.OnPropertiesInitialized =function(v44155) { if (v44155 =="OnInitialize") { this.Table =this.Parent; this.DefaultVisible =this.Visible; } };  this.GetDefault =function(ve2583) { if (this[ve2583] =="Default") { if (ve2583 =="AllowSizing")ve2583 ="AllowColumnSizing"; return this.Table.GetDefault(ve2583); } else return this[ve2583]; }; this.__getter =function(ve2583) { switch (ve2583) { case "AllowSorting": case "AllowGrouping": case "AllowSizing": return this.GetDefault(ve2583); break; } };   this.__setter =function(ve2583,v8d469,va8025) {  switch (ve2583) { case "Width": var v37a5 =null;  try {v37a5 =this.GetElement(); }catch(e){}  if (v37a5) { wgf1447.m07085(this.Table,v37a5,v8d469); } break; } };   this.GetGrid =function() { return this.Table.GetGrid(); }; this.GetElement =function(v66a44) { if (!this.Table.IsRootTable &&!v66a44) { if (this.GetGrid().HeaderContext !=null) v66a44 =wg30210.mf1728(this.GetGrid().HeaderContext);  if (!v66a44) { try { v66a44 =this.Table.SubTableIds[0].GetElement(WG40.COLHEADER,WG40.HTMLTABLE); }catch(e){} } }  var v5ac95 =this.Table.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v66a44); if (v5ac95) { var vc6233 =v5ac95.rows[0]; if (this.Table.IsUseColumnSet) { var ve325 =this.Table.GetRowLayoutByColName(this.Name); var v7ec12 =ve325.Row;  if (this.Table.IsColumnSetHeaderVisible())v7ec12++; vc6233 =v5ac95.rows[v7ec12]; } return wgGetCellByName(vc6233,this.Name); }  return null; };  this.Resize =function(v92025) { var v37a5 =this.GetElement(); if (!v37a5)return;  var vc8c34 =v37a5.parentElement; wgf1447.m07085(this.Table,v37a5,v92025,!this.Table.IsRootTable,true);  if (!this.Table.IsUseColumnSet) wgf1447.m6f382(this.Table,vc8c34);  wgf1447.m96e83(this.Table,"Resize",v37a5,v92025); };  this.ResizeBestFit =function() { wgf1447.mdb065(this.GetElement()); };  this.GetFilterEditType =function() { var vebe28 =this.FilterEditType; if (vebe28 =="SameAsEditType") vebe28 =this.EditType;  return vebe28; }; }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(v5cd69,va9871) { for (var v1ed53=0; v1ed53<this.Layout.length; v1ed53++) { if (this.Layout[v1ed53].Row ==v5cd69 &&this.Layout[v1ed53].Col ==va9871) return this.Layout[v1ed53]; }  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(vb2414) { switch (vb2414) { case "FilterText": return "CDATA"; default: return "Attribute"; } };  this.GetElement =function() { var vfb250 =this.Table.GetFilterRow(); if (vfb250) { return wgGetCellByName(vfb250,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 vc9178 =wgf1447.m3a748(this.Table.Grid.Id,this.Table.Name); var vf2022 =this.Table.Grid; if (vc9178) { var v94f3 =vc9178.childNodes[0].childNodes[0].childNodes[0].childNodes[0]; for (var vd2960=0; vd2960<v94f3.cells.length; vd2960++) { wg30210.m7c16(v94f3.cells[vd2960]); if (v94f3.cells[vd2960].colName ==this.ColumnMember &&v94f3.cells[vd2960].type =="GroupColumn") { return v94f3.cells[vd2960]; } } } return null; };}function WebGridRow(vaff66,v4e548){ this._Type ="WebGridRow"; ISObject.call(this); this.Table =vaff66; this.SubTable =v4e548; 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;  this.Setup =function(v5a12) { this.RowElement =v5a12; this.Type =v5a12.type; this.Grid =this.Table.Grid;  if (v5a12.expanded &&v5a12.expanded =="True") this.GroupExpanded =true;  if (this.Type !="GroupHeader" &&this.Table.ChildTables.length >0) { var v11039 =wgGetHierRecord(v5a12); if (v11039 &&v11039.childrenLoaded &&v11039.childrenLoaded =="True") this.ChildrenLoaded =true; }  if (v5a12.noEdit &&v5a12.noEdit =="True") this.ForceNoEdit =true;  if (v5a12.keyValue) this.KeyValue =v5a12.keyValue;  if (v5a12.childExpanded &&v5a12.childExpanded =="True") { this.ChildExpanded =true; this.ChildrenLoaded =true; }  if (v5a12.isRowChecked) this.Checked =true;  if (v5a12.srLevel) { this.SelfRefLevel =parseFloat(v5a12.srLevel); this.IsSelfRefRow =true; }  if (v5a12.srRC) this.SelfRefRowCount =parseFloat(v5a12.srRC); if (v5a12.parentValue) this.SelfRefParentValue =v5a12.parentValue;  if (v5a12.relNames) this.RelNames =v5a12.relNames;  if (vaff66.HasMultiPrimaryKey) this.KeyValues =wgGetKeyValues(this.RowElement);  if (v5a12.srExpanded &&v5a12.srExpanded =="True") this.SelfRefExpanded =true;  this.ParentPos =wgf1447.mdb875(this.RowElement);  if (this.Type =="GroupHeader") this.GroupRowText =v5a12.innerText; if (this.Table.PreviewRowVisible) { var ve973 =wgf1447.mc5373(v5a12);  if (ve973) { if (ve973.expanded =="True") this.PreviewRowExpanded =true; } }  this.Position =parseFloat(v5a12.position);  };  this.IsSelected =function() { if (this.Grid.LastSelObj !=null) { if (this.Grid.LastSelObj.GetRowElement()==this.RowElement) return true; }  return false; };  this.GetElement =function() { return this.RowElement; };  this.Synchronize =function() { this.Setup(this.RowElement); };  this.GetCells =function() { if (this._UIState =="Added") return this.Cells;  var v91e69 =new ISArray();  for (var va5a37=0; va5a37<this.Table.Columns.length; va5a37++) { var vaf060 =this.GetCell(this.Table.Columns[va5a37].Name); v91e69[v91e69.length] =vaf060; }  return v91e69; };  this.GetCell =function(va0a27) { var vd4f92 =""; var v97937 =-1; var v5a12;  if (typeof(va0a27)=="string") vd4f92 =va0a27; else v97937 =va0a27;  if (vd4f92) v5a12 =wgGetCellByName(this.RowElement,vd4f92); else v5a12 =wgGetCellByPosition(this.RowElement,v97937);  if (v5a12) { var ve9532 =new WebGridCell(this); ve9532.Setup(v5a12); return ve9532; }  return null; };  this.ExpandGroupRow =function() { this.GroupExpanded =true; wgExpandGroupRow(this.RowElement); };  this.CollapseGroupRow =function() { this.GroupExpanded =false; wgCollapseGroupRow(this.RowElement); };  this.ExpandChildRow =function(v8f37) { if (v8f37)this.Grid.XmlHttp.Asynchronous =false; this.ChildExpanded =true; wgExpandChildRow(this.RowElement); this.Grid.XmlHttp.Asynchronous =true; };  this.CollapseChildRow =function() { this.ChildExpanded =false; wgCollapseChildRow(this.RowElement); };  this.ExpandSelfRefRow =function() { if (!this.IsSelfRefRow)return;  this.SelfRefExpanded =true; this.RowElement.srExpanded ="False"; wgf1447.mb1279(null,this.RowElement,null,true); };  this.CollapseSelfRefRow =function() { if (!this.IsSelfRefRow)return; this.SelfRefExpanded =false; this.RowElement.srExpanded ="True"; wgf1447.mb1279(null,this.RowElement);  };  this.Select =function() { if (this.Table.IsRootTable) this.Table.SelectRow(this.RowElement); else this.SubTable.SelectRow(this.RowElement); };  this.GetChildRow =function(vf0971,v66e50) { if (!this.RowElement)return; if (!v66e50 &&this.Table.ChildTables.length ==0)return;  this.Synchronize();  if (!this.ChildrenLoaded)return; if (!v66e50)v66e50 =this.Table.ChildTables[0].Name;  var v3f458 =this.Grid.Tables[v66e50]; var v50a71 =v3f458.GetSubIdByParentKey(this.RelNames);  if (v50a71) { return v50a71.GetRow(vf0971); } };  this.GetChildRows =function(v66e50) { if (!this.RowElement)return; if (!v66e50 &&this.Table.ChildTables.length ==0)return;  this.Synchronize();  if (!this.ChildrenLoaded)return; if (!v66e50)v66e50 =this.Table.ChildTables[0].Name;  var v3f458 =this.Grid.Tables[v66e50]; var v50a71 =v3f458.GetSubIdByParentKey(this.RelNames);  if (v50a71) { var va1a78 =new Array(); var v4196 =v50a71.GetRowsCount(); for (var va5a37=0; va5a37<v4196; va5a37++) { va1a78[va1a78.length] =v50a71.GetRow(va5a37); } return va1a78;  } };  this.GetParentRow =function() { if (this.SubTable) { var v5a12 =this.SubTable.GetParentRecordRow();  if (this.Table.Parent.IsRootTable) { if (this.Table.Parent.GroupedColumns.length >0) return this.Table.Parent.ToRowObject(v5a12); else return this.Table.Parent.GetRow(parseFloat(v5a12.position)); } else { var vd3b24 =this.Table.Parent; var vbba21 =vd3b24.GetSubTableById(wg_getTableSubId(v5a12)); var vedf7 =new WebGridRow(vd3b24,vbba21);  vedf7.Setup(v5a12); return vedf7; } } return null; };  this.GetGroupChildRows =function() { var v9fe10 =new Array(); var v99374 =this.RowElement;  if (this.Type =="GroupHeader") { var cr,crType; var vc1522; var v3c623 =this.Table;  if (!this.Table.IsRootTable) v3c623 =this.SubTable; vc1522 =v3c623.GetElement(WG40.BODY,WG40.HTMLTABLE); cr =wgGetNextRow(vc1522,v99374); if (cr)crType =cr.type; else crType ="GroupHeader";  if (crType =="GroupHeader") { while (cr &&(cr.type =="GroupTotalRow" ||(cr.hasParent =='True' &&(parseFloat(cr.groupIndex)-1 ==parseFloat(v99374.groupIndex))&&cr.parentIndex ==v99374.position))) { v9fe10[v9fe10.length] =this.Table.ToRowObject(cr); cr =wgGetNextRow(vc1522,cr);  while (cr &&(cr.type =="Record" ||cr.type =="PR" ||cr.type =="CSRecord" ||(cr.type =="GroupTotalRow" &&parseFloat(cr.groupIndex)-1 >parseFloat(v99374.groupIndex))||cr.type =="HierRecord" ||(cr.type =="GroupHeader" &&parseFloat(cr.groupIndex)-1 >parseFloat(v99374.groupIndex)))) cr =wgGetNextRow(vc1522,cr); } } else if (crType =="Record") { while (cr &&(cr.type =='Record')) { v9fe10[v9fe10.length] =this.Table.ToRowObject(cr); cr =wgGetNextRow(vc1522,cr); } }  return v9fe10; } return null; };  this.GetNextRow =function() { var v3795 =this.Position+1; if (this.Table.IsRootTable) return this.Table.GetRow(v3795); else return this.SubTable.GetRow(v3795); };  this.GetPreviousRow =function() { var v8bb66 =this.Position-1; if (v8bb66 <0)return;  if (this.Table.IsRootTable) return this.Table.GetRow(v8bb66); else return this.SubTable.GetRow(v8bb66); }; this.Update =function(v8f37) { if (typeof(wgUpdateRow)=="undefined") { alert("WebGrid_Edit's library is not loaded. Make sure the grid has AllowEdit enabled."); return; }  if (v8f37)this.Grid.XmlHttp.Asynchronous =false;  if (this._UIState =="Changed") wgUpdateRow(this); else if (this._UIState =="Added") wgAddNewRow(this);  this.Grid.XmlHttp.Asynchronous =true; };  this.Delete =function(v8f37) { if (typeof(wgDeleteRow)=="undefined") { alert("WebGrid_Edit's library is not loaded. Make sure the grid has AllowEdit enabled."); return; }  if (v8f37)this.Grid.XmlHttp.Asynchronous =false; wgDeleteRow(this); this.Grid.XmlHttp.Asynchronous =true;  };  this.Validate =function() { return wg99e67.mc5488(this.Grid,this.RowElement); };  this.IsDirty =function() { return wgIsRowDirty(this.RowElement);  };  this.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"); } };  this.IsMarkedEdit =function() { return (this.RowElement.markedEdit =="True"); };  this.CancelChanges =function() { return wg99e67.m56816(this.RowElement); };  this.AcceptChanges =function() { return wg99e67.mebf95(this.RowElement); };  this.BeginEdit =function() { return wg99e67.m7228(this.RowElement); }; this.SetForceNoEdit =function(v21e61) { if (typeof(v21e61)=="undefined")v21e61 =true;  if (v21e61) { this.ForceNoEdit =true; this.RowElement.noEdit ="True"; } else { this.ForceNoEdit =false; this.RowElement.removeAttribute("noEdit"); } };  this.Check =function() { try {wgf1447.mf2880(this.RowElement,true); }catch(e){} };  this.Uncheck =function() { try {wgf1447.mf2880(this.RowElement,false); }catch(e){} };  this.ExpandPreviewRow =function() { if (!this.PreviewRowExpanded) wgf1447.m61517(this.RowElement); };  this.CollapsePreviewRow =function() { if (this.PreviewRowExpanded) wgf1447.m61517(this.RowElement); };  this.ToXml =function() { var v35a49 ="";  if (this.Table.HasMultiPrimaryKey) v35a49 =ISXml.EncodeString(this.KeyValues); else v35a49 =ISXml.EncodeString(this.KeyValue);  var v8c915 ="<row keyValue=\"" +v35a49 +"\">"; var v83710 =this.Cells;  if (v83710 ==null)v83710 =this.GetCells();  for (var va5a37=0; va5a37<v83710.length; va5a37++) { if (v83710[va5a37]) v8c915 +=v83710[va5a37].ToXml(); }  v8c915 +="</row>"; return v8c915; }; }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 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.GetGrid =function() { if (this.Grid ==null) { var vc655 =this; do  { vc655 =vc655.Parent; if (vc655 &&vc655.GetType()=="WebGrid") { this.Grid =vc655; break; }  }while (vc655 !=null); } return this.Grid; };  this.OnPropertiesInitialized =function() { var vf7013 =this.GetGrid(); vf7013.Tables[this.Name] =this; this.Id =this.Name; this.GridId =this.Grid.Id; this.Layout =vf7013.LayoutSettings; };  this.GetDefault =function(v16e81) { if (this[v16e81] =="Default" ||this[v16e81] =="NotSet" ||this[v16e81] =="" ||this[v16e81] ==-1) return this.Grid.LayoutSettings[v16e81]; else return this[v16e81]; }; this.__getter =function(v16e81) { switch (v16e81) { 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": return this.GetDefault(v16e81); break; case "AllowFilter": if (this.IsRootTable) return this.GetDefault(v16e81); else return this.AllowFilter; break; } };  this.HasNextSiblingGroupedColumns =function() { if (this.IsRootTable)return false; var vc0c66 =parseFloat(this.Position); var va0848 =this.GetParentTables(); if (vc0c66 >=va0848.length-1)return false; for (var v3c067=vc0c66+1; v3c067<va0848.length; v3c067++) { var ve1b97 =va0848[v3c067]; if (parseFloat(ve1b97.GroupedColumns.length)>0) return true; } return false;  };  this.HasChildTableGroupedColumns =function() { var v6d58 =this.GetChildTables(); for(var v3c067=0; v3c067<v6d58.length; v3c067++) { if (v6d58[v3c067].GroupedColumns.length >0) return true;  if (v6d58[v3c067].HasChildTableGroupedColumns()) return true; } return false; };  this.GetParentTables =function() { var v3e981 =new Array();  for(table in this.Grid.Tables) { var vfb560 =this.Grid.Tables[table]; if (!vfb560.IsRootTable) { if (vfb560.Parent.Name ==this.Parent.Name) v3e981[v3e981.length] =vfb560; } }  return v3e981; }; this.GetChildTables =function() { var v6d58 =new Array(); for(table in this.Grid.Tables) { var vfb560 =this.Grid.Tables[table]; if (vfb560.Parent.Name ==this.Name) v6d58[v6d58.length] =vfb560; }  return v6d58; };  this.GetParentTreeStructure =function() { var vd6a31 =this.Parent.Name; var v3d475 =new Array();  while (vd6a31 !="") { var vfc399 =this.Grid.Tables[vd6a31]; if (!vfc399)return v3d475;  if (vfc399.HasNextSiblingGroupedColumns()) v3d475[v3d475.length] ="Continuos"; else v3d475[v3d475.length] ="Last"; var vd6a31 =vfc399.Parent.Name; if (vd6a31 !="" &&vfc399.IsRootTable)break; }  v3d475.reverse(); return v3d475; }; this.GetColumnGroupHeadersWidth =function() { var v0c576 =0;  if (!this.IsRootTable &&this.Parent.Get("RowHeaders")=="Yes") { v0c576 +=26; }  v0c576 +=(this.GroupedColumns.length *16);  if (this.Grid.LayoutSettings.Hierarchical) v0c576 +=22; if (this.Get("RowHeaders")=="Yes" ) v0c576 +=parseInt(this.Get("RowHeaderWidth"));  if (this.IsPreviewRowVisible &&this.PreviewRowSettings.Expandable) v0c576 +=parseInt(this.Get("RowHeaderWidth"));  return v0c576; };  this.GetParentHeadersWidth =function() { var v4d118 =this; var v0c576 =0; while (v4d118) { var vcba47 =null;  if (!v4d118.IsRootTable)vcba47 =v4d118.Parent.Name; var vfc399;  if (vcba47 !="" &&vcba47) { vfc399 =this.Grid.Tables[vcba47]; v0c576 +=vfc399.GetColumnGroupHeadersWidth(); if (vfc399.Get("RowHeaders")=="Yes") v0c576 -=parseInt(this.Get("RowHeaderWidth")); v4d118 =vfc399; }else v4d118 =null; } return v0c576; };  this.GetElement =function(v98026,v02748,vea675) { if (v98026 ==WG40.COLHEADER ||v98026 ==WG40.COLFOOTER ||v98026 ==WG40.BODY) { if (v02748 ==WG40.HTMLDIV) { if (this.IsRootTable) return document.getElementById(v02748 +v98026 +"_" +this.Grid.Id +"_" +this.Id); else return document.getElementById(v02748 +v98026 +"_" +this.Grid.Id +"_" +this.Id +"_" +wg30210.ma2919(vea675)); } else { var v0b995 =this.GetElement(v98026,WG40.HTMLDIV,vea675); return v0b995.childNodes[0]; } } else { var v7b957; if (v98026 ==WG40.COLGROUP) v7b957 =this.GetElement(WG40.BODY,WG40.HTMLTABLE,vea675); else if (v98026 ==WG40.COLHEADERGROUP) v7b957 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vea675); else if (v98026 ==WG40.COLFOOTERGROUP) v7b957 =this.GetElement(WG40.COLFOOTER,WG40.HTMLTABLE,vea675);  return v7b957.childNodes[0]; } };  this.GetFilterRow =function(vea675) { if (!this.IsRootTable) return this.Grid.RootTable.GetFilterRow();  var va8c88 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vea675); for (var v3c067=0; v3c067<va8c88.rows.length; v3c067++) { wg30210.m7c16(va8c88.rows[v3c067]); if (va8c88.rows[v3c067].type &&va8c88.rows[v3c067].type =="FilterRow") return va8c88.rows[v3c067]; } return null; };   this.GetNewRow =function(vea675) { var va8c88 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vea675); for (var v3c067=0; v3c067<va8c88.rows.length; v3c067++) { wg30210.m7c16(va8c88.rows[v3c067]); if (va8c88.rows[v3c067].type &&va8c88.rows[v3c067].type =="NewRow") return va8c88.rows[v3c067]; } return null; };  this.GetSubTablePosById =function(v63e96) { for (var v3c067=0; v3c067<this.SubTableIds.length; v3c067++) { if (this.SubTableIds[v3c067].SubId ==v63e96) return v3c067; } return -1; };  this.GetMaxWidth =function() { var v07448 =0;  if (this.SubTableIds) { for (var v3c067=0; v3c067<this.SubTableIds.length; v3c067++) { var v36819 =this.SubTableIds[v3c067]; v07448 =Math.max(v07448,v36819.Width); } }  return v07448; }; this.GetContainer =function(v3b877) { var va8c88 =wg30210.m44c63(v3b877); var vb9711 =wg30210.m05534(va8c88,2); return vb9711; };  this.SelectRow =function(vfb560) { var vea675; var vc1214 =null;  if (typeof(vfb560)=="number")vea675 =this.GetElement(WG40.BODY,WG40.HTMLTABLE).rows[vfb560];  else vea675 =vfb560;  wg30210.m7c16(vea675);  if (wgIsRecordRow(vea675)||vea675.type =="FilterRow") vc1214 =wgGetCellByPosition(vea675,0); else if (vea675.type =="NewRow") vc1214 =vea675.cells[vea675.cells.length-1];  if (vc1214) { wga3a74.m0a482(vc1214); vc1214.focus(); } };  this.GetSelRowStyle =function() { var vdda75 =this.Get("SelectedRowClass"); return IS.GetCssText(this.Grid.Id,vdda75); };  this.GetFocusCellStyle =function() { if (this.FocusCellStyle.BorderStyle =="NotSet") return this.Grid.LayoutSettings.FocusCellStyle.GetStyleText(); else return this.FocusCellStyle.GetStyleText(); };  this.GetCheckedRowStyle =function() { var v30e12 =this.CheckedRowClass; if (v30e12 =="")v30e12 =this.Grid.LayoutSettings.CheckedRowClass; if (v30e12 =="")return "";  return IS.GetCssText(this.Grid.Id,v30e12); };  this.GetColumn =function(vf5221) { return this.Columns.GetNamedItem(vf5221); };  this.IsFilterRowVisible =function() { var vd8261 =this.GetFilterRow(); return (vd8261.style.display ==""); };  this.GetFilterEditType =function(va621) { return this.GetColumn(va621).GetFilterEditType(); };  this.GetRowCheckerColumn =function() { var v7e596 =this.Columns; var va7a77 =""; for (var v3c067=0;v3c067<v7e596.length;v3c067++) { if(v7e596[v3c067].IsRowChecker) { va7a77 =v7e596[v3c067].Name; break; } } return va7a77; };  this.GetCheckedRows =function() { var v42656 =this.GetRowCheckerColumn(); if (v42656) { var v80320 =new Array(); var ve370 =new Array(); if (this.IsRootTable) { ve370[0] =this.GetElement(WG40.BODY,WG40.HTMLTABLE); } else  { for (var v3c067=0; v3c067<this.SubTableIds.length; v3c067++) { ve370[ve370.length] =this.SubTableIds[v3c067].GetElement(WG40.BODY,WG40.HTMLTABLE); } }  for (var v8d029=0; v8d029<ve370.length; v8d029++) { var va8c88 =ve370[v8d029]; for (var v3c067=0; v3c067<va8c88.rows.length; v3c067++) { if (IS.moz) wg30210.m7c16(va8c88.rows[v3c067]);  if (va8c88.rows[v3c067].type =="Record" &&va8c88.rows[v3c067].isRowChecked) { v80320[v80320.length] =va8c88.rows[v3c067]; } } } return v80320; } };  this.GetAutoWidthColumn =function() { var v7e596 =this.Columns; for (var v3c067=0; v3c067<v7e596.length; v3c067++) { var v71816 =v7e596[v3c067]; if (v71816.IsAutoWidth) return v71816; } return null; };  this.GetSubTableById =function(v63e96) { for (var v3c067=0; v3c067<this.SubTableIds.length; v3c067++) { if (this.SubTableIds[v3c067].SubId ==v63e96) return this.SubTableIds[v3c067]; } return null; };  this.GetColNameByRowLayout =function(vcc446,vdc564,v30e12) { var vb5c47 =this.ColumnSets[parseFloat(vcc446)]; var vf672 =null;  for(var v3c067=0; v3c067<vb5c47.Layout.length; v3c067++) { var v45d10 =vb5c47.Layout[v3c067]; if (v45d10.Row ==vdc564 &&v45d10.Col ==v30e12) { vf672 =v45d10; break; } }  if (vf672) return vf672.ColumnMember;  return null; };  this.GetRowLayoutByColName =function(v87f7) { var ved055 =this.ColumnSets; for (var v3c067=0; v3c067<ved055.length; v3c067++) { var vb5c47 =ved055[v3c067];  for (var v8d029=0; v8d029<vb5c47.Layout.length; v8d029++) { if (vb5c47.Layout[v8d029].ColumnMember ==v87f7) return vb5c47.Layout[v8d029]; } } return null; };  this.GetRowLayoutByIndex =function(vf6735,vdc564,v30e12) { var vb5c47 =this.ColumnSets[vf6735];  for(var v3c067=0; v3c067<vb5c47.Layout.length; v3c067++) { var v45d10 =vb5c47.Layout[v3c067]; if (v45d10.Row ==vdc564 &&v45d10.Col ==v30e12) return v45d10; }  return null; };  this.GetColHeaderSpanCount =function() { var v3d661 =0; if (!this.IsRootTable)v3d661++; v3d661 +=this.GroupedColumns.length;  if (this.Layout.Hierarchical)v3d661++; if (this.Layout.RowHeaders =="Yes")v3d661++; if (this.PreviewRowVisible &&this.PreviewRowSettings.Expandable)v3d661++; return v3d661; };  this.GetCSCellPosByIndex =function(vb5c47,vdc564,v30e12,vd566) { var ved055 =this.ColumnSets; var v3d661 =0;  for (var v3c067=0; v3c067<vb5c47; v3c067++) { var v20055 =ved055[v3c067]; if (v20055.Visible)v3d661 +=parseInt(v20055.ColumnCount); }  if (vd566) { var v45d10 =this.GetRowLayoutByIndex(vb5c47,vdc564,v30e12); var vb8823 =v45d10.ColSpan; if (vb8823 &&parseInt(vb8823)>1) v3d661 +=parseInt(vb8823)-1; } return v3d661 +parseInt(v30e12); }; this.GetCSHeaderCellPosByIndex =function(vd6833) { var ved055 =this.ColumnSets; var v3d661 =0; var vb5c47 =vd6833.pos;  for (var v3c067=0; v3c067<vb5c47; v3c067++) { var v20055 =ved055[v3c067]; if (v20055.Visible)v3d661 +=parseInt(v20055.ColumnCount); }  return v3d661; };  this.GetCSHeaderWidth =function(vf6735) { var vb5c47 =this.ColumnSets[vf6735]; var v0c576 =0; for (var v3c067=0; v3c067<vb5c47.ColumnCount; v3c067++) { var v45d10 =this.GetRowLayoutByIndex(vf6735,0,v3c067); v0c576 +=parseInt(v45d10.Width); } return v0c576; };  this.GetColumnSetByPos =function(vf6735) { return this.ColumnSets[vf6735]; };  this.UpdateRowLayoutWidth =function(v36e46,v30e12,v0c576) { var vb5c47 =this.GetColumnSetByPos(v36e46); var vd9e61 =vb5c47.Layout; for (var v3c067=0; v3c067<vd9e61.length; v3c067++) { var v45d10 =vd9e61[v3c067]; if (v45d10.Col ==v30e12) { v45d10.Set("Width",v0c576,true); } } };  this.GetParentRow =function(v3b877) { var vea675; try  { var va8c88 =wg30210.m44c63(v3b877); var ve6225 =wg30210.m05534(va8c88,4); va8c88 =wg30210.m44c63(ve6225); vea675 =wgGetPreviousRow(va8c88,ve6225); vea675 =wgGetRootRow(vea675); } catch (e){vea675 =null;}; return vea675; };  this.GetRecursiveParentRowPosition =function(v3b877) { var ve6225 =this.GetParentRow(v3b877); var vee39 =wgf1447.mdb875(ve6225); var vd759 ="";  while (ve6225 !=null) { wg30210.m7c16(ve6225); vd759 +=ve6225.position +"_"; ve6225 =this.GetParentRow(ve6225); if (!ve6225 ||!ve6225.type)ve6225 =null; }  if (vd759 !="")vd759 =vd759.substring(0,vd759.length-1); if (vee39 !="")vd759 +="_" +vee39;  return vd759; };  this.CreateFormula =function(va7a77,v8cc21) { var v8c63 =false; for (var v3c067=0; v3c067<this.Formulas.length; v3c067++) { if (this.Formulas[v3c067].colName ==va7a77) { v8c63 =true; break; } } if (!v8c63) { this.Formulas[this.Formulas.length] =new wgFormula(this.GridId,this.Id,va7a77,v8cc21); } else  { alert("The formula for column '" +va7a77 +"' is already exist."); } };  this.Refresh =function() { if (this.IsRootTable) this.GetGrid().Refresh(); else  wg30210.mb0d0(this.GetGrid().Name,"ChildTableRefresh",this.Id); };  this.GetDataKeyFieldsCount =function() { return this.DataKeyFieldsCount; };  this.GetTableElementRowsCount =function(vd4260) { var vd6833 =this.GetElement(WG40.BODY,WG40.HTMLTABLE,vd4260); if (vd6833) { return vd6833.rows.length; } };  this.GetRowsCount =function() { var v3d661 =this.GetTableElementRowsCount(); var ve4724 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); if (v3d661 ==0)return 0;  var vea675 =ve4724.rows[v3d661-1]; var v9b115 =wgGetRootRow(vea675); return parseFloat(v9b115.position)+1; };  this.ToRowObject =function(vea675) { var v18b31 =new WebGridRow(this); v18b31.Setup(vea675);  if (!this.IsRootTable) { var v8c359 =wg30210.ma2919(vea675); v18b31.SubTable =this.GetSubTableById(v8c359); }  return v18b31; };  this.GetRow =function(vf6735) { if (this.IsRootTable) { var ve4724 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var vea675 =wgGetRowByPositionExact(ve4724,vf6735,vf6735);  if (!vea675)return null;  var v18b31 =new WebGridRow(this); v18b31.Setup(vea675);  return v18b31; } return null; };    this.GetRowByKeyValue =function(v4b969) { if (this.IsRootTable) { var ve4724 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var vea675 =null;  for (var v3c067=0; v3c067<ve4724.rows.length; v3c067++) { var vdc564 =ve4724.rows[v3c067]; wg30210.m7c16(vdc564); if (wgIsRecordRow(vdc564)&&vdc564.keyValue ==v4b969) { vea675 =vdc564; break; } }  if (!vea675)return null;  var v18b31 =new WebGridRow(this); v18b31.Setup(vea675);  return v18b31;  } else { var vea675 =null;  for (var v3c067=0; v3c067<this.SubTableIds.length; v3c067++) { var v36819 =this.SubTableIds[v3c067]; var vdc564 =v36819.GetRowByKeyValue(v4b969);  if (vdc564) return vdc564; } }  return null; };  this.GetRowByGroup =function(vf7e50,v0f944,v6ff40) { if (this.IsRootTable) { var ve4724 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var vea675 =wgGetRowByGroup(ve4724,vf7e50,v0f944,v6ff40);  if (!vea675)return null;  var v18b31 =new WebGridRow(this); v18b31.Setup(vea675);  return v18b31; } };  this.GetSubIdByParentKey =function(vfca75) { for (var v3c067=0; v3c067<this.SubTableIds.length; v3c067++) { if (this.SubTableIds[v3c067].RelNames ==vfca75) return this.SubTableIds[v3c067]; } };   this.NewRow =function(vd7055) { var vea675 =new WebGridRow(this,vd7055); var v09860 =new ISArray();  for(var v3c067=0; v3c067<this.Columns.length; v3c067++) { var vc1214 =new WebGridCell(vea675); vc1214.Name =this.Columns[v3c067].Name; vc1214.Column =this.Columns[v3c067]; v09860[v09860.length] =vc1214; }  vea675.Cells =v09860; vea675._UIState ="Added"; vea675.Grid =this.Grid;  return vea675; };  this.GetSelfRefParent =function(v3b877) { var va8c88 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); return wgf1447.m6b078(va8c88,v3b877); };  this.GetGroupRows =function() { var va8c88 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var v3b877 =va8c88.rows[0]; var vee17 =v3b877; var v60446 =new Array(); if (va8c88.rows.length ==0)return null;  while (vee17) { if (vee17.type =="GroupHeader" &&vee17.groupIndex =="0") { var vdc564 =this.ToRowObject(vee17); v60446[v60446.length] =vdc564; } vee17 =wgGetNextRow(va8c88,vee17); }  return v60446; };  this.UpdateUI =function() { wgf1447.m43d3(this); };  this.IsColumnSetHeaderVisible =function() { var v5f93 =this.ColumnSetSettings.ShowHeaders; if (v5f93 =="Default") v5f93 =this.Layout.ColumnSetHeaders; return v5f93 =="Yes"; };}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(vb7064){ return ISGetObject(vb7064);}function wg_getGridNameByRow(vde928){ return wg30210.m03a49(vde928);}function wg_getTableNameByRow(vcfb28){ return wg30210.ma1652(vcfb28);}function wg_getTableSubId(vb8f28){ return wg30210.ma2919(vb8f28);}function wg_getTable(vba444){ return wg30210.m44c63(vba444);}function wgGetTable(v33844){ return wg30210.m44c63(v33844);}function wgDoResize(){ wg30210.m0a462();}function wgMouseCoord(v3ee44,vcc387){ this.x =v3ee44; this.y =vcc387; 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(v0cb48,v41682,v6fd19,v48829){ this.isValid =true; this.nonValidMsg =null; this.colName =v6fd19; this.gridId =v0cb48; this.tblName =v41682; this.formula =v48829; this.affectedColumns =new Array(); this.skipErrorMessage =false; this.table =null; this.valueOnError =0; var v66c25 =v48829.indexOf("["); var v71e78 =0; while (v66c25 >=0) { v71e78 =v48829.indexOf("]",v66c25); this.affectedColumns[this.affectedColumns.length] =v48829.substring(v66c25+1,v71e78); v66c25 =v48829.indexOf("[",v71e78); } this.table =ISGetObject(this.gridId).Tables[this.tblName]; for (var v8ba84=0; v8ba84<this.affectedColumns.length; v8ba84++) { var v1d545 =this.table.GetColumn(this.affectedColumns[v8ba84]);  if (!v1d545 ||!v1d545.Visible) { this.isValid =false; break; } } this.GetResult =function(va099) { if (this.isValid) { var vfe156 =this.formula; for (var v8ba84=0; v8ba84<this.affectedColumns.length; v8ba84++) { var va3415 =wgGetCellByName(va099,this.affectedColumns[v8ba84]); var v1d545 =this.table.GetColumn(wgGetColNameByCell(va3415)); var vfe911 =va3415.innerText;  if (v1d545.DataFormat !="") vfe911 =wgGetUnMask(ISGetObject(this.gridId),v1d545,va3415);  vfe156 =vfe156.replace(new RegExp(this.affectedColumns[v8ba84],"g"),vfe911); }  vfe156 =vfe156.replace (/[\[\]]/g,"");  var va6e83; try  { va6e83 =eval(vfe156); } catch (e) { va6e83 =this.valueOnError; } return va6e83; } 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(va099,v02094) { if (this.IsCellAccounted(v02094)) { var va6e83 =this.GetResult(va099); var va3415 =wgGetCellByName(va099,this.colName); var v1d545 =this.table.GetColumn(wgGetColNameByCell(va3415)); if (v1d545.DataFormat !=""){ va3415.cellValue =va6e83; va3415.innerText =wgGetMask(ISGetObject(this.gridId),null,String(va6e83),this.table,va3415); } } }; this.IsCellAccounted =function(v02094) { var v6fd19 =wgGetColNameByCell(v02094); for (var v8ba84=0; v8ba84<this.affectedColumns.length; v8ba84++) { if (v6fd19 ==this.affectedColumns[v8ba84]) return true; } return false; }; return this;}function wgGetChildTableByRow(v5c362,vef436){ var v2f653 =wg30210.m44c63(v5c362); var v2fa84 =wgGetNextRow(v2f653,v5c362); var v4f839 =v2fa84.cells[v2fa84.cells.length-1]; var v53d3 =v4f839.childNodes[0]; var v0a725 =document.getElementById("dvTB_" +v53d3.gridId +"_" +vef436 +"_" +v53d3.subId).childNodes[0]; return v0a725;}function wgMoveColArgs(v68f7,vfcb57,vf9550,vd2755,vd6859,vdf617){ this.table =v68f7; this.c1 =vfcb57; this.c2 =vf9550; this.tr =vd2755; this.cdt =vd6859; this.th =vdf617; return this;}function wgShowHelp(v38976){ var v13832 =ISGetObject(v38976); var v32468 =v13832.LayoutSettings.HelpURL;  if (v32468 =="")
 v32468 ="http://www.intersoftpt.com/WebGrid/Help.aspx";
  window.open(v32468,null,"toolbar=no, menubar=no, scrollbars=yes, resizable=yes");}function wgGetCellCount(v21b37){ if (v21b37) { var v4f876; var v5a989 =0; if (v21b37.tagName =="TR") v4f876 =v21b37.cells; else if (v21b37.tagName =="TD") v4f876 =v21b37;  for (var v07c13=0; v07c13<v4f876.length; v07c13++) { wg30210.m7c16(v4f876[v07c13]); if (v4f876[v07c13].type =="Cell" ||v4f876[v07c13].type =="GroupCell" ||v4f876[v07c13].type =="FilterColumn") v5a989++; } } return v5a989;}function wgGetCellByPosition(v59a43,v47571){ if (v59a43) { var v5bc18; var v24960 =-1; if (v59a43.tagName =="TR") v5bc18 =v59a43.cells; else if (v59a43.tagName =="TD") v5bc18 =v59a43;  for (var v7e012=0; v7e012<v5bc18.length; v7e012++) { wg30210.m7c16(v5bc18[v7e012]); if (v5bc18[v7e012].type =="Cell" ||v5bc18[v7e012].type =="GroupCell" ||v5bc18[v7e012].type =="FilterColumn") { v24960++; } if (v47571 ==v24960)return v5bc18[v7e012]; } } return null;}function wgGetCellByName(v3bf82,v31e36){ if (v3bf82) { var va6e88; var v06192 =-1; var vf3175; if (v3bf82.tagName =="TR") { va6e88 =v3bf82.cells; vf3175 =v3bf82; } else if (v3bf82.tagName =="TD") { vf3175 =v3bf82.parentElement; va6e88 =v3bf82; }  var v6e834 =wg30210.m44c63(v3bf82);  if (v6e834) { var vddb73 =ISGetObject(v6e834.gridId).Tables[v6e834.tblName]; if (vddb73.IsUseColumnSet) { return wgGetCSCellByName(vf3175,v31e36); }  var v87042 =vddb73.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v3bf82).rows[0]; var v3415 =-1;  for (var ve5f94=0; ve5f94<v87042.cells.length; ve5f94++) { va6e88 =v87042.cells; wg30210.m7c16(va6e88[ve5f94]); if ((va6e88[ve5f94].type =="Column")&&va6e88[ve5f94].colName ==v31e36 ) { v3415 =ve5f94; break; } }  if (v3415 >=0) { return v3bf82.cells[v3415]; } }  } return null;}function wgGetCellPosByName(v8da36,v18a8){ if (v8da36) { var v62427; var v84657 =-1; if (v8da36.tagName =="TR") v62427 =v8da36.cells; else if (v8da36.tagName =="TD") v62427 =v8da36;  for (var vb700=0; vb700<v62427.length; vb700++) { wg30210.m7c16(v62427[vb700]); if ((v62427[vb700].type =="Cell" ||v62427[vb700].type =="GroupCell")) { if (v62427[vb700] ==v18a8) { v84657++; return v84657; }else v84657++; } } } return null;}function wgGetRowByPosition(v0fb80,v6bd29){ return v0fb80.rows[v6bd29];}function wgGetRowByPositionExact(v3cf41,vda110,v62e77){ if (!v62e77)v62e77 =0; for (var vf2461=v62e77; vf2461<v3cf41.rows.length; vf2461++) { wg30210.m7c16(v3cf41.rows[vf2461]); if (wgIsRecordRow(v3cf41.rows[vf2461])&&v3cf41.rows[vf2461].position ==vda110) { var v25620 =(typeof(v3cf41.rows[vf2461].srLevel)=="string"); if (!v25620) return v3cf41.rows[vf2461]; else  { if (v3cf41.rows[vf2461].srLevel =="0") return v3cf41.rows[vf2461]; } } } return null;}function wgGetRootRow(v37f50){ if (!v37f50)return; wg30210.m7c16(v37f50); if (wgIsColumnSetRow(v37f50))return wgGetColumnSetRow(v37f50); else if (v37f50.type =="PR")return wgGetPreviewRowParent(v37f50); else return v37f50;}function wgGetColNameByCell(v26436){ var vca730 =v26436.parentElement; var v97852 =wg30210.m44c63(vca730); var vb077 =ISGetObject(v97852.gridId); var v5af20 =vb077.Tables[v97852.tblName]; var v21176 =v5af20.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vca730).rows[0].cells; if (!v5af20.IsUseColumnSet) { for (var ve0649=0; ve0649<v21176.length; ve0649++) { if (IS.moz)wg62d36.ma4d45(v21176[ve0649]); if (v21176[ve0649].type =="Column" &&v21176[ve0649].cellIndex ==v26436.cellIndex){ return v21176[ve0649].colName; } } } else  { if (typeof(v26436.cs)=="undefined")return null; return v5af20.GetColNameByRowLayout(v26436.cs,v26436.r,v26436.c); }}function wgExpandGroupRow(v69e81,vad875){ if (vad875) { _wgExpAllGR(v69e81); return; } if (v69e81.type =="GroupHeader" &&v69e81.expanded =="False") { var v8d564 =ISGetObject(wg30210.m44c63(v69e81).gridId ); wgf1447.mc2488(v8d564,wgGetCellByPosition(v69e81,0).childNodes[0],v69e81.expanded); wgf1447.mdfa58(null,v69e81); }}function _wgExpAllGR(v88a6){ wgExpandGroupRow(v88a6); var vc2625 =wg30210.m44c63(v88a6); var v3dd96 =wgGetNextRow(vc2625,v88a6); while (v3dd96) { if (v3dd96.groupIndex ==v88a6.groupIndex &&v3dd96.style.display =="" &&v3dd96.childrenLoaded !="False")wgExpandGroupRow(v3dd96); v3dd96 =wgGetNextRow(vc2625,v3dd96); }}function wgCollapseGroupRow(v89a50,v0137){ if (v0137) { _wgColAllGR(v89a50); return; } if (v89a50.type =="GroupHeader" &&v89a50.expanded =="True") { var v98034 =ISGetObject(wg30210.m44c63(v89a50).gridId ); wgf1447.mc2488(v98034,wgGetCellByPosition(v89a50,0).childNodes[0],v89a50.expanded); wgf1447.mdfa58(null,v89a50); }}function _wgColAllGR(vc2459){ wgCollapseGroupRow(vc2459); var v38531 =wg30210.m44c63(vc2459); var v8cc97 =wgGetNextRow(v38531,vc2459); while (v8cc97) { if (v8cc97.groupIndex ==vc2459.groupIndex)wgCollapseGroupRow(v8cc97); v8cc97 =wgGetNextRow(v38531,v8cc97); }}function wgExpandChildRow(v8cd4){ var v92f75 =ISGetObject(wg30210.m44c63(v8cd4).gridId ); var vdd418 =wg55c21.m3db18(v8cd4); wg55c21.m01984(v92f75,vdd418,"False"); wg55c21.m5fb16(null,v8cd4);}function wgCollapseChildRow(v94d4){ var v3e54 =ISGetObject(wg30210.m44c63(v94d4).gridId ); var v43579 =wg55c21.m3db18(v94d4); wg55c21.m01984(v3e54,v43579,"True"); wg55c21.m5fb16(null,v94d4);}function wgRefreshHierPosition(vee19,v0a181,veb757,v95048,vd8c2){ if (vd8c2) wg55c21.m55243(vee19,v0a181,veb757,v95048); else { if (!veb757)return; var v4124 =veb757.rowIndex; var v48c79 =v95048; var v92876 =vee19.Tables[v0a181.tblName]; for (var v10a74 =v4124; v10a74<v0a181.rows.length; v10a74++){ var v87323 =v0a181.rows[v10a74]; if (v87323.type =="Record"){ v87323.position =v87323.recordIndex =v95048; v95048++; } } }}function wgGetSelectedObjectFromEvent(vd3a84){ if (vd3a84) { var vae198 =vd3a84.srcElement; if (vae198.tagName !="TD") { origEl =vae198; vae198 =_wgGetTDElement(vae198); } if (!vae198)return null;  var v8f923 =vae198.parentElement; var v0ab87 =wg30210.m44c63(v8f923); var vf2942 =ISGetObject(v0ab87.gridId); var v0dd58 =vf2942.Tables[v0ab87.tblName]; var v81339 =v0dd58.Get("CellClickAction");  var v95b71;  if (v81339 =="RowSelect") { v95b71 =new SelectedObject(v0ab87.tblName,v0ab87.gridId,vae198); v95b71.type ="Row"; v95b71.rowIndex =v8f923.rowIndex; } else if (v81339 =="CellSelect") { v95b71 =new SelectedObject(v0ab87.tblName,v0ab87.gridId,vae198); v95b71.type ="Cell"; v95b71.rowIndex =v8f923.rowIndex; v95b71.cellIndex =wgGetCellPosByName(v8f923,vae198);  }  return v95b71;  } return null;}function wgIsColumnSetRow(v7ee13){ if (typeof(v7ee13.csRowPos)!="undefined") return true;  return false;}function wgGetPreviewRow(v79e74){ var v2de29 =wg30210.m44c63(v79e74); var vc7236 =wgGetNextRow(v2de29,v79e74);  while (vc7236 &&vc7236.type !="PR") vc7236 =wgGetNextRow(v2de29,vc7236); return vc7236;}function wgGetPreviewRowCell(vaf738){ for (var v74c74=0; v74c74<vaf738.cells.length; v74c74++) { if (vaf738.cells[v74c74].type =="PRCell")return vaf738.cells[v74c74]; } return null;}function wgIsValidCell(v23054){ if (!v23054)return false; if (v23054.type =="Cell" ||v23054.type =="GroupCell" ||v23054.type =="ECell" ||v23054.type =="PRExp" ||v23054.type =="PRCell" ||v23054.type =="FilterColumn")return true; return false;}function wgIsValidClickableCell(v5f918){ if (!v5f918)return false; if (v5f918.type =="RowSelector" ||wgIsValidCell(v5f918))return true; return false;}function wgIsValidRow(v9eb18){ if (!v9eb18)return false; if (v9eb18.type =="NewRow" ||v9eb18.type=="PR" ||v9eb18.type=="CSRecord" ||v9eb18.type =="Record" ||v9eb18.type =="FilterRow")return true; return false;}function wgGetPreviewRowParent(vc6043){ if (vc6043.type !="PR")return vc6043; var v29682 =wg30210.m44c63(vc6043); var v2318 =wgGetGridById(v29682.gridId); var v5f227 =v2318.Tables[v29682.tblName]; if (!v5f227.IsUseColumnSet) return wgGetPreviousRow(v29682,vc6043); else return wgGetColumnSetRow(wgGetPreviousRow(v29682,vc6043)); return null;}function wgIsSameRow(vd5133,v76331){ if ((vd5133 ==null &&v76331 !=null)||(vd5133 !=null &&v76331 ==null))return false; var v8f97 =wg30210.m44c63(vd5133); var vbe320 =wg30210.m44c63(v76331); if (v8f97 ==vbe320) { var v53075 =wgGetGridById(v8f97.gridId); var ve7d37 =v53075.Tables[v8f97.tblName]; if (!ve7d37.IsUseColumnSet) { if (!ve7d37.PreviewRowVisible) return vd5133 ==v76331; else return wgGetPreviewRowParent(vd5133)==wgGetPreviewRowParent(v76331); } else  { if (!ve7d37.PreviewRowVisible) return wgIsSameColumnSetRow(vd5133,v76331); else return wgIsSameColumnSetRow(wgGetPreviewRowParent(vd5133),v76331); } } else  return false;  return false;}function wgIsSameColumnSetRow(v5e838,va9c33){ if (v5e838.type =="PR") { var va9477 =wg30210.m44c63(v5e838); v5e838 =wgGetPreviousRow(va9477,v5e838); } if (va9c33.type =="PR") { var v43352 =wg30210.m44c63(va9c33); va9c33 =wgGetPreviousRow(v43352,va9c33); } var v30838 =wgGetColumnSetRow(v5e838); var va3769 =wgGetColumnSetRow(va9c33); if (v30838 ==va3769)return true; return false;}function wgIsRecordRow(v2c683){ if (v2c683.type =="Record" ||v2c683.type =="CSRecord")return true; return false;}function wgGetHierRecord(v6ba97){ var v59563 =wg30210.m44c63(v6ba97); var vb6a44 =wgGetGridById(v59563.gridId); var v7fd52 =vb6a44.Tables[v59563.tblName]; var ve7381 =0; if (v7fd52.IsUseColumnSet) ve7381 +=v7fd52.ColumnSetSettings.RowCount-1; if (v7fd52.PreviewRowVisible) ve7381 +=1; ve7381+=1; var vfdb63 =wgGetRootRow(v6ba97); for (var v31410=0; v31410<ve7381; v31410++) vfdb63 =wgGetNextRow(v59563,vfdb63); if (vfdb63 &&vfdb63.type =="HierRecord")return vfdb63; return null;}function wgGetRowByGroup(v6e458,v0aa88,v8a062,v16348){ var v55361 =0; if (v16348)v55361 =v16348.rowIndex; for (var vef737=v55361; vef737<v6e458.rows.length; vef737++) { var v78178 =v6e458.rows[vef737]; wg30210.m7c16(v78178); if (v78178.type =="GroupHeader" &&v78178.groupIndex ==v0aa88 &&v78178.position ==v8a062) return v78178; } return null;}function wgSetSelectedObject(v3c356,v5a326){ var v14331 =ISXml.CreateXmlDocument(); v14331.loadXML(v5a326); var v72870 =v14331.selectSingleNode("//Object"); var vd4e40 =v72870.getAttribute("parentIndex"); var vb6962 =wgGetGridById(v3c356); var v68131 =vb6962.Tables[v72870.getAttribute("tblName")]; var vd4066 =null; var v58560; if (v68131.IsRootTable) { v58560 =v68131.GetElement(WG40.BODY,WG40.HTMLTABLE); } else  { var v53952 =v72870.getAttribute("tblSubId"); var v12312 =v68131.GetSubTableById(v53952); v58560 =v12312.GetElement(WG40.BODY,WG40.HTMLTABLE); } if (vd4e40 !="") { var v5a964 =vd4e40.split("_");  for (var vbfb46=0; vbfb46<v5a964.length; vbfb46++) { var v6a722 =wgGetRowByGroup(v58560,vbfb46,v5a964[vbfb46],vd4066); if (v6a722) { if (v6a722.childrenLoaded =="True") { wgExpandGroupRow(v6a722); } } vd4066 =v6a722; } } var v31a12 =wgGetRowByPositionExact(v58560,parseFloat(v72870.getAttribute("pos")),(vd4066? vd4066.rowIndex+1 : null)); if (v31a12) { var vc6b39 =null;  if (v31a12.srLevel) { if (v31a12.currentStyle.display =="none") { var v28a30 =wgGetPreviousRow(v58560,v31a12); var v57530 =new Array(); while (v28a30) { if (v28a30.srRC >0 &&v28a30.srLevel <v31a12.srLevel)v57530[v57530.length] =v28a30; v28a30 =wgGetPreviousRow(v58560,v28a30); if (!v28a30)break; if (v28a30.srLevel ==0) { v57530[v57530.length] =v28a30; break; } } v57530 =v57530.reverse(); for (var vbfb46=0; vbfb46<v57530.length; vbfb46++) { wgf1447.mb1279(wgf1447.m6286(v68131,v57530[vbfb46])); } } }  if (v68131.Get("CellClickAction")=="RowSelect") vc6b39 =wgGetCellByPosition(v31a12,0); else if (v68131.Get("CellClickAction")=="CellSelect") { if (v68131.LastAECIndex !=-1) vc6b39 =v31a12.cells[v68131.LastAECIndex]; else vc6b39 =wgGetCellByPosition(v31a12,0); }  if (vc6b39) { wga3a74.m0a482(vc6b39,true); wga3a74.m76f3(vb6962,vc6b39); } }}function wgExpandSelfRefRow(vad181){ var ve891 =wg30210.m44c63(vad181); var vc0e47 =wgGetGridById(ve891.gridId).Tables[ve891.tblName]; vad181.srExpanded ="False"; wgf1447.mb1279(wgf1447.m6286(vc0e47,vad181));}function wgCollapseSelfRefRow(vb9a45){ var vf6745 =wg30210.m44c63(vb9a45); var v80d68 =wgGetGridById(vf6745.gridId).Tables[vf6745.tblName]; vb9a45.srExpanded ="True"; wgf1447.mb1279(wgf1447.m6286(v80d68,vb9a45));}function wgToggleSelfRefRow(vf4d45){ if (vf4d45.srExpanded =="True") wgCollapseSelfRefRow(vf4d45); else  wgExpandSelfRefRow(vf4d45);}function wgGetKeyValues(v3ac51){ var v54510 =wg30210.m44c63(v3ac51); var v3aa99 =wgGetGridById(v54510.gridId); var vf0791 =v3aa99.Tables[v54510.tblName]; if (vf0791.HasMultiPrimaryKey) { var vfae90 =vf0791.GetDataKeyFieldsCount(); var vd4f56 =new Array(); for (var v48571=0; v48571<vfae90; v48571++) { vd4f56[vd4f56.length] =v3ac51.getAttribute("keyValue" +v48571); } return vd4f56; } return null;}function wgIsFilterRow(v22a15){ return v22a15.type =="FilterRow";}function wgRemoveRow(vbe721,v3922){ var v5f979 =wgGetHierRecord(v3922); var v8a031 =null;  if (vbe721.PreviewRowVisible)v8a031 =wgGetPreviewRow(v3922); if (v5f979 &&v5f979.type !="HierRecord")v5f979 =null; if (wgIsColumnSetRow(v3922)) { var ve2a53 =wgGetColumnSetRows(v3922); for (var v3ef22=0; v3ef22<ve2a53.length; v3ef22++) { ve2a53[v3ef22].removeNode(true); } } else  { v3922.removeNode(true); } if (v8a031)v8a031.removeNode(true); if (v5f979)v5f979.removeNode(true);}function wgGetGridByElement(v27749){ return wg30210.m08f98(v27749);}function wgGetTableByElement(v78d65){ return wg30210.m0b118(v78d65);}function wgGetColumnByElement(v08065){ return wg30210.mcd887(v08065);}function wgGetCellByElement(v38765){ return wg30210.mfd249(v38765);}function wgGetRowByElement(ve9f65){ return wg30210.m62624(ve9f65);}var wg30210 ={ Initialized: false,  m25379:function(v5ef49) { var v1b668 =new WebGrid(v5ef49); wg30210.md0258(v1b668); wg30210.m3b945(v1b668); wg30210.ma3492(v1b668); v1b668.IsInit =true; return v1b668; },  md0258:function(veac29) { if (veac29==null)return; if (!veac29.IsInit) { var v1ad49 =ISXml.GetNode(veac29.XmlDt,"//WebGrid");  if (v1ad49 ==null) v1ad49 =veac29.XmlDt.documentElement; if (v1ad49!=null) {  IS.SetPropertiesRecursive(veac29,v1ad49); veac29.LayoutSettings.StatusBarCommandStyle =DynamicStyleEngine.Assign(ISXml.GetNode(veac29.XmlDt,"//StatusBarCommandStyle")); } } },  m3b945:function(v76238) {  window.attachEvent("onload",function(){wg30210.m79a68(v76238);}); window.attachEvent("onunload",function(){wg30210.mfd73(v76238.Id);});  if (!wg30210.Initialized) { var v4cf57 =document.body; Listener.Add(v4cf57,"onresize",wg30210.m0a462); window.attachEvent("onload",wg30210.mea360); window.attachEvent("onbeforeprint",wg30210.madd65); window.attachEvent("onafterprint",wg30210.mca328);  v4cf57.attachEvent("onmousemove",wg30210.m45830); v4cf57.attachEvent("onmouseup",wg30210.mb8466); v4cf57.attachEvent("onmousedown",wg30210.ma1a19); wg30210.Initialized =true; } wg30210.ma8d35(v76238); wg30210.m67586(v76238);  if (v76238.LayoutSettings.StatusBarVisible) { var v22494 =v76238.GetElement(WG40.STATUSBARCOMMAND,WG40.HTMLCELL); Listener.Add(v22494,"onmouseover",function(){wgf1447.m2a30(v76238);}); Listener.Add(v22494,"onmouseout",function(){wgf1447.m2a30(v76238);}); Listener.Add(v22494,"onmousedown",function(){wgf1447.m2a30(v76238);}); Listener.Add(v22494,"onmouseup",function(){wgf1447.m2a30(v76238);}); }  v76238.XmlHttp =ISXmlHttpEngine.Create(v76238,function(){wg30210.m3d291(v76238);}); },  ma8d35:function(v25218) { v25218.FrameObj.attachEvent("onbeforedeactivate",function(){wg30210.m10577(v25218.Id);}); v25218.FrameObj.attachEvent("onactivate",function(){wg30210.m8685(v25218.Id); }); v25218.FrameObj.attachEvent("onmouseover",function(){wg30210.ma6d58(v25218); }); v25218.FrameObj.attachEvent("onfocus",function(){wg30210.m72386(v25218); }); v25218.FrameObj.attachEvent("oncontextmenu",function(){wg30210.m79f50(v25218); }); v25218.FrameObj.attachEvent("onmouseup",function(){wg30210.m79f50(v25218); }); },  ma3492:function(v6cb99) { if (IS.moz) { var v67018 =v6cb99.FrameObj; v67018.style.MozUserFocus ="normal"; v67018.attachEvent("onblur",function(){wg62d36.m9f397(v6cb99); });  var v6a275 =v6cb99.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); wg62d36.ma4d45(v6a275.childNodes[0]); window.attachEvent("onresize",function(){wg30210.m0a462();}); wg62d36.m12446(v6cb99,true); wg62d36.mc0a67(v6cb99); wg62d36.m61651(v6cb99); } },  m67586:function(v73463) { var vc7399 =v73463.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); Listener.Add(vc7399,"onresize",function(){wg30210.m31e69(vc7399); }); Listener.Add(vc7399,"onscroll",function(){wg30210.m6e712(v73463); }); if (v73463.IsInProgress &&IS.moz) { var vd9c65 =v73463.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); wg62d36.ma4d45(vd9c65.childNodes[0]); wg62d36.m3405(v73463); } },  md3866:function(ved943) { ved943.FrameObj.detachEvent("onbeforedeactivate",function(){wg30210.m10577(ved943.Id);}); ved943.FrameObj.detachEvent("onactivate",function(){wg30210.m8685(ved943.Id); }); ved943.FrameObj.detachEvent("onmouseover",function(){wg30210.ma6d58(ved943); }); ved943.FrameObj.detachEvent("onfocus",function(){wg30210.m72386(ved943); }); ved943.FrameObj.detachEvent("oncontextmenu",function(){wg30210.m79f50(ved943); }); ved943.FrameObj.detachEvent("onmouseup",function(){wg30210.m79f50(ved943); }); Listener.Unload(ved943.FrameObj); Listener.Unload(ved943.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); if (ved943.LayoutSettings.StatusBarVisible) { var vde727 =ved943.GetElement(WG40.STATUSBARCOMMAND,WG40.HTMLCELL);  Listener.Unload(vde727); }  if (IS.moz) ved943.FrameObj.detachEvent("onblur",function(){wg62d36.m9f397(ved943); }); },  md5087:function(v44243) { Listener.Unload(v44243.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); },  m7f014:function(v1dd8) { var v09243 =document.body; v09243.onresize =null; window.detachEvent("onload",wg30210.mea360); window.detachEvent("onload",function(){wg30210.m79a68(v1dd8);}); window.detachEvent("onresize",function(){wg30210.m0a462();}); v09243.detachEvent("onmousemove",wg30210.m45830); v09243.detachEvent("onmouseup",wg30210.mb8466); v09243.detachEvent("onmousedown",wg30210.ma1a19); wg30210.md3866(v1dd8); },  m79a68:function(v62624) { if (IS.moz) { var vc428 =v62624.FrameObj.style.height; v62624.FrameObj.style.height ="0px"; v62624.FrameObj.style.height =vc428; wg62d36.m3405(v62624); } },  m7c16:function(v87c24) { if (IS.moz) wg62d36.ma4d45(v87c24); }, SetMenuCssFile: function(v43888,v0127) { if (typeof(Menu)!="undefined")v43888.cssFile =v0127; },  madd65:function() { var v72052 =wg30210.m9052();  for(var grid in v72052) { var v6c937 =v72052[grid]; var v35336 =v6c937.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); if (ISEvent.Raise(v6c937.LayoutSettings.ClientSideEvents.OnBeforePrint,v6c937.Id)) { v35336.style.display =""; if (v6c937.BrowserPrintSettings.GridLayout =="AsDisplayedInBrowser") v35336.style.overflow ="hidden"; else v35336.style.overflow ="visible";  if (!v6c937.BrowserPrintSettings.PrintStatusBar) { var v1478 =v6c937.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v1478) v1478.style.display ="none"; } } } },  mca328:function() { var va7f77 =wg30210.m9052(); for(var grid in va7f77) { var vadc49 =va7f77[grid]; var v91984 =vadc49.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV);  if (ISEvent.Raise(vadc49.LayoutSettings.ClientSideEvents.OnAfterPrint,vadc49.Id)) { v91984.style.overflow ="auto";  if (!vadc49.BrowserPrintSettings.PrintStatusBar) { var v05343 =vadc49.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v05343) v05343.style.display =""; } } } },  m79f50:function(vc3963) { if (event.type =="contextmenu" ||event.button ==2) { var veb32 =event.srcElement; if (veb32 &&veb32.tagName) { if (veb32.tagName =="INPUT" ||veb32.tagName =="IMG" ||veb32.tagName =="SELECT" ||veb32.tagName =="TEXTAREA") return true; }  var v6b460 =vc3963.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v6b460 &&v6b460.contains(veb32))return false;  event.cancelBubble =true; event.returnValue =false; return false; } },  m10577:function(v7f86,v5cd55) { var vcc327 =ISGetObject(v7f86); if (vcc327.IsOnBlur)return; try  { var v29571 =event.srcElement; var va4080 =event.toElement; if ((v29571.tagName =="DIV" &&(v29571.id ==v7f86 +IS.FRAMESUFFIX)&&va4080.tagName =="BODY")||(va4080.tagName =="BODY" &&v29571.tagName =="TD")) { window.setTimeout(function(){vcc327.EnsureActiveEditCellFocus();},200); return; } var v62913 =vcc327.FrameObj; if (!v62913.contains(va4080)) { var v7170 =false; for (var vca523=0; vca523<vcc327.EditControls.length; vca523++) { if (va4080 ==vcc327.EditControls[vca523] ||vcc327.EditControls[vca523].contains(va4080)) { v7170 =true; break; } } for (var vca523=0; vca523<IS.RuntimeWindowPopups.length; vca523++) { var vbdf47 =IS.RuntimeWindowPopups[vca523]._e; if (vbdf47.contains(va4080)) { v7170 =true; break; } }  if (!v7170) { wg30210.m53836(vcc327,va4080); wg_Global.ActiveGrid =null; } } }catch(vbdf47){} },  m8685:function(v7e83) { var v34d86 =wgGetActiveGrid(); if (!v34d86 ||v7e83 !=v34d86) { wg_Global.ActiveGrid =v7e83; wg30210.ma4d64(ISGetObject(v7e83)); } },  mea360:function() { var vbb831 =wg30210.m9052(); for (var v76f67=0; v76f67<vbb831.length; v76f67++) { var v5f587 =vbb831[v76f67]; var v4d836 =v5f587.FrameObj; if (v5f587.NeedFocus) { wg30210.ma4d64(v5f587,true); v5f587.NeedFocus =false; } for (var v54291=0; v54291<v5f587.WebCombos.length; v54291++) { if (typeof(wcGetComboById)!="function") break;  v5f587.WebCombos[v54291].Id =v5f587.WebCombos[v54291].Id.replace(/\$/g,"_"); var v00277 =wcGetComboById(v5f587.WebCombos[v54291].Id ); if (v00277) { v00277.FrameObj.style.display ="none"; v4d836.insertAdjacentElement("beforeEnd",v00277.FrameObj); } } if (v5f587.LayoutSettings.AutoFitColumns) wgf1447.m4bc85(v5f587); } wg30210.m0a462(); },  mfd73:function(vfa51) {  },  m45830:function() { wgf1447.m1e679(); },  mb8466:function() { wgf1447.m46649();  },  ma1a19:function() { wgf1447.m4c020(); },  ma3647:function(vfb017) { vfb017.style.left =plGetCurX()-25; vfb017.style.top =plGetCurY()-25; },  ma6d58:function() { if (event.button ==0) { var v3c481 =event.srcElement; if (v3c481 &&((v3c481.tagName =="TD" &&v3c481.currentStyle.textOverflow =="ellipsis")||v3c481.tagName =="NOBR" ||(v3c481.tagName =="SPAN" &&typeof(v3c481.content)!="undefined"))) { if (wg_Global.TTId !=0)clearTimeout(wg_Global.TTId); wg_Global.TTId =setTimeout(function(){wgf1447.m4f553(v3c481);},wg_Global.ToolTipDelay ); } } },  m72386:function(ve8942) { if (ve8942.IsOnBlur)return;  if (IS.moz) { if (!ve8942.HasFocus()) wg30210.ma4d64(ve8942,true); } if (!ve8942.LastSelObj) { var v9bf62 =ve8942.GetRootTable(); if (v9bf62.GetElement(WG40.BODY,WG40.HTMLTABLE).rows.length >0) v9bf62.SelectRow(0); } else  { if (ve8942.ActiveEditCell) { ve8942.EnsureActiveEditCellFocus(); } else  { try  { if (ve8942.LastSelObj.type =="Row") { var vd4e80 =wgGetCellByPosition(ve8942.LastSelObj.element,0); vd4e80.setActive(); } else  { ve8942.LastSelObj.element.setActive(); } }catch(e){} } } },  m31e69:function(ve9b87) { var v5b170 =ISGetObject(ve9b87.childNodes[0].gridId); if (v5b170.LayoutSettings.AutoWidth) wg30210.m94b54(ve9b87.childNodes[0]);  if (IS.moz)wg62d36.m12446(v5b170); },  m6e712:function(v71e85) { var v42751 =v71e85.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); var v06e21 =v42751.scrollTop +v42751.offsetHeight; wg30210.m7c16(v42751.childNodes[0]);  var vc5345 =ISGetObject(v42751.childNodes[0].gridId); var v77838 =vc5345.Tables[v42751.childNodes[0].tblName]; var v28e4 =v77838.GetElement(WG40.COLHEADER,WG40.HTMLDIV);  if (vc5345.LayoutSettings.AutoFitColumns) v28e4.scrollLeft =0;  if (v28e4.scrollLeft !=v42751.scrollLeft) { wg30210.m94b54(v42751.childNodes[0]); v28e4.scrollLeft =v42751.scrollLeft; if (v77838.Get("ColumnFooters")=="Yes") { var vbf521 =v77838.GetElement(WG40.COLFOOTER,WG40.HTMLDIV); vbf521.scrollLeft =v42751.scrollLeft; } } if (vc5345.LastEditObj) { var v30598 =vc5345.LastEditObj.element; vc5345.ExitEditMode(); }  var v9f35 =(wg30210.m1bc52(v42751)? 17 : 0)+v42751.scrollHeight; if (v42751.scrollHeight <v42751.offsetHeight)return; if (v06e21+2 >=v9f35) { if (v77838.GroupedColumns.length >0)return; if (!vc5345.IsInProgress &&vc5345.LayoutSettings.PagingMode !="None")wg30210.mb0d0(v42751.childNodes[0].gridId,"More"); } },  m0a462:function() { if (wg_Global.GlobalResizeID !=0) { clearTimeout(wg_Global.GlobalResizeID); wg_Global.GlobalResizeID =0; } else wg30210.ma9650();  wg_Global.GlobalResizeID =setTimeout("wg30210.ma9650()",50); },  ma9650:function() { var vf781 =wg30210.m9052(); for (var ve8e44=0; ve8e44<vf781.length; ve8e44++) { var v5f441 =vf781[ve8e44];  if (IS.ie) { if (v5f441.LayoutSettings.AutoHeight) { v5f441.NeedHeightResize =true; wgf1447.m9d451(v5f441.FrameObj); } else  { if (v5f441.FrameObj.style.height !="") { if (v5f441.FrameObj.style.height.indexOf("%")>0) { v5f441.CacheTBodyHeight =null; } }  } if (v5f441.LayoutSettings.AutoWidth) { v5f441.NeedWidthResize =true; wgf1447.m78298(v5f441.FrameObj); } } else { wg62d36.m12446(v5f441); } if (v5f441.LayoutSettings.AutoFitColumns &&v5f441.FrameObj.style.width.indexOf("%")>=0) { if (v5f441.TempResizeID !=0) clearTimeout(v5f441.TempResizeID); setTimeout("wgf1447.m4d236('" +v5f441.Name +"')",500); } } },  me9c95:function(v37d51) { if ((v37d51.LastEditObj ||v37d51.ActiveEditCell)&&!v37d51.IsExitingEdit) { var v54926 =v37d51.LastEditObj; var v92d55 =v37d51.ActiveEditCell; var v33c89 =v37d51.Tables[ ((v54926)? v54926.tblName : v92d55.tblName)]; var vdbc43 =v33c89.Get("AllowEdit")=="Yes";  var v2ae39;  if (v54926) v2ae39 =v54926.cellElement.parentElement; else v2ae39 =v92d55.rowElement; if (vdbc43 &&v2ae39.type =="Record") { if (v54926)wg99e67.md6792(v54926); } } },  m94126:function(v55f79) { v55f79.IsInProgress =true; v55f79.SetBusy(); },  ma4d64:function(vd9a29,v10451) { var v51c96 =vd9a29.LastSelObj; if (vd9a29.IsOnBlur)return; if (!vd9a29.Get("Visible"))return; if (!ISEvent.Raise(vd9a29.LayoutSettings.ClientSideEvents.OnFocus,vd9a29.Id)) return; if (v10451) wg_Global.ActiveGrid =vd9a29.Name; if (wg30210.mad387(v51c96)) { var vd5588 =vd9a29.Tables[v51c96.tblName]; var v8a752 =vd5588.Get("CellClickAction"); if (v51c96.type =="Row" ||v8a752 =="RowSelect") { wga3a74.m9ba48(v51c96.GetRowElement(),""); var v76a75 =vd9a29.ActiveEditCell; if (v76a75 &&wgIsSameRow(v76a75.rowElement,v51c96.GetRowElement())) { wg99e67.m04261(v76a75.element,"Redraw"); vd9a29.EnsureActiveEditCellFocus(); } else { var vfdf96 =wgGetCellByPosition(v51c96.element,0); vfdf96.setActive(); } } else  { var vd5588 =vd9a29.Tables[v51c96.tblName]; wga3a74.m08f13(v51c96.element,vd5588.GetSelRowStyle(),vd5588.GetFocusCellStyle(),"",true); v51c96.element.setActive(); } } else  { if (v10451) { wg_Global.ActiveGrid =vd9a29.Name; var vf6213 =vd9a29.GetRootTable().GetElement(WG40.BODY,WG40.HTMLTABLE); if (vf6213.rows.length >0) { wga3a74.m0a482(wgGetCellByPosition(vf6213.rows[0],0),true); wgGetCellByPosition(vf6213.rows[0],0).setActive(); } } } },  m9052:function() { var vdb190 =new Array(); for(var v2c631=0; v2c631<IS.RuntimeObjects.length;v2c631++) { var v0a562 =IS.RuntimeObjects[v2c631]; if (v0a562.ClassName =="WebGrid" &&v0a562.Version =="4.0.6200") vdb190[vdb190.length] =v0a562; } return vdb190; },  m08f98:function(v3c580) { var v2d099 =wg30210.m03a49(v3c580); var v72583 =ISGetObject(v2d099); return v72583; },  m0b118:function(veda24) { var vfbd80 =wg30210.ma1652(veda24); var v3ad73 =wg30210.m03a49(veda24); var v9ab92 =ISGetObject(v3ad73); var v07a36 =v9ab92.Tables[vfbd80];  return v07a36; },  mcd887:function(vd4533) { var v53b88 =wgGetColNameByCell(vd4533); var v7b125 =vd4533.parentElement; if (v53b88) { var v6ed88 =ISGetObject(wg30210.m03a49(v7b125)); var v1fc91 =v6ed88.Tables[wg30210.ma1652(v7b125)]; return v1fc91.Columns.GetNamedItem(v53b88); }  return null; },  mfd249:function(vefd94) { var vdc249 =wg30210.mf1728(vefd94); if (vdc249) { var vec05 =wg30210.m62624(vdc249); if (vec05) { var v43354 =wgGetColNameByCell(vefd94); return vec05.GetCell(v43354); } } return null; },  m62624:function(vf4a19) { var v32594 =wg30210.mf1728(vf4a19); if (v32594) { var vaa426 =wg30210.ma1652(v32594); var v12269 =wg30210.m03a49(v32594); var v4cb65 =ISGetObject(v12269); var v04021 =v4cb65.Tables[vaa426]; if (v04021.IsUseColumnSet) v32594 =wgGetRootRow(v32594);   return v04021.ToRowObject(v32594); }  return null; },  mad387:function(vcb564) { if (vcb564){ if (vcb564.element){ try { var v71683 =vcb564.GetRowElement(); var vbc868 =vcb564.element; if (vcb564.type =="Row"){ if (v71683.rowIndex !=-1){ return true; } }else { if (vbc868.cellIndex !=-1 )return true; } }catch (e){return false;} } } return false; },  ma2919:function(v83128) { if (v83128.tagName =="TR" ||v83128.tagName =="TD") return wg30210.m44c63(v83128).subId; else if (v83128.tagName =="TABLE") return v83128.subId;  },  m03a49:function(v48c44) { return wg30210.m44c63(v48c44).gridId; },  ma1652:function(vfd444) { return wg30210.m44c63(vfd444).tblName; },  m44c63:function(v53e72) { var vb2e44 =v53e72.parentElement; while (vb2e44 &&vb2e44.tagName !="TABLE"){ vb2e44 =vb2e44.parentElement; } if (vb2e44 &&IS.moz)wg62d36.ma4d45(vb2e44); return vb2e44; },  m94b54:function(v84158) { var v49689 =ISGetObject(v84158.gridId); var v6fd70 =v49689.Tables[v84158.tblName]; var v0c580 =v6fd70.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var vc0d32 =v0c580.rows[0].cells[v0c580.rows[0].cells.length-1];  if (wg30210.m1bc52(v84158.parentElement)) { if (!vc0d32.locked) wg30210.me6313(v6fd70,vc0d32,'17px'); }else { if (!vc0d32.locked) wg30210.me6313(v6fd70,vc0d32,'100%'); } if (v49689.LayoutSettings.Hierarchical) { if (v49689.GetMaxWidth()>v49689.FrameObj.offsetWidth) { if (!vc0d32.locked) { v49689.FixPadColumnWidth(); } } else  { var v10056 =v49689.GetRootTable(); var v81822 =v10056.GetElement(WG40.COLGROUP); var v21e3 =v81822.childNodes[v81822.childNodes.length-1]; v21e3.width ="100%"; wg30210.me6313(v6fd70,vc0d32,'100%'); vc0d32.locked =false; } } },  m1bc52:function(v78439) { if (v78439.offsetHeight !=v78439.clientHeight)return true; else return false;  },  HasHSBar: function(v0533) { if (v0533.offsetWidth !=v0533.clientWidth)return true; else return false;  },  me6313:function(vec683,v05a14,ve6290) { if (vec683.IsUseColumnSet) { var v34d3 =vec683.GetElement(WG40.COLHEADERGROUP); var v7d923 =v34d3.childNodes[v34d3.childNodes.length-1]; v7d923.width =ve6290; } else { v05a14.style.width =ve6290; } if (vec683.Get("ColumnFooters")=="Yes") { var v34d3 =vec683.GetElement(WG40.COLFOOTERGROUP); var v7d923 =v34d3.childNodes[v34d3.childNodes.length-1]; v7d923.width =ve6290; } },  m0d468:function(v9fb28) { if (!v9fb28)return null; while (v9fb28.tagName !="TD") { try  { v9fb28 =v9fb28.parentElement; if (!v9fb28)return null; } catch (e){return null;} } return v9fb28; },  mf1728:function(vecd9) { while (vecd9 &&vecd9.tagName !="TR") vecd9 =vecd9.parentElement;  return vecd9; },  m05534:function(vd5f53,v3e246) { var v1b173 =vd5f53.parentElement; for (var v65a55=0; v65a55<v3e246-1; v65a55++) v1b173 =v1b173.parentElement; return v1b173; },  m3f088:function(v59a62,vf8597) { if (vf8597.rowIndex ==v59a62.rows.length-1)return null; var vd2a98 =v59a62.rows[vf8597.rowIndex+1]; if (vd2a98) wg30210.m7c16(vd2a98); return vd2a98; },  mda498:function(vd2642,v84d88) { if (v84d88.rowIndex ==0)return null; var v22642 =vd2642.rows[v84d88.rowIndex-1]; if (v22642) wg30210.m7c16(v22642); return v22642; },  GetChildNodes: function(v3eb23,v37a78) { var va8542 =v3eb23.childNodes[0]; for (var vb9688=0; vb9688<v37a78-1; vb9688++) va8542 =va8542.childNodes[0]; return va8542; },  mb0d0:function(v84037,va0531,v1b093) { var v55251 =ISGetObject(v84037); var v3c739 =v55251.XmlHttp; var v21279 =""; var v63b80 =v84037; if (v55251.IsPreviewMode) { alert("Not supported in Preview mode!"); return; } v55251.XmlReq =ISXmlHttpEngine.CreateRequestXml(v55251.GetType()); wg30210.me9c95(v55251);  var v7ee59 =ISXml.GetNode(v55251.XmlReq,"//request"); v55251.RequestId =0;  if (v55251.IsInProgress) { if (va0531 =="More" &&v55251.LastAction =="AddRow")return; if (va0531 =="UpdateRow" &&v55251.LastAction =="LoadChild") { v55251.NextQueue =[va0531,v1b093]; return; }  if (v55251.LayoutSettings.InProgressUIBehavior =="DisplayMessageBox") alert(v55251.GetString("MessageBoxText/InProgress")); return; } if (!ISEvent.Raise(v55251.LayoutSettings.ClientSideEvents.OnBeforeRequest,v63b80,va0531)) return;  v7ee59.setAttribute("id",v63b80); v55251.TempLRO =v1b093; switch (va0531) { case "More": if (!wg7b565.m2e786(v55251,v7ee59,v63b80))return false; break; case "LoadGroup": if (!wg7b565.m30e5(v55251,v7ee59,v63b80,v1b093))return false; break; case "ColumnSort": if (!wg7b565.m3fa5(v55251,v7ee59,v63b80,v1b093))return false; break; case "Group": if (!wg7b565.m22e32(v55251,v7ee59,v63b80,v1b093,"Group"))return false; break; case "Ungroup": if (!wg7b565.m22e32(v55251,v7ee59,v63b80,v1b093,"Ungroup"))return false; break; case "ChangeGroup": if (!wg7b565.m22e32(v55251,v7ee59,v63b80,v1b093,"ChangeGroup"))return false; break; case "ColumnFilter": if (!wg7b565.m77c5(v55251,v7ee59,v63b80,v1b093))return false; break; case "LoadChild": if (!wg55c21.m9be23(v55251,v7ee59,v63b80,v1b093))return false; break; case "ColumnChange": if (!wg7b565.m63396(v55251,v7ee59,v63b80,v1b093))return false; break; case "Refresh": if (!wg7b565.m2874(v55251,v7ee59,v63b80))return false; break; case "RefreshAll": if (!wg7b565.m24a63(v55251,v7ee59,v63b80))return false; break; case "Custom": if (!wg7b565.m6806(v55251,v7ee59,v63b80))return false; break; case "AddRow": if (!wg99e67.m8d327(v55251,v7ee59,v63b80,v1b093))return false; break; case "UpdateRow": if (!wg99e67.m71976(v55251,v7ee59,v63b80,v1b093))return false; break; case "DeleteRow": if (!wg99e67.m8da40(v55251,v7ee59,v63b80,v1b093))return false; break; case "Export": if (!wg7b565.m10c89(v55251,v7ee59,v63b80,v1b093))return false; break; case "ButtonClick": if (!wg7b565.m8e554(v55251,v7ee59,v63b80,v1b093))return false; break; case "ChildTableRefresh": if (!wg55c21.m3ed64(v55251,v7ee59,v1b093))return false; break; case "LoadSelfRefChild": if (!wg7b565.m92121(v55251,v7ee59,v63b80,v1b093))return false; break; } v55251.LastRequestObj =v1b093; v55251.LastAction =va0531; var v1fa38 =v55251.XmlHttp.Asynchronous; v3c739.Send();  if (v1fa38) { wg30210.m94126(v55251); } },  m1251:function(vb117,v81064) { vb117.LastError =v81064;  if (!ISEvent.Raise(vb117.LayoutSettings.ClientSideEvents.OnUnhandledError,vb117.Name,vb117.LastAction,vb117.LastRequestObj,vb117.LastError)) return;  var v30b62 =v81064; if (v30b62.indexOf("Server Error")>=0 ||v30b62.indexOf("Stack Trace")>=0) { wgf1447.m8b026(vb117,v81064,vb117.GetString("MessageBoxText/UnhandledError")); } else  { if (v30b62 !="") { var v20243 =IS.GetFormAction(v30b62); window.location =v20243; return; } else  { wgf1447.m8b026(vb117,"Unable to communicate with server.","Unhandled exception."); } } vb117.IsInProgress =false; vb117.SetIdle(); vb117.SetStatus1("","readyerror","CommonText/ReadyError"); },  m3d291:function(v09646,v5d328) {  var v8aa51 =v09646.XmlResp; var v56f85 =ISXml.GetNodeText(v8aa51,"//status"); if (!ISEvent.Raise(v09646.LayoutSettings.ClientSideEvents.OnResponse,v09646.Id,v56f85)) return; if (v56f85 =="Error") { alert(ISXml.GetNodeText(v8aa51,"//error")); wg30210.m25a80(v09646); v09646.SetStatus1("","ready","CommonText/Ready"); v09646.SetIdle(); v09646.IsInProgress =false; return ; } var v8ce70 =ISXml.GetNodeText(v8aa51,"//action");  if (!ISEvent.Raise(v09646.LayoutSettings.ClientSideEvents.OnActionDispatched,v09646.Id,v8ce70)) return;  switch (v8ce70) { case "More": wg7b565.m16e21(v09646,v8aa51); break; case "LoadGroup": wg7b565.mae174(v09646,v8aa51); break; case "ColumnSort": wg7b565.m6e937(v09646,v8aa51); break; case "Group": case "Ungroup": case "ChangeGroup": case "ColumnChange": wg7b565.m66896(v09646,v8aa51); break; case "ColumnFilter": wg7b565.m31719(v09646,v8aa51); break; case "LoadChild": wg55c21.m65241(v09646,v8aa51); break; case "Refresh": wg7b565.m1f162(v09646,v8aa51); break; case "RefreshAll": wg7b565.m80a61(v09646,v8aa51); break; case "Custom": if (typeof(wgCustomActionResponse)=="function") wgCustomActionResponse(v09646,v8aa51); break; case "AddRow": wg99e67.m22a59(v09646,v8aa51); break; case "UpdateRow": wg99e67.m70b25(v09646,v8aa51); break; case "DeleteRow": wg99e67.m3aa95(v09646,v8aa51); break; case "Export": wg7b565.m40390(v09646,v8aa51); break; case "ButtonClick": wg7b565.m9a092(v09646,v8aa51); break; case "ChildTableRefresh": wg55c21.m6e231(v09646,v8aa51); break; case "LoadSelfRefChild": wg7b565.m49459(v09646,v8aa51); break; } v09646.IsInProgress =false;  var va3721 =v8aa51.selectSingleNode("//clientScripts"); if (va3721) { var v25472 =va3721.text; if (v25472 !="") { var v80572 =v25472.split(");"); for (var vcb693=0; vcb693<v80572.length; vcb693++) { if (v80572[vcb693] !="") { var v08f97 =v80572[vcb693]; if (v08f97.indexOf("(")>=0) v08f97 +=")"; eval(v08f97); } } } }  if (!ISEvent.Raise(v09646.LayoutSettings.ClientSideEvents.OnAfterResponseProcess,v09646.Name,v8ce70,v09646.LastRequestObj,v8aa51)) return;  v09646.LastRequestObj =null; v09646.TempLRO =null; v09646.SetIdle(); if (v09646.NextQueue) { wg30210.mb0d0(v09646.Name,v09646.NextQueue[0],v09646.NextQueue[1]); v09646.NextQueue =null; } },  m53836:function(v23a25,va1a12) { var v9dc91 =v23a25.LastSelObj; v23a25.IsOnBlur =true; if (!ISEvent.Raise(v23a25.LayoutSettings.ClientSideEvents.OnLostFocus,v23a25.Name)) return; if ((v23a25.LastEditObj ||v23a25.ActiveEditCell)&&!v23a25.IsExitingEdit) { var v43949 =v23a25.LastEditObj; var v13e96 =v23a25.ActiveEditCell;  var vdbc85;  if (v43949) vdbc85 =v43949.cellElement.parentElement; else vdbc85 =v13e96.rowElement; if (wgIsRowDirty(vdbc85)||wgIsRowMarkedEdit(vdbc85)) { var vd0985 =v23a25.ExitEdit(3)[2]; if (!vd0985) { if (vdbc85.type =="NewRow") { wg99e67.m04261(v13e96.element,"Clear",v13e96.element); wg99e67.m74b60(v23a25,vdbc85); } wga3a74.mdd416(vdbc85,v23a25.GetCurSelImage()); } try  { va1a12.focus(); } catch(e){} } else  { v23a25.ExitEditMode(true); } }  if (v9dc91) { if (v9dc91.type =="Row") wga3a74.m9ba48(v9dc91.GetRowElement(),"",true); else  { wga3a74.m08f13(v9dc91.element,v23a25.GetBlurRowStyle(),"0px","",true); } } var vb5325 =function(){v23a25.IsOnBlur =false;}; window.setTimeout(vb5325,50); }, mf4d45:function(vd0266,v89d83) { for (var vf3a86=0; vf3a86<vd0266.attributes.length; vf3a86++) { if (v89d83.indexOf(vd0266.attributes[vf3a86].name )==-1) { vd0266.removeAttribute(vd0266.attributes[vf3a86].name ); vf3a86--; } } },  m62028:function(v2af70) { var vd3411 =v2af70.XmlDt; var v1a74 =vd3411.documentElement; var v67154 =v2af70.LastSelObj;  if (v67154 &&v67154.element) { var vc1087 =ISXml.GetNode(vd3411,"//selectedObject"); if (vc1087) v1a74.removeChild(vc1087);  var vac298 =vd3411.createNode(1,"selectedObject",""); var vef568 =v67154.GetRowElement();  if (!vef568 ||vef568.rowIndex ==-1 ||vef568.type =="NewRow" ||vef568.type =="FilterRow")return; vef568 =wgGetRootRow(vef568); vac298.setAttribute("tblName",v67154.tblName); vac298.setAttribute("type",v67154.type); vac298.setAttribute("rowIndex",vef568.position); vac298.setAttribute("cellIndex",v67154.cellIndex); vac298.setAttribute("parentIndex",wgf1447.mdb875(vef568));  ISXml.CreateCDATA(vd3411,vac298,"keyValue",(vef568.keyValue ? vef568.keyValue : ""));  var va4c1 =v2af70.Tables[v67154.tblName]; if (va4c1.HasMultiPrimaryKey &&vef568.type =="Record") { var va3757 =wgGetKeyValues(vef568); vac298.setAttribute("keyCount",va3757.length); for (var vee470=0; vee470<va3757.length;vee470++) { ISXml.CreateCDATA(vd3411,vac298,"keyValue" +vee470,va3757[vee470]); } } v1a74.appendChild(vac298); } else  { ISXml.RemoveNode(v1a74,"selectedObject"); } }, m78a83:function(v77479) { var v3f234 =v77479.StateRestorationLevel; var v9579 =v77479.GetXml().xml; if (v3f234 !="High") { var v55d28 =ISXml.CreateXmlDocument(); ISXml.LoadXml(v55d28,v77479.XmlDt.xml); var vce471 =ISXml.GetNode(v55d28,"//LayoutSettings"); var vbc688 ="TotalLoadedRows,TotalRows";  for (var vcc532=0; vcc532<vce471.childNodes.length; vcc532++) { vce471.removeChild(vce471.childNodes[vcc532]); vcc532--; } if (v3f234 =="Low") { var v59a72 ="Name,DataMember,IsRootTable,DataKeyField"; var v4ab68 ="FilterBarVisible,Culture,Hierarchical"; var vafb62 ="Name,IsGrouped,IsSorted,Visible,Width,EditType,WebComboID,ColumnType,FilterEditType"; var vf425 =["BrowserPrintSettings","FlyPostBackSettings","UtilizedCustomEditors","WebCombos"]; var v99178 =["PreviewRowSettings","ColumnSetSettings","SelfReferencingSettings","FocusCellStyle"];  wg30210.mf4d45(v55d28.documentElement,vbc688); wg30210.mf4d45(vce471,v4ab68);  for (sTbl in v77479.Tables) { var v9db31 =v77479.Tables[sTbl]; var v84413 =null;  if (v9db31.IsRootTable) v84413 =v55d28.selectSingleNode("//RootTable"); else v84413 =v55d28.selectSingleNode("//WebGridTable[@Name='" +v9db31.Id +"']");  wg30210.mf4d45(v84413,v59a72);  for (var tNode in v99178) ISXml.RemoveNode(v84413,v99178[tNode]);  var vb7f63 =v84413.selectNodes("Columns/WebGridColumn"); for (var v06e67=0; v06e67<vb7f63.length; v06e67++) wg30210.mf4d45(vb7f63[v06e67],vafb62); }  for (var node in vf425) ISXml.RemoveNode(v55d28.documentElement,vf425[node]); }  v9579 =v55d28.xml; v55d28 =null; } v77479.CustomStateString =v9579; var va2a42 =document.getElementById(v77479.xmlInputHiddenUniqueID); if (va2a42 ==null)va2a42 =document.getElementById(v77479.xmlInputHiddenUniqueID.replace(/:/g,"_")); if (va2a42 ==null)va2a42 =document.getElementById(v77479.xmlInputHiddenUniqueID.replace(/\$/g,"_"));  if (va2a42 !=null) va2a42.value =escape(v9579); }, m25a80:function(v77a68) { switch (v77a68.LastAction) { case "AddRow": var vc9f23 =v77a68.LayoutSettings.ResetNewRowValuesOnError; var v74096 =v77a68.LastSelObj.GetRowElement(); var v29149 =v77a68.LastRequestObj.RowElement;  if (vc9f23 ||(v29149 &&!wgIsSameRow(v74096,v29149))) { try  { wg99e67.m74b60(v77a68,v29149); if (wgIsSameRow(v74096,v29149)) wga3a74.mdd416(v29149,v77a68.GetCurSelImage()); } catch(e){}; } break;  case "UpdateRow": var v29149 =v77a68.LastRequestObj; wg99e67.m56816(v29149.RowElement); break; } }, m29927:function(v2eb7) { var vbd412 =v2eb7.XmlDt; for(table in v2eb7.Tables) { var vc5c38 =v2eb7.Tables[table]; var vb5579 =vc5c38.GetRowCheckerColumn(); if (vb5579) { var v28199 =vc5c38.GetCheckedRows(); if (v28199.length >0) { var v2b614 =vc5c38.XmlNode; ISXml.RemoveNode(v2b614,"checkedRows");  var vca037 =ISXml.GetNode(v2b614,"checkedRows"); if (!vca037)vca037 =ISXml.CreateNode(vbd412,v2b614,"checkedRows",""); for (var vcbe69=0; vcbe69<v28199.length; vcbe69++) { var v22684 =ISXml.CreateNode(vbd412,vca037,"rowKV","");  if (vc5c38.HasMultiPrimaryKey) { var vb3476 =wgGetKeyValues(v28199[vcbe69]); for (var v9a267=0; v9a267<vb3476.length; v9a267++) { ISXml.CreateCDATA(vbd412,v22684,"keyValue" +v9a267,vb3476[v9a267]); } } else  { ISXml.CreateCDATA(vbd412,v22684,"keyValue",v28199[vcbe69].keyValue); } } } else  { var v2b614 =vc5c38.XmlNode; ISXml.RemoveNode(v2b614,"checkedRows"); } } } },  ReplaceXmlNode: function(vb2896,v5f123,vbc719) { var vcf988 =v5f123.indexOf("<" +vb2896 +">"); var va6172 =v5f123.indexOf("</" +vb2896 +">"); if (vcf988 >=0 &&va6172 >=0 &&va6172 >vcf988) { var ve1922 =v5f123.substring(0,vcf988); var ve614 =v5f123.substring(va6172 +vb2896.length +3); return ve1922 +"<" +vb2896 +">" +vbc719 +"</" +vb2896 +">" +ve614; } }, m15792:function(v9bc93) { }};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: "SortAsc.gif", SortDescImage: "SortDesc.gif", SelectColumnImage : "SelectColumns.gif", GroupImage: "GroupByThisField.gif", GroupByBoxImage : "GroupByBox.gif", EditImage : "wg_Edit2.gif", CopyImage : "wg_Copy.gif", DeleteImage : "wg_Delete.gif", UpdateImage : "wg_Update.gif", CancelImage : "wg_Cancel.gif", FilterRowImage : "wg_FilterRow.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],["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"), ErrorBox : null, LastKeyDownProcessed : false, IsDragObjectValid : false, GlobalResizeID: 0};function InitWG40(v8ec29,v4f154){ var v74465 =wg30210.m25379(v8ec29); v74465.NeedFocus =v4f154; v74465.OnInitialize();}var posLib2 ={ getLeftAbs: function(vbba36,v30589){ if (IS.moz) { var vbb78 =ISPosLib.getLeftNonIE(vbba36); if (v30589) { if (v30589.PosRelativeTo) { vbb78 +=ISPosLib.getLeftNonIE(v30589.PosRelativeTo); } } return vbb78; }  if (v30589 &&v30589.LayoutSettings.UseRelativePositioning) { return ISPosLib.getLeft(vbba36); }  var vbb78 =vbba36.style.posLeft; var vd9d14 =vbba36.parentElement; vbb78+=ISPosLib.getBorderLeftWidth(vbba36); if (vd9d14){ if (vd9d14.style.position.toLowerCase()=="absolute") vbb78+=vd9d14.style.posLeft; } if (v30589){ if (v30589.PosRelativeTo){ vbb78 +=ISPosLib.getLeft(v30589.PosRelativeTo); } } return vbb78; },  getTopAbs: function(vff278,v97160){ if (IS.moz) { var va1097 =ISPosLib.getTopNonIE(vff278); if (v97160) { if (v97160.LayoutSettings.UseRelativePositioning) { return va1097; } if (v97160.PosRelativeTo) { va1097 +=ISPosLib.getTopNonIE(v97160.PosRelativeTo); } if (v97160.FrameObj.style.position !="absolute") return 0; }  if (vff278.style.position =="absolute" ||vff278.style.position =="relative") return va1097; else return 0; } if (v97160 &&v97160.LayoutSettings.UseRelativePositioning) { return ISPosLib.getTop(vff278); }  var va1097 =vff278.style.posTop; var v64644 =vff278.parentElement; va1097+=ISPosLib.getBorderTopWidth(vff278); if (v64644){ if (v64644.style.position.toLowerCase()=="absolute") va1097+=v64644.style.posTop; } if (v97160){ if (v97160.PosRelativeTo){ va1097 +=ISPosLib.getLeft(v97160.PosRelativeTo); } } return va1097;  }};function WebGridCoreDestructor(){ wg_Global =null; delete wg_Global;  var vcf710 =delete wg30210;}window.attachEvent("onunload",WebGridCoreDestructor);