
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 
// Generated Datetime : 8/23/2006 3:40:11 PM
// Copyright (c) 2005 Intersoft Solutions.
// Unauthorized decryption/reproduction of any codes contained herein is strictly prohibited and will result in severe civil and criminal penalties .
//**Start Encode**
var WG40 ={ COLHEADER: "CH",COLFOOTER: "CF",BODY: "TB",COLHEADERGROUP : "CHG", COLFOOTERGROUP : "CFG", COLGROUP: "CG", GROUPBYBOX: "GBB", GROUPBYBOXLABEL: "GBBInfo", STATUSBOX: "Status", STATUSBAR: "Stat", STATUSBARRIGHT: "Stat2", STATUSICON : "StatIcon", STATUSBARCOMMAND : "Stat3", HTMLDIV: "dv", HTMLTABLE: "tb", HTMLCELL: "td", HTMLROW: "tr"};function WebGrid(vcc319){ 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,vcc319); 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 =vcc319; 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) { wgad280.m5ba36(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 v7993=0; v7993<this.UtilizedCustomEditors.length; v7993++) this.CustomEditors[this.UtilizedCustomEditors[v7993].Name] =this.UtilizedCustomEditors[v7993];  if (typeof(ISGetCultureInfo)=="function") this.CultureInfo =ISGetCultureInfo(this.LayoutSettings.Culture,false);  this.SetStatus1("","ready","CommonText/Ready"); var ve3a40 =this.TotalLoadedRows; var vba913 =this.TotalRows;  if (vba913 <ve3a40)ve3a40 =vba913; this.SetStatus2("","loaded",ve3a40,vba913);  var v34629 =ISXml.GetNode(this.LayoutSettings.XmlNode,"//FocusCellStyle"); this.LayoutSettings.XmlNode.removeChild(v34629);  var v8d06 =this.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); if (v8d06 &&v8d06.style.display =="none") v8d06.style.display ="block";  v8d06 =null; }; this.OnUnload =function() { wg54183.m50640(this); Listener.Unload(this.FrameObj); Listener.Unload(this.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); }; this.__getter =function(v5e639) { switch (v5e639) { case "Visible": return (this.FrameObj.style.display ==""); } };  this.ReBindingPostBackData =function() { wg54183.mbb245(this); wg54183.m15140(this); };  this.PrepareAdditionalPostBackData =function() { wg54183.m51512(this);  };  this.OnResponseError =function(v56a76) { wg54183.mf1869(this,v56a76); };  this.OnResponse =function(v56a76) { wg54183.m9ee95(this,v56a76); };  this.GetFocusControl =function() { var ve7858 =document.getElementById(this.Id +"_Moz"); ve7858.grid =this; return ve7858; };   this.IsRightToLeft =function() { var v2a068 =this.FrameObj.currentStyle.direction; return v2a068 =="rtl"; };  this.EnsureActiveEditCellFocus =function() { if (typeof(wgd4b96)!="undefined") wgd4b96.m32b79(this); };  this.EditKeyboardHandler =function(v68578) { wgd4b96.m0ac87(this,v68578); };  this.GetRootTable =function() { return this.RootTable; };  this.GetMaxWidth =function() { var v2ef96 =this.GetRootTable().GetElement(WG40.BODY,WG40.HTMLTABLE).offsetWidth; var v7da38 =v2ef96; var vb9e21; for (vb9e21 in this.Tables) { var v91b51 =this.Tables[vb9e21]; if (typeof(v91b51)!="function") v7da38 =Math.max(v7da38,v91b51.GetMaxWidth()); }  return v7da38; };  this.GetRootTableWidth =function() { var v34f4 =this.GetRootTable().GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var v15b17 =v34f4.rows[0].cells[v34f4.rows[0].cells.length-1]; return v34f4.offsetWidth -v15b17.offsetWidth; }; this.GetPreferredRootTableWidth =function() { var v34f4 =this.GetRootTable().GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var v15b17 =v34f4.rows[0].cells[v34f4.rows[0].cells.length-1]; if (v15b17.style.width.indexOf("%")>0) return v34f4.offsetWidth -v15b17.offsetWidth; else return v34f4.offsetWidth; };   this.FixPadColumnWidth =function() { if (this.GetMaxWidth()>this.GetRootTableWidth()) { var v5f37 =this.GetMaxWidth()-this.GetRootTableWidth()+50; var vdc18 =this.GetRootTable(); var v5bc1 =vdc18.GetElement(WG40.COLGROUP); var v36558 =v5bc1.childNodes[v5bc1.childNodes.length-1]; v36558.width =v5f37; var v9cf82 =v36558.width;  if (wg54183.m4fd40(this.GetRootTable().GetElement(WG40.BODY,WG40.HTMLDIV))) v9cf82 +=17; v5bc1 =vdc18.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); v36558 =v5bc1.rows[0].cells[v5bc1.rows[0].cells.length-1]; wg54183.me0011(vdc18,v36558,v9cf82); v36558.locked =true; } };  this.GetColumnByElement =function(v1c249){return wg54183.mdeb77(v1c249); }; this.GetCellByElement =function(v1c249){return wg54183.m55278(v1c249); }; this.GetRowByElement =function(v1c249){return wg54183.m52846(v1c249); };  this.GetElement =function(v8dd5,vbb684) { if (vbb684 ==WG40.HTMLROW) { var vaab87 =this.GetElement(v8dd5,WG40.HTMLCELL); return vaab87.parentElement; } else { return document.getElementById(vbb684 +v8dd5 +"_" +this.Name); } }; this.SetStatus1 =function(v0c638,v1833,v7eb96) { if (this.LayoutSettings.StatusBarVisible) { if (v7eb96 !="" &&!this.IsPreviewMode) { var vc196 =this.LayoutSettings.TextSettings.TextItems.GetItemByProperty("TextItem",v7eb96); if (vc196)v0c638 =vc196.TextValue;  if (v0c638 !="") { if (v0c638 =="none")v0c638 =""; } else  { v0c638 =this.GetString(v7eb96);  if (typeof(v0c638)=="undefined" ||v0c638 ==null) { var v4a690=this; setTimeout(function(){v4a690.SetStatus1("",v1833,v7eb96);},100 ); return; }  } }  this.GetElement(WG40.STATUSBAR,WG40.HTMLCELL).innerText =v0c638; } };  this.SetStatus2 =function(v0c638,v1833,v23d67,v65728) { if (this.LayoutSettings.StatusBarVisible) { if (v1833 =="loaded") { v0c638 =this.GetLoadedText(v1833,v23d67,v65728); if (typeof(v0c638)=="undefined") { var v4a690=this; setTimeout(function(){v4a690.SetStatus2(v0c638,v1833,v23d67,v65728);},100 ); return; } } else  { var v1bc48 =this.GetString(v1833); if (v1bc48 !="") v0c638 =v1bc48; } this.GetElement(WG40.STATUSBARRIGHT,WG40.HTMLCELL).innerText =v0c638; } };  this.SendCustomRequest =function() { wg54183.md3516(this.Name,"Custom"); };  this.ClearSelectedObject =function(v87b49) { if (v87b49 &&this.LastSelObj !=null) { wg3bc89.me5432(this.LastSelObj.element,"","","Clear"); var v45232 =wgGetRowHeader(this.LastSelObj.element); if (v45232) v45232.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 v84265 =this.GetDefaultLanguageXml(); var v77863 =this.LayoutSettings.TextSettings.Language;  if (v77863 =="UseCulture") { var v8a720 =document.getElementById("WGLang_" +this.LayoutSettings.Culture); if (!v8a720)return v84265; else return v8a720; } else if (v77863 =="UseCustom") { var v8a720 =document.getElementById("WGLang_" +this.LayoutSettings.TextSettings.UseLanguage); if (!v8a720)return v84265; else return v8a720; } return v84265; }; this.GetString =function(v7eb96) { var v56a76 ="";  if (this.IsPreviewMode)return v7eb96;  var vc196 =this.LayoutSettings.TextSettings.TextItems.GetItemByProperty("TextItem",v7eb96); if (vc196)v56a76 =vc196.TextValue; if (v56a76 =="") { var v8a720 =this.GetLanguageXml(); if (IS.moz &&!this.LanguageXml) { v8a720 =ISMoz.ConvertToXmlObject(v8a720); this.LanguageXml =v8a720; }  if ((IS.moz &&v8a720.xml =="")||(IS.ie &&v8a720.readyState !="complete")) return null;  var va5252 =ISXml.GetNode(v8a720,"//" +v7eb96); if (va5252)v56a76 =va5252.text; } return v56a76; };  this.GetLoadedText =function(v1833,v23d67,v65728) { var v0c638 =""; try  { v0c638 =this.GetString("CommonText/Loaded"); if (v0c638 ==null)v0c638 =v0c638.substring(0,1); }catch(e) { var v23e49=this; setTimeout(function(){v23e49.GetLoadedText(v1833,v23d67,v65728);},100); return; }  v0c638 =v0c638.replace("[n]",v23d67); v0c638 =v0c638.replace("[total]",v65728);  if (v23d67 ==0 ||v65728==0) wgad280.mf435(this); else wgad280.m5ba36(this); return v0c638; };  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 v01546 =false; for(v91b51 in this.Tables) { var vb9e21 =this.Tables[v91b51]; if (typeof(vb9e21)!="function" &&vb9e21.GroupedColumns.length >0) { v01546 =true; break; } }  return v01546; };  this.ActivateEditMode =function(vea124) { return wgd4b96.mb5317(this,vea124); };  this.ExitEditMode =function(v1ad96) { return wgd4b96.m4cd3(this.LastEditObj,v1ad96); };  this.ValidateRow =function(v0f215) { return wgd4b96.me3746(this,v0f215); };  this.ExitEdit =function(v7ed99,v51137,vbcd90) { return wgd4b96.mbe614(this,v7ed99,v51137,vbcd90); };  this.UpdateState =function() { };  this.ShowGroupByBox =function() { var v08934 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (v08934) { var vba913 =v08934.parentElement; this.NeedHeightResize =true; vba913.style.display ="";  if (IS.moz) { var vb4e98 =this; window.setTimeout(function(){wg9451.mee252(vb4e98);},100); } } };  this.HideGroupByBox =function() { var v08934 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (v08934) { var vba913 =v08934.parentElement; this.NeedHeightResize =true; vba913.style.display ="none";  if (IS.moz) { var vb4e98 =this; window.setTimeout(function(){wg9451.mee252(vb4e98);},100); } } };  this.IsGroupByBoxShown =function() { var v08934 =this.GetElement(WG40.GROUPBYBOX,WG40.HTMLTABLE); if (v08934) { var vba913 =v08934.parentElement; return vba913.style.display ==""; } return false; };  this.ShowFilterBar =function() { var v45b6 =this.GetRootTable().GetFilterRow(); var vc3e73 =new Array(); if (wgIsColumnSetRow(v45b6)) vc3e73 =wgGetColumnSetRows(v45b6); else vc3e73[0] =v45b6;  this.LayoutSettings.Set("FilterBarVisible",true,true);  for(var v7993=0;v7993<vc3e73.length;v7993++) vc3e73[v7993].style.display =""; if (IS.moz) { var vb4e98 =this; window.setTimeout(function(){wg9451.mee252(vb4e98);},100); } }; this.HideFilterBar =function() { var v45b6 =this.GetRootTable().GetFilterRow(); var vc3e73 =new Array(); if (wgIsColumnSetRow(v45b6)) vc3e73 =wgGetColumnSetRows(v45b6); else vc3e73[0] =v45b6; this.LayoutSettings.Set("FilterBarVisible",false,true);  for(var v7993=0;v7993<vc3e73.length;v7993++) vc3e73[v7993].style.display ="none";  if (IS.moz) { var vb4e98 =this; window.setTimeout(function(){wg9451.mee252(vb4e98);},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 v15233 =document.getElementById(this.Name +"_ImgB"); if (!v15233) { v15233 =document.createElement("IMG"); v15233.id =this.Name +"_ImgB"; v15233.style.cssText ="z-index: 299; filter2:alpha(opacity=0); position:absolute; height:50px; width:50px;"; v15233.src =this.LayoutSettings.ImageSettings.Folder +"wg_blank.gif"; document.body.appendChild(v15233); } v15233.style.display =""; v15233.style.cursor ="wait"; this.FrameObj.onmousemove =function(){wg54183.mcec14(v15233);}; }  };  this.SetIdle =function() { if (this.LayoutSettings.StatusBarVisible) document.getElementById("tdStatIcon_" +this.Name).childNodes[0].style.visibility ="hidden";  if (this.LayoutSettings.InProgressUIBehavior =="ChangeCursorToHourGlass") { var v15233 =document.getElementById(this.Name +"_ImgB"); v15233.style.cursor ="default"; v15233.style.display ="none"; this.FrameObj.onmousemove =null; } };  this.ClearChildTables =function(v54110) {  if (v54110) { var vc2950 =this.Tables[v54110].GetChildTables(); for (var v7993=0; v7993<vc2950.length; v7993++) { var v50d81 =this.Tables[vc2950[v7993].Id]; v50d81.SubTableIds =new Array(); } } else  { var vdc18 =this.GetRootTable(); var v5bc1 =vdc18.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var v8fb4 =vdc18.GetElement(WG40.COLHEADER,WG40.HTMLDIV);  if (!this.IsRightToLeft()) v8fb4.scrollLeft =0; else v8fb4.scrollLeft =v8fb4.scrollWidth;  var v36558 =v5bc1.rows[0].cells[v5bc1.rows[0].cells.length-1]; v36558.locked =false;  for (childTbl in this.Tables) { if (typeof(this.Tables[childTbl])!="function") this.Tables[childTbl].SubTableIds =new Array(); } } };  this.GetBlurRowStyle =function() { var v94893 =this.LayoutSettings.LostFocusClass; if (v94893 =="") return "background-color: gainsboro"; else return IS.GetCssText(this.Id,v94893); };  this.GetEditFocusStyle =function() { var v94893 =this.LayoutSettings.EditFocusClass; if (v94893 =="") return "background-color: white;"; else return IS.GetCssText(this.Id,v94893); };  this.GetXml =function() { return this.XmlDt; };  this.MarkEdit =function() { wgd4b96.m8ff21(this); };  this.GetCurSelImage =function() { return this.LayoutSettings.ImageSettings.Folder +this.LayoutSettings.ImageSettings.CurrentRowImage; }; this.Show =function() { this.FrameObj.style.display =""; wgad280.md9015(this.Name); if (this.NeedFocus)wg54183.m56817(this,true); };  this.SetFocus =function() { wg54183.m56817(this,true); };  this.Hide =function() { this.FrameObj.style.display ="none"; }; this.ExportGrid =function(vcd829,v6fb5,v35027,vd0d52) { wg54183.md3516(this.Name,"Export",new Array(vcd829,v6fb5,v35027,vd0d52)); }; this.GetActiveEditCell =function() { return this.ActiveEditCell; };  this.GetLastEditObject =function() { return this.LastEditObj; };  this.SetHeight =function(v76e40) { wgad280.mcdb70(this,v76e40); };}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 v25160 =this.BorderStyle; if (v25160 =="NotSet")v25160 =""; v25160 =v25160.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 " +v25160; } else { var vda272 =IS.GetCssObject(null,this.CssClass); if (vda272) { if (vda272.borderColor =="")vda272.borderColor ="transparent"; if (vda272.borderWidth =="")vda272.borderWidth ="0"; if (vda272.borderStyle =="")vda272.borderStyle ="none"; return "border: " +vda272.borderColor +" " +vda272.borderWidth +"px " +vda272.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(v04d36){ 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 =v04d36; 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(vb2f72) { if (vb2f72 !=null) wg54183.mdf49(vb2f72);  this.CellElement =vb2f72; this.Table =this.Row.Table; this.SubTable =this.Row.SubTable; this.Grid =this.Table.Grid;  var v0e687 =wgGetColNameByCell(vb2f72); this.Column =this.Table.GetColumn(v0e687); this.Name =v0e687;  if (vb2f72.contentMode) this.ContentMode =vb2f72.contentMode;  var v0be90 =vb2f72.innerText; if (this.ContentMode =="HTML") { var v53287 =wg3bc89.m6e675(vb2f72); if (v53287) v0be90 =v53287.innerHTML; else v0be90 =vb2f72.innerHTML;  if (v0be90 !="") { var v6446 =new RegExp("\r\n","g"); v0be90 =v0be90.replace(v6446,""); } }  if (v0be90 ==" ")v0be90 =""; if (this.Column.ColumnType =="ImageAndText" &&v0be90.substring(0,1)==" ")v0be90 =v0be90.substring(1); this.Text =v0be90;  if (this.Column.ColumnType =="ImageAndText") { var v53287 =wg3bc89.m6e675(vb2f72); if (v53287) { if (v53287.children[0].tagName =="SPAN") this.Image =v53287.children[0].children[0].src; else if (v53287.children[0].tagName =="IMG") this.Image =v53287.children[0].src; } } if (this.Column.ColumnType !="CheckBox") { if (vb2f72.cellValue) this.Value =vb2f72.cellValue; else this.Value =this.Text; } else { this.Value =vb2f72.cellValue; }  if (vb2f72.noEdit) this.ForceNoEdit =true;  if (vb2f72.cellModified) this.Modified =true; var vaa369 =(vb2f72.oldCellValue !="" &&typeof(vb2f72.oldCellValue)!="undefined"); this.OldText =(vb2f72.oldText ? vb2f72.oldText : ""); this.OldValue =(vaa369 ? vb2f72.oldCellValue : "");  this.DataChanged =(vb2f72.cellModified ==true ||(vaa369 &&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(v0ba92) { if (this.SubTable) { if (!v0ba92) v0ba92 =this.SubTable.GetConstraintXml();  var v3a211 =ISXml.GetNodes(v0ba92,"//DataColumn"); for (var ve457=0; ve457<v3a211.length; ve457++) { if (ISXml.GetAttribute(v3a211[ve457],"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(v0ba92) { if (this.IsForeignColumn(v0ba92)) { if (!v0ba92) v0ba92 =this.SubTable.GetConstraintXml();  return ISXml.GetNodeText(v0ba92,"//DataColumn[@name='" +this.Column.Name +"']"); }; return null; };  this.SetText =function(v68870,v19511) { this.Text =v68870; if (v19511) this.SetValue(v68870);  if (this.Row._UIState !="Added") { var v7cf75 =this.CellElement.innerHTML.indexOf("NOBR")>0; var vcc974 =wg3bc89.m6e675(this.CellElement); if (vcc974) v7cf75 =vcc974.innerHTML.indexOf("NOBR")>0;  var vae747 =(v7cf75 ? "<NOBR>" : "")+(v68870 =="" ? "&nbsp;" : _FixAmpChar(v68870))+(v7cf75 ? "</NOBR>" : ""); if (vcc974) vcc974.innerHTML =vae747; else this.CellElement.innerHTML =vae747; this.CellElement.cellModified =true; } this.DataChanged =true; this.Row.SetDataChanged(); };  this.SetValue =function(v2d183) { this.Value =v2d183; this.Modified =true;  if (this.Row._UIState !="Added") { this.CellElement.cellValue =v2d183; this.CellElement.cellModified =true; } this.Row.SetDataChanged(); };  this.SetForceNoEdit =function(v2d183) { if (typeof(v2d183)=="undefined")v2d183 =true;  if (v2d183) { this.ForceNoEdit =true; this.CellElement.noEdit ="True"; } else { this.ForceNoEdit =false; this.CellElement.removeAttribute("noEdit"); } };  this.Select =function(v2b42,v46a59) { if (!v2b42) wgd4b96.m21f13(this.CellElement); else { var v17129 =this.Table.GetSelRowStyle(); var v64f34 =this.Table.GetFocusCellStyle(); wg3bc89.m65847(this.CellElement,v17129,v64f34,"",v46a59); } };  this.ToXml =function() { if (this.DataChanged) { if (this.SubTable) { var v75924 =this.SubTable.GetConstraintXml(); if (this.IsForeignColumn(v75924)) { var v4013 =this.GetParentKeyValue(v75924); if (v4013) { this.Text =this.Value =v4013; } } }  var v51514 =this.OldText; if (v51514 !="")v51514 =v51514.replace(/<BR>/g,"\n"); var v52276 =this.Value; if (typeof(v52276)=="boolean")v52276 =(v52276)? "True" : "False";  if (this.Modified &&this.Column !=null &&this.Column.DataType =="System.Boolean" &&v52276 =="") v52276 ="False";  var v68870 ="<cell "; v68870 +="modified='" +this.Modified +"' colName='" +this.Column.Name +"'>"; v68870 +="<text>" +ISXml.EncodeString(this.Text)+"</text>"; v68870 +="<value>" +ISXml.EncodeString(v52276)+"</value>"; v68870 +="<oldtext>" +ISXml.EncodeString(v51514)+"</oldtext>"; v68870 +="<oldvalue>" +ISXml.EncodeString(this.OldValue)+"</oldvalue>"; v68870 +="</cell>"; return v68870; } 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(v46644) { if (v46644 =="OnInitialize") { this.Table =this.Parent; this.DefaultVisible =this.Visible; } };  this.GetDefault =function(ve1f27) { if (this[ve1f27] =="Default") { if (ve1f27 =="AllowSizing")ve1f27 ="AllowColumnSizing"; return this.Table.GetDefault(ve1f27); } else return this[ve1f27]; }; this.__getter =function(ve1f27) { switch (ve1f27) { case "AllowSorting": case "AllowGrouping": case "AllowSizing": return this.GetDefault(ve1f27); break; } };   this.__setter =function(ve1f27,va435,v29197) {  switch (ve1f27) { case "Width": var v61341 =null;  try {v61341 =this.GetElement(); }catch(e){}  if (v61341) { wgad280.m6421(this.Table,v61341,va435); } break; } };   this.GetGrid =function() { return this.Table.GetGrid(); }; this.GetElement =function(v74a2) { if (!this.Table.IsRootTable &&!v74a2) { if (this.GetGrid().HeaderContext !=null) v74a2 =wg54183.mc7086(this.GetGrid().HeaderContext);  if (!v74a2) { try { v74a2 =this.Table.SubTableIds[0].GetElement(WG40.COLHEADER,WG40.HTMLTABLE); }catch(e){} } }  var vf9e79 =this.Table.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v74a2); if (vf9e79) { var vc0389 =vf9e79.rows[0]; if (this.Table.IsUseColumnSet) { var va1f28 =this.Table.GetRowLayoutByColName(this.Name); var ve4b82 =va1f28.Row;  if (this.Table.IsColumnSetHeaderVisible())ve4b82++; vc0389 =vf9e79.rows[ve4b82]; } return wgGetCellByName(vc0389,this.Name); }  return null; };  this.Resize =function(v65774) { var v61341 =this.GetElement(); if (!v61341)return;  var v25a76 =v61341.parentElement; wgad280.m6421(this.Table,v61341,v65774,!this.Table.IsRootTable,true);  if (!this.Table.IsUseColumnSet) wgad280.mc4f87(this.Table,v25a76);  wgad280.m36e28(this.Table,"Resize",v61341,v65774); };  this.ResizeBestFit =function() { wgad280.mb5066(this.GetElement()); };  this.GetFilterEditType =function() { var v4f770 =this.FilterEditType; if (v4f770 =="SameAsEditType") v4f770 =this.EditType;  return v4f770; }; }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(v7b129,vf7732) { for (var vf6d93=0; vf6d93<this.Layout.length; vf6d93++) { if (this.Layout[vf6d93].Row ==v7b129 &&this.Layout[vf6d93].Col ==vf7732) return this.Layout[vf6d93]; }  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(v67132) { switch (v67132) { case "FilterText": return "CDATA"; default: return "Attribute"; } };  this.GetElement =function() { var vfae49 =this.Table.GetFilterRow(); if (vfae49) { return wgGetCellByName(vfae49,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 vc5132 =wgad280.m9fd0(this.Table.Grid.Id,this.Table.Name); var v4b182 =this.Table.Grid; if (vc5132) { var v6ff1 =vc5132.childNodes[0].childNodes[0].childNodes[0].childNodes[0]; for (var vffa32=0; vffa32<v6ff1.cells.length; vffa32++) { wg54183.mdf49(v6ff1.cells[vffa32]); if (v6ff1.cells[vffa32].colName ==this.ColumnMember &&v6ff1.cells[vffa32].type =="GroupColumn") { return v6ff1.cells[vffa32]; } } } return null; };}function WebGridRow(v87b80,v58d25){ this._Type ="WebGridRow"; ISObject.call(this); this.Table =v87b80; this.SubTable =v58d25; 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(vfd846) { this.RowElement =vfd846; this.Type =vfd846.type; this.Grid =this.Table.Grid;  if (vfd846.expanded &&vfd846.expanded =="True") this.GroupExpanded =true;  if (this.Type !="GroupHeader" &&this.Table.ChildTables.length >0) { var v1b260 =wgGetHierRecord(vfd846); if (v1b260 &&v1b260.childrenLoaded &&v1b260.childrenLoaded =="True") this.ChildrenLoaded =true; }  if (vfd846.noEdit &&vfd846.noEdit =="True") this.ForceNoEdit =true;  if (vfd846.keyValue) this.KeyValue =vfd846.keyValue;  if (vfd846.childExpanded &&vfd846.childExpanded =="True") { this.ChildExpanded =true; this.ChildrenLoaded =true; }  if (vfd846.isRowChecked) this.Checked =true;  if (vfd846.srLevel) { this.SelfRefLevel =parseFloat(vfd846.srLevel); this.IsSelfRefRow =true; }  if (vfd846.srRC) this.SelfRefRowCount =parseFloat(vfd846.srRC); if (vfd846.parentValue) this.SelfRefParentValue =vfd846.parentValue;  if (vfd846.relNames) this.RelNames =vfd846.relNames;  if (v87b80.HasMultiPrimaryKey) this.KeyValues =wgGetKeyValues(this.RowElement);  if (vfd846.srExpanded &&vfd846.srExpanded =="True") this.SelfRefExpanded =true;  this.ParentPos =wgad280.meca77(this.RowElement);  if (this.Type =="GroupHeader") this.GroupRowText =vfd846.innerText; if (this.Table.PreviewRowVisible) { var vfa80 =wgad280.m90f58(vfd846);  if (vfa80) { if (vfa80.expanded =="True") this.PreviewRowExpanded =true; } }  this.Position =parseFloat(vfd846.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 vee623 =new ISArray();  for (var v5e518=0; v5e518<this.Table.Columns.length; v5e518++) { var vd8380 =this.GetCell(this.Table.Columns[v5e518].Name); vee623[vee623.length] =vd8380; }  return vee623; };  this.GetCell =function(v54755) { var vefd83 =""; var v99c18 =-1; var vfd846;  if (typeof(v54755)=="string") vefd83 =v54755; else v99c18 =v54755;  if (vefd83) vfd846 =wgGetCellByName(this.RowElement,vefd83); else vfd846 =wgGetCellByPosition(this.RowElement,v99c18);  if (vfd846) { var v92a93 =new WebGridCell(this); v92a93.Setup(vfd846); return v92a93; }  return null; };  this.ExpandGroupRow =function() { this.GroupExpanded =true; wgExpandGroupRow(this.RowElement); };  this.CollapseGroupRow =function() { this.GroupExpanded =false; wgCollapseGroupRow(this.RowElement); };  this.ExpandChildRow =function(v33991) { if (v33991)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"; wgad280.ma4077(null,this.RowElement,null,true); };  this.CollapseSelfRefRow =function() { if (!this.IsSelfRefRow)return; this.SelfRefExpanded =false; this.RowElement.srExpanded ="True"; wgad280.ma4077(null,this.RowElement);  };  this.Select =function() { if (this.Table.IsRootTable) this.Table.SelectRow(this.RowElement); else this.SubTable.SelectRow(this.RowElement); };  this.GetChildRow =function(v72f11,vd8993) { if (!this.RowElement)return; if (!vd8993 &&this.Table.ChildTables.length ==0)return;  this.Synchronize();  if (!this.ChildrenLoaded)return; if (!vd8993)vd8993 =this.Table.ChildTables[0].Name;  var v99158 =this.Grid.Tables[vd8993]; var v86629 =v99158.GetSubIdByParentKey(this.RelNames);  if (v86629) { return v86629.GetRow(v72f11); } };  this.GetChildRows =function(vd8993) { if (!this.RowElement)return; if (!vd8993 &&this.Table.ChildTables.length ==0)return;  this.Synchronize();  if (!this.ChildrenLoaded)return; if (!vd8993)vd8993 =this.Table.ChildTables[0].Name;  var v99158 =this.Grid.Tables[vd8993]; var v86629 =v99158.GetSubIdByParentKey(this.RelNames);  if (v86629) { var vbb953 =new Array(); var v07750 =v86629.GetRowsCount(); for (var v5e518=0; v5e518<v07750; v5e518++) { vbb953[vbb953.length] =v86629.GetRow(v5e518); } return vbb953;  } };  this.GetParentRow =function() { if (this.SubTable) { var vfd846 =this.SubTable.GetParentRecordRow();  if (this.Table.Parent.IsRootTable) { if (this.Table.Parent.GroupedColumns.length >0) return this.Table.Parent.ToRowObject(vfd846); else return this.Table.Parent.GetRow(parseFloat(vfd846.position)); } else { var va4720 =this.Table.Parent; var v6667 =va4720.GetSubTableById(wg_getTableSubId(vfd846)); var vc0443 =new WebGridRow(va4720,v6667);  vc0443.Setup(vfd846); return vc0443; } } return null; };  this.GetGroupChildRows =function() { var v24e75 =new Array(); var vbcc6 =this.RowElement;  if (this.Type =="GroupHeader") { var cr,crType; var v8ee26; var v9fa11 =this.Table;  if (!this.Table.IsRootTable) v9fa11 =this.SubTable; v8ee26 =v9fa11.GetElement(WG40.BODY,WG40.HTMLTABLE); cr =wgGetNextRow(v8ee26,vbcc6); if (cr)crType =cr.type; else crType ="GroupHeader";  if (crType =="GroupHeader") { while (cr &&(cr.type =="GroupTotalRow" ||(cr.hasParent =='True' &&(parseFloat(cr.groupIndex)-1 ==parseFloat(vbcc6.groupIndex))&&cr.parentIndex ==vbcc6.position))) { v24e75[v24e75.length] =this.Table.ToRowObject(cr); cr =wgGetNextRow(v8ee26,cr);  while (cr &&(cr.type =="Record" ||cr.type =="PR" ||cr.type =="CSRecord" ||(cr.type =="GroupTotalRow" &&parseFloat(cr.groupIndex)-1 >parseFloat(vbcc6.groupIndex))||cr.type =="HierRecord" ||(cr.type =="GroupHeader" &&parseFloat(cr.groupIndex)-1 >parseFloat(vbcc6.groupIndex)))) cr =wgGetNextRow(v8ee26,cr); } } else if (crType =="Record") { while (cr &&(cr.type =='Record')) { v24e75[v24e75.length] =this.Table.ToRowObject(cr); cr =wgGetNextRow(v8ee26,cr); } }  return v24e75; } return null; };  this.GetNextRow =function() { var ve8178 =this.Position+1; if (this.Table.IsRootTable) return this.Table.GetRow(ve8178); else return this.SubTable.GetRow(ve8178); };  this.GetPreviousRow =function() { var v8440 =this.Position-1; if (v8440 <0)return;  if (this.Table.IsRootTable) return this.Table.GetRow(v8440); else return this.SubTable.GetRow(v8440); }; this.Update =function(v33991) { if (typeof(wgUpdateRow)=="undefined") { alert("WebGrid_Edit's library is not loaded. Make sure the grid has AllowEdit enabled."); return; }  if (v33991)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(v33991) { if (typeof(wgDeleteRow)=="undefined") { alert("WebGrid_Edit's library is not loaded. Make sure the grid has AllowEdit enabled."); return; }  if (v33991)this.Grid.XmlHttp.Asynchronous =false; wgDeleteRow(this); this.Grid.XmlHttp.Asynchronous =true;  };  this.Validate =function() { return wgd4b96.me3746(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 wgd4b96.m50b50(this.RowElement); };  this.AcceptChanges =function() { return wgd4b96.md5393(this.RowElement); };  this.BeginEdit =function() { return wgd4b96.m83b92(this.RowElement); }; this.SetForceNoEdit =function(v0f922) { if (typeof(v0f922)=="undefined")v0f922 =true;  if (v0f922) { this.ForceNoEdit =true; this.RowElement.noEdit ="True"; } else { this.ForceNoEdit =false; this.RowElement.removeAttribute("noEdit"); } };  this.Check =function() { try {wgad280.m49126(this.RowElement,true); }catch(e){} };  this.Uncheck =function() { try {wgad280.m49126(this.RowElement,false); }catch(e){} };  this.ExpandPreviewRow =function() { if (!this.PreviewRowExpanded) wgad280.made27(this.RowElement); };  this.CollapsePreviewRow =function() { if (this.PreviewRowExpanded) wgad280.made27(this.RowElement); };  this.ToXml =function() { var vadc34 ="";  if (this.Table.HasMultiPrimaryKey) vadc34 =ISXml.EncodeString(this.KeyValues); else vadc34 =ISXml.EncodeString(this.KeyValue);  var v00c32 ="<row keyValue=\"" +vadc34 +"\">"; var v43938 =this.Cells;  if (v43938 ==null)v43938 =this.GetCells();  for (var v5e518=0; v5e518<v43938.length; v5e518++) { if (v43938[v5e518]) v00c32 +=v43938[v5e518].ToXml(); }  v00c32 +="</row>"; return v00c32; }; }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 v09877 =this; do  { v09877 =v09877.Parent; if (v09877 &&v09877.GetType()=="WebGrid") { this.Grid =v09877; break; }  }while (v09877 !=null); } return this.Grid; };  this.OnPropertiesInitialized =function() { var v80230 =this.GetGrid(); v80230.Tables[this.Name] =this; this.Id =this.Name; this.GridId =this.Grid.Id; this.Layout =v80230.LayoutSettings; };  this.GetDefault =function(v25e1) { if (this[v25e1] =="Default" ||this[v25e1] =="NotSet" ||this[v25e1] =="" ||this[v25e1] ==-1) return this.Grid.LayoutSettings[v25e1]; else return this[v25e1]; }; this.__getter =function(v25e1) { switch (v25e1) { 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(v25e1); break; case "AllowFilter": if (this.IsRootTable) return this.GetDefault(v25e1); else return this.AllowFilter; break; } };  this.HasNextSiblingGroupedColumns =function() { if (this.IsRootTable)return false; var v07e74 =parseFloat(this.Position); var v73928 =this.GetParentTables(); if (v07e74 >=v73928.length-1)return false; for (var va5550=v07e74+1; va5550<v73928.length; va5550++) { var v9bb89 =v73928[va5550]; if (parseFloat(v9bb89.GroupedColumns.length)>0) return true; } return false;  };  this.HasChildTableGroupedColumns =function() { var v70218 =this.GetChildTables(); for(var va5550=0; va5550<v70218.length; va5550++) { if (v70218[va5550].GroupedColumns.length >0) return true;  if (v70218[va5550].HasChildTableGroupedColumns()) return true; } return false; };  this.GetParentTables =function() { var v9a930 =new Array();  for(table in this.Grid.Tables) { var vc4f10 =this.Grid.Tables[table]; if (typeof(vc4f10)!="function" &&!vc4f10.IsRootTable) { if (vc4f10.Parent.Name ==this.Parent.Name) v9a930[v9a930.length] =vc4f10; } }  return v9a930; }; this.GetChildTables =function() { var v70218 =new Array(); for(table in this.Grid.Tables) { var vc4f10 =this.Grid.Tables[table]; if (typeof(vc4f10)!="function" &&vc4f10.Parent.Name ==this.Name) v70218[v70218.length] =vc4f10; }  return v70218; };  this.GetParentTreeStructure =function() { var vfa880 =this.Parent.Name; var v03936 =new Array();  while (vfa880 !="") { var vdb97 =this.Grid.Tables[vfa880]; if (!vdb97)return v03936;  if (vdb97.HasNextSiblingGroupedColumns()) v03936[v03936.length] ="Continuos"; else v03936[v03936.length] ="Last"; var vfa880 =vdb97.Parent.Name; if (vfa880 !="" &&vdb97.IsRootTable)break; }  v03936.reverse(); return v03936; }; this.GetColumnGroupHeadersWidth =function() { var vc2381 =0;  if (!this.IsRootTable &&this.Parent.Get("RowHeaders")=="Yes") { vc2381 +=26; }  vc2381 +=(this.GroupedColumns.length *16);  if (this.Grid.LayoutSettings.Hierarchical) vc2381 +=22; if (this.Get("RowHeaders")=="Yes" ) vc2381 +=parseInt(this.Get("RowHeaderWidth"));  if (this.IsPreviewRowVisible &&this.PreviewRowSettings.Expandable) vc2381 +=parseInt(this.Get("RowHeaderWidth"));  return vc2381; };  this.GetParentHeadersWidth =function() { var v71456 =this; var vc2381 =0; while (v71456) { var vc1884 =null;  if (!v71456.IsRootTable)vc1884 =v71456.Parent.Name; var vdb97;  if (vc1884 !="" &&vc1884) { vdb97 =this.Grid.Tables[vc1884]; vc2381 +=vdb97.GetColumnGroupHeadersWidth(); if (vdb97.Get("RowHeaders")=="Yes") vc2381 -=parseInt(this.Get("RowHeaderWidth")); v71456 =vdb97; }else v71456 =null; } return vc2381; };  this.GetElement =function(v2e456,v81695,vdbd32) { if (v2e456 ==WG40.COLHEADER ||v2e456 ==WG40.COLFOOTER ||v2e456 ==WG40.BODY) { if (v81695 ==WG40.HTMLDIV) { if (this.IsRootTable) return document.getElementById(v81695 +v2e456 +"_" +this.Grid.Id +"_" +this.Id); else return document.getElementById(v81695 +v2e456 +"_" +this.Grid.Id +"_" +this.Id +"_" +wg54183.m92999(vdbd32)); } else { var vd8a53 =this.GetElement(v2e456,WG40.HTMLDIV,vdbd32); return vd8a53.childNodes[0]; } } else { var v1c745; if (v2e456 ==WG40.COLGROUP) v1c745 =this.GetElement(WG40.BODY,WG40.HTMLTABLE,vdbd32); else if (v2e456 ==WG40.COLHEADERGROUP) v1c745 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vdbd32); else if (v2e456 ==WG40.COLFOOTERGROUP) v1c745 =this.GetElement(WG40.COLFOOTER,WG40.HTMLTABLE,vdbd32);  return v1c745.childNodes[0]; } };  this.GetFilterRow =function(vdbd32) { if (!this.IsRootTable) return this.Grid.RootTable.GetFilterRow();  var v16770 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vdbd32); for (var va5550=0; va5550<v16770.rows.length; va5550++) { wg54183.mdf49(v16770.rows[va5550]); if (v16770.rows[va5550].type &&v16770.rows[va5550].type =="FilterRow") return v16770.rows[va5550]; } return null; };   this.GetNewRow =function(vdbd32) { var v16770 =this.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,vdbd32); for (var va5550=0; va5550<v16770.rows.length; va5550++) { wg54183.mdf49(v16770.rows[va5550]); if (v16770.rows[va5550].type &&v16770.rows[va5550].type =="NewRow") return v16770.rows[va5550]; } return null; };  this.GetSubTablePosById =function(vc5470) { for (var va5550=0; va5550<this.SubTableIds.length; va5550++) { if (this.SubTableIds[va5550].SubId ==vc5470) return va5550; } return -1; };  this.GetMaxWidth =function() { var vd6b14 =0;  if (this.SubTableIds) { for (var va5550=0; va5550<this.SubTableIds.length; va5550++) { var v7a576 =this.SubTableIds[va5550]; vd6b14 =Math.max(vd6b14,v7a576.Width); } }  return vd6b14; }; this.GetContainer =function(v3e928) { var v16770 =wg54183.m3471(v3e928); var v1a471 =wg54183.m46479(v16770,2); return v1a471; };  this.SelectRow =function(vc4f10) { var vdbd32; var vcff62 =null;  if (typeof(vc4f10)=="number")vdbd32 =this.GetElement(WG40.BODY,WG40.HTMLTABLE).rows[vc4f10];  else vdbd32 =vc4f10;  wg54183.mdf49(vdbd32);  if (wgIsRecordRow(vdbd32)||vdbd32.type =="FilterRow") vcff62 =wgGetCellByPosition(vdbd32,0); else if (vdbd32.type =="NewRow") vcff62 =vdbd32.cells[vdbd32.cells.length-1];  if (vcff62) { wg3bc89.m49e7(vcff62); vcff62.focus(); } };  this.GetSelRowStyle =function() { var va2350 =this.Get("SelectedRowClass"); return IS.GetCssText(this.Grid.Id,va2350); };  this.GetFocusCellStyle =function() { if (this.FocusCellStyle.BorderStyle =="NotSet") return this.Grid.LayoutSettings.FocusCellStyle.GetStyleText(); else return this.FocusCellStyle.GetStyleText(); };  this.GetCheckedRowStyle =function() { var ve1585 =this.CheckedRowClass; if (ve1585 =="")ve1585 =this.Grid.LayoutSettings.CheckedRowClass; if (ve1585 =="")return "";  return IS.GetCssText(this.Grid.Id,ve1585); };  this.GetColumn =function(v27245) { return this.Columns.GetNamedItem(v27245); };  this.IsFilterRowVisible =function() { var v21f59 =this.GetFilterRow(); return (v21f59.style.display ==""); };  this.GetFilterEditType =function(v37c81) { return this.GetColumn(v37c81).GetFilterEditType(); };  this.GetRowCheckerColumn =function() { var v18d99 =this.Columns; var v8f824 =""; for (var va5550=0;va5550<v18d99.length;va5550++) { if(v18d99[va5550].IsRowChecker) { v8f824 =v18d99[va5550].Name; break; } } return v8f824; };  this.GetCheckedRows =function() { var v57684 =this.GetRowCheckerColumn(); if (v57684) { var v6f621 =new Array(); var vf1694 =new Array(); if (this.IsRootTable) { vf1694[0] =this.GetElement(WG40.BODY,WG40.HTMLTABLE); } else  { for (var va5550=0; va5550<this.SubTableIds.length; va5550++) { vf1694[vf1694.length] =this.SubTableIds[va5550].GetElement(WG40.BODY,WG40.HTMLTABLE); } }  for (var v18037=0; v18037<vf1694.length; v18037++) { var v16770 =vf1694[v18037]; for (var va5550=0; va5550<v16770.rows.length; va5550++) { if (IS.moz) wg54183.mdf49(v16770.rows[va5550]);  if (v16770.rows[va5550].type =="Record" &&v16770.rows[va5550].isRowChecked) { v6f621[v6f621.length] =v16770.rows[va5550]; } } } return v6f621; } };  this.GetAutoWidthColumn =function() { var v18d99 =this.Columns; for (var va5550=0; va5550<v18d99.length; va5550++) { var v1fd53 =v18d99[va5550]; if (v1fd53.IsAutoWidth) return v1fd53; } return null; };  this.GetSubTableById =function(vc5470) { for (var va5550=0; va5550<this.SubTableIds.length; va5550++) { if (this.SubTableIds[va5550].SubId ==vc5470) return this.SubTableIds[va5550]; } return null; };  this.GetColNameByRowLayout =function(vd8f36,vf0487,ve1585) { var v59045 =this.ColumnSets[parseFloat(vd8f36)]; var vbdc44 =null;  for(var va5550=0; va5550<v59045.Layout.length; va5550++) { var v9c423 =v59045.Layout[va5550]; if (v9c423.Row ==vf0487 &&v9c423.Col ==ve1585) { vbdc44 =v9c423; break; } }  if (vbdc44) return vbdc44.ColumnMember;  return null; };  this.GetRowLayoutByColName =function(v5a911) { var vb3e85 =this.ColumnSets; for (var va5550=0; va5550<vb3e85.length; va5550++) { var v59045 =vb3e85[va5550];  for (var v18037=0; v18037<v59045.Layout.length; v18037++) { if (v59045.Layout[v18037].ColumnMember ==v5a911) return v59045.Layout[v18037]; } } return null; };  this.GetRowLayoutByIndex =function(vb5731,vf0487,ve1585) { var v59045 =this.ColumnSets[vb5731];  for(var va5550=0; va5550<v59045.Layout.length; va5550++) { var v9c423 =v59045.Layout[va5550]; if (v9c423.Row ==vf0487 &&v9c423.Col ==ve1585) return v9c423; }  return null; };  this.GetColHeaderSpanCount =function() { var v15198 =0; if (!this.IsRootTable)v15198++; v15198 +=this.GroupedColumns.length;  if (this.Layout.Hierarchical)v15198++; if (this.Layout.RowHeaders =="Yes")v15198++; if (this.PreviewRowVisible &&this.PreviewRowSettings.Expandable)v15198++; return v15198; };  this.GetCSCellPosByIndex =function(v59045,vf0487,ve1585,v17f90) { var vb3e85 =this.ColumnSets; var v15198 =0;  for (var va5550=0; va5550<v59045; va5550++) { var v45348 =vb3e85[va5550]; if (v45348.Visible)v15198 +=parseInt(v45348.ColumnCount); }  if (v17f90) { var v9c423 =this.GetRowLayoutByIndex(v59045,vf0487,ve1585); var vcdd56 =v9c423.ColSpan; if (vcdd56 &&parseInt(vcdd56)>1) v15198 +=parseInt(vcdd56)-1; } return v15198 +parseInt(ve1585); }; this.GetCSHeaderCellPosByIndex =function(v61582) { var vb3e85 =this.ColumnSets; var v15198 =0; var v59045 =v61582.pos;  for (var va5550=0; va5550<v59045; va5550++) { var v45348 =vb3e85[va5550]; if (v45348.Visible)v15198 +=parseInt(v45348.ColumnCount); }  return v15198; };  this.GetCSHeaderWidth =function(vb5731) { var v59045 =this.ColumnSets[vb5731]; var vc2381 =0; for (var va5550=0; va5550<v59045.ColumnCount; va5550++) { var v9c423 =this.GetRowLayoutByIndex(vb5731,0,va5550); vc2381 +=parseInt(v9c423.Width); } return vc2381; };  this.GetColumnSetByPos =function(vb5731) { return this.ColumnSets[vb5731]; };  this.UpdateRowLayoutWidth =function(vd6072,ve1585,vc2381) { var v59045 =this.GetColumnSetByPos(vd6072); var v95928 =v59045.Layout; for (var va5550=0; va5550<v95928.length; va5550++) { var v9c423 =v95928[va5550]; if (v9c423.Col ==ve1585) { v9c423.Set("Width",vc2381,true); } } };  this.GetParentRow =function(v3e928) { var vdbd32; try  { var v16770 =wg54183.m3471(v3e928); var v86642 =wg54183.m46479(v16770,4); v16770 =wg54183.m3471(v86642); vdbd32 =wgGetPreviousRow(v16770,v86642); vdbd32 =wgGetRootRow(vdbd32); } catch (e){vdbd32 =null;}; return vdbd32; };  this.GetRecursiveParentRowPosition =function(v3e928) { var v86642 =this.GetParentRow(v3e928); var v76f27 =wgad280.meca77(v86642); var vf1c25 ="";  while (v86642 !=null) { wg54183.mdf49(v86642); vf1c25 +=v86642.position +"_"; v86642 =this.GetParentRow(v86642); if (!v86642 ||!v86642.type)v86642 =null; }  if (vf1c25 !="")vf1c25 =vf1c25.substring(0,vf1c25.length-1); if (v76f27 !="")vf1c25 +="_" +v76f27;  return vf1c25; };  this.CreateFormula =function(v8f824,v7171) { var v07838 =false; for (var va5550=0; va5550<this.Formulas.length; va5550++) { if (this.Formulas[va5550].colName ==v8f824) { v07838 =true; break; } } if (!v07838) { this.Formulas[this.Formulas.length] =new wgFormula(this.GridId,this.Id,v8f824,v7171); } else  { alert("The formula for column '" +v8f824 +"' is already exist."); } };  this.Refresh =function() { if (this.IsRootTable) this.GetGrid().Refresh(); else  wg54183.md3516(this.GetGrid().Name,"ChildTableRefresh",this.Id); };  this.GetDataKeyFieldsCount =function() { return this.DataKeyFieldsCount; };  this.GetTableElementRowsCount =function(v62093) { var v61582 =this.GetElement(WG40.BODY,WG40.HTMLTABLE,v62093); if (v61582) { return v61582.rows.length; } };  this.GetRowsCount =function() { var v15198 =this.GetTableElementRowsCount(); var vf8a84 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); if (v15198 ==0)return 0;  var vdbd32 =vf8a84.rows[v15198-1]; var v77d94 =wgGetRootRow(vdbd32); return parseFloat(v77d94.position)+1; };  this.ToRowObject =function(vdbd32) { var v4bc70 =new WebGridRow(this); v4bc70.Setup(vdbd32);  if (!this.IsRootTable) { var va8822 =wg54183.m92999(vdbd32); v4bc70.SubTable =this.GetSubTableById(va8822); }  return v4bc70; };  this.GetRow =function(vb5731) { if (this.IsRootTable) { var vf8a84 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var vdbd32 =wgGetRowByPositionExact(vf8a84,vb5731,vb5731);  if (!vdbd32)return null;  var v4bc70 =new WebGridRow(this); v4bc70.Setup(vdbd32);  return v4bc70; } return null; };    this.GetRowByKeyValue =function(vd0433) { if (this.IsRootTable) { var vf8a84 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var vdbd32 =null;  for (var va5550=0; va5550<vf8a84.rows.length; va5550++) { var vf0487 =vf8a84.rows[va5550]; wg54183.mdf49(vf0487); if (wgIsRecordRow(vf0487)&&vf0487.keyValue ==vd0433) { vdbd32 =vf0487; break; } }  if (!vdbd32)return null;  var v4bc70 =new WebGridRow(this); v4bc70.Setup(vdbd32);  return v4bc70;  } else { var vdbd32 =null;  for (var va5550=0; va5550<this.SubTableIds.length; va5550++) { var v7a576 =this.SubTableIds[va5550]; var vf0487 =v7a576.GetRowByKeyValue(vd0433);  if (vf0487) return vf0487; } }  return null; };  this.GetRowByGroup =function(v80e52,v92d9,v9b467) { if (this.IsRootTable) { var vf8a84 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var vdbd32 =wgGetRowByGroup(vf8a84,v80e52,v92d9,v9b467);  if (!vdbd32)return null;  var v4bc70 =new WebGridRow(this); v4bc70.Setup(vdbd32);  return v4bc70; } };  this.GetSubIdByParentKey =function(vee863) { for (var va5550=0; va5550<this.SubTableIds.length; va5550++) { if (this.SubTableIds[va5550].RelNames ==vee863) return this.SubTableIds[va5550]; } };   this.NewRow =function(v2c882) { var vdbd32 =new WebGridRow(this,v2c882); var v1d664 =new ISArray();  for(var va5550=0; va5550<this.Columns.length; va5550++) { var vcff62 =new WebGridCell(vdbd32); vcff62.Name =this.Columns[va5550].Name; vcff62.Column =this.Columns[va5550]; v1d664[v1d664.length] =vcff62; }  vdbd32.Cells =v1d664; vdbd32._UIState ="Added"; vdbd32.Grid =this.Grid;  return vdbd32; };  this.GetSelfRefParent =function(v3e928) { var v16770 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); return wgad280.m17093(v16770,v3e928); };  this.GetGroupRows =function() { var v16770 =this.GetElement(WG40.BODY,WG40.HTMLTABLE); var v3e928 =v16770.rows[0]; var v02f22 =v3e928; var v8eb22 =new Array(); if (v16770.rows.length ==0)return null;  while (v02f22) { if (v02f22.type =="GroupHeader" &&v02f22.groupIndex =="0") { var vf0487 =this.ToRowObject(v02f22); v8eb22[v8eb22.length] =vf0487; } v02f22 =wgGetNextRow(v16770,v02f22); }  return v8eb22; };  this.UpdateUI =function() { wgad280.maa060(this); };  this.IsColumnSetHeaderVisible =function() { var v94692 =this.ColumnSetSettings.ShowHeaders; if (v94692 =="Default") v94692 =this.Layout.ColumnSetHeaders; return v94692 =="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(v2b674){ return ISGetObject(v2b674);}function wg_getGridNameByRow(v41b74){ return wg54183.m8859(v41b74);}function wg_getTableNameByRow(vffb57){ return wg54183.m3fa51(vffb57);}function wg_getTableSubId(v6a157){ return wg54183.m92999(v6a157);}function wg_getTable(vf8257){ return wg54183.m3471(vf8257);}function wgGetTable(vc2857){ return wg54183.m3471(vc2857);}function wgDoResize(){ wg54183.m6ae69();}function wgMouseCoord(vde157,v09465){ this.x =vde157; this.y =v09465; 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(v82290,v08540,v89c57,v07049){ this.isValid =true; this.nonValidMsg =null; this.colName =v89c57; this.gridId =v82290; this.tblName =v08540; this.formula =v07049; this.affectedColumns =new Array(); this.skipErrorMessage =false; this.table =null; this.valueOnError =0; var v4c029 =v07049.indexOf("["); var v1b34 =0; while (v4c029 >=0) { v1b34 =v07049.indexOf("]",v4c029); this.affectedColumns[this.affectedColumns.length] =v07049.substring(v4c029+1,v1b34); v4c029 =v07049.indexOf("[",v1b34); } this.table =ISGetObject(this.gridId).Tables[this.tblName]; for (var vcc893=0; vcc893<this.affectedColumns.length; vcc893++) { var vaa513 =this.table.GetColumn(this.affectedColumns[vcc893]);  if (!vaa513 ||!vaa513.Visible) { this.isValid =false; break; } } this.GetResult =function(v22145) { if (this.isValid) { var vbab6 =this.formula; for (var vcc893=0; vcc893<this.affectedColumns.length; vcc893++) { var v6a845 =wgGetCellByName(v22145,this.affectedColumns[vcc893]); var vaa513 =this.table.GetColumn(wgGetColNameByCell(v6a845)); var v45595 =v6a845.innerText;  if (vaa513.DataFormat !="") v45595 =wgGetUnMask(ISGetObject(this.gridId),vaa513,v6a845);  vbab6 =vbab6.replace(new RegExp(this.affectedColumns[vcc893],"g"),v45595); }  vbab6 =vbab6.replace (/[\[\]]/g,"");  var v18d67; try  { v18d67 =eval(vbab6); } catch (e) { v18d67 =this.valueOnError; } return v18d67; } 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(v22145,v36875) { if (this.IsCellAccounted(v36875)) { var v18d67 =this.GetResult(v22145); var v6a845 =wgGetCellByName(v22145,this.colName); var vaa513 =this.table.GetColumn(wgGetColNameByCell(v6a845)); if (vaa513.DataFormat !=""){ v6a845.cellValue =v18d67; v6a845.innerText =wgGetMask(ISGetObject(this.gridId),null,String(v18d67),this.table,v6a845); } } }; this.IsCellAccounted =function(v36875) { var v89c57 =wgGetColNameByCell(v36875); for (var vcc893=0; vcc893<this.affectedColumns.length; vcc893++) { if (v89c57 ==this.affectedColumns[vcc893]) return true; } return false; }; return this;}function wgGetChildTableByRow(vc7f9,v5ac4){ var v40c34 =wg54183.m3471(vc7f9); var v1a515 =wgGetNextRow(v40c34,vc7f9); var vb5091 =v1a515.cells[v1a515.cells.length-1]; var vd0d5 =vb5091.childNodes[0]; var va1d57 =document.getElementById("dvTB_" +vd0d5.gridId +"_" +v5ac4 +"_" +vd0d5.subId).childNodes[0]; return va1d57;}function wgMoveColArgs(v1a181,v4de43,v33580,v08e53,v0d124,v9499){ this.table =v1a181; this.c1 =v4de43; this.c2 =v33580; this.tr =v08e53; this.cdt =v0d124; this.th =v9499; return this;}function wgShowHelp(v47811){ var vaf939 =ISGetObject(v47811); var v9a872 =vaf939.LayoutSettings.HelpURL;  if (v9a872 =="")
 v9a872 ="http://www.intersoftpt.com/WebGrid/Help.aspx";
  window.open(v9a872,null,"toolbar=no, menubar=no, scrollbars=yes, resizable=yes");}function wgGetCellCount(v16686){ if (v16686) { var v60795; var v7df51 =0; if (v16686.tagName =="TR") v60795 =v16686.cells; else if (v16686.tagName =="TD") v60795 =v16686;  for (var vf7b66=0; vf7b66<v60795.length; vf7b66++) { wg54183.mdf49(v60795[vf7b66]); if (v60795[vf7b66].type =="Cell" ||v60795[vf7b66].type =="GroupCell" ||v60795[vf7b66].type =="FilterColumn") v7df51++; } } return v7df51;}function wgGetCellByPosition(v2ba80,v97198){ if (v2ba80) { var v1b45; var v2a89 =-1; if (v2ba80.tagName =="TR") v1b45 =v2ba80.cells; else if (v2ba80.tagName =="TD") v1b45 =v2ba80;  for (var v40436=0; v40436<v1b45.length; v40436++) { wg54183.mdf49(v1b45[v40436]); if (v1b45[v40436].type =="Cell" ||v1b45[v40436].type =="GroupCell" ||v1b45[v40436].type =="FilterColumn") { v2a89++; } if (v97198 ==v2a89)return v1b45[v40436]; } } return null;}function wgGetCellByName(v2a521,v01c23){ if (v2a521) { var v26736; var vfbd77 =-1; var v7e273; if (v2a521.tagName =="TR") { v26736 =v2a521.cells; v7e273 =v2a521; } else if (v2a521.tagName =="TD") { v7e273 =v2a521.parentElement; v26736 =v2a521; }  var vca116 =wg54183.m3471(v2a521);  if (vca116) { var v7e332 =ISGetObject(vca116.gridId).Tables[vca116.tblName]; if (v7e332.IsUseColumnSet) { return wgGetCSCellByName(v7e273,v01c23); }  var v44382 =v7e332.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v2a521).rows[0]; var v45634 =-1;  for (var v0e893=0; v0e893<v44382.cells.length; v0e893++) { v26736 =v44382.cells; wg54183.mdf49(v26736[v0e893]); if ((v26736[v0e893].type =="Column")&&v26736[v0e893].colName ==v01c23 ) { v45634 =v0e893; break; } }  if (v45634 >=0) { return v2a521.cells[v45634]; } }  } return null;}function wgGetCellPosByName(v04752,v82a91){ if (v04752) { var v34160; var v61b43 =-1; if (v04752.tagName =="TR") v34160 =v04752.cells; else if (v04752.tagName =="TD") v34160 =v04752;  for (var vfed30=0; vfed30<v34160.length; vfed30++) { wg54183.mdf49(v34160[vfed30]); if ((v34160[vfed30].type =="Cell" ||v34160[vfed30].type =="GroupCell")) { if (v34160[vfed30] ==v82a91) { v61b43++; return v61b43; }else v61b43++; } } } return null;}function wgGetRowByPosition(v2a17,v40c70){ return v2a17.rows[v40c70];}function wgGetRowByPositionExact(v01c46,v06089,v4e752){ if (!v4e752)v4e752 =0; for (var v44627=v4e752; v44627<v01c46.rows.length; v44627++) { wg54183.mdf49(v01c46.rows[v44627]); if (wgIsRecordRow(v01c46.rows[v44627])&&v01c46.rows[v44627].position ==v06089) { var v39280 =(typeof(v01c46.rows[v44627].srLevel)=="string"); if (!v39280) return v01c46.rows[v44627]; else  { if (v01c46.rows[v44627].srLevel =="0") return v01c46.rows[v44627]; } } } return null;}function wgGetRootRow(v28c93){ if (!v28c93)return; wg54183.mdf49(v28c93); if (wgIsColumnSetRow(v28c93))return wgGetColumnSetRow(v28c93); else if (v28c93.type =="PR")return wgGetPreviewRowParent(v28c93); else return v28c93;}function wgGetColNameByCell(v39792){ var v9ba12 =v39792.parentElement; var v38027 =wg54183.m3471(v9ba12); var v9d28 =ISGetObject(v38027.gridId); var v92991 =v9d28.Tables[v38027.tblName]; var vc0428 =v92991.GetElement(WG40.COLHEADER,WG40.HTMLTABLE,v9ba12).rows[0].cells; if (!v92991.IsUseColumnSet) { for (var va8284=0; va8284<vc0428.length; va8284++) { if (IS.moz)wg9451.mf9c35(vc0428[va8284]); if (vc0428[va8284].type =="Column" &&vc0428[va8284].cellIndex ==v39792.cellIndex){ return vc0428[va8284].colName; } } } else  { if (typeof(v39792.cs)=="undefined")return null; return v92991.GetColNameByRowLayout(v39792.cs,v39792.r,v39792.c); }}function wgExpandGroupRow(vf7748,v74551){ if (v74551) { _wgExpAllGR(vf7748); return; } if (vf7748.type =="GroupHeader" &&vf7748.expanded =="False") { var v77f12 =ISGetObject(wg54183.m3471(vf7748).gridId ); wgad280.m13f0(v77f12,wgGetCellByPosition(vf7748,0).childNodes[0],vf7748.expanded); wgad280.m33b10(null,vf7748); }}function _wgExpAllGR(ve0a23){ wgExpandGroupRow(ve0a23); var vbe73 =wg54183.m3471(ve0a23); var v1c630 =wgGetNextRow(vbe73,ve0a23); while (v1c630) { if (v1c630.groupIndex ==ve0a23.groupIndex &&v1c630.style.display =="" &&v1c630.childrenLoaded !="False")wgExpandGroupRow(v1c630); v1c630 =wgGetNextRow(vbe73,v1c630); }}function wgCollapseGroupRow(vd2178,v61f18){ if (v61f18) { _wgColAllGR(vd2178); return; } if (vd2178.type =="GroupHeader" &&vd2178.expanded =="True") { var ve7a42 =ISGetObject(wg54183.m3471(vd2178).gridId ); wgad280.m13f0(ve7a42,wgGetCellByPosition(vd2178,0).childNodes[0],vd2178.expanded); wgad280.m33b10(null,vd2178); }}function _wgColAllGR(vfd653){ wgCollapseGroupRow(vfd653); var v1ca98 =wg54183.m3471(vfd653); var v9f728 =wgGetNextRow(v1ca98,vfd653); while (v9f728) { if (v9f728.groupIndex ==vfd653.groupIndex)wgCollapseGroupRow(v9f728); v9f728 =wgGetNextRow(v1ca98,v9f728); }}function wgExpandChildRow(v33173){ var vfcf53 =ISGetObject(wg54183.m3471(v33173).gridId ); var v8db7 =wg0bb8.meb755(v33173); wg0bb8.mfb793(vfcf53,v8db7,"False"); wg0bb8.m3f372(null,v33173);}function wgCollapseChildRow(v84973){ var v90f73 =ISGetObject(wg54183.m3471(v84973).gridId ); var v8d717 =wg0bb8.meb755(v84973); wg0bb8.mfb793(v90f73,v8d717,"True"); wg0bb8.m3f372(null,v84973);}function wgRefreshHierPosition(v0d483,v4c375,v81462,vf6b93,ve3d46){ if (ve3d46) wg0bb8.mbeb21(v0d483,v4c375,v81462,vf6b93); else { if (!v81462)return; var vbec9 =v81462.rowIndex; var v6d486 =vf6b93; var v18110 =v0d483.Tables[v4c375.tblName]; for (var vd6d28 =vbec9; vd6d28<v4c375.rows.length; vd6d28++){ var v3d024 =v4c375.rows[vd6d28]; if (v3d024.type =="Record"){ v3d024.position =v3d024.recordIndex =vf6b93; vf6b93++; } } }}function wgGetSelectedObjectFromEvent(vee744){ if (vee744) { var vef894 =vee744.srcElement; if (vef894.tagName !="TD") { origEl =vef894; vef894 =_wgGetTDElement(vef894); } if (!vef894)return null;  var v1f833 =vef894.parentElement; var v48732 =wg54183.m3471(v1f833); var v42699 =ISGetObject(v48732.gridId); var v53690 =v42699.Tables[v48732.tblName]; var vf6026 =v53690.Get("CellClickAction");  var v4d947;  if (vf6026 =="RowSelect") { v4d947 =new SelectedObject(v48732.tblName,v48732.gridId,vef894); v4d947.type ="Row"; v4d947.rowIndex =v1f833.rowIndex; } else if (vf6026 =="CellSelect") { v4d947 =new SelectedObject(v48732.tblName,v48732.gridId,vef894); v4d947.type ="Cell"; v4d947.rowIndex =v1f833.rowIndex; v4d947.cellIndex =wgGetCellPosByName(v1f833,vef894);  }  return v4d947;  } return null;}function wgIsColumnSetRow(v59c80){ if (typeof(v59c80.csRowPos)!="undefined") return true;  return false;}function wgGetPreviewRow(v1b055){ var vf0b64 =wg54183.m3471(v1b055); var vf1a20 =wgGetNextRow(vf0b64,v1b055);  while (vf1a20 &&vf1a20.type !="PR") vf1a20 =wgGetNextRow(vf0b64,vf1a20); return vf1a20;}function wgGetPreviewRowCell(v86591){ for (var v8b755=0; v8b755<v86591.cells.length; v8b755++) { if (v86591.cells[v8b755].type =="PRCell")return v86591.cells[v8b755]; } return null;}function wgIsValidCell(v4fe74){ if (!v4fe74)return false; if (v4fe74.type =="Cell" ||v4fe74.type =="GroupCell" ||v4fe74.type =="ECell" ||v4fe74.type =="PRExp" ||v4fe74.type =="PRCell" ||v4fe74.type =="FilterColumn")return true; return false;}function wgIsValidClickableCell(v01510){ if (!v01510)return false; if (v01510.type =="RowSelector" ||wgIsValidCell(v01510))return true; return false;}function wgIsValidRow(vee710){ if (!vee710)return false; if (vee710.type =="NewRow" ||vee710.type=="PR" ||vee710.type=="CSRecord" ||vee710.type =="Record" ||vee710.type =="FilterRow")return true; return false;}function wgGetPreviewRowParent(v90c85){ if (v90c85.type !="PR")return v90c85; var v90430 =wg54183.m3471(v90c85); var v16957 =wgGetGridById(v90430.gridId); var v6ba59 =v16957.Tables[v90430.tblName]; if (!v6ba59.IsUseColumnSet) return wgGetPreviousRow(v90430,v90c85); else return wgGetColumnSetRow(wgGetPreviousRow(v90430,v90c85)); return null;}function wgIsSameRow(va1696,v56994){ if ((va1696 ==null &&v56994 !=null)||(va1696 !=null &&v56994 ==null))return false; var vbf35 =wg54183.m3471(va1696); var v22e46 =wg54183.m3471(v56994); if (vbf35 ==v22e46) { var ve5411 =wgGetGridById(vbf35.gridId); var v6c565 =ve5411.Tables[vbf35.tblName]; if (!v6c565.IsUseColumnSet) { if (!v6c565.PreviewRowVisible) return va1696 ==v56994; else return wgGetPreviewRowParent(va1696)==wgGetPreviewRowParent(v56994); } else  { if (!v6c565.PreviewRowVisible) return wgIsSameColumnSetRow(va1696,v56994); else return wgIsSameColumnSetRow(wgGetPreviewRowParent(va1696),v56994); } } else  return false;  return false;}function wgIsSameColumnSetRow(vfb690,vd4593){ if (vfb690.type =="PR") { var v89151 =wg54183.m3471(vfb690); vfb690 =wgGetPreviousRow(v89151,vfb690); } if (vd4593.type =="PR") { var v47c73 =wg54183.m3471(vd4593); vd4593 =wgGetPreviousRow(v47c73,vd4593); } var va370 =wgGetColumnSetRow(vfb690); var v5cc13 =wgGetColumnSetRow(vd4593); if (va370 ==v5cc13)return true; return false;}function wgIsRecordRow(v37246){ if (v37246.type =="Record" ||v37246.type =="CSRecord")return true; return false;}function wgGetHierRecord(v1eb96){ var v69365 =wg54183.m3471(v1eb96); var vbb381 =wgGetGridById(v69365.gridId); var v59186 =vbb381.Tables[v69365.tblName]; var vfe41 =0; if (v59186.IsUseColumnSet) vfe41 +=v59186.ColumnSetSettings.RowCount-1; if (v59186.PreviewRowVisible) vfe41 +=1; vfe41+=1; var v4b07 =wgGetRootRow(v1eb96); for (var v2d054=0; v2d054<vfe41; v2d054++) v4b07 =wgGetNextRow(v69365,v4b07); if (v4b07 &&v4b07.type =="HierRecord")return v4b07; return null;}function wgGetRowByGroup(v6db73,ve8644,v83649,v38085){ var vfee32 =0; if (v38085)vfee32 =v38085.rowIndex; for (var v5f918=vfee32; v5f918<v6db73.rows.length; v5f918++) { var v9fd42 =v6db73.rows[v5f918]; wg54183.mdf49(v9fd42); if (v9fd42.type =="GroupHeader" &&v9fd42.groupIndex ==ve8644 &&v9fd42.position ==v83649) return v9fd42; } return null;}function wgSetSelectedObject(v67094,v22315){ var v98948 =ISXml.CreateXmlDocument(); v98948.loadXML(v22315); var v3e233 =v98948.selectSingleNode("//Object"); var vffb1 =v3e233.getAttribute("parentIndex"); var vc8950 =wgGetGridById(v67094); var v85482 =vc8950.Tables[v3e233.getAttribute("tblName")]; var vb3031 =null; var v6cb64; if (v85482.IsRootTable) { v6cb64 =v85482.GetElement(WG40.BODY,WG40.HTMLTABLE); } else  { var v9a646 =v3e233.getAttribute("tblSubId"); var v2ba50 =v85482.GetSubTableById(v9a646); v6cb64 =v2ba50.GetElement(WG40.BODY,WG40.HTMLTABLE); } if (vffb1 !="") { var vd7620 =vffb1.split("_");  for (var vbc042=0; vbc042<vd7620.length; vbc042++) { var vdfa51 =wgGetRowByGroup(v6cb64,vbc042,vd7620[vbc042],vb3031); if (vdfa51) { if (vdfa51.childrenLoaded =="True") { wgExpandGroupRow(vdfa51); } } vb3031 =vdfa51; } } var vbb934 =wgGetRowByPositionExact(v6cb64,parseFloat(v3e233.getAttribute("pos")),(vb3031? vb3031.rowIndex+1 : null)); if (vbb934) { var v78e43 =null;  if (vbb934.srLevel) { if (vbb934.currentStyle.display =="none") { var vecf34 =wgGetPreviousRow(v6cb64,vbb934); var v54d19 =new Array(); while (vecf34) { if (vecf34.srRC >0 &&vecf34.srLevel <vbb934.srLevel)v54d19[v54d19.length] =vecf34; vecf34 =wgGetPreviousRow(v6cb64,vecf34); if (!vecf34)break; if (vecf34.srLevel ==0) { v54d19[v54d19.length] =vecf34; break; } } v54d19 =v54d19.reverse(); for (var vbc042=0; vbc042<v54d19.length; vbc042++) { wgad280.ma4077(wgad280.mf3466(v85482,v54d19[vbc042])); } } }  if (v85482.Get("CellClickAction")=="RowSelect") v78e43 =wgGetCellByPosition(vbb934,0); else if (v85482.Get("CellClickAction")=="CellSelect") { if (v85482.LastAECIndex !=-1) v78e43 =vbb934.cells[v85482.LastAECIndex]; else v78e43 =wgGetCellByPosition(vbb934,0); }  if (v78e43) { wg3bc89.m49e7(v78e43,true); wg3bc89.m42232(vc8950,v78e43); } }}function wgExpandSelfRefRow(vb0569){ var vd2797 =wg54183.m3471(vb0569); var vdb065 =wgGetGridById(vd2797.gridId).Tables[vd2797.tblName]; vb0569.srExpanded ="False"; wgad280.ma4077(wgad280.mf3466(vdb065,vb0569));}function wgCollapseSelfRefRow(vbe852){ var v84a52 =wg54183.m3471(vbe852); var v35644 =wgGetGridById(v84a52.gridId).Tables[v84a52.tblName]; vbe852.srExpanded ="True"; wgad280.ma4077(wgad280.mf3466(v35644,vbe852));}function wgToggleSelfRefRow(v33c52){ if (v33c52.srExpanded =="True") wgCollapseSelfRefRow(v33c52); else  wgExpandSelfRefRow(v33c52);}function wgGetKeyValues(v1db63){ var v94288 =wg54183.m3471(v1db63); var vb9d14 =wgGetGridById(v94288.gridId); var v77418 =vb9d14.Tables[v94288.tblName]; if (v77418.HasMultiPrimaryKey) { var vb8584 =v77418.GetDataKeyFieldsCount(); var vb0656 =new Array(); for (var v89c35=0; v89c35<vb8584; v89c35++) { vb0656[vb0656.length] =v1db63.getAttribute("keyValue" +v89c35); } return vb0656; } return null;}function wgIsFilterRow(v19899){ return v19899.type =="FilterRow";}function wgRemoveRow(veba94,vc6c70){ var v63999 =wgGetHierRecord(vc6c70); var v9d872 =null;  if (veba94.PreviewRowVisible)v9d872 =wgGetPreviewRow(vc6c70); if (v63999 &&v63999.type !="HierRecord")v63999 =null; if (wgIsColumnSetRow(vc6c70)) { var vc9c88 =wgGetColumnSetRows(vc6c70); for (var va9f90=0; va9f90<vc9c88.length; va9f90++) { vc9c88[va9f90].removeNode(true); } } else  { vc6c70.removeNode(true); } if (v9d872)v9d872.removeNode(true); if (v63999)v63999.removeNode(true);}function wgGetGridByElement(v9fa13){ return wg54183.meaf58(v9fa13);}function wgGetTableByElement(v12313){ return wg54183.m4b86(v12313);}function wgGetColumnByElement(v4b613){ return wg54183.mdeb77(v4b613);}function wgGetCellByElement(v9db13){ return wg54183.m55278(v9db13);}function wgGetRowByElement(vcb549){ return wg54183.m52846(vcb549);}var wg54183 ={ Initialized: false,  mf5b66:function(vee773) { var vc6c37 =new WebGrid(vee773); wg54183.m71a76(vc6c37); wg54183.me7748(vc6c37); wg54183.mbfb54(vc6c37); vc6c37.IsInit =true; return vc6c37; },  m71a76:function(vb0528) { if (vb0528==null)return; if (!vb0528.IsInit) { var v7999 =ISXml.GetNode(vb0528.XmlDt,"//WebGrid");  if (v7999 ==null) v7999 =vb0528.XmlDt.documentElement; if (v7999!=null) {  IS.SetPropertiesRecursive(vb0528,v7999); vb0528.LayoutSettings.StatusBarCommandStyle =DynamicStyleEngine.Assign(ISXml.GetNode(vb0528.XmlDt,"//StatusBarCommandStyle")); } } },  me7748:function(vb2967) {  window.attachEvent("onload",function(){wg54183.m04b97(vb2967);}); window.attachEvent("onunload",function(){wg54183.md8d51(vb2967.Id);});  if (!wg54183.Initialized) { var v79d64 =document.body; Listener.Add(v79d64,"onresize",wg54183.m6ae69); window.attachEvent("onload",wg54183.m4e660); window.attachEvent("onbeforeprint",wg54183.m95685); window.attachEvent("onafterprint",wg54183.m85879);  v79d64.attachEvent("onmousemove",wg54183.mdee72); v79d64.attachEvent("onmouseup",wg54183.m37361); v79d64.attachEvent("onmousedown",wg54183.mee320); wg54183.Initialized =true; } wg54183.m46740(vb2967); wg54183.mcd619(vb2967);  if (vb2967.LayoutSettings.StatusBarVisible) { var veca14 =vb2967.GetElement(WG40.STATUSBARCOMMAND,WG40.HTMLCELL); Listener.Add(veca14,"onmouseover",function(){wgad280.m12a25(vb2967);}); Listener.Add(veca14,"onmouseout",function(){wgad280.m12a25(vb2967);}); Listener.Add(veca14,"onmousedown",function(){wgad280.m12a25(vb2967);}); Listener.Add(veca14,"onmouseup",function(){wgad280.m12a25(vb2967);}); }  vb2967.XmlHttp =ISXmlHttpEngine.Create(vb2967,function(){wg54183.m9ee95(vb2967);}); },  m46740:function(ve0f39) { ve0f39.FrameObj.attachEvent("onbeforedeactivate",function(){wg54183.m5c123(ve0f39.Id);}); ve0f39.FrameObj.attachEvent("onactivate",function(){wg54183.m2d245(ve0f39.Id); }); ve0f39.FrameObj.attachEvent("onmouseover",function(){wg54183.m3dc43(ve0f39); }); ve0f39.FrameObj.attachEvent("onfocus",function(){wg54183.m8dd2(ve0f39); }); ve0f39.FrameObj.attachEvent("oncontextmenu",function(){wg54183.mf9a63(ve0f39); }); ve0f39.FrameObj.attachEvent("onmouseup",function(){wg54183.mf9a63(ve0f39); }); },  mbfb54:function(v3bd59) { if (IS.moz) { var vc1d39 =v3bd59.FrameObj; vc1d39.style.MozUserFocus ="normal"; vc1d39.attachEvent("onblur",function(){wg9451.mbfd18(v3bd59); });  var v4e22 =v3bd59.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); wg9451.mf9c35(v4e22.childNodes[0]); window.attachEvent("onresize",function(){wg54183.m6ae69();});  if (typeof(WebPaneManager)=="undefined") wg9451.mcee11(v3bd59,true);  wg9451.ma0353(v3bd59); wg9451.m0df59(v3bd59); } },  mcd619:function(va2894) { var v93659 =va2894.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); Listener.Add(v93659,"onresize",function(){wg54183.m2f577(v93659); }); Listener.Add(v93659,"onscroll",function(){wg54183.me8133(va2894); }); if (va2894.IsInProgress &&IS.moz) { var vf7812 =va2894.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); wg9451.mf9c35(vf7812.childNodes[0]); wg9451.mee252(va2894); } },  m89376:function(v69014) { v69014.FrameObj.detachEvent("onbeforedeactivate",function(){wg54183.m5c123(v69014.Id);}); v69014.FrameObj.detachEvent("onactivate",function(){wg54183.m2d245(v69014.Id); }); v69014.FrameObj.detachEvent("onmouseover",function(){wg54183.m3dc43(v69014); }); v69014.FrameObj.detachEvent("onfocus",function(){wg54183.m8dd2(v69014); }); v69014.FrameObj.detachEvent("oncontextmenu",function(){wg54183.mf9a63(v69014); }); v69014.FrameObj.detachEvent("onmouseup",function(){wg54183.mf9a63(v69014); }); Listener.Unload(v69014.FrameObj); Listener.Unload(v69014.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); if (v69014.LayoutSettings.StatusBarVisible) { var v80c78 =v69014.GetElement(WG40.STATUSBARCOMMAND,WG40.HTMLCELL);  Listener.Unload(v80c78); }  if (IS.moz) v69014.FrameObj.detachEvent("onblur",function(){wg9451.mbfd18(v69014); }); },  ma5e84:function(v70614) { Listener.Unload(v70614.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV)); },  m50640:function(v6fc98) { var va5e14 =document.body; va5e14.onresize =null; window.detachEvent("onload",wg54183.m4e660); window.detachEvent("onload",function(){wg54183.m04b97(v6fc98);}); window.detachEvent("onresize",function(){wg54183.m6ae69();}); va5e14.detachEvent("onmousemove",wg54183.mdee72); va5e14.detachEvent("onmouseup",wg54183.m37361); va5e14.detachEvent("onmousedown",wg54183.mee320); wg54183.m89376(v6fc98); },  m04b97:function(v65c33) { if (IS.moz) { var vd4998 =v65c33.FrameObj.style.height; v65c33.FrameObj.style.height ="0px"; v65c33.FrameObj.style.height =vd4998; wg9451.mee252(v65c33); } },  mdf49:function(va1333) { if (IS.moz) wg9451.mf9c35(va1333); }, SetMenuCssFile: function(ve1169,v85c70) { if (typeof(Menu)!="undefined")ve1169.cssFile =v85c70; },  m95685:function() { var v91753 =wg54183.m76c93();  for(var grid in v91753) { var v72310 =v91753[grid]; if (typeof(v72310)=="function") continue; var v99a78 =v72310.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); if (ISEvent.Raise(v72310.LayoutSettings.ClientSideEvents.OnBeforePrint,v72310.Id)) { v99a78.style.display =""; if (v72310.BrowserPrintSettings.GridLayout =="AsDisplayedInBrowser") v99a78.style.overflow ="hidden"; else v99a78.style.overflow ="visible";  if (!v72310.BrowserPrintSettings.PrintStatusBar) { var v32651 =v72310.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v32651) v32651.style.display ="none"; } } } },  m85879:function() { var vd0c64 =wg54183.m76c93(); for(var grid in vd0c64) { var v72668 =vd0c64[grid]; if (typeof(v72668)=="function") continue; var v2a048 =v72668.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV);  if (ISEvent.Raise(v72668.LayoutSettings.ClientSideEvents.OnAfterPrint,v72668.Id)) { v2a048.style.overflow ="auto";  if (!v72668.BrowserPrintSettings.PrintStatusBar) { var va8458 =v72668.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (va8458) va8458.style.display =""; } } } },  mf9a63:function(v2c994) { if (event.type =="contextmenu" ||event.button ==2) { var vd6b39 =event.srcElement; if (vd6b39 &&vd6b39.tagName) { if (vd6b39.tagName =="INPUT" ||vd6b39.tagName =="IMG" ||vd6b39.tagName =="SELECT" ||vd6b39.tagName =="TEXTAREA") return true; }  var v8ae57 =v2c994.GetElement(WG40.STATUSBOX,WG40.HTMLDIV); if (v8ae57 &&v8ae57.contains(vd6b39))return false;  event.cancelBubble =true; event.returnValue =false; return false; } },  m5c123:function(v48a16,vdf052) { var vb2d30 =ISGetObject(v48a16); if (vb2d30.IsOnBlur)return; try  { var vd2c6 =event.srcElement; var v36b4 =event.toElement; if ((vd2c6.tagName =="DIV" &&(vd2c6.id ==v48a16 +IS.FRAMESUFFIX)&&v36b4.tagName =="BODY")||(v36b4.tagName =="BODY" &&vd2c6.tagName =="TD")) { window.setTimeout(function(){vb2d30.EnsureActiveEditCellFocus();},200); return; } var va5267 =vb2d30.FrameObj; if (!va5267.contains(v36b4)) { var ve3b52 =false; for (var v5fe13=0; v5fe13<vb2d30.EditControls.length; v5fe13++) { if (v36b4 ==vb2d30.EditControls[v5fe13] ||vb2d30.EditControls[v5fe13].contains(v36b4)) { ve3b52 =true; break; } } for (var v5fe13=0; v5fe13<IS.RuntimeWindowPopups.length; v5fe13++) { var v5cd14 =IS.RuntimeWindowPopups[v5fe13]._e; if (v5cd14.contains(v36b4)) { ve3b52 =true; break; } }  if (!ve3b52) { wg54183.md8f81(vb2d30,v36b4); wg_Global.ActiveGrid =null; } } }catch(v5cd14){} },  m2d245:function(v19d91) { var va7435 =wgGetActiveGrid(); if (!va7435 ||v19d91 !=va7435) { wg_Global.ActiveGrid =v19d91; wg54183.m56817(ISGetObject(v19d91)); } },  m4e660:function() { var v45a74 =wg54183.m76c93(); for (var v14781=0; v14781<v45a74.length; v14781++) { var v39f27 =v45a74[v14781]; var v82223 =v39f27.FrameObj; if (v39f27.NeedFocus) { wg54183.m56817(v39f27,true); v39f27.NeedFocus =false; } for (var v74f16=0; v74f16<v39f27.WebCombos.length; v74f16++) { if (typeof(wcGetComboById)!="function") break;  v39f27.WebCombos[v74f16].Id =v39f27.WebCombos[v74f16].Id.replace(/\$/g,"_"); var v3a471 =wcGetComboById(v39f27.WebCombos[v74f16].Id ); if (v3a471) { v3a471.FrameObj.style.display ="none"; v82223.insertAdjacentElement("beforeEnd",v3a471.FrameObj); } } if (v39f27.LayoutSettings.AutoFitColumns) wgad280.m08a24(v39f27); } wg54183.m6ae69(); },  md8d51:function(v03c5) {  },  mdee72:function() { wgad280.m50b62(); },  m37361:function() { wgad280.m60148();  },  mee320:function() { wgad280.m75496(); },  mcec14:function(v4b140) { v4b140.style.left =plGetCurX()-25; v4b140.style.top =plGetCurY()-25; },  m3dc43:function() { if (event.button ==0) { var vab376 =event.srcElement; if (vab376 &&((vab376.tagName =="TD" &&vab376.currentStyle.textOverflow =="ellipsis")||vab376.tagName =="NOBR" ||(vab376.tagName =="SPAN" &&typeof(vab376.content)!="undefined"))) { if (wg_Global.TTId !=0)clearTimeout(wg_Global.TTId); wg_Global.TTId =setTimeout(function(){wgad280.m53424(vab376);},wg_Global.ToolTipDelay ); } } },  m8dd2:function(v0af51) { if (v0af51.IsOnBlur)return;  if (IS.moz) { if (!v0af51.HasFocus()) wg54183.m56817(v0af51,true); } if (!v0af51.LastSelObj) { var vcff96 =v0af51.GetRootTable(); if (vcff96.GetElement(WG40.BODY,WG40.HTMLTABLE).rows.length >0) vcff96.SelectRow(0); } else  { if (v0af51.ActiveEditCell) { v0af51.EnsureActiveEditCellFocus(); } else  { try  { if (v0af51.LastSelObj.type =="Row") { var vfab98 =wgGetCellByPosition(v0af51.LastSelObj.element,0); vfab98.setActive(); } else  { v0af51.LastSelObj.element.setActive(); } }catch(e){} } } },  m2f577:function(vebe71) { var vf5071 =ISGetObject(vebe71.childNodes[0].gridId); if (vf5071.LayoutSettings.AutoWidth) wg54183.m65021(vebe71.childNodes[0]);  if (IS.moz)wg9451.mcee11(vf5071); },  me8133:function(vbf321) { var v9bd7 =vbf321.RootTable.GetElement(WG40.BODY,WG40.HTMLDIV); var vcda56 =v9bd7.scrollTop +v9bd7.offsetHeight; wg54183.mdf49(v9bd7.childNodes[0]);  var v3b938 =ISGetObject(v9bd7.childNodes[0].gridId); var v29743 =v3b938.Tables[v9bd7.childNodes[0].tblName]; var v62648 =v29743.GetElement(WG40.COLHEADER,WG40.HTMLDIV);  if (v3b938.LayoutSettings.AutoFitColumns) v62648.scrollLeft =0;  if (v62648.scrollLeft !=v9bd7.scrollLeft) { wg54183.m65021(v9bd7.childNodes[0]); v62648.scrollLeft =v9bd7.scrollLeft; if (v29743.Get("ColumnFooters")=="Yes") { var vd7515 =v29743.GetElement(WG40.COLFOOTER,WG40.HTMLDIV); vd7515.scrollLeft =v9bd7.scrollLeft; } } if (v3b938.LastEditObj) { var v65d44 =v3b938.LastEditObj.element; v3b938.ExitEditMode(); }  var vb3e56 =(wg54183.m4fd40(v9bd7)? 17 : 0)+v9bd7.scrollHeight; if (v9bd7.scrollHeight <v9bd7.offsetHeight)return; if (vcda56+2 >=vb3e56) { if (v29743.GroupedColumns.length >0)return; if (!v3b938.IsInProgress &&v3b938.LayoutSettings.PagingMode !="None")wg54183.md3516(v9bd7.childNodes[0].gridId,"More"); } },  m6ae69:function() { if (WG40.ForceBogusResize) wg54183.mb4e67();  if (wg_Global.GlobalResizeID !=0) { clearTimeout(wg_Global.GlobalResizeID); wg_Global.GlobalResizeID =0; } else wg54183.mb4e67();  wg_Global.GlobalResizeID =setTimeout("wg54183.mb4e67()",50); },  mb4e67:function() { var v99640 =wg54183.m76c93(); for (var v95a73=0; v95a73<v99640.length; v95a73++) { var v00f91 =v99640[v95a73];  if (IS.ie) { if (v00f91.LayoutSettings.AutoHeight) { v00f91.NeedHeightResize =true; wgad280.m52b22(v00f91.FrameObj); } else  { if (v00f91.FrameObj.style.height !="") { if (v00f91.FrameObj.style.height.indexOf("%")>0) { v00f91.CacheTBodyHeight =null; } } } if (v00f91.LayoutSettings.AutoWidth) { v00f91.NeedWidthResize =true; wgad280.mbaa22(v00f91.FrameObj); } } else { wg9451.mcee11(v00f91); } if (v00f91.LayoutSettings.AutoFitColumns &&v00f91.FrameObj.style.width.indexOf("%")>=0) { if (v00f91.TempResizeID !=0) clearTimeout(v00f91.TempResizeID); setTimeout("wgad280.md9015('" +v00f91.Name +"')",500); } } },  ma6f50:function(vdfb42) { if ((vdfb42.LastEditObj ||vdfb42.ActiveEditCell)&&!vdfb42.IsExitingEdit) { var v9cb31 =vdfb42.LastEditObj; var v40522 =vdfb42.ActiveEditCell; var ve4295 =vdfb42.Tables[ ((v9cb31)? v9cb31.tblName : v40522.tblName)]; var v27e37 =ve4295.Get("AllowEdit")=="Yes";  var v7a513;  if (v9cb31) v7a513 =v9cb31.cellElement.parentElement; else v7a513 =v40522.rowElement; if (v27e37 &&v7a513.type =="Record") { if (v9cb31)wgd4b96.m4cd3(v9cb31); } } },  m6ec21:function(v7b662) { v7b662.IsInProgress =true; v7b662.SetBusy(); },  m56817:function(v7b012,v2bd67) { var vf2198 =v7b012.LastSelObj; if (v7b012.IsOnBlur)return; if (!v7b012.Get("Visible"))return; if (!ISEvent.Raise(v7b012.LayoutSettings.ClientSideEvents.OnFocus,v7b012.Id)) return; if (v2bd67) wg_Global.ActiveGrid =v7b012.Name; if (wg54183.m74363(vf2198)) { var v6ce59 =v7b012.Tables[vf2198.tblName]; var vf0050 =v6ce59.Get("CellClickAction"); if (vf2198.type =="Row" ||vf0050 =="RowSelect") { wg3bc89.m1de95(vf2198.GetRowElement(),""); var v8a847 =v7b012.ActiveEditCell; if (v8a847 &&wgIsSameRow(v8a847.rowElement,vf2198.GetRowElement())) { wgd4b96.m21f13(v8a847.element,"Redraw"); v7b012.EnsureActiveEditCellFocus(); } else { var vafd79 =wgGetCellByPosition(vf2198.element,0); vafd79.setActive(); } } else  { var v6ce59 =v7b012.Tables[vf2198.tblName]; wg3bc89.m65847(vf2198.element,v6ce59.GetSelRowStyle(),v6ce59.GetFocusCellStyle(),"",true); vf2198.element.setActive(); } } else  { if (v2bd67) { wg_Global.ActiveGrid =v7b012.Name; var v31146 =v7b012.GetRootTable().GetElement(WG40.BODY,WG40.HTMLTABLE); if (v31146.rows.length >0) { wg3bc89.m49e7(wgGetCellByPosition(v31146.rows[0],0),true); wgGetCellByPosition(v31146.rows[0],0).setActive(); } } } },  m76c93:function() { var v8963 =new Array(); for(var v2c315=0; v2c315<IS.RuntimeObjects.length;v2c315++) { var v08140 =IS.RuntimeObjects[v2c315]; if (v08140.ClassName =="WebGrid" &&v08140.Version =="4.0.6200") v8963[v8963.length] =v08140; } return v8963; },  meaf58:function(v14d61) { var v0b342 =wg54183.m8859(v14d61); var v2b934 =ISGetObject(v0b342); return v2b934; },  m4b86:function(vfd817) { var v32397 =wg54183.m3fa51(vfd817); var v65513 =wg54183.m8859(vfd817); var v30259 =ISGetObject(v65513); var v1906 =v30259.Tables[v32397];  return v1906; },  mdeb77:function(vb9c8) { var ve2f53 =wgGetColNameByCell(vb9c8); var v40e93 =vb9c8.parentElement; if (ve2f53) { var v62f44 =ISGetObject(wg54183.m8859(v40e93)); var v9069 =v62f44.Tables[wg54183.m3fa51(v40e93)]; return v9069.Columns.GetNamedItem(ve2f53); }  return null; },  m55278:function(v90347) { var v5a992 =wg54183.mc7086(v90347); if (v5a992) { var ve9e12 =wg54183.m52846(v5a992); if (ve9e12) { var v1ab78 =wgGetColNameByCell(v90347); return ve9e12.GetCell(v1ab78); } } return null; },  m52846:function(v7f238) { var v7c147 =wg54183.mc7086(v7f238); if (v7c147) { var v62a91 =wg54183.m3fa51(v7c147); var v20d63 =wg54183.m8859(v7c147); var v44f36 =ISGetObject(v20d63); var v56a9 =v44f36.Tables[v62a91]; if (v56a9.IsUseColumnSet) v7c147 =wgGetRootRow(v7c147);   return v56a9.ToRowObject(v7c147); }  return null; },  m74363:function(v88094) { if (v88094){ if (v88094.element){ try { var v86658 =v88094.GetRowElement(); var v75d49 =v88094.element; if (v88094.type =="Row"){ if (v86658.rowIndex !=-1){ return true; } }else { if (v75d49.cellIndex !=-1 )return true; } }catch (e){return false;} } } return false; },  m92999:function(vdf877) { if (vdf877.tagName =="TR" ||vdf877.tagName =="TD") return wg54183.m3471(vdf877).subId; else if (vdf877.tagName =="TABLE") return vdf877.subId;  },  m8859:function(ve7213) { return wg54183.m3471(ve7213).gridId; },  m3fa51:function(v64813) { return wg54183.m3471(v64813).tblName; },  m3471:function(v4e669) { var va1e49 =v4e669.parentElement; while (va1e49 &&va1e49.tagName !="TABLE"){ va1e49 =va1e49.parentElement; } if (va1e49 &&IS.moz)wg9451.mf9c35(va1e49); return va1e49; },  m65021:function(v29083) { var v99069 =ISGetObject(v29083.gridId); var v6a47 =v99069.Tables[v29083.tblName]; var v9134 =v6a47.GetElement(WG40.COLHEADER,WG40.HTMLTABLE); var va3349 =v9134.rows[0].cells[v9134.rows[0].cells.length-1];  if (wg54183.m4fd40(v29083.parentElement)) { if (!va3349.locked) wg54183.me0011(v6a47,va3349,'17px'); }else { if (!va3349.locked) wg54183.me0011(v6a47,va3349,'100%'); } if (v99069.LayoutSettings.Hierarchical) { if (v99069.GetMaxWidth()>v99069.FrameObj.offsetWidth) { if (!va3349.locked) { v99069.FixPadColumnWidth(); } } else  { var v7c896 =v99069.GetRootTable(); var v1ef14 =v7c896.GetElement(WG40.COLGROUP); var v39f39 =v1ef14.childNodes[v1ef14.childNodes.length-1]; v39f39.width ="100%"; wg54183.me0011(v6a47,va3349,'100%'); va3349.locked =false; } } },  m4fd40:function(v56119) { if (v56119.offsetHeight !=v56119.clientHeight)return true; else return false;  },  HasHSBar: function(v10f74) { if (v10f74.offsetWidth !=v10f74.clientWidth)return true; else return false;  },  me0011:function(v7c293,v98f73,v85a60) { if (v7c293.IsUseColumnSet) { var vcfa74 =v7c293.GetElement(WG40.COLHEADERGROUP); var vb0163 =vcfa74.childNodes[vcfa74.childNodes.length-1]; vb0163.width =v85a60; } else { v98f73.style.width =v85a60; } if (v7c293.Get("ColumnFooters")=="Yes") { var vcfa74 =v7c293.GetElement(WG40.COLFOOTERGROUP); var vb0163 =vcfa74.childNodes[vcfa74.childNodes.length-1]; vb0163.width =v85a60; } },  md5029:function(v50849) { if (!v50849)return null; while (v50849.tagName !="TD") { try  { v50849 =v50849.parentElement; if (!v50849)return null; } catch (e){return null;} } return v50849; },  mc7086:function(v50968) { while (v50968 &&v50968.tagName !="TR") v50968 =v50968.parentElement;  return v50968; },  m46479:function(v31124,v19141) { var v5d84 =v31124.parentElement; for (var vb1d31=0; vb1d31<v19141-1; vb1d31++) v5d84 =v5d84.parentElement; return v5d84; },  m23f32:function(vb9179,v39d20) { if (v39d20.rowIndex ==vb9179.rows.length-1)return null; var v5a943 =vb9179.rows[v39d20.rowIndex+1]; if (v5a943) wg54183.mdf49(v5a943); return v5a943; },  m75b81:function(v8a199,v20229) { if (v20229.rowIndex ==0)return null; var v53899 =v8a199.rows[v20229.rowIndex-1]; if (v53899) wg54183.mdf49(v53899); return v53899; },  GetChildNodes: function(vd8d54,vbaa9) { var v3eb35 =vd8d54.childNodes[0]; for (var vd9d99=0; vd9d99<vbaa9-1; vd9d99++) v3eb35 =v3eb35.childNodes[0]; return v3eb35; },  md3516:function(vd2d40,vcf955,v37958) { var vdca74 =ISGetObject(vd2d40); var v9a218 =vdca74.XmlHttp; var v87c2 =""; var v6f841 =vd2d40; if (vdca74.IsPreviewMode) { alert("Not supported in Preview mode!"); return; } vdca74.XmlReq =ISXmlHttpEngine.CreateRequestXml(vdca74.GetType()); wg54183.ma6f50(vdca74);  var v08148 =ISXml.GetNode(vdca74.XmlReq,"//request"); vdca74.RequestId =0;  if (vdca74.IsInProgress) { if (vcf955 =="More" &&vdca74.LastAction =="AddRow")return; if (vcf955 =="UpdateRow" &&vdca74.LastAction =="LoadChild") { vdca74.NextQueue =[vcf955,v37958]; return; }  if (vdca74.LayoutSettings.InProgressUIBehavior =="DisplayMessageBox") alert(vdca74.GetString("MessageBoxText/InProgress")); return; } if (!ISEvent.Raise(vdca74.LayoutSettings.ClientSideEvents.OnBeforeRequest,v6f841,vcf955)) return;  v08148.setAttribute("id",v6f841); vdca74.TempLRO =v37958; switch (vcf955) { case "More": if (!wge4347.m76526(vdca74,v08148,v6f841))return false; break; case "LoadGroup": if (!wge4347.mc3991(vdca74,v08148,v6f841,v37958))return false; break; case "ColumnSort": if (!wge4347.mfac38(vdca74,v08148,v6f841,v37958))return false; break; case "Group": if (!wge4347.mbb085(vdca74,v08148,v6f841,v37958,"Group"))return false; break; case "Ungroup": if (!wge4347.mbb085(vdca74,v08148,v6f841,v37958,"Ungroup"))return false; break; case "ChangeGroup": if (!wge4347.mbb085(vdca74,v08148,v6f841,v37958,"ChangeGroup"))return false; break; case "ColumnFilter": if (!wge4347.mcdf37(vdca74,v08148,v6f841,v37958))return false; break; case "LoadChild": if (!wg0bb8.m1f455(vdca74,v08148,v6f841,v37958))return false; break; case "ColumnChange": if (!wge4347.mfd636(vdca74,v08148,v6f841,v37958))return false; break; case "Refresh": if (!wge4347.mfb475(vdca74,v08148,v6f841))return false; break; case "RefreshAll": if (!wge4347.m8fc5(vdca74,v08148,v6f841))return false; break; case "Custom": if (!wge4347.meec1(vdca74,v08148,v6f841))return false; break; case "AddRow": if (!wgd4b96.m90860(vdca74,v08148,v6f841,v37958))return false; break; case "UpdateRow": if (!wgd4b96.mb5042(vdca74,v08148,v6f841,v37958))return false; break; case "DeleteRow": if (!wgd4b96.m43c18(vdca74,v08148,v6f841,v37958))return false; break; case "Export": if (!wge4347.m6a292(vdca74,v08148,v6f841,v37958))return false; break; case "ButtonClick": if (!wge4347.m9a979(vdca74,v08148,v6f841,v37958))return false; break; case "ChildTableRefresh": if (!wg0bb8.mcc550(vdca74,v08148,v37958))return false; break; case "LoadSelfRefChild": if (!wge4347.m3a599(vdca74,v08148,v6f841,v37958))return false; break; } vdca74.LastRequestObj =v37958; vdca74.LastAction =vcf955; var v82520 =vdca74.XmlHttp.Asynchronous; v9a218.Send();  if (v82520) { wg54183.m6ec21(vdca74); } },  mf1869:function(v79270,v6ea23) { v79270.LastError =v6ea23;  if (!ISEvent.Raise(v79270.LayoutSettings.ClientSideEvents.OnUnhandledError,v79270.Name,v79270.LastAction,v79270.LastRequestObj,v79270.LastError)) return;  var v05715 =v6ea23; if (v05715.indexOf("Server Error")>=0 ||v05715.indexOf("Stack Trace")>=0) { wgad280.m8ee60(v79270,v6ea23,v79270.GetString("MessageBoxText/UnhandledError")); } else  { if (v05715 !="") { var v7f844 =IS.GetFormAction(v05715); window.location =v7f844; return; } else  { wgad280.m8ee60(v79270,"Unable to communicate with server.","Unhandled exception."); } } v79270.IsInProgress =false; v79270.SetIdle(); v79270.SetStatus1("","readyerror","CommonText/ReadyError"); },  m9ee95:function(v45c31,vf2759) {  var v08961 =v45c31.XmlResp; var vdef72 =ISXml.GetNodeText(v08961,"//status"); if (!ISEvent.Raise(v45c31.LayoutSettings.ClientSideEvents.OnResponse,v45c31.Id,vdef72)) return; if (vdef72 =="Error") { alert(ISXml.GetNodeText(v08961,"//error")); wg54183.mfb688(v45c31); v45c31.SetStatus1("","ready","CommonText/Ready"); v45c31.SetIdle(); v45c31.IsInProgress =false; return ; } var v7a899 =ISXml.GetNodeText(v08961,"//action");  if (!ISEvent.Raise(v45c31.LayoutSettings.ClientSideEvents.OnActionDispatched,v45c31.Id,v7a899)) return;  switch (v7a899) { case "More": wge4347.m90848(v45c31,v08961); break; case "LoadGroup": wge4347.mbfb41(v45c31,v08961); break; case "ColumnSort": wge4347.m39a27(v45c31,v08961); break; case "Group": case "Ungroup": case "ChangeGroup": case "ColumnChange": wge4347.m2a956(v45c31,v08961); break; case "ColumnFilter": wge4347.me2c79(v45c31,v08961); break; case "LoadChild": wg0bb8.m11353(v45c31,v08961); break; case "Refresh": wge4347.m76c89(v45c31,v08961); break; case "RefreshAll": wge4347.ma3388(v45c31,v08961); break; case "Custom": if (typeof(wgCustomActionResponse)=="function") wgCustomActionResponse(v45c31,v08961); break; case "AddRow": wgd4b96.m8680(v45c31,v08961); break; case "UpdateRow": wgd4b96.m89545(v45c31,v08961); break; case "DeleteRow": wgd4b96.me2726(v45c31,v08961); break; case "Export": wge4347.m78222(v45c31,v08961); break; case "ButtonClick": wge4347.ma9184(v45c31,v08961); break; case "ChildTableRefresh": wg0bb8.me7c62(v45c31,v08961); break; case "LoadSelfRefChild": wge4347.m72046(v45c31,v08961); break; } v45c31.IsInProgress =false;  var v44863 =v08961.selectSingleNode("//clientScripts"); if (v44863) { var v6792 =v44863.text; if (v6792 !="") { var v9f771 =v6792.split(");"); for (var v5d255=0; v5d255<v9f771.length; v5d255++) { if (v9f771[v5d255] !="") { var v08f22 =v9f771[v5d255]; if (v08f22.indexOf("(")>=0) v08f22 +=")"; eval(v08f22); } } } }  if (!ISEvent.Raise(v45c31.LayoutSettings.ClientSideEvents.OnAfterResponseProcess,v45c31.Name,v7a899,v45c31.LastRequestObj,v08961)) return;  v45c31.LastRequestObj =null; v45c31.TempLRO =null; v45c31.SetIdle(); if (v45c31.NextQueue) { wg54183.md3516(v45c31.Name,v45c31.NextQueue[0],v45c31.NextQueue[1]); v45c31.NextQueue =null; } },  md8f81:function(v62a52,va1775) { var v26c22 =v62a52.LastSelObj; v62a52.IsOnBlur =true; if (!ISEvent.Raise(v62a52.LayoutSettings.ClientSideEvents.OnLostFocus,v62a52.Name)) return; if ((v62a52.LastEditObj ||v62a52.ActiveEditCell)&&!v62a52.IsExitingEdit) { var v3837 =v62a52.LastEditObj; var v27b73 =v62a52.ActiveEditCell;  var vfb499;  if (v3837) vfb499 =v3837.cellElement.parentElement; else vfb499 =v27b73.rowElement; if (wgIsRowDirty(vfb499)||wgIsRowMarkedEdit(vfb499)) { var ve3689 =v62a52.ExitEdit(3)[2]; if (!ve3689) { if (vfb499.type =="NewRow") { wgd4b96.m21f13(v27b73.element,"Clear",v27b73.element); wgd4b96.m7f279(v62a52,vfb499); } wg3bc89.m20e12(vfb499,v62a52.GetCurSelImage()); } try  { va1775.focus(); } catch(e){} } else  { v62a52.ExitEditMode(true); } }  if (v26c22) { if (v26c22.type =="Row") wg3bc89.m1de95(v26c22.GetRowElement(),"",true); else  { wg3bc89.m65847(v26c22.element,v62a52.GetBlurRowStyle(),"0px","",true); } } var v3e219 =function(){v62a52.IsOnBlur =false;}; window.setTimeout(v3e219,50); }, mf4b11:function(vdac27,v30b63) { for (var v46191=0; v46191<vdac27.attributes.length; v46191++) { if (v30b63.indexOf(vdac27.attributes[v46191].name )==-1) { vdac27.removeAttribute(vdac27.attributes[v46191].name ); v46191--; } } },  mbb245:function(v3ff7) { var vcce83 =v3ff7.XmlDt; var v6bf43 =vcce83.documentElement; var v27948 =v3ff7.LastSelObj;  if (v27948 &&v27948.element) { var ve7f35 =ISXml.GetNode(vcce83,"//selectedObject"); if (ve7f35) v6bf43.removeChild(ve7f35);  var v81376 =vcce83.createNode(1,"selectedObject",""); var v26f66 =v27948.GetRowElement();  if (!v26f66 ||v26f66.rowIndex ==-1 ||v26f66.type =="NewRow" ||v26f66.type =="FilterRow")return; v26f66 =wgGetRootRow(v26f66); v81376.setAttribute("tblName",v27948.tblName); v81376.setAttribute("type",v27948.type); v81376.setAttribute("rowIndex",v26f66.position); v81376.setAttribute("cellIndex",v27948.cellIndex); v81376.setAttribute("parentIndex",wgad280.meca77(v26f66));  ISXml.CreateCDATA(vcce83,v81376,"keyValue",(v26f66.keyValue ? v26f66.keyValue : ""));  var vadb58 =v3ff7.Tables[v27948.tblName]; if (vadb58.HasMultiPrimaryKey &&v26f66.type =="Record") { var v96e6 =wgGetKeyValues(v26f66); v81376.setAttribute("keyCount",v96e6.length); for (var ve3844=0; ve3844<v96e6.length;ve3844++) { ISXml.CreateCDATA(vcce83,v81376,"keyValue" +ve3844,v96e6[ve3844]); } } v6bf43.appendChild(v81376); } else  { ISXml.RemoveNode(v6bf43,"selectedObject"); } }, m51512:function(vda234) { var va2d27 =vda234.StateRestorationLevel; var v13a18 =vda234.GetXml().xml; if (va2d27 !="High") { var v40371 =ISXml.CreateXmlDocument(); ISXml.LoadXml(v40371,vda234.XmlDt.xml); var v50091 =ISXml.GetNode(v40371,"//LayoutSettings"); var v3f641 ="TotalLoadedRows,TotalRows";  for (var v68524=0; v68524<v50091.childNodes.length; v68524++) { v50091.removeChild(v50091.childNodes[v68524]); v68524--; } if (va2d27 =="Low") { var v4e131 ="Name,DataMember,IsRootTable,DataKeyField"; var vdc31 ="FilterBarVisible,Culture,Hierarchical"; var v6de23 ="Name,IsGrouped,IsSorted,Visible,Width,EditType,WebComboID,ColumnType,FilterEditType"; var vc8832 =["BrowserPrintSettings","FlyPostBackSettings","UtilizedCustomEditors","WebCombos"]; var vbf477 =["PreviewRowSettings","ColumnSetSettings","SelfReferencingSettings","FocusCellStyle"];  wg54183.mf4b11(v40371.documentElement,v3f641); wg54183.mf4b11(v50091,vdc31);  for (sTbl in vda234.Tables) { var v51539 =vda234.Tables[sTbl]; var v55c73 =null; if (typeof(v51539)=="function") continue;  if (v51539.IsRootTable) v55c73 =v40371.selectSingleNode("//RootTable"); else v55c73 =v40371.selectSingleNode("//WebGridTable[@Name='" +v51539.Id +"']");  wg54183.mf4b11(v55c73,v4e131);  for (var tNode in vbf477) ISXml.RemoveNode(v55c73,vbf477[tNode]);  var v65e68 =v55c73.selectNodes("Columns/WebGridColumn"); for (var v14879=0; v14879<v65e68.length; v14879++) wg54183.mf4b11(v65e68[v14879],v6de23); }  for (var node in vc8832) ISXml.RemoveNode(v40371.documentElement,vc8832[node]); }  v13a18 =v40371.xml; v40371 =null; } vda234.CustomStateString =v13a18; var v70a69 =document.getElementById(vda234.xmlInputHiddenUniqueID); if (v70a69 ==null)v70a69 =document.getElementById(vda234.xmlInputHiddenUniqueID.replace(/:/g,"_")); if (v70a69 ==null)v70a69 =document.getElementById(vda234.xmlInputHiddenUniqueID.replace(/\$/g,"_"));  if (v70a69 !=null) v70a69.value =escape(v13a18); }, mfb688:function(va1393) { switch (va1393.LastAction) { case "AddRow": var v2a537 =va1393.LayoutSettings.ResetNewRowValuesOnError; var v24e31 =va1393.LastSelObj.GetRowElement(); var v30650 =va1393.LastRequestObj.RowElement;  if (v2a537 ||(v30650 &&!wgIsSameRow(v24e31,v30650))) { try  { wgd4b96.m7f279(va1393,v30650); if (wgIsSameRow(v24e31,v30650)) wg3bc89.m20e12(v30650,va1393.GetCurSelImage()); } catch(e){}; } break;  case "UpdateRow": var v30650 =va1393.LastRequestObj; wgd4b96.m50b50(v30650.RowElement); break; } }, m15140:function(v4f089) { var vd4565 =v4f089.XmlDt; for(table in v4f089.Tables) { var vf1e49 =v4f089.Tables[table]; if (typeof(vf1e49)=="function") continue; var v39172 =vf1e49.GetRowCheckerColumn(); if (v39172) { var v77a43 =vf1e49.GetCheckedRows(); if (v77a43.length >0) { var vc0938 =vf1e49.XmlNode; ISXml.RemoveNode(vc0938,"checkedRows");  var v3a28 =ISXml.GetNode(vc0938,"checkedRows"); if (!v3a28)v3a28 =ISXml.CreateNode(vd4565,vc0938,"checkedRows",""); for (var vc9162=0; vc9162<v77a43.length; vc9162++) { var ve1733 =ISXml.CreateNode(vd4565,v3a28,"rowKV","");  if (vf1e49.HasMultiPrimaryKey) { var vcb323 =wgGetKeyValues(v77a43[vc9162]); for (var v74117=0; v74117<vcb323.length; v74117++) { ISXml.CreateCDATA(vd4565,ve1733,"keyValue" +v74117,vcb323[v74117]); } } else  { ISXml.CreateCDATA(vd4565,ve1733,"keyValue",v77a43[vc9162].keyValue); } } } else  { var vc0938 =vf1e49.XmlNode; ISXml.RemoveNode(vc0938,"checkedRows"); } } } },  ReplaceXmlNode: function(vebc0,vb4673,v13299) { var ve9d9 =vb4673.indexOf("<" +vebc0 +">"); var v02625 =vb4673.indexOf("</" +vebc0 +">"); if (ve9d9 >=0 &&v02625 >=0 &&v02625 >ve9d9) { var vac695 =vb4673.substring(0,ve9d9); var v2100 =vb4673.substring(v02625 +vebc0.length +3); return vac695 +"<" +vebc0 +">" +v13299 +"</" +vebc0 +">" +v2100; } }, m2b784:function(vfaa56) { }};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(v86869,vdf759){ var vea385 =wg54183.mf5b66(v86869); vea385.NeedFocus =vdf759; vea385.OnInitialize();}var posLib2 ={ getLeftAbs: function(vfa287,v9e898){ if (IS.moz) { var v71168 =ISPosLib.getLeftNonIE(vfa287); if (v9e898) { if (v9e898.PosRelativeTo) { v71168 +=ISPosLib.getLeftNonIE(v9e898.PosRelativeTo); } } return v71168; }  if (v9e898 &&v9e898.LayoutSettings.UseRelativePositioning) { return ISPosLib.getLeft(vfa287); }  var v71168 =vfa287.style.posLeft; var v65537 =vfa287.parentElement; v71168+=ISPosLib.getBorderLeftWidth(vfa287); if (v65537){ if (v65537.style.position.toLowerCase()=="absolute") v71168+=v65537.style.posLeft; } if (v9e898){ if (v9e898.PosRelativeTo){ v71168 +=ISPosLib.getLeft(v9e898.PosRelativeTo); } } return v71168; },  getTopAbs: function(v36a98,v80a56){ if (IS.moz) { var v11f43 =ISPosLib.getTopNonIE(v36a98); if (v80a56) { if (v80a56.LayoutSettings.UseRelativePositioning) { return v11f43; } if (v80a56.PosRelativeTo) { v11f43 +=ISPosLib.getTopNonIE(v80a56.PosRelativeTo); } if (v80a56.FrameObj.style.position !="absolute") return 0; }  if (v36a98.style.position =="absolute" ||v36a98.style.position =="relative") return v11f43; else return 0; } if (v80a56 &&v80a56.LayoutSettings.UseRelativePositioning) { return ISPosLib.getTop(v36a98); }  var v11f43 =v36a98.style.posTop; var v5e289 =v36a98.parentElement; v11f43+=ISPosLib.getBorderTopWidth(v36a98); if (v5e289){ if (v5e289.style.position.toLowerCase()=="absolute") v11f43+=v5e289.style.posTop; } if (v80a56){ if (v80a56.PosRelativeTo){ v11f43 +=ISPosLib.getLeft(v80a56.PosRelativeTo); } } return v11f43;  }};function WebGridCoreDestructor(){ wg_Global =null; delete wg_Global; delete wg54183; window.detachEvent("onunload",WebGridCoreDestructor); IS.RegisterUnloadVariables("wg54183");}window.attachEvent("onunload",WebGridCoreDestructor);