
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 
// Generated Datetime : 6/16/2006 11:49:46 AM
// Copyright (c) 2005 Intersoft Solutions.
// Unauthorized decryption/reproduction of any codes contained herein is strictly prohibited and will result in severe civil and criminal penalties .
//**Start Encode**
function SelectedObject(v4c498,vd852,v82746 ){ this.tblName =v4c498; this.gridId =vd852; this.element =v82746; this.rowIndex =0; this.cellIndex =0; this.type =""; this.getRowElement =this.GetRowElement =function(){ if (this.element){ if (this.element.tagName =="TR")return this.element; else return this.element.parentElement; } return null; }; this.GetRowObject =this.ToRowObject =function() { var v7a873 =wgGetRootRow(this.GetRowElement()); if (v7a873) { var vb4d22 =ISGetObject(this.gridId); var v58498 =vb4d22.Tables[this.tblName]; return v58498.ToRowObject(v7a873); } }; this.getColSetRowElement =this.GetColSetRowElement =function(){ var vd852 =wgGetGridById(this.gridId); var v58498 =vd852.Tables[this.tblName]; if (v58498.IsUseColumnSet) return wgGetColumnSetRow(this.element); return null; }; this.getColSetRowsElement =this.GetColSetRowsElement =function(){ var vd852 =wgGetGridById(this.gridId); var v58498 =vd852.Tables[this.tblName]; if (v58498.IsUseColumnSet) return wgGetColumnSetRows(this.element); return null; }; return this;}function wgGetLastSelectedObject(){ return wg_Global.LastSelObj;}function wgGetRowHeader(vcaf87){ if (!vcaf87)return null; var v72d79 =wg30210.m44c63(vcaf87); if (!v72d79)return null;  var v51623 =ISGetObject(v72d79.gridId); if (!v51623)return null;  for (var ve7479=0; ve7479<vcaf87.cells.length; ve7479++) { var v5d775 =vcaf87.cells[ve7479]; wg30210.m7c16(v5d775); if (v5d775.type =="RowSelector" ||v5d775.type =="RowHeader") return v5d775; } return null;}function wgGetValidActiveCell(vb6068){ if (vb6068.type !="Cell") return vb6068.parentElement.cells[wgGetFirstEditableCell(vb6068.parentElement)]; else return vb6068;}function wgGetLastVisibleRow(vc7f38){ var ved848 =null; try  { ved848 =vc7f38.rows[vc7f38.rows.length-1]; }catch(e){ved848 =null; } if (ved848 ==null) { var v90c56 =ISGetObject(vc7f38.gridId).Tables[vc7f38.tblName]; if (v90c56.Get("AllowAddNew")=="Yes") { ved848 =vc7f38.parentElement.previousSibling.childNodes[0].rows[0]; ved848 =v90c56.GetNewRow(ved848); var v17542 =new SelectedObject(vc7f38.tblName,vc7f38.gridId,ved848); return v17542; } } if (ved848) wg30210.m7c16(ved848); if (ved848 &&(ved848.style.display =="none" ||ved848.type =="GroupTotalRow" ||ved848.type =="PR" ||ved848.type =="CSRecord")) { return wgGetPrevVisibleRow(vc7f38,ved848); } else  { var vcb57 =ISGetObject(vc7f38.gridId); var v90c56 =vcb57.Tables[vc7f38.tblName]; if (vcb57.LastSelObj.element.type =="NewRow") { ved848 =vc7f38.rows[vc7f38.rows.length-1]; wg30210.m7c16(ved848); if (ved848.style.display =="none" ||ved848.type =="GroupTotalRow" ||ved848.type =="PR" ||ved848.type =="CSRecord") { return wgGetPrevVisibleRow(vc7f38,ved848); } } var v17542 =new SelectedObject(vc7f38.tblName,vc7f38.gridId,ved848); return v17542; } return null;}function wgGetLastChildVisibleRow(v0e47){ if (v0e47.style.display =="none") v0e47 =wgGetPreviousRow(tb,v0e47); else  { var v06618 =v0e47.cells[v0e47.cells.length-1]; var v3a888 =v06618.childNodes[v06618.childNodes.length-1]; wg30210.m7c16(v3a888); var vd4e4 =document.getElementById("dvTB_" +v3a888.gridId +"_" +v3a888.tblName +"_" +v3a888.subId).childNodes[0]; var v04e39 =wgGetLastVisibleRow(vd4e4); if (v04e39) { if (v04e39.type =="HierRecord") v04e39 =wgGetLastChildVisibleRow(v04e39.element); if (v04e39)return v04e39; } else v0e47 =wgGetPreviousRow(tb,v0e47); } return v0e47;}function wgGetPrevVisibleRow(ve3861,v01948){ var v01588 =ISGetObject(ve3861.gridId); var vf0420 =v01588.Tables[ve3861.tblName]; var v71267 =wgGetPreviousRow(ve3861,v01948);  wg30210.m7c16(v01948);  if (v01948.type =="NewRow") { if (vf0420.Get("AllowFilter")=="Yes" &&vf0420.IsFilterRowVisible()) { var vc5b71 =vf0420.GetFilterRow(v01948); if (vc5b71) { v71267 =vc5b71; var v7c93 =new SelectedObject(ve3861.tblName,ve3861.gridId,v71267); return v7c93; } }else v71267 =null; } else if (v01948.type =="FilterRow")v71267 =null;  while (v71267 !=null) { if (v71267.type =="HierRecord") { if (v71267.style.display =="none") v71267 =wgGetPreviousRow(ve3861,v71267); else  { var v5dd11 =v71267.cells[v71267.cells.length-1]; var v36277 =v5dd11.childNodes[v5dd11.childNodes.length-1]; wg30210.m7c16(v36277); var vf2241 =document.getElementById("dvTB_" +v36277.gridId +"_" +v36277.tblName +"_" +v36277.subId).childNodes[0]; var vd453 =wgGetLastVisibleRow(vf2241); if (vd453) { if (vd453.element.type =="HierRecord") vd453 =wgGetLastChildVisibleRow(vd453.element); if (vd453)return vd453; } else v71267 =wgGetPreviousRow(ve3861,v71267); } } else  { if (v71267.style.display =="none" ||v71267.type =="GroupTotalRow" ||v71267.type =="PR" ||v71267.type =="CSRecord") v71267 =wgGetPreviousRow(ve3861,v71267); else  { var v7c93 =new SelectedObject(ve3861.tblName,ve3861.gridId,v71267); return v7c93; } } }  if (v71267 ==null &&v01948.type !="NewRow") { var v81274 =vf0420.Get("AllowAddNew"); if (v81274 =="Yes") { var vf964 =vf0420.GetNewRow(v01948); if (vf964) { v71267 =vf964; var v7c93 =new SelectedObject(ve3861.tblName,ve3861.gridId,v71267); return v7c93; } }  if (vf0420.Get("AllowFilter")=="Yes") { var vc5b71 =vf0420.GetFilterRow(v01948); if (vc5b71) { v71267 =vc5b71; var v7c93 =new SelectedObject(ve3861.tblName,ve3861.gridId,v71267); return v7c93; } } }  if (v71267 ==null) { var v01588 =ISGetObject(ve3861.gridId); var vf0420 =v01588.Tables[ve3861.tblName]; if (!vf0420.IsRootTable) {  var v0542 =vf0420.GetElement(WG40.COLHEADER,WG40.HTMLDIV,v01948).parentElement; if (v0542) { if (v0542.previousSibling) { v0542 =v0542.previousSibling.previousSibling; wg30210.m7c16(v0542); var v9b499 =document.getElementById("dvTB_" +v0542.gridId +"_" +v0542.tblName +"_" +v0542.subId).childNodes[0]; return wgGetLastVisibleRow(v9b499); } }  var vc1c1 =vf0420.GetParentRow(v01948); if (vc1c1) { var v0e810 =wg30210.m44c63(vc1c1); return new SelectedObject(v0e810.tblName,v0e810.gridId,vc1c1);  } } } return null;}function wgGetPrevSiblingRow(v32a67,v8f149){ var v92a70; wg30210.m7c16(v8f149); if (v8f149.type =="NewRow")return null; else if (v8f149.type =="Record") { v92a70 =wgGetPreviousRow(v32a67,v8f149); if (v92a70) { if (v92a70.type =="HierRecord") v92a70 =wgGetPreviousRow(v32a67,v92a70); else if (v92a70.type =="NewRow") v92a70 =null; } } else if (v8f149.type =="GroupHeader") { v92a70 =wgGetPreviousRow(v32a67,v8f149); if (v92a70) v92a70 =wgf1447.me1547(v92a70,v8f149.groupIndex,"previous"); if (v92a70) if (v92a70.parentIndex !=v8f149.parentIndex)v92a70 =null; } if (v92a70 ==null)return null;  var v3cc99 =new SelectedObject(v32a67.tblName,v32a67.gridId,v92a70); return v3cc99;}function wgGetFirstVisibleRow(vbc40){ var vc4e11 =null; try  { vc4e11 =vbc40.rows[0]; } catch(e){vc4e11 =null; }  if (vc4e11) wg30210.m7c16(vc4e11); if (vc4e11 &&(vc4e11.style.display =="none" ||vc4e11.type =="GroupTotalRow" ||vc4e11.type =="PR" ||vc4e11.type =="CSRecord")) { return wgGetNextVisibleRow(vbc40,vc4e11); } else  { wg30210.m7c16(vbc40); var v8e170 =ISGetObject(vbc40.gridId).Tables[vbc40.tblName]; if (v8e170.Get("AllowAddNew")=="Yes") { if (!vc4e11)vc4e11 =vbc40.parentElement.previousSibling.childNodes[0].rows[0]; vc4e11 =v8e170.GetNewRow(vc4e11); } var v3e032 =new SelectedObject(vbc40.tblName,vbc40.gridId,vc4e11); return v3e032; } return null;}function wgGetNextSiblingRow(v58970,v64b44){ var v92c81; wg30210.m7c16(v64b44); if (v64b44.type =="NewRow") return null; else if (v64b44.type =="Record") { var v75f3 =wgGetGridById(v58970.gridId); var v03d95 =v75f3.Tables[v58970.tblName]; if (v03d95.IsUseColumnSet) { v92c81 =wgGetLowestColumnSetRow(v64b44); v92c81 =wgGetNextRow(v58970,v92c81); } else v92c81 =wgGetNextRow(v58970,v64b44);  if (v92c81) { if (v92c81.type =="PR") v92c81 =wgGetNextRow(v58970,v92c81); if (v92c81 &&v92c81.type =="HierRecord") v92c81 =wgGetNextRow(v58970,v92c81); else if (v92c81.type =="NewRow" ||v92c81.type =="GroupTotalRow") v92c81 =null; } } else if (v64b44.type =="GroupHeader") { v92c81 =wgGetNextRow(v58970,v64b44); if (v92c81) v92c81 =wgf1447.me1547(v92c81,v64b44.groupIndex,"next"); if (v92c81) if (v92c81.parentIndex !=v64b44.parentIndex)v92c81 =null; } if (v92c81 ==null)return null;  var v40328 =new SelectedObject(v58970.tblName,v58970.gridId,v92c81); return v40328;}function wgGetNextVisibleRow(vc5e43,v46772){ var v38115 =ISGetObject(vc5e43.gridId); var vdd965 =v38115.Tables[vc5e43.tblName]; var v2e239 =wgGetNextRow(vc5e43,v46772); var v61b18 =false;  if (v46772.type =="NewRow") v61b18 =true; else if (wgIsFilterRow(v46772)&&vdd965.Get("AllowAddNew")=="No") v61b18 =true;  if (v61b18) { var v38115 =ISGetObject(vc5e43.gridId); var vdd965 =v38115.Tables[vc5e43.tblName]; tbl =vdd965.GetElement(WG40.BODY,WG40.HTMLTABLE,v46772); if (tbl.rows.length >0) v2e239 =tbl.rows[0]; else v2e239 =null; } while (v2e239 !=null) { if (v2e239.type =="HierRecord") { if (v2e239.style.display =="none") v2e239 =wgGetNextRow(vc5e43,v2e239); else  { var vd4250 =v2e239.cells[v2e239.cells.length-1]; var v56554 =vd4250.childNodes[0]; wg30210.m7c16(v56554); var v08744 =document.getElementById("dvTB_" +v56554.gridId +"_" +v56554.tblName +"_" +v56554.subId).childNodes[0]; var v0d897 =wgGetFirstVisibleRow(v08744); if (v0d897)return v0d897; else  v2e239 =wgGetNextRow(vc5e43,v2e239);  } } else  { if (v2e239.style.display =="none" ||v2e239.type =="GroupTotalRow" ||v2e239.type =="PR" ||v2e239.type =="CSRecord" ||!v2e239.type) v2e239 =wgGetNextRow(vc5e43,v2e239); else  { var v05a78 =new SelectedObject(vc5e43.tblName,vc5e43.gridId,v2e239); return v05a78; } } }  if (v2e239 ==null) { if (!vdd965.IsRootTable) { var v79b32 =vdd965.GetElement(WG40.COLHEADER,WG40.HTMLDIV,v46772).parentElement; if (v79b32) { if (v79b32.nextSibling) { v79b32 =v79b32.nextSibling.nextSibling; wg30210.m7c16(v79b32); var v46d72 =document.getElementById("dvTB_" +v79b32.gridId +"_" +v79b32.tblName +"_" +v79b32.subId).childNodes[0]; return wgGetFirstVisibleRow(v46d72); } } var vcbc50 =vdd965.GetParentRow(v46772); if (vcbc50) { var v10664 =wg30210.m44c63(vcbc50); vcbc50 =wgGetNextSiblingRow(v10664,vcbc50); if (!vcbc50) return null;  vcbc50 =wgGetPreviousRow(v10664,vcbc50.element); return wgGetNextVisibleRow(v10664,vcbc50); } } } return null;}var wga3a74 ={ m0a482:function(va6414,ve9d47,v67a29) {  var v92999; if (!va6414)return;  if (va6414.tagName !="TD") { v92999 =va6414; va6414 =wg30210.m0d468(va6414); } if (!va6414)return; if (va6414.tagName =="TD") { var v2db49 =va6414.parentElement; var vd3d60;  wg30210.m7c16(va6414); wg30210.m7c16(v2db49); if (!va6414.type)return; if (wgIsValidClickableCell(va6414)||wgIsValidRow(v2db49)) { if (va6414.type =="RowSelector")ve9d47 =true; var v4587 =wg30210.m44c63(v2db49); var v90475 =ISGetObject(v4587.gridId); if (!v90475.Enabled)return; var v00156 =v90475.Tables[v4587.tblName];  var vefe80 =v00156.Get("CellClickAction"); var ve213 =v00156.GetSelRowStyle(); var vb998 =v00156.GetFocusCellStyle();  var vf2044 =v90475.LayoutSettings.ImageSettings.Folder +v90475.LayoutSettings.ImageSettings.CurrentRowImage; var v9861 =false; if (!v67a29) if (!ISEvent.Raise(v90475.LayoutSettings.ClientSideEvents.OnCellClick,v90475.Id,v00156.Id,v2db49.rowIndex,va6414.cellIndex,va6414)) return; if (vefe80 =="RowSelect" ||vefe80 =="CellSelect" ||wgIsValidRow(v2db49)) { var v27242 =v00156.Get("AllowEdit")=="Yes"; if (v90475.LastSelObj &&(v90475.ActiveEditCell ||v90475.LastEditObj)) { vd3d60 =v90475.LastSelObj.element; if (vd3d60.tagName =="TD")vd3d60 =vd3d60.parentElement;  if (!wgIsSameRow(vd3d60,v2db49)||ve9d47) { var v4370 =v90475.ExitEdit(1)[0]; if (!v4370)return; } else  { if (((v27242 ||(v2db49.type =="NewRow"))||v2db49.type =="FilterRow")&&!ve9d47 &&v2db49.type !="GroupHeader") { if (v92999) { if (v92999.rowChecker) wgf1447.m85641(v92999,event.shiftKey); else wg99e67.mf3b93(v92999,va6414); } wga3a74.mbef17(v90475,v00156,v92999,va6414); v9861 =true; if (v90475.LastEditObj) { var v4370 =v90475.ExitEditMode(); if (v4370 &&(vefe80 !="CellSelect" ||v2db49.type =="NewRow" ||v2db49.type =="FilterRow")) { wg99e67.m04261(va6414); var vdab43 =v90475.LayoutSettings.EditOnClick; if (vdab43 ||v2db49.type =="NewRow" ||v2db49.type =="FilterRow") { if (wgIsFilterRow(v2db49)&&v92999 &&v92999.tagName =="IMG")return; if (!v67a29 &&event.button !=2)v90475.ActivateEditMode(); if (v2db49.type =="NewRow" ||wgIsFilterRow(v2db49)||vdab43)return; } else  { va6414.setActive(); return; } } else  return; } else  { if (vefe80 !="CellSelect") { wg99e67.m04261(va6414); if (v90475.LayoutSettings.EditOnClick ||v2db49.type =="NewRow" ||v2db49.type =="FilterRow") { if (wgIsFilterRow(v2db49)&&v92999 &&v92999.tagName =="IMG")return; if (!v67a29 &&event.button !=2)v90475.ActivateEditMode(); } return; } } } } } }  var vb7c11 =false; if ((vefe80 =="RowSelect" ||va6414.type =="RowSelector" ||v2db49.type =="GroupHeader" ||v2db49.type =="NewRow" ||v2db49.type =="FilterRow")) { vb7c11 =true; } if (vb7c11) { if (va6414.type =="RowSelector") { if (!ISEvent.Raise(v90475.LayoutSettings.ClientSideEvents.OnRowSelectorClick,v90475.Id,v00156.Id,v2db49.rowIndex,v2db49)) return;  ve9d47 =true; } if (v2db49.type =="NewRow") wga3a74.m7d366(v90475,v2db49); wga3a74.mdd416(v2db49,vf2044);  if (wgIsColumnSetRow(v2db49)&&va6414.type =="RowSelector" &&vefe80 =="CellSelect") { wg99e67.m2eb68(va6414); wga3a74.m74878(v2db49,ve213,vb998,"Forcedraw",true); } else wga3a74.m74878(v2db49,ve213,vb998,"",v67a29);  if (((v27242 &&(v2db49.type =="Record" ||v2db49.type =="CSRecord"))||v2db49.type =="FilterRow")&&!ve9d47) { if (v90475.HasFocus()) { wg99e67.m04261(va6414); if (wgIsFilterRow(v2db49)&&v92999 &&v92999.tagName =="IMG")return; if (v90475.LayoutSettings.EditOnClick)v90475.ActivateEditMode(); } else  { wg99e67.m04261(va6414,"Nodraw"); } } else if (wgIsRecordRow(v2db49)&&!v27242) v90475.ActiveEditCell =null;  if (ve9d47 &&v27242) { if (v90475.HasFocus()) va6414.setActive(); }  if ((v2db49.type =="GroupHeader" ||!v27242)&&v90475.ActiveEditCell &&v90475.ActiveEditCell.rowElement.type =="NewRow") { wg99e67.m76e59(v90475.ActiveEditCell.rowElement); v90475.ActiveEditCell =null; } else if (v2db49.type =="NewRow") { wg99e67.m7228(v2db49); if (!v67a29) v90475.ActivateEditMode(); } else if (v2db49.type =="FilterRow") v90475.ActivateEditMode(); else if (v2db49.type =="GroupHeader" &&v90475.ActiveEditCell) v90475.ActiveEditCell =null; } else if (vefe80 =="CellSelect" &&v2db49.type !="PR") { if (vd3d60) { if (!wgIsSameRow(vd3d60,v2db49)) wga3a74.mdd416(v2db49,vf2044); } else wga3a74.mdd416(v2db49,vf2044);  wga3a74.m08f13(va6414,ve213,vb998,"",v67a29);  if (v90475.LayoutSettings.EditOnClick) v90475.ActivateEditMode(); } }  if (v92999 &&v92999.type =="checkbox") { wg30210.m7c16(v92999); if (v92999.rowChecker) wgf1447.m85641(v92999,event.shiftKey); else  { if (typeof(wg99e67)!="undefined") { if (typeof(wg99e67.mf3b93)=="function") wg99e67.mf3b93(v92999,va6414); } } }  if (!v9861) wga3a74.mbef17(v90475,v00156,v92999,va6414); } },  mbef17:function(v49153,v7b312,vc3f54,v4f141) { if (vc3f54 &&vc3f54.tagName =="BUTTON") { wg30210.m7c16(vc3f54); if (vc3f54.disabled)return;  var vbac12 =wgGetColNameByCell(v4f141); var v2ad40 =ISEvent.Raise(v49153.LayoutSettings.ClientSideEvents.OnButtonClick,v49153.Id,v7b312.Id,vbac12,vc3f54.keyValue);  if (v2ad40) { if (IS.moz) { event.cancelBubble =true; event.returnValue =false; }  var v6ee55 =v7b312.Columns.GetNamedItem(vbac12); if (v6ee55.ButtonAutoPostback) { var vdcb26 =v6ee55.ButtonPostbackMode; if (vdcb26 =="OnTheFly") { wg30210.mb0d0(v49153.Name,"ButtonClick",vc3f54); } else  { var v8a035 =v49153.Name +"\03" +v7b312.Id +"\03" +vbac12 +"\03" +vc3f54.keyValue; __doPostBack(v49153.ServerUniqueID,"ButtonClick:" +v8a035); } } } } }, m7d366:function(va5796,vba926) { var vba642; var v73f53 =vba926.cells;  for (var v3bf84=0; v3bf84<v73f53.length; v3bf84++) { if (v73f53[v3bf84].type =="NewRowInfoCell") { vba642 =v73f53[v3bf84]; break; } }  if (vba642) { var vf9b34 =va5796.Tables[wg30210.ma1652(vba926)]; if (vf9b34.IsUseColumnSet) { wgd5194.m8ce59(va5796,vf9b34,vba926,vba642); return; }  vba926.origColSpan =vba642.colSpan; vba926.infoText =vba642.innerText; vba642.colSpan =1; vba642.innerText =" "; vba642.type ="Cell"; vba926.oldClassName =vba642.className; vba642.className =va5796.RowClass; for (var v3bf84=0; v3bf84<vba926.origColSpan-1; v3bf84++) { var v65497 =vba926.insertCell(-1); v65497.type ="Cell"; v65497.className =va5796.RowClass; } wg99e67.m74b60(va5796,vba926); } }, mb9420:function(v79f91) { var v8cc57; var vb937 =v79f91.cells; var v2a461 =wg30210.m44c63(v79f91); var vc3e63 =wgGetGridById(v2a461.gridId); var ve0827 =vc3e63.Tables[v2a461.tblName];  if (ve0827.IsUseColumnSet) { wgd5194.me2194(vc3e63,ve0827,v79f91); return; } for (var vcf066=0; vcf066<vb937.length; vcf066++) { if (vb937[vcf066].type =="Cell") { v8cc57 =vb937[vcf066]; break; } }  if (v8cc57) { var vfa774 =0; for (var vcf066=0; vcf066<v79f91.origColSpan-1; vcf066++) { v79f91.deleteCell(v8cc57.cellIndex+1); vfa774++; } v8cc57.colSpan =v79f91.origColSpan; v8cc57.innerText =v79f91.infoText; v8cc57.type ="NewRowInfoCell"; v8cc57.style.cssText =""; v8cc57.className =v79f91.oldClassName; } }, m48577:function(vd5b35) { for (var v21571=0; v21571<vd5b35.childNodes.length; v21571++) { if (vd5b35.childNodes[v21571].tagName =="SPAN" &&vd5b35.childNodes[v21571].getAttribute("content")=="") return vd5b35.childNodes[v21571]; else if (vd5b35.childNodes[v21571].childNodes.length >0) { var v80860 =wga3a74.m48577(vd5b35.childNodes[v21571]); if (v80860)return v80860; } } return null; }, m9ba48:function(vc2980,v3c857,v1f026) { var v28b32 =wgGetCellCount(vc2980); var v87141 =wg30210.m44c63(vc2980); if (!vc2980 ||!v87141)return;  var vdee5 =ISGetObject(v87141.gridId); var vcd469 =vdee5.Tables[v87141.tblName]; var v85e62 =vcd469.GetSelRowStyle(); var v4d417 =vcd469.GetFocusCellStyle(); var v5fb89 =false; var vaaf95;  if (v4d417 !="") v4d417 =v4d417.substring(v4d417.indexOf(":")+1);  if (wgGetActiveGrid()!=vdee5.Name)v1f026 =true; if (v1f026) { v85e62 =vdee5.GetBlurRowStyle(); v4d417 ="0px"; } else  { if (v3c857 =="CheckedRow") { v85e62 =vcd469.GetCheckedRowStyle(); if (v85e62 =="")return; v4d417 =""; } } if (wgIsColumnSetRow(vc2980)||(vcd469.PreviewRowVisible &&vc2980.type !="GroupHeader" &&vc2980.type !="NewRow")) { wgd5194.m2fe23(vc2980,v3c857,v1f026); return; } if (vcd469.SelfReferencingSettings.Enabled &&vcd469.SelfReferencingSettings.IsTreeViewSelectionMode &&vc2980.type !="GroupHeader") { var v30e42 =vcd469.SelfReferencingSettings.ExpandColumnMember; var va4e40 =wgGetCellByName(vc2980,v30e42); var v80189 =wga3a74.m48577(va4e40);  if (v3c857 =="Clear") v80189.runtimeStyle.cssText =""; else { if (v3c857 !="Redraw") v80189.runtimeStyle.cssText =v85e62; v80189.runtimeStyle.border =v4d417; }  return; } for (var v2a12=0; v2a12<vc2980.cells.length; v2a12++) { var v93369 =vc2980.cells[v2a12]; wg30210.m7c16(v93369); if (v93369.type =="Cell" ||v93369.type =="GroupCell" ||v93369.type =="FilterColumn") { if (v3c857 =="Clear") { with (v93369.runtimeStyle) { cssText =""; } } else  { if (v3c857 !="Redraw") { v93369.runtimeStyle.cssText =v85e62; } if (!v5fb89) { v5fb89 =true; v93369.runtimeStyle.borderLeft =v4d417; v93369.runtimeStyle.borderTop =v4d417; v93369.runtimeStyle.borderBottom =v4d417; if (v28b32 >1 ||v93369.type =="GroupCell") v93369.runtimeStyle.borderRightWidth ="0"; else v93369.runtimeStyle.borderRight =v4d417; } else  { vaaf95 =v93369; v93369.runtimeStyle.borderTop =v4d417; v93369.runtimeStyle.borderBottom =v4d417; v93369.runtimeStyle.borderLeftWidth ="0"; v93369.runtimeStyle.borderRightWidth ="0"; } } } } if (vaaf95) { with (vaaf95.runtimeStyle) { borderRight =v4d417; borderTop =v4d417; borderBottom =v4d417; borderLeftWidth ="0"; } } if (v3c857 =="Clear" &&vc2980.isRowChecked &&!v1f026)wga3a74.m9ba48(vc2980,"CheckedRow"); },  m74878:function(v38f30,v84979,v17522,v9a958,vda387) { if (!v38f30)return; if (v9a958 =="Clear" &&v38f30.tagName =="TD") { wga3a74.m08f13(v38f30,v84979,v17522,"Clear"); return; } if (v9a958 =="Clear") { var v3715 =wg30210.m44c63(v38f30); if (!v3715)return; var v9a168 =ISGetObject(v3715.gridId); if (!wg30210.mad387(v9a168.LastSelObj))return; } else  { var v3715 =wg30210.m44c63(v38f30); var v9a168 =ISGetObject(v3715.gridId); if (v38f30.type =="PR")v38f30 =wgGetPreviousRow(v3715,v38f30); if (v9a168.LastSelObj &&!wgIsSameRow(v9a168.LastSelObj.element,v38f30)) { wga3a74.m74878(v9a168.LastSelObj.element,"","","Clear"); if (v9a168.LastSelObj.element.type =="NewRow") { wga3a74.mb9420(v9a168.LastSelObj.element); } } else  { if (v9a168.LastSelObj &&wgIsSameRow(v9a168.LastSelObj.element,v38f30)&&v9a958 !="Forcedraw" ) return; }  if (!vda387) { if (!ISEvent.Raise(v9a168.LayoutSettings.ClientSideEvents.OnBeforeRowSelect,v9a168.Id,v3715.tblName,v9a168.LastSelObj)) return; }  var v4b99 =new SelectedObject(v3715.tblName,v3715.gridId,v38f30); v4b99.type ="Row"; v4b99.rowIndex =v38f30.rowIndex; v9a168.LastSelObj =v4b99; if (!vda387) { if (!ISEvent.Raise(v9a168.LayoutSettings.ClientSideEvents.OnRowSelect,v9a168.Id,v3715.tblName,v38f30.rowIndex,v38f30)) return; } }  wga3a74.m9ba48(v38f30,v9a958); },  m08f13:function(vf5034,v21e74,v08229,v4bf80,ve9f78) { if (!vf5034.origStyle)vf5034.origStyle =vf5034.style.cssText; if (v08229 !="") v08229 =v08229.substring(v08229.indexOf(":")+1);  if (v4bf80 =="Clear" &&vf5034.tagName =="TR") { wga3a74.m74878(vf5034,v21e74,v08229,"Clear"); return; }  if (v4bf80 =="Clear") { } else  { var v98a84 =wg30210.m44c63(vf5034.parentElement); var vb7352 =ISGetObject(v98a84.gridId);  if (vb7352.LastSelObj &&vb7352.LastSelObj.element !=vf5034) { wga3a74.m08f13(vb7352.LastSelObj.element,"","","Clear"); } if (vb7352.LastSelObj &&vb7352.LastSelObj.GetRowElement()!=vf5034.parentElement) { var v30a33 =vb7352.LastSelObj.GetRowElement(); if (v30a33 &&v30a33.type =="NewRow") { wga3a74.m74878(v30a33,"","","Clear"); wga3a74.mb9420(v30a33); } }  var v52b10 =new SelectedObject(v98a84.tblName,v98a84.gridId,vf5034); var v01021 =vb7352.Tables[v98a84.tblName];  v52b10.type ="Cell"; v52b10.rowIndex =vf5034.parentElement.rowIndex; v52b10.cellIndex =wgGetCellPosByName(vf5034.parentElement,vf5034); v01021.LastAECIndex =vf5034.cellIndex; vb7352.LastSelObj =v52b10; if (!ve9f78) if (!ISEvent.Raise(vb7352.LayoutSettings.ClientSideEvents.OnCellSelect,v98a84.gridId,v98a84.tblName,v52b10.rowIndex,v52b10.cellIndex,vf5034)) return;  var vb4c18 =v01021.Get("AllowEdit")=="Yes"; if (vb4c18) { vb7352.ActiveEditCell =new wgActiveCell(v98a84.gridId,v98a84.tblName,vf5034); vb7352.ActiveEditCell.rowElement =vf5034.parentElement; }  } if (v4bf80 =="Clear") { vf5034.runtimeStyle.cssText =""; if (vf5034.stripedClass) { vf5034.className +=vf5034.stripedClass; vf5034.stripedClass =""; } } else  { with (vf5034.runtimeStyle) { cssText =v21e74; borderLeft =borderRight =borderBottom =borderTop =v08229; }  if (vf5034.className.indexOf("DefNoBrdBottom")>=0) { vf5034.className =vf5034.className.replace(/DefNoBrdBottom/g,""); vf5034.stripedClass ="DefNoBrdBottom "; }  if (vf5034.className.indexOf("DefNoBrdRight")>=0) { vf5034.className =vf5034.className.replace(/DefNoBrdRight/g,""); vf5034.stripedClass +="DefNoBrdRight "; } } }, mdd416:function(v50028,ve1418) { if (!v50028)return; var vdc620 =wg30210.m44c63(v50028); if (!vdc620)return;  var v13b67 =ISGetObject(vdc620.gridId); if(v13b67.LastSelObj &&ve1418 !=null) { obj =v13b67.LastSelObj.element; if (obj.tagName =="TR") wga3a74.mdd416(obj,null); else wga3a74.mdd416(obj.parentElement,null); } if (!v13b67)return;  if (wgIsColumnSetRow(v50028)) v50028 =wgGetColumnSetRow(v50028); else if (v50028.type =="PR") v50028 =wgGetPreviewRowParent(v50028); var vc3643 =wgGetRowHeader(v50028); if (!vc3643)return;  if (ve1418) { vc3643.innerHTML ="<img src='" +ve1418 +"' align='absmiddle'>"; } else  { if (v50028.type =="NewRow") { ve1418 =v13b67.LayoutSettings.ImageSettings.Folder +v13b67.LayoutSettings.ImageSettings.NewRowImage; vc3643.innerHTML ="<img src='" +ve1418 +"' align='absmiddle'>"; } else vc3643.innerHTML ="&nbsp;"; } v50028.markedEdit =false; }, m97b31:function(ve6287) { var vc7f54 =event.srcElement; var vf2f29; if (vc7f54.tagName !="TD")vc7f54 =wg30210.m0d468(vc7f54); if (!vc7f54 ||vc7f54.tagName !="TD")return; if (vc7f54.tagName =="TD")vf2f29 =wg30210.m44c63(vc7f54.parentElement); else if (vc7f54.tagName =="TR")vf2f29 =wg30210.m44c63(vc7f54); if (!vf2f29)return; if (vf2f29.tagName !="TABLE" ||!vf2f29.gridId)return; if (vf2f29.tblName !=ve6287)return;  var v2b487 =ISGetObject(vf2f29.gridId); var vc2e83 =v2b487.Tables[vf2f29.tblName]; var v09a91 =vc7f54.parentElement; if (!ISEvent.Raise(v2b487.LayoutSettings.ClientSideEvents.OnCellDblClick,vf2f29.gridId,vf2f29.tblName,v09a91.rowIndex,vc7f54.cellIndex,vc7f54)) return; if (v09a91.type =="GroupHeader") { wgf1447.mc2488(v2b487,wgGetCellByPosition(v09a91,0).childNodes[0],v09a91.expanded); wgf1447.mdfa58(null,v09a91); } else if (wgIsRecordRow(v09a91)) { if (!v2b487.LayoutSettings.EditOnClick) { if (vc2e83.Get("AllowEdit")=="Yes") v2b487.ActivateEditMode(); else  { if (typeof(v09a91.srLevel)!="undefined") wgToggleSelfRefRow(v09a91); } } } event.cancelBubble =true; event.returnValue =false; },  m92b35:function() { if (IS.moz &&wg_Global.LastKeyDownProcessed) { event.cancelBubble =true; event.returnValue =false; } }, m83314:function(v7dc47) { var v1fe68 =(v7dc47 ? v7dc47 : event); var v78583 =v1fe68.srcElement; if (!v78583)v78583 =v1fe68._srcElement; var tbl,v2b582;  if (v78583.tagName =="TD") { tbl =wg30210.m44c63(v78583.parentElement); v2b582 =v78583.parentElement; } else if (v78583.tagName =="TR") { tbl =wg30210.m44c63(v78583); v2b582 =v78583; } else if (v78583.tagName =="SPAN" ||v78583.tagName =="NOBR") { v78583 =wg30210.m0d468(v78583); v2b582 =v78583.parentElement; tbl =wg30210.m44c63(v78583); } if (!tbl)return; if (tbl.tagName !="TABLE" ||!tbl.gridId)return;  var vd9365 =ISGetObject(tbl.gridId); var v38e11 =vd9365.Tables[tbl.tblName]; var veb725 =false; var v52398 =false; var vcc060 =false; var v56195 =true; var v0df44 =false; var v4ef33 =vd9365.LastSelObj; var v42265 =false; var vefc53 =null;  if (IS.moz) { if (v4ef33) { v78583 =v4ef33.element; tbl =wg30210.m44c63(v78583); } }  if (tbl !=v38e11.GetElement(WG40.BODY,WG40.HTMLTABLE,v2b582)) { if (!v4ef33)return; v78583 =v4ef33.element; tbl =wg30210.m44c63(v78583); } try  { if (!ISEvent.Raise(vd9365.LayoutSettings.ClientSideEvents.OnKeyDown,vd9365.Name,tbl.tblName,v78583.parentElement.rowIndex,v78583.cellIndex)) return; }catch (e){return;} var v4f799 =v38e11.Get("CellClickAction"); if (v4f799 =="None")v52398 =true; if (v52398) { event.cancelBubble =true; return; } var vd0b97 =new SelectedObject(tbl.tblName,tbl.gridId,null); var v28710 =false; var ve8752 =false; if (v1fe68.keyCode ==187 &&v1fe68.ctrlKey)v28710 =true; if (v1fe68.keyCode ==189 &&v1fe68.ctrlKey)ve8752 =true; switch(v1fe68.keyCode) { case 35: var v2b582 =v4ef33.element; if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v4f799 =="RowSelect" ||v2b582.type =="GroupHeader") { try  { vd0b97 =wgGetLastVisibleRow(tbl); } catch(e){} } else  { if (v2b582.type !="NewRow") { vd0b97.cellIndex =wgGetCellCount(v4ef33.element.parentElement)-1; vd0b97.element =wgGetCellByPosition(v4ef33.element.parentElement,vd0b97.cellIndex ); } }  if (vd0b97) { var v08842 =vd9365.Tables[vd0b97.tblName].Get("CellClickAction"); if (v08842 =="RowSelect" ||v2b582.type =="GroupHeader") vd0b97.type ="Row"; else if (v08842 =="CellSelect") vd0b97.type ="Cell"; vcc060 =true; veb725 =true; }  if (!v1fe68.ctrlKey &&v4f799 !="CellSelect") { if (v2b582.type =="NewRow" ||wgIsFilterRow(v2b582)||(wgIsRecordRow(v2b582)&&v38e11.Get("AllowEdit")=="Yes" )) { var va8c20 =wgGetLastEditableCell(v2b582); if (va8c20)wg99e67.m04261(va8c20); vcc060 =false; } } break; case 36: var v2b582 =v4ef33.element; if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement;  if (v4f799 =="RowSelect" ||v2b582.type =="GroupHeader") vd0b97 =wgGetFirstVisibleRow(tbl); else  { if (v2b582.type !="NewRow") { vd0b97.element =wgGetCellByPosition(v4ef33.element.parentElement,0); vd0b97.cellIndex =0; } }  if (vd0b97) { var v08842 =vd9365.Tables[vd0b97.tblName].Get("CellClickAction"); if (v08842 =="RowSelect" ||v2b582.type =="GroupHeader") vd0b97.type ="Row"; else if (v08842 =="CellSelect") { vd0b97.type ="Cell"; } vcc060 =true; veb725 =true; }  if (!v1fe68.ctrlKey &&v4f799 !="CellSelect") { if (v2b582.type =="NewRow" ||wgIsFilterRow(v2b582)||(wgIsRecordRow(v2b582)&&v38e11.Get("AllowEdit")=="Yes" )) { wg99e67.m7228(v2b582); vcc060 =false; } } break; case 9: if (v1fe68.ctrlKey) { while (true) { var vfca21; if (!v1fe68.shiftKey) vfca21 =wgGetNextFocusableElement(vd9365,null,vfca21); else vfca21 =wgGetPrevFocusableElement(vd9365,null,vfca21); if (vfca21) { if (vd9365.LastEditObj) vd9365.ExitEditMode(); try  { vfca21.focus(); break; }catch(e){} }else break; } vcc060 =false; veb725 =true; break; } case 37: if (v1fe68.keyCode ==37 ||(v1fe68.keyCode ==9 &&v1fe68.shiftKey)) { var v2b582 =v4ef33.element; if (v4f799 =="RowSelect" ||v2b582.type =="GroupHeader" ||v2b582.type =="NewRow" ||wgIsFilterRow(v2b582)) { if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v2b582.type =="GroupHeader" &&v2b582.expanded =="True") { wgf1447.mc2488(vd9365,wgGetCellByPosition(v2b582,0).childNodes[0],v2b582.expanded); wgf1447.mdfa58(null,v2b582); } else if (typeof(v2b582.srLevel)!="undefined" &&!v38e11.Get("AllowEdit")=="Yes") { if (v4f799 !="CellSelect") { var vc0b47 =wgf1447.m6286(v38e11,v2b582); wgf1447.mc2488(vd9365,vc0b47,v2b582.srExpanded); wgf1447.mb1279(vc0b47); } } else if (v2b582.type =="NewRow" ||wgIsFilterRow(v2b582)||(wgIsRecordRow(v2b582)&&v38e11.Get("AllowEdit")=="Yes" )) { if (!wgActiveCellValid(vd9365,v2b582)) { wg99e67.m7228(v2b582); } else  { var vf3f43 =wgGetPrevEditableCell(vd9365.ActiveEditCell.element,v2b582); if (vf3f43) { if (!vf3f43.rowChanged) { wg99e67.m04261(vf3f43.element); if (wgIsColumnSetRow(v2b582))vf3f43.element.setActive(); }  if (vf3f43.rowChanged) { v2b582 =vf3f43.rowElement; vd0b97.type ="Row"; vd0b97.element =v2b582; vcc060 =true; if (vf3f43.element) { v42265 =true; vefc53 =vf3f43.element; } } if (wgIsColumnSetRow(v2b582))v56195 =false; } } } } else if (v4f799 =="CellSelect") { if (v4ef33.cellIndex-1 >=0){ vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,null); vd0b97.cellIndex =v4ef33.cellIndex -1; vd0b97.rowIndex =v4ef33.rowIndex; vd0b97.type ="Cell"; vd0b97.element =wgGetCellByPosition(v4ef33.element.parentElement,vd0b97.cellIndex); vcc060 =true; } }  veb725 =true; break; } case 9: if (v1fe68.shiftKey)break; case 39: var v2b582 =v4ef33.element;  if (v4f799 =="RowSelect" ||v4ef33.element.type =="GroupHeader" ||v2b582.type =="NewRow" ||wgIsFilterRow(v2b582)) { if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v2b582.type =="GroupHeader" &&v2b582.expanded =="False") { wgf1447.mc2488(vd9365,wgGetCellByPosition(v2b582,0).childNodes[0],v2b582.expanded); wgf1447.mdfa58(null,v2b582); } else if (typeof(v2b582.srLevel)!="undefined" &&!v38e11.Get("AllowEdit")=="Yes") { if (v4f799 !="CellSelect") { var vc0b47 =wgf1447.m6286(v38e11,v2b582); wgf1447.mc2488(vd9365,vc0b47,v2b582.srExpanded); wgf1447.mb1279(vc0b47); } } else if (v2b582.type =="NewRow" ||wgIsFilterRow(v2b582)||(wgIsRecordRow(v2b582)&&v38e11.Get("AllowEdit")=="Yes" )) { if (!wgActiveCellValid(vd9365,v2b582)){ wg99e67.m7228(v2b582); } else  { var vc9423 =wgGetNextEditableCell(vd9365.ActiveEditCell.element,v2b582); if (vc9423){ if (!vc9423.rowChanged) { wg99e67.m04261(vc9423.element); if (wgIsFilterRow(v2b582)) { wga3a74.m76f3(vd9365,vc9423.element); } if (wgIsColumnSetRow(v2b582))vc9423.element.setActive(); }  if (vc9423.rowChanged) { v2b582 =vc9423.rowElement; vd0b97.type ="Row"; vd0b97.element =v2b582; vcc060 =true; if (vc9423.element) { v42265 =true; vefc53 =vc9423.element; } } if (wgIsColumnSetRow(v2b582))v56195 =false; } } } } else if (v4f799 =="CellSelect") { var v5b023 =(v4ef33.element.tagName =="TR" ? v4ef33.element : v4ef33.element.parentElement); if (!vd9365.LastEditObj) { if (v4ef33.cellIndex+1 <wgGetCellCount(v5b023)) { vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,null); vd0b97.cellIndex =v4ef33.cellIndex +1; vd0b97.rowIndex =v4ef33.rowIndex; vd0b97.type ="Cell"; vd0b97.element =wgGetCellByPosition(v5b023,vd0b97.cellIndex); vcc060 =true; } } else  { var v82d47 =v4ef33.GetRowElement(); if (wgIsRecordRow(v82d47)&&v38e11.Get("AllowEdit")=="Yes") { var vc9423 =wgGetNextEditableCell(vd9365.ActiveEditCell.element,v82d47); if (vc9423) { vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,null); vd0b97.cellIndex =vc9423.element.cellIndex; vd0b97.rowIndex =v82d47.rowIndex; vd0b97.type ="Cell"; vd0b97.element =vc9423.element; } vcc060 =true; } } } veb725 =true; break;  case 38: var ve8480;  var v2b582 =v4ef33.element; if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v1fe68.ctrlKey) { vd0b97 =wgGetPrevSiblingRow(tbl,v2b582); if (!vd0b97)vd0b97 =wgGetPrevVisibleRow(tbl,v2b582); } else vd0b97 =wgGetPrevVisibleRow(tbl,v2b582); if (v38e11.Get("AllowEdit")=="Yes" &&!wgActiveCellValid(vd9365,v2b582)) { if (!wgIsColumnSetRow(v2b582)) wg99e67.m7228(v2b582); else v56195 =false; } else  { if (wgIsColumnSetRow(v2b582)&&(v38e11.Get("AllowEdit")=="Yes" ||wgIsFilterRow(v2b582))) { var v78583 =vd9365.ActiveEditCell.element; var vcdf68 =wgGetCSPrevEditableRow(tbl,v78583,v78583.cs,v78583.c,true);  if (vcdf68 &&vcdf68.element &&vcdf68.element.type !="GroupHeader" &&vcdf68.element.type !="NewRow") { if (vcdf68 &&v38e11.Id ==vcdf68.tblName) { if (wgIsSameRow(vcdf68.rowElement,v2b582)) { v0df44 =true; v42265 =true; v56195 =false; vefc53 =vcdf68.element; vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,null); vd0b97.type ="Row"; vd0b97.element =vcdf68.rowElement; } else  { v56195 =false; vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,null); vd0b97.type ="Row"; vd0b97.element =vcdf68.rowElement; if (vcdf68.element) { v42265 =true; vefc53 =vcdf68.element; } } } } else  { if (!event.ctrlKey) vd0b97 =wgGetPrevVisibleRow(tbl,v78583.parentElement); } } }  if (vd0b97) { var v08842 =vd9365.Tables[vd0b97.tblName].Get("CellClickAction");  if (v08842 =="RowSelect" ||vd0b97.element.type =="GroupHeader" ||vd0b97.element.type =="NewRow" ||vd0b97.element.type =="FilterRow") vd0b97.type ="Row"; else if (v08842 =="CellSelect") { vd0b97.type ="Cell"; if (v4ef33.tblName ==vd0b97.tblName) { vd0b97.cellIndex =v4ef33.cellIndex; vd0b97.element =wgGetCellByPosition(vd0b97.element,vd0b97.cellIndex); } else  { if (vd9365.Tables[vd0b97.tblName].LastAECIndex !=-1) { vd0b97.cellIndex =vd9365.Tables[vd0b97.tblName].LastAECIndex; vd0b97.element =wgGetValidActiveCell(vd0b97.element.cells[vd0b97.cellIndex]); } else vd0b97.element =wgGetCellByPosition(vd0b97.element,vd0b97.cellIndex); } } vcc060 =true; veb725 =true; } break; case 40: var ve8480; var v2b582 =v4ef33.element; if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v4ef33.tblName !=tbl.tblName)tbl =wg30210.m44c63(v2b582); if (v1fe68.ctrlKey) { vd0b97 =wgGetNextSiblingRow(tbl,v2b582); if (!vd0b97)vd0b97 =wgGetNextVisibleRow(tbl,v2b582); } else vd0b97 =wgGetNextVisibleRow(tbl,v2b582); if (v38e11.Get("AllowEdit")=="Yes" &&!wgActiveCellValid(vd9365,v2b582)) { if (!wgIsColumnSetRow(v2b582)) wg99e67.m7228(v2b582); else v56195 =false; } else  { if (wgIsColumnSetRow(v2b582)&&(v38e11.Get("AllowEdit")=="Yes" ||wgIsFilterRow(v2b582))) { var v78583 =vd9365.ActiveEditCell.element; var vcdf68 =wgGetCSNextEditableRow(tbl,v78583,v78583.cs,v78583.c,true); if (vcdf68 &&vcdf68.element &&vcdf68.element.type !="GroupHeader" &&vcdf68.element.type !="NewRow") { if (vcdf68 &&v38e11.Id ==vcdf68.tblName) { if (wgIsSameRow(vcdf68.rowElement,v2b582)) { v0df44 =true; v42265 =true; v56195 =false; vefc53 =vcdf68.element; vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,null); vd0b97.type ="Row"; vd0b97.element =vcdf68.rowElement;  } else  { v56195 =false; vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,null); vd0b97.type ="Row"; vd0b97.element =vcdf68.rowElement; if (vcdf68.element) { v42265 =true; vefc53 =vcdf68.element; } } } } else  { if (!event.ctrlKey) vd0b97 =wgGetNextVisibleRow(tbl,v78583.parentElement); } } }  if (vd0b97) { var v08842 =vd9365.Tables[vd0b97.tblName].Get("CellClickAction"); if (v08842 =="RowSelect" ||vd0b97.element.type =="GroupHeader" ||vd0b97.element.type =="NewRow") vd0b97.type ="Row"; else if (v08842 =="CellSelect") { vd0b97.type ="Cell"; if (v4ef33.tblName ==vd0b97.tblName) { vd0b97.cellIndex =v4ef33.cellIndex; vd0b97.element =wgGetCellByPosition(vd0b97.element,vd0b97.cellIndex); } else  { if (vd9365.Tables[vd0b97.tblName].LastAECIndex !=-1) { vd0b97.cellIndex =vd9365.Tables[vd0b97.tblName].LastAECIndex; vd0b97.element =wgGetValidActiveCell(vd0b97.element.cells[vd0b97.cellIndex]); } else  { vd0b97.element =wgGetCellByPosition(vd0b97.element,vd0b97.cellIndex); } } } vcc060 =true; veb725 =true; } break; case 46: var v2b582 =v4ef33.element; if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v38e11.Get("AllowDelete")=="Yes" &&wgIsRecordRow(v2b582)) { var v10879 =true; if (vd9365.LayoutSettings.PromptBeforeDelete) v10879 =confirm(vd9365.GetString("MessageBoxText/DeleteRow"));  if (v10879) { wg99e67.md7322(vd9365,v2b582); veb725 =true; } else { event.cancelBubble =true; } } break; case 107: if (v4f799 =="RowSelect") { var v82d47 =v4ef33.element; if (v4ef33.type =="Cell")v82d47 =v82d47.parentElement; if (wgIsRecordRow(v82d47)) { var v59e13; v82d47 =wgGetRootRow(v82d47); for (var v09547=0; v09547<v82d47.cells.length;v09547++) { if (v82d47.cells[v09547].type =="CellExpander") { v59e13 =v82d47.cells[v09547]; break; } } if (v59e13 &&(v82d47.childExpanded =="True")){ wg55c21.m01984(vd9365,v59e13,"True"); wg55c21.m5fb16(null,v82d47); } } } veb725 =true; break; case 109: if (v4f799 =="RowSelect") { var v82d47 =v4ef33.element; if (v4ef33.type =="Cell")v82d47 =v82d47.parentElement; if (wgIsRecordRow(v82d47)) { var v59e13; for (var v09547=0; v09547<v82d47.cells.length;v09547++){ if (v82d47.cells[v09547].type =="CellExpander"){ v59e13 =v82d47.cells[v09547]; break; } } if (v59e13 &&(v82d47.childExpanded =="False" ||!v82d47.childExpanded)) { wg55c21.m01984(vd9365,v59e13,"False"); wg55c21.m5fb16(null,v82d47); } } } veb725 =true; break; case 27: if (v38e11.Get("AllowAddNew")=="Yes" ||v38e11.Get("AllowEdit")=="Yes" ||wgIsFilterRow(v2b582)) { var v1b267 =vd9365.ExitEdit(-1)[0]; if (v1b267) vd9365.IsInEditMode =false; } break; case 82: if (v1fe68.ctrlKey) { vd9365.Refresh(); v1fe68.keyCode =0; veb725 =true; break; } case 76: if (v1fe68.ctrlKey) { wgLoadMore(vd9365.Name); v1fe68.keyCode =0; veb725 =true; break; } case 69: if (v1fe68.ctrlKey) { if (typeof(wg73c63.m4bf9)=="function" &&vd9365.LayoutSettings.AllowExport =="Yes") { wgExport(vd9365.Name); } v1fe68.keyCode =0; veb725 =true; break; } case 115: if (wgIsFilterRow(v2b582)) { wgf1447.mc6d61(vd9365.ActiveEditCell.element.childNodes[0]); v1fe68.keyCode =0; veb725 =true; } else if (vd9365.ActiveEditCell) { var vbd685 =v38e11.Columns.GetNamedItem(wgGetColNameByCell(vd9365.ActiveEditCell.element)); if (vbd685 &&vbd685.EditType =="Custom") { var ved633 =vd9365.CustomEditors[vbd685.CustomEditorName]; if (ved633.ImplementationObject) ved633.ImplementationObject.OnDropdown(); v1fe68.keyCode =0; veb725 =true; } } default: if(v1fe68.keyCode>=48 &&v1fe68.keyCode<=57 ||v1fe68.keyCode>=54 &&v1fe68.keyCode<=90 ||v1fe68.keyCode>=96 &&v1fe68.keyCode<=111 ||v1fe68.keyCode>=186 &&v1fe68.keyCode<=192 ||v1fe68.keyCode>=219 &&v1fe68.keyCode<=222 ||v1fe68.keyCode==113 ||v1fe68.keyCode ==13 ||v1fe68.keyCode ==32 ||v1fe68.keyCode ==229) { if (!v1fe68.ctrlKey) { var v2b582 =v4ef33.element; if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if ((v38e11.Get("AllowAddNew")=="Yes" &&v2b582.type =="NewRow")||(v38e11.Get("AllowEdit")=="Yes" &&wgIsRecordRow(v2b582))||wgIsFilterRow(v2b582)) { if (v1fe68.shiftKey &&v1fe68.keyCode ==13) { vd9365.ExitEdit(0,false); veb725 =true; } else  { var vd0c78 =wg99e67.me5245(vd9365,true); if (v1fe68.keyCode ==13)veb725 =true; else if (vd0c78)wg99e67.m50543(vd9365); } } else  { var vece26 =v38e11.GetRowCheckerColumn(); if (vece26) { wgf1447.mf2880(v2b582); veb725 =true; } } } else  { if (v1fe68.keyCode ==84) { if (v38e11.Get("AllowFilter")=="Yes" &&v38e11.IsFilterRowVisible()) { vd0b97 =new SelectedObject(v4ef33.tblName,v4ef33.gridId,v38e11.GetFilterRow()); vd0b97.type ="Row"; vcc060 =true; } veb725 =true; } else if (v1fe68.keyCode ==32) { var vece26 =v38e11.GetRowCheckerColumn(); if (vece26) { wgf1447.mf2880(v2b582); veb725 =true; } } } } } if (v28710) { var v2b582 =v4ef33.element; if (v4f799 =="RowSelect" ||v4ef33.element.type =="GroupHeader" ||v2b582.type =="NewRow") { if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v2b582.type =="GroupHeader" &&v2b582.expanded =="False") { wgf1447.mc2488(vd9365,wgGetCellByPosition(v2b582,0).childNodes[0],v2b582.expanded); wgf1447.mdfa58(null,v2b582); } else if (v2b582.type =="Record") { var v59e13; for (var v09547=0; v09547<v2b582.cells.length;v09547++) { if (v2b582.cells[v09547].type =="CellExpander") { v59e13 =v2b582.cells[v09547]; break; } } if (v59e13 &&(v2b582.childExpanded =="False" ||!v2b582.childExpanded)) { wg55c21.m01984(vd9365,v59e13,"False"); wg55c21.m5fb16(null,v2b582); } } } } else if (ve8752) { var v2b582 =v4ef33.element; if (v4f799 =="RowSelect" ||v2b582.type =="GroupHeader" ||v2b582.type =="NewRow") { if (v4ef33.type =="Cell")v2b582 =v2b582.parentElement; if (v2b582.type =="GroupHeader" &&v2b582.expanded =="True") { wgf1447.mc2488(vd9365,wgGetCellByPosition(v2b582,0).childNodes[0],v2b582.expanded); wgf1447.mdfa58(null,v2b582); } else if (v2b582.type =="Record") { var v59e13; for (var v09547=0; v09547<v2b582.cells.length;v09547++) { if (v2b582.cells[v09547].type =="CellExpander") { v59e13 =v2b582.cells[v09547]; break; } }  if (v59e13 &&(v2b582.childExpanded =="True")) { wg55c21.m01984(vd9365,v59e13,"True"); wg55c21.m5fb16(null,v2b582); } } } } if (vcc060) { var vd7e72 =ISGetObject(vd0b97.gridId); var v6fe97 =vd7e72.Tables[vd0b97.tblName]; var v83077 =v6fe97.GetSelRowStyle(); var ve2285 =v6fe97.GetFocusCellStyle(); var vc0b47 =vd7e72.LayoutSettings.ImageSettings.Folder +vd7e72.LayoutSettings.ImageSettings.CurrentRowImage; if (vd9365.ActiveEditCell ||vd9365.LastEditObj) {  if (!wgIsSameRow(v4ef33.GetRowElement(),vd0b97.GetRowElement())) { var v1b267 =vd9365.ExitEdit(2)[0]; if (!v1b267)return; } } if (vd0b97.type =="Row") { if (vd0b97.element.type =="NewRow") wga3a74.m7d366(vd7e72,vd0b97.element);  if (!v0df44) { wga3a74.mdd416(vd0b97.element,vc0b47); wga3a74.m74878(vd0b97.element,v83077,ve2285); }  if (v56195) { var v0f029 =wgGetCellByPosition(vd0b97.element,0); v0f029.setActive();  if (vd0b97.element.type =="NewRow" ||wgIsFilterRow(vd0b97.element)||(vd0b97.element.type =="Record" &&v6fe97.Get("AllowEdit")=="Yes")) wgSetLastAEC(vd0b97.element); else  { wga3a74.m76f3(vd9365,v0f029); vd7e72.ActiveEditCell =null; } } else  { if (v42265) { if (vefc53.cellIndex ==-1) { if (vd0b97.element.type =="NewRow") vefc53 =wgGetCSFirstEditableCell(vd0b97.element); } wga3a74.m76f3(vd9365,vefc53); vefc53.setActive(); }  }  if (v42265) { wg99e67.m04261(vefc53); }  } else if (vd0b97.type =="Cell") { if (!wgIsSameRow(v4ef33.GetRowElement(),vd0b97.GetRowElement())) { wga3a74.mdd416(vd0b97.element.parentElement,vc0b47); } wga3a74.m08f13(vd0b97.element,v83077,ve2285); vd0b97.element.setActive(); wga3a74.m76f3(vd7e72,vd0b97.element); } } if (veb725) { event.cancelBubble =true; event.returnValue =false; }  wg_Global.LastKeyDownProcessed =veb725; }, m76f3:function(v3b295,vd7d91) { var vadb92 =v3b295.GetRootTable().GetElement(WG40.BODY,WG40.HTMLDIV); var v0ff96 =vadb92.scrollLeft; var v7d155 =vadb92.scrollTop; var v9d619 =vd7d91.parentElement; if (v9d619.type =="NewRow" ||v9d619.type =="FilterRow") { tblName =wg30210.ma1652(v9d619); if (v3b295.Tables[tblName].IsRootTable) { if (vadb92.childNodes[0].rows.length ==0) vadb92 =wg30210.m44c63(v9d619).parentElement; } } var vdb998 =ISPosLib.getClientLeft(vd7d91)+vd7d91.offsetWidth +vadb92.scrollLeft; var v8c047 =vadb92.offsetWidth +vadb92.scrollLeft +ISPosLib.getClientLeft(vadb92); var v59d47 =posLib2.getLeftAbs(v3b295.FrameObj,v3b295); if (v8c047 <vdb998)vadb92.scrollLeft +=vdb998 -v8c047 +20; if (v59d47 ==0)v59d47 =ISPosLib.getClientLeft(vadb92); var v1c745 =ISPosLib.getClientLeft(vd7d91)-v59d47; if (v1c745 <0)vadb92.scrollLeft +=v1c745 -20; var v0ca61 =ISPosLib.getClientTop(vd7d91); var vda454 =v0ca61 +vd7d91.offsetHeight +17; var v9a192 =ISPosLib.getClientTop(vadb92); var vafd33 =v9a192 +vadb92.offsetHeight; if (v0ca61 <v9a192 &&vadb92.contains(vd7d91))vadb92.scrollTop -=v9a192 -v0ca61; if (vda454 >vafd33)vadb92.scrollTop +=vda454 -vafd33;  if (IS.moz &&(v0ff96 !=vadb92.scrollLeft ||v7d155 !=vadb92.scrollTop)) wg30210.m6e712(v3b295); }};function WebGridEventDestructor(){ var v03088 =delete wga3a74;}window.attachEvent("onunload",WebGridEventDestructor);