
// 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**
function SelectedObject(vae421,v65685,v4444 ){ this.tblName =vae421; this.gridId =v65685; this.element =v4444; 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 v52446 =wgGetRootRow(this.GetRowElement()); if (v52446) { var v7697 =ISGetObject(this.gridId); var v7c451 =v7697.Tables[this.tblName]; return v7c451.ToRowObject(v52446); } }; this.getColSetRowElement =this.GetColSetRowElement =function(){ var v65685 =wgGetGridById(this.gridId); var v7c451 =v65685.Tables[this.tblName]; if (v7c451.IsUseColumnSet) return wgGetColumnSetRow(this.element); return null; }; this.getColSetRowsElement =this.GetColSetRowsElement =function(){ var v65685 =wgGetGridById(this.gridId); var v7c451 =v65685.Tables[this.tblName]; if (v7c451.IsUseColumnSet) return wgGetColumnSetRows(this.element); return null; }; return this;}function wgGetLastSelectedObject(){ return wg_Global.LastSelObj;}function wgGetRowHeader(vc9b16){ if (!vc9b16)return null; var v62c41 =wg54183.m3471(vc9b16); if (!v62c41)return null;  var v09d5 =ISGetObject(v62c41.gridId); if (!v09d5)return null;  for (var v8ce70=0; v8ce70<vc9b16.cells.length; v8ce70++) { var vae811 =vc9b16.cells[v8ce70]; wg54183.mdf49(vae811); if (vae811.type =="RowSelector" ||vae811.type =="RowHeader") return vae811; } return null;}function wgGetValidActiveCell(vbf151){ if (vbf151.type !="Cell") return vbf151.parentElement.cells[wgGetFirstEditableCell(vbf151.parentElement)]; else return vbf151;}function wgGetLastVisibleRow(v21318){ var vddf71 =null; try  { vddf71 =v21318.rows[v21318.rows.length-1]; }catch(e){vddf71 =null; } if (vddf71 ==null) { var v2de73 =ISGetObject(v21318.gridId).Tables[v21318.tblName]; if (v2de73.Get("AllowAddNew")=="Yes") { vddf71 =v21318.parentElement.previousSibling.childNodes[0].rows[0]; vddf71 =v2de73.GetNewRow(vddf71); var v2a48 =new SelectedObject(v21318.tblName,v21318.gridId,vddf71); return v2a48; } } if (vddf71) wg54183.mdf49(vddf71); if (vddf71 &&(vddf71.style.display =="none" ||vddf71.type =="GroupTotalRow" ||vddf71.type =="PR" ||vddf71.type =="CSRecord")) { return wgGetPrevVisibleRow(v21318,vddf71); } else  { var vcff79 =ISGetObject(v21318.gridId); var v2de73 =vcff79.Tables[v21318.tblName]; if (vcff79.LastSelObj.element.type =="NewRow") { vddf71 =v21318.rows[v21318.rows.length-1]; wg54183.mdf49(vddf71); if (vddf71.style.display =="none" ||vddf71.type =="GroupTotalRow" ||vddf71.type =="PR" ||vddf71.type =="CSRecord") { return wgGetPrevVisibleRow(v21318,vddf71); } } var v2a48 =new SelectedObject(v21318.tblName,v21318.gridId,vddf71); return v2a48; } return null;}function wgGetLastChildVisibleRow(v1cb12){ if (v1cb12.style.display =="none") v1cb12 =wgGetPreviousRow(tb,v1cb12); else  { var v23d37 =v1cb12.cells[v1cb12.cells.length-1]; var ve1a10 =v23d37.childNodes[v23d37.childNodes.length-1]; wg54183.mdf49(ve1a10); var v4eb64 =document.getElementById("dvTB_" +ve1a10.gridId +"_" +ve1a10.tblName +"_" +ve1a10.subId).childNodes[0]; var vccb89 =wgGetLastVisibleRow(v4eb64); if (vccb89) { if (vccb89.type =="HierRecord") vccb89 =wgGetLastChildVisibleRow(vccb89.element); if (vccb89)return vccb89; } else v1cb12 =wgGetPreviousRow(tb,v1cb12); } return v1cb12;}function wgGetPrevVisibleRow(v6dd94,v9aa50){ var v5e668 =ISGetObject(v6dd94.gridId); var vdfd78 =v5e668.Tables[v6dd94.tblName]; var v35a1 =wgGetPreviousRow(v6dd94,v9aa50);  wg54183.mdf49(v9aa50);  if (v9aa50.type =="NewRow") { if (vdfd78.Get("AllowFilter")=="Yes" &&vdfd78.IsFilterRowVisible()) { var v0d357 =vdfd78.GetFilterRow(v9aa50); if (v0d357) { v35a1 =v0d357; var v7d520 =new SelectedObject(v6dd94.tblName,v6dd94.gridId,v35a1); return v7d520; } }else v35a1 =null; } else if (v9aa50.type =="FilterRow")v35a1 =null;  while (v35a1 !=null) { if (v35a1.type =="HierRecord") { if (v35a1.style.display =="none") v35a1 =wgGetPreviousRow(v6dd94,v35a1); else  { var v5db23 =v35a1.cells[v35a1.cells.length-1]; var v6e377 =v5db23.childNodes[v5db23.childNodes.length-1]; wg54183.mdf49(v6e377); var vd0346 =document.getElementById("dvTB_" +v6e377.gridId +"_" +v6e377.tblName +"_" +v6e377.subId).childNodes[0]; var v5af66 =wgGetLastVisibleRow(vd0346); if (v5af66) { if (v5af66.element.type =="HierRecord") v5af66 =wgGetLastChildVisibleRow(v5af66.element); if (v5af66)return v5af66; } else v35a1 =wgGetPreviousRow(v6dd94,v35a1); } } else  { if (v35a1.style.display =="none" ||v35a1.type =="GroupTotalRow" ||v35a1.type =="PR" ||v35a1.type =="CSRecord") v35a1 =wgGetPreviousRow(v6dd94,v35a1); else  { var v7d520 =new SelectedObject(v6dd94.tblName,v6dd94.gridId,v35a1); return v7d520; } } }  if (v35a1 ==null &&v9aa50.type !="NewRow") { var v9a728 =vdfd78.Get("AllowAddNew"); if (v9a728 =="Yes") { var vbc716 =vdfd78.GetNewRow(v9aa50); if (vbc716) { v35a1 =vbc716; var v7d520 =new SelectedObject(v6dd94.tblName,v6dd94.gridId,v35a1); return v7d520; } }  if (vdfd78.Get("AllowFilter")=="Yes") { var v0d357 =vdfd78.GetFilterRow(v9aa50); if (v0d357) { v35a1 =v0d357; var v7d520 =new SelectedObject(v6dd94.tblName,v6dd94.gridId,v35a1); return v7d520; } } }  if (v35a1 ==null) { var v5e668 =ISGetObject(v6dd94.gridId); var vdfd78 =v5e668.Tables[v6dd94.tblName]; if (!vdfd78.IsRootTable) {  var v0e877 =vdfd78.GetElement(WG40.COLHEADER,WG40.HTMLDIV,v9aa50).parentElement; if (v0e877) { if (v0e877.previousSibling) { v0e877 =v0e877.previousSibling.previousSibling; wg54183.mdf49(v0e877); var v36070 =document.getElementById("dvTB_" +v0e877.gridId +"_" +v0e877.tblName +"_" +v0e877.subId).childNodes[0]; return wgGetLastVisibleRow(v36070); } }  var vc2f10 =vdfd78.GetParentRow(v9aa50); if (vc2f10) { var vc6876 =wg54183.m3471(vc2f10); return new SelectedObject(vc6876.tblName,vc6876.gridId,vc2f10);  } } } return null;}function wgGetPrevSiblingRow(v9ab89,vbc649){ var ve5d33; wg54183.mdf49(vbc649); if (vbc649.type =="NewRow")return null; else if (vbc649.type =="Record") { ve5d33 =wgGetPreviousRow(v9ab89,vbc649); if (ve5d33) { if (ve5d33.type =="HierRecord") ve5d33 =wgGetPreviousRow(v9ab89,ve5d33); else if (ve5d33.type =="NewRow") ve5d33 =null; } } else if (vbc649.type =="GroupHeader") { ve5d33 =wgGetPreviousRow(v9ab89,vbc649); if (ve5d33) ve5d33 =wgad280.m3e00(ve5d33,vbc649.groupIndex,"previous"); if (ve5d33) if (ve5d33.parentIndex !=vbc649.parentIndex)ve5d33 =null; } if (ve5d33 ==null)return null;  var va2770 =new SelectedObject(v9ab89.tblName,v9ab89.gridId,ve5d33); return va2770;}function wgGetFirstVisibleRow(v0a219){ var va1444 =null; try  { va1444 =v0a219.rows[0]; } catch(e){va1444 =null; }  if (va1444) wg54183.mdf49(va1444); if (va1444 &&(va1444.style.display =="none" ||va1444.type =="GroupTotalRow" ||va1444.type =="PR" ||va1444.type =="CSRecord")) { return wgGetNextVisibleRow(v0a219,va1444); } else  { wg54183.mdf49(v0a219); var v0da28 =ISGetObject(v0a219.gridId).Tables[v0a219.tblName]; if (v0da28.Get("AllowAddNew")=="Yes") { if (!va1444)va1444 =v0a219.parentElement.previousSibling.childNodes[0].rows[0]; va1444 =v0da28.GetNewRow(va1444); } var v81935 =new SelectedObject(v0a219.tblName,v0a219.gridId,va1444); return v81935; } return null;}function wgGetNextSiblingRow(v68a85,v30054){ var vfd575; wg54183.mdf49(v30054); if (v30054.type =="NewRow") return null; else if (v30054.type =="Record") { var v47396 =wgGetGridById(v68a85.gridId); var v05073 =v47396.Tables[v68a85.tblName]; if (v05073.IsUseColumnSet) { vfd575 =wgGetLowestColumnSetRow(v30054); vfd575 =wgGetNextRow(v68a85,vfd575); } else vfd575 =wgGetNextRow(v68a85,v30054);  if (vfd575) { if (vfd575.type =="PR") vfd575 =wgGetNextRow(v68a85,vfd575); if (vfd575 &&vfd575.type =="HierRecord") vfd575 =wgGetNextRow(v68a85,vfd575); else if (vfd575.type =="NewRow" ||vfd575.type =="GroupTotalRow") vfd575 =null; } } else if (v30054.type =="GroupHeader") { vfd575 =wgGetNextRow(v68a85,v30054); if (vfd575) vfd575 =wgad280.m3e00(vfd575,v30054.groupIndex,"next"); if (vfd575) if (vfd575.parentIndex !=v30054.parentIndex)vfd575 =null; } if (vfd575 ==null)return null;  var ve930 =new SelectedObject(v68a85.tblName,v68a85.gridId,vfd575); return ve930;}function wgGetNextVisibleRow(v58260,v30b97){ var v3b824 =ISGetObject(v58260.gridId); var v14773 =v3b824.Tables[v58260.tblName]; var v55277 =wgGetNextRow(v58260,v30b97); var v44930 =false;  if (v30b97.type =="NewRow") v44930 =true; else if (wgIsFilterRow(v30b97)&&v14773.Get("AllowAddNew")=="No") v44930 =true;  if (v44930) { var v3b824 =ISGetObject(v58260.gridId); var v14773 =v3b824.Tables[v58260.tblName]; tbl =v14773.GetElement(WG40.BODY,WG40.HTMLTABLE,v30b97); if (tbl.rows.length >0) v55277 =tbl.rows[0]; else v55277 =null; } while (v55277 !=null) { if (v55277.type =="HierRecord") { if (v55277.style.display =="none") v55277 =wgGetNextRow(v58260,v55277); else  { var vbbf76 =v55277.cells[v55277.cells.length-1]; var vce686 =vbbf76.childNodes[0]; wg54183.mdf49(vce686); var ve8710 =document.getElementById("dvTB_" +vce686.gridId +"_" +vce686.tblName +"_" +vce686.subId).childNodes[0]; var va9b6 =wgGetFirstVisibleRow(ve8710); if (va9b6)return va9b6; else  v55277 =wgGetNextRow(v58260,v55277);  } } else  { if (v55277.style.display =="none" ||v55277.type =="GroupTotalRow" ||v55277.type =="PR" ||v55277.type =="CSRecord" ||!v55277.type) v55277 =wgGetNextRow(v58260,v55277); else  { var vee229 =new SelectedObject(v58260.tblName,v58260.gridId,v55277); return vee229; } } }  if (v55277 ==null) { if (!v14773.IsRootTable) { var vae359 =v14773.GetElement(WG40.COLHEADER,WG40.HTMLDIV,v30b97).parentElement; if (vae359) { if (vae359.nextSibling) { vae359 =vae359.nextSibling.nextSibling; wg54183.mdf49(vae359); var vb7560 =document.getElementById("dvTB_" +vae359.gridId +"_" +vae359.tblName +"_" +vae359.subId).childNodes[0]; return wgGetFirstVisibleRow(vb7560); } } var v24139 =v14773.GetParentRow(v30b97); if (v24139) { var vbd80 =wg54183.m3471(v24139); v24139 =wgGetNextSiblingRow(vbd80,v24139); if (!v24139) return null;  v24139 =wgGetPreviousRow(vbd80,v24139.element); return wgGetNextVisibleRow(vbd80,v24139); } } } return null;}var wg3bc89 ={ m49e7:function(v56c46,va709,vd6771) {  var v76c44; if (!v56c46)return;  if (v56c46.tagName !="TD") { v76c44 =v56c46; v56c46 =wg54183.md5029(v56c46); } if (!v56c46)return; if (v56c46.tagName =="TD") { var v28048 =v56c46.parentElement; var v7a389;  wg54183.mdf49(v56c46); wg54183.mdf49(v28048); if (!v56c46.type)return; if (wgIsValidClickableCell(v56c46)||wgIsValidRow(v28048)) { if (v56c46.type =="RowSelector")va709 =true; var vbc846 =wg54183.m3471(v28048); var v3e184 =ISGetObject(vbc846.gridId); if (!v3e184.Enabled)return; var v27794 =v3e184.Tables[vbc846.tblName];  var v9bf23 =v27794.Get("CellClickAction"); var v31f84 =v27794.GetSelRowStyle(); var v03240 =v27794.GetFocusCellStyle();  var va4642 =v3e184.LayoutSettings.ImageSettings.Folder +v3e184.LayoutSettings.ImageSettings.CurrentRowImage; var v2dc34 =false; if (!vd6771) if (!ISEvent.Raise(v3e184.LayoutSettings.ClientSideEvents.OnCellClick,v3e184.Id,v27794.Id,v28048.rowIndex,v56c46.cellIndex,v56c46)) return; if (v9bf23 =="RowSelect" ||v9bf23 =="CellSelect" ||wgIsValidRow(v28048)) { var vbfe68 =v27794.Get("AllowEdit")=="Yes"; if (v3e184.LastSelObj &&(v3e184.ActiveEditCell ||v3e184.LastEditObj)) { v7a389 =v3e184.LastSelObj.element; if (v7a389.tagName =="TD")v7a389 =v7a389.parentElement;  if (!wgIsSameRow(v7a389,v28048)||va709) { var vb0880 =v3e184.ExitEdit(1)[0]; if (!vb0880)return; } else  { if (((vbfe68 ||(v28048.type =="NewRow"))||v28048.type =="FilterRow")&&!va709 &&v28048.type !="GroupHeader") { if (v76c44) { if (v76c44.rowChecker) wgad280.m11682(v76c44,event.shiftKey); else wgd4b96.ma8534(v76c44,v56c46); } wg3bc89.m5eb40(v3e184,v27794,v76c44,v56c46); v2dc34 =true; if (v3e184.LastEditObj) { var vb0880 =v3e184.ExitEditMode(); if (vb0880 &&(v9bf23 !="CellSelect" ||v28048.type =="NewRow" ||v28048.type =="FilterRow")) { wgd4b96.m21f13(v56c46); var va3946 =v3e184.LayoutSettings.EditOnClick; if (va3946 ||v28048.type =="NewRow" ||v28048.type =="FilterRow") { if (wgIsFilterRow(v28048)&&v76c44 &&v76c44.tagName =="IMG")return; if (!vd6771 &&event.button !=2)v3e184.ActivateEditMode(); if (v28048.type =="NewRow" ||wgIsFilterRow(v28048)||va3946)return; } else  { v56c46.setActive(); return; } } else  return; } else  { if (v9bf23 !="CellSelect") { wgd4b96.m21f13(v56c46); if (v3e184.LayoutSettings.EditOnClick ||v28048.type =="NewRow" ||v28048.type =="FilterRow") { if (wgIsFilterRow(v28048)&&v76c44 &&v76c44.tagName =="IMG")return; if (!vd6771 &&event.button !=2)v3e184.ActivateEditMode(); } return; } } } } } }  var vbf076 =false; if ((v9bf23 =="RowSelect" ||v56c46.type =="RowSelector" ||v28048.type =="GroupHeader" ||v28048.type =="NewRow" ||v28048.type =="FilterRow")) { vbf076 =true; } if (vbf076) { if (v56c46.type =="RowSelector") { if (!ISEvent.Raise(v3e184.LayoutSettings.ClientSideEvents.OnRowSelectorClick,v3e184.Id,v27794.Id,v28048.rowIndex,v28048)) return;  va709 =true; } if (v28048.type =="NewRow") wg3bc89.m41472(v3e184,v28048); wg3bc89.m20e12(v28048,va4642);  if (wgIsColumnSetRow(v28048)&&v56c46.type =="RowSelector" &&v9bf23 =="CellSelect") { wgd4b96.m09984(v56c46); wg3bc89.me5432(v28048,v31f84,v03240,"Forcedraw",true); } else wg3bc89.me5432(v28048,v31f84,v03240,"",vd6771);  if (((vbfe68 &&(v28048.type =="Record" ||v28048.type =="CSRecord"))||v28048.type =="FilterRow")&&!va709) { if (v3e184.HasFocus()) { wgd4b96.m21f13(v56c46); if (wgIsFilterRow(v28048)&&v76c44 &&v76c44.tagName =="IMG")return; if (v3e184.LayoutSettings.EditOnClick)v3e184.ActivateEditMode(); } else  { wgd4b96.m21f13(v56c46,"Nodraw"); } } else if (wgIsRecordRow(v28048)&&!vbfe68) v3e184.ActiveEditCell =null;  if (va709 &&vbfe68) { if (v3e184.HasFocus()) v56c46.setActive(); }  if ((v28048.type =="GroupHeader" ||!vbfe68)&&v3e184.ActiveEditCell &&v3e184.ActiveEditCell.rowElement.type =="NewRow") { wgd4b96.mc9e94(v3e184.ActiveEditCell.rowElement); v3e184.ActiveEditCell =null; } else if (v28048.type =="NewRow") { wgd4b96.m83b92(v28048); if (!vd6771) v3e184.ActivateEditMode(); } else if (v28048.type =="FilterRow") v3e184.ActivateEditMode(); else if (v28048.type =="GroupHeader" &&v3e184.ActiveEditCell) v3e184.ActiveEditCell =null; } else if (v9bf23 =="CellSelect" &&v28048.type !="PR") { if (v7a389) { if (!wgIsSameRow(v7a389,v28048)) wg3bc89.m20e12(v28048,va4642); } else wg3bc89.m20e12(v28048,va4642);  wg3bc89.m65847(v56c46,v31f84,v03240,"",vd6771);  if (v3e184.LayoutSettings.EditOnClick) v3e184.ActivateEditMode(); } }  if (v76c44 &&v76c44.type =="checkbox") { wg54183.mdf49(v76c44); if (v76c44.rowChecker) wgad280.m11682(v76c44,event.shiftKey); else  { if (typeof(wgd4b96)!="undefined") { if (typeof(wgd4b96.ma8534)=="function") wgd4b96.ma8534(v76c44,v56c46); } } }  if (!v2dc34) wg3bc89.m5eb40(v3e184,v27794,v76c44,v56c46); } },  m5eb40:function(v8c56,v39845,v45846,v88292) { if (v45846 &&v45846.tagName =="BUTTON") { wg54183.mdf49(v45846); if (v45846.disabled)return;  var v98e95 =wgGetColNameByCell(v88292); var v74786 =ISEvent.Raise(v8c56.LayoutSettings.ClientSideEvents.OnButtonClick,v8c56.Id,v39845.Id,v98e95,v45846.keyValue);  if (v74786) { if (IS.moz) { event.cancelBubble =true; event.returnValue =false; }  var v59b75 =v39845.Columns.GetNamedItem(v98e95); if (v59b75.ButtonAutoPostback) { var v8e986 =v59b75.ButtonPostbackMode; if (v8e986 =="OnTheFly") { wg54183.md3516(v8c56.Name,"ButtonClick",v45846); } else  { var vf101 =v8c56.Name +"\03" +v39845.Id +"\03" +v98e95 +"\03" +v45846.keyValue; __doPostBack(v8c56.ServerUniqueID,"ButtonClick:" +vf101); } } } } }, m41472:function(vd2047,v3c370) { var v63053; var v78372 =v3c370.cells;  for (var v8dd35=0; v8dd35<v78372.length; v8dd35++) { if (v78372[v8dd35].type =="NewRowInfoCell") { v63053 =v78372[v8dd35]; break; } }  if (v63053) { var vda240 =vd2047.Tables[wg54183.m3fa51(v3c370)]; if (vda240.IsUseColumnSet) { wg37547.m5ac67(vd2047,vda240,v3c370,v63053); return; }  v3c370.origColSpan =v63053.colSpan; v3c370.infoText =v63053.innerText; v63053.colSpan =1; v63053.innerText =" "; v63053.type ="Cell"; v3c370.oldClassName =v63053.className; v63053.className =vd2047.RowClass; for (var v8dd35=0; v8dd35<v3c370.origColSpan-1; v8dd35++) { var va6c40 =v3c370.insertCell(-1); va6c40.type ="Cell"; va6c40.className =vd2047.RowClass; } wgd4b96.m7f279(vd2047,v3c370); } }, m7d10:function(v7f853) { var va803; var v5f049 =v7f853.cells; var v38639 =wg54183.m3471(v7f853); var v3b970 =wgGetGridById(v38639.gridId); var v2e455 =v3b970.Tables[v38639.tblName];  if (v2e455.IsUseColumnSet) { wg37547.mc9f42(v3b970,v2e455,v7f853); return; } for (var v94f73=0; v94f73<v5f049.length; v94f73++) { if (v5f049[v94f73].type =="Cell") { va803 =v5f049[v94f73]; break; } }  if (va803) { var v81c57 =0; for (var v94f73=0; v94f73<v7f853.origColSpan-1; v94f73++) { v7f853.deleteCell(va803.cellIndex+1); v81c57++; } va803.colSpan =v7f853.origColSpan; va803.innerText =v7f853.infoText; va803.type ="NewRowInfoCell"; va803.style.cssText =""; va803.className =v7f853.oldClassName; } }, m6e675:function(vd6e8) { for (var vc4072=0; vc4072<vd6e8.childNodes.length; vc4072++) { if (vd6e8.childNodes[vc4072].tagName =="SPAN" &&vd6e8.childNodes[vc4072].getAttribute("content")=="") return vd6e8.childNodes[vc4072]; else if (vd6e8.childNodes[vc4072].childNodes.length >0) { var vc1c36 =wg3bc89.m6e675(vd6e8.childNodes[vc4072]); if (vc1c36)return vc1c36; } } return null; }, m1de95:function(vc6463,vaf840,vb2a22) { var v2eb28 =wgGetCellCount(vc6463); var v32215 =wg54183.m3471(vc6463); if (!vc6463 ||!v32215)return;  var v2d195 =ISGetObject(v32215.gridId); var v99f65 =v2d195.Tables[v32215.tblName]; var v8af20 =v99f65.GetSelRowStyle(); var v92522 =v99f65.GetFocusCellStyle(); var v63a41 =false; var v52539;  if (v92522 !="") v92522 =v92522.substring(v92522.indexOf(":")+1);  if (wgGetActiveGrid()!=v2d195.Name)vb2a22 =true; if (vb2a22) { v8af20 =v2d195.GetBlurRowStyle(); v92522 ="0px"; } else  { if (vaf840 =="CheckedRow") { v8af20 =v99f65.GetCheckedRowStyle(); if (v8af20 =="")return; v92522 =""; } } if (wgIsColumnSetRow(vc6463)||(v99f65.PreviewRowVisible &&vc6463.type !="GroupHeader" &&vc6463.type !="NewRow")) { wg37547.m39652(vc6463,vaf840,vb2a22); return; } if (v99f65.SelfReferencingSettings.Enabled &&v99f65.SelfReferencingSettings.IsTreeViewSelectionMode &&vc6463.type !="GroupHeader") { var v1b821 =v99f65.SelfReferencingSettings.ExpandColumnMember; var v3f092 =wgGetCellByName(vc6463,v1b821); var vec042 =wg3bc89.m6e675(v3f092);  if (vaf840 =="Clear") vec042.runtimeStyle.cssText =""; else { if (vaf840 !="Redraw") vec042.runtimeStyle.cssText =v8af20; vec042.runtimeStyle.border =v92522; }  return; } for (var v46d37=0; v46d37<vc6463.cells.length; v46d37++) { var v25180 =vc6463.cells[v46d37]; wg54183.mdf49(v25180); if (v25180.type =="Cell" ||v25180.type =="GroupCell" ||v25180.type =="FilterColumn") { if (vaf840 =="Clear") { with (v25180.runtimeStyle) { cssText =""; } } else  { if (vaf840 !="Redraw") { v25180.runtimeStyle.cssText =v8af20; } if (!v63a41) { v63a41 =true; v25180.runtimeStyle.borderLeft =v92522; v25180.runtimeStyle.borderTop =v92522; v25180.runtimeStyle.borderBottom =v92522; if (v2eb28 >1 ||v25180.type =="GroupCell") v25180.runtimeStyle.borderRightWidth ="0"; else v25180.runtimeStyle.borderRight =v92522; } else  { v52539 =v25180; v25180.runtimeStyle.borderTop =v92522; v25180.runtimeStyle.borderBottom =v92522; v25180.runtimeStyle.borderLeftWidth ="0"; v25180.runtimeStyle.borderRightWidth ="0"; } } } } if (v52539) { with (v52539.runtimeStyle) { borderRight =v92522; borderTop =v92522; borderBottom =v92522; borderLeftWidth ="0"; } } if (vaf840 =="Clear" &&vc6463.isRowChecked &&!vb2a22)wg3bc89.m1de95(vc6463,"CheckedRow"); },  me5432:function(v7cd24,v52b75,v74e97,vfe02,vf1016) { if (!v7cd24)return; if (vfe02 =="Clear" &&v7cd24.tagName =="TD") { wg3bc89.m65847(v7cd24,v52b75,v74e97,"Clear"); return; } if (vfe02 =="Clear") { var v48785 =wg54183.m3471(v7cd24); if (!v48785)return; var vb5f56 =ISGetObject(v48785.gridId); if (!wg54183.m74363(vb5f56.LastSelObj))return; } else  { var v48785 =wg54183.m3471(v7cd24); var vb5f56 =ISGetObject(v48785.gridId); if (v7cd24.type =="PR")v7cd24 =wgGetPreviousRow(v48785,v7cd24); if (vb5f56.LastSelObj &&!wgIsSameRow(vb5f56.LastSelObj.element,v7cd24)) { wg3bc89.me5432(vb5f56.LastSelObj.element,"","","Clear"); if (vb5f56.LastSelObj.element.type =="NewRow") { wg3bc89.m7d10(vb5f56.LastSelObj.element); } } else  { if (vb5f56.LastSelObj &&wgIsSameRow(vb5f56.LastSelObj.element,v7cd24)&&vfe02 !="Forcedraw" ) return; }  if (!vf1016) { if (!ISEvent.Raise(vb5f56.LayoutSettings.ClientSideEvents.OnBeforeRowSelect,vb5f56.Id,v48785.tblName,vb5f56.LastSelObj)) return; }  var v04816 =new SelectedObject(v48785.tblName,v48785.gridId,v7cd24); v04816.type ="Row"; v04816.rowIndex =v7cd24.rowIndex; vb5f56.LastSelObj =v04816; if (!vf1016) { if (!ISEvent.Raise(vb5f56.LayoutSettings.ClientSideEvents.OnRowSelect,vb5f56.Id,v48785.tblName,v7cd24.rowIndex,v7cd24)) return; } }  wg3bc89.m1de95(v7cd24,vfe02); },  m65847:function(vc6c56,vc8349,v3ea8,v2c521,v2d147) { if (!vc6c56.origStyle)vc6c56.origStyle =vc6c56.style.cssText; if (v3ea8 !="") v3ea8 =v3ea8.substring(v3ea8.indexOf(":")+1);  if (v2c521 =="Clear" &&vc6c56.tagName =="TR") { wg3bc89.me5432(vc6c56,vc8349,v3ea8,"Clear"); return; }  if (v2c521 =="Clear") { } else  { var veba54 =wg54183.m3471(vc6c56.parentElement); var v45e43 =ISGetObject(veba54.gridId);  if (v45e43.LastSelObj &&v45e43.LastSelObj.element !=vc6c56) { wg3bc89.m65847(v45e43.LastSelObj.element,"","","Clear"); } if (v45e43.LastSelObj &&v45e43.LastSelObj.GetRowElement()!=vc6c56.parentElement) { var vf8634 =v45e43.LastSelObj.GetRowElement(); if (vf8634 &&vf8634.type =="NewRow") { wg3bc89.me5432(vf8634,"","","Clear"); wg3bc89.m7d10(vf8634); } }  var v3b570 =new SelectedObject(veba54.tblName,veba54.gridId,vc6c56); var v78759 =v45e43.Tables[veba54.tblName];  v3b570.type ="Cell"; v3b570.rowIndex =vc6c56.parentElement.rowIndex; v3b570.cellIndex =wgGetCellPosByName(vc6c56.parentElement,vc6c56); v78759.LastAECIndex =vc6c56.cellIndex; v45e43.LastSelObj =v3b570; if (!v2d147) if (!ISEvent.Raise(v45e43.LayoutSettings.ClientSideEvents.OnCellSelect,veba54.gridId,veba54.tblName,v3b570.rowIndex,v3b570.cellIndex,vc6c56)) return;  var va5f57 =v78759.Get("AllowEdit")=="Yes"; if (va5f57) { v45e43.ActiveEditCell =new wgActiveCell(veba54.gridId,veba54.tblName,vc6c56); v45e43.ActiveEditCell.rowElement =vc6c56.parentElement; }  } if (v2c521 =="Clear") { vc6c56.runtimeStyle.cssText =""; if (vc6c56.stripedClass) { vc6c56.className +=vc6c56.stripedClass; vc6c56.stripedClass =""; } } else  { with (vc6c56.runtimeStyle) { cssText =vc8349; borderLeft =borderRight =borderBottom =borderTop =v3ea8; }  if (vc6c56.className.indexOf("DefNoBrdBottom")>=0) { vc6c56.className =vc6c56.className.replace(/DefNoBrdBottom/g,""); vc6c56.stripedClass ="DefNoBrdBottom "; }  if (vc6c56.className.indexOf("DefNoBrdRight")>=0) { vc6c56.className =vc6c56.className.replace(/DefNoBrdRight/g,""); vc6c56.stripedClass +="DefNoBrdRight "; } } }, m20e12:function(v8a961,ve296) { if (!v8a961)return; var vea470 =wg54183.m3471(v8a961); if (!vea470)return;  var vbfa57 =ISGetObject(vea470.gridId); if(vbfa57.LastSelObj &&ve296 !=null) { obj =vbfa57.LastSelObj.element; if (obj.tagName =="TR") wg3bc89.m20e12(obj,null); else wg3bc89.m20e12(obj.parentElement,null); } if (!vbfa57)return;  if (wgIsColumnSetRow(v8a961)) v8a961 =wgGetColumnSetRow(v8a961); else if (v8a961.type =="PR") v8a961 =wgGetPreviewRowParent(v8a961); var v53794 =wgGetRowHeader(v8a961); if (!v53794)return;  if (ve296) { v53794.innerHTML ="<img src='" +ve296 +"' align='absmiddle'>"; } else  { if (v8a961.type =="NewRow") { ve296 =vbfa57.LayoutSettings.ImageSettings.Folder +vbfa57.LayoutSettings.ImageSettings.NewRowImage; v53794.innerHTML ="<img src='" +ve296 +"' align='absmiddle'>"; } else v53794.innerHTML ="&nbsp;"; }  if (IS.moz) wg9451.m79178(vbfa57);  v8a961.markedEdit =false; }, m13417:function(v81786) { var v05b36 =event.srcElement; var vb3695; if (v05b36.tagName !="TD")v05b36 =wg54183.md5029(v05b36); if (!v05b36 ||v05b36.tagName !="TD")return; if (v05b36.tagName =="TD")vb3695 =wg54183.m3471(v05b36.parentElement); else if (v05b36.tagName =="TR")vb3695 =wg54183.m3471(v05b36); if (!vb3695)return; if (vb3695.tagName !="TABLE" ||!vb3695.gridId)return; if (vb3695.tblName !=v81786)return;  var v59250 =ISGetObject(vb3695.gridId); var v90f18 =v59250.Tables[vb3695.tblName]; var v58e34 =v05b36.parentElement; if (!ISEvent.Raise(v59250.LayoutSettings.ClientSideEvents.OnCellDblClick,vb3695.gridId,vb3695.tblName,v58e34.rowIndex,v05b36.cellIndex,v05b36)) return; if (v58e34.type =="GroupHeader") { wgad280.m13f0(v59250,wgGetCellByPosition(v58e34,0).childNodes[0],v58e34.expanded); wgad280.m33b10(null,v58e34); } else if (wgIsRecordRow(v58e34)) { if (!v59250.LayoutSettings.EditOnClick) { if (v90f18.Get("AllowEdit")=="Yes") v59250.ActivateEditMode(); else  { if (typeof(v58e34.srLevel)!="undefined") wgToggleSelfRefRow(v58e34); } } } event.cancelBubble =true; event.returnValue =false; },  ma7015:function() { if (IS.moz &&wg_Global.LastKeyDownProcessed) { event.cancelBubble =true; event.returnValue =false; } }, mbe838:function(vc2914) { var v1f86 =(vc2914 ? vc2914 : event); var vbf681 =v1f86.srcElement; if (!vbf681)vbf681 =v1f86._srcElement; var tbl,v41d13;  if (vbf681.tagName =="TD") { tbl =wg54183.m3471(vbf681.parentElement); v41d13 =vbf681.parentElement; } else if (vbf681.tagName =="TR") { tbl =wg54183.m3471(vbf681); v41d13 =vbf681; } else if (vbf681.tagName =="SPAN" ||vbf681.tagName =="NOBR") { vbf681 =wg54183.md5029(vbf681); v41d13 =vbf681.parentElement; tbl =wg54183.m3471(vbf681); } if (!tbl)return; if (tbl.tagName !="TABLE" ||!tbl.gridId)return;  var vaf821 =ISGetObject(tbl.gridId); var v88e10 =vaf821.Tables[tbl.tblName]; var v37477 =false; var vde275 =false; var vea843 =false; var vaf163 =true; var v6c551 =false; var v29463 =vaf821.LastSelObj; var v5d180 =false; var va1c16 =null;  if (IS.moz) { if (v29463) { vbf681 =v29463.element; tbl =wg54183.m3471(vbf681); } }  if (tbl !=v88e10.GetElement(WG40.BODY,WG40.HTMLTABLE,v41d13)) { if (!v29463)return; vbf681 =v29463.element; tbl =wg54183.m3471(vbf681); } try  { if (!ISEvent.Raise(vaf821.LayoutSettings.ClientSideEvents.OnKeyDown,vaf821.Name,tbl.tblName,vbf681.parentElement.rowIndex,vbf681.cellIndex)) return; }catch (e){return;} var v60373 =v88e10.Get("CellClickAction"); if (v60373 =="None")vde275 =true; if (vde275) { event.cancelBubble =true; return; } var vf9e53 =new SelectedObject(tbl.tblName,tbl.gridId,null); var va4929 =false; var vf9d42 =false; if (v1f86.keyCode ==187 &&v1f86.ctrlKey)va4929 =true; if (v1f86.keyCode ==189 &&v1f86.ctrlKey)vf9d42 =true; switch(v1f86.keyCode) { case 35: var v41d13 =v29463.element; if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v60373 =="RowSelect" ||v41d13.type =="GroupHeader") { try  { vf9e53 =wgGetLastVisibleRow(tbl); } catch(e){} } else  { if (v41d13.type !="NewRow") { vf9e53.cellIndex =wgGetCellCount(v29463.element.parentElement)-1; vf9e53.element =wgGetCellByPosition(v29463.element.parentElement,vf9e53.cellIndex ); } }  if (vf9e53) { var v35490 =vaf821.Tables[vf9e53.tblName].Get("CellClickAction"); if (v35490 =="RowSelect" ||v41d13.type =="GroupHeader") vf9e53.type ="Row"; else if (v35490 =="CellSelect") vf9e53.type ="Cell"; vea843 =true; v37477 =true; }  if (!v1f86.ctrlKey &&v60373 !="CellSelect") { if (v41d13.type =="NewRow" ||wgIsFilterRow(v41d13)||(wgIsRecordRow(v41d13)&&v88e10.Get("AllowEdit")=="Yes" )) { var v07360 =wgGetLastEditableCell(v41d13); if (v07360)wgd4b96.m21f13(v07360); vea843 =false; } } break; case 36: var v41d13 =v29463.element; if (v29463.type =="Cell")v41d13 =v41d13.parentElement;  if (v60373 =="RowSelect" ||v41d13.type =="GroupHeader") vf9e53 =wgGetFirstVisibleRow(tbl); else  { if (v41d13.type !="NewRow") { vf9e53.element =wgGetCellByPosition(v29463.element.parentElement,0); vf9e53.cellIndex =0; } }  if (vf9e53) { var v35490 =vaf821.Tables[vf9e53.tblName].Get("CellClickAction"); if (v35490 =="RowSelect" ||v41d13.type =="GroupHeader") vf9e53.type ="Row"; else if (v35490 =="CellSelect") { vf9e53.type ="Cell"; } vea843 =true; v37477 =true; }  if (!v1f86.ctrlKey &&v60373 !="CellSelect") { if (v41d13.type =="NewRow" ||wgIsFilterRow(v41d13)||(wgIsRecordRow(v41d13)&&v88e10.Get("AllowEdit")=="Yes" )) { wgd4b96.m83b92(v41d13); vea843 =false; } } break; case 9: if (v1f86.ctrlKey) { while (true) { var va2034; if (!v1f86.shiftKey) va2034 =wgGetNextFocusableElement(vaf821,null,va2034); else va2034 =wgGetPrevFocusableElement(vaf821,null,va2034); if (va2034) { if (vaf821.LastEditObj) vaf821.ExitEditMode(); try  { va2034.focus(); break; }catch(e){} }else break; } vea843 =false; v37477 =true; break; } case 37: if (v1f86.keyCode ==37 ||(v1f86.keyCode ==9 &&v1f86.shiftKey)) { var v41d13 =v29463.element; if (v60373 =="RowSelect" ||v41d13.type =="GroupHeader" ||v41d13.type =="NewRow" ||wgIsFilterRow(v41d13)) { if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v41d13.type =="GroupHeader" &&v41d13.expanded =="True") { wgad280.m13f0(vaf821,wgGetCellByPosition(v41d13,0).childNodes[0],v41d13.expanded); wgad280.m33b10(null,v41d13); } else if (typeof(v41d13.srLevel)!="undefined" &&!v88e10.Get("AllowEdit")=="Yes") { if (v60373 !="CellSelect") { var v2c651 =wgad280.mf3466(v88e10,v41d13); wgad280.m13f0(vaf821,v2c651,v41d13.srExpanded); wgad280.ma4077(v2c651); } } else if (v41d13.type =="NewRow" ||wgIsFilterRow(v41d13)||(wgIsRecordRow(v41d13)&&v88e10.Get("AllowEdit")=="Yes" )) { if (!wgActiveCellValid(vaf821,v41d13)) { wgd4b96.m83b92(v41d13); } else  { var vc075 =wgGetPrevEditableCell(vaf821.ActiveEditCell.element,v41d13); if (vc075) { if (!vc075.rowChanged) { wgd4b96.m21f13(vc075.element); if (wgIsColumnSetRow(v41d13))vc075.element.setActive(); }  if (vc075.rowChanged) { v41d13 =vc075.rowElement; vf9e53.type ="Row"; vf9e53.element =v41d13; vea843 =true; if (vc075.element) { v5d180 =true; va1c16 =vc075.element; } } if (wgIsColumnSetRow(v41d13))vaf163 =false; } } } } else if (v60373 =="CellSelect") { if (v29463.cellIndex-1 >=0){ vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,null); vf9e53.cellIndex =v29463.cellIndex -1; vf9e53.rowIndex =v29463.rowIndex; vf9e53.type ="Cell"; vf9e53.element =wgGetCellByPosition(v29463.element.parentElement,vf9e53.cellIndex); vea843 =true; } }  v37477 =true; break; } case 9: if (v1f86.shiftKey)break; case 39: var v41d13 =v29463.element;  if (v60373 =="RowSelect" ||v29463.element.type =="GroupHeader" ||v41d13.type =="NewRow" ||wgIsFilterRow(v41d13)) { if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v41d13.type =="GroupHeader" &&v41d13.expanded =="False") { wgad280.m13f0(vaf821,wgGetCellByPosition(v41d13,0).childNodes[0],v41d13.expanded); wgad280.m33b10(null,v41d13); } else if (typeof(v41d13.srLevel)!="undefined" &&!v88e10.Get("AllowEdit")=="Yes") { if (v60373 !="CellSelect") { var v2c651 =wgad280.mf3466(v88e10,v41d13); wgad280.m13f0(vaf821,v2c651,v41d13.srExpanded); wgad280.ma4077(v2c651); } } else if (v41d13.type =="NewRow" ||wgIsFilterRow(v41d13)||(wgIsRecordRow(v41d13)&&v88e10.Get("AllowEdit")=="Yes" )) { if (!wgActiveCellValid(vaf821,v41d13)){ wgd4b96.m83b92(v41d13); } else  { var vd0456 =wgGetNextEditableCell(vaf821.ActiveEditCell.element,v41d13); if (vd0456){ if (!vd0456.rowChanged) { wgd4b96.m21f13(vd0456.element); if (wgIsFilterRow(v41d13)) { wg3bc89.m42232(vaf821,vd0456.element); } if (wgIsColumnSetRow(v41d13))vd0456.element.setActive(); }  if (vd0456.rowChanged) { v41d13 =vd0456.rowElement; vf9e53.type ="Row"; vf9e53.element =v41d13; vea843 =true; if (vd0456.element) { v5d180 =true; va1c16 =vd0456.element; } } if (wgIsColumnSetRow(v41d13))vaf163 =false; } } } } else if (v60373 =="CellSelect") { var ve2524 =(v29463.element.tagName =="TR" ? v29463.element : v29463.element.parentElement); if (!vaf821.LastEditObj) { if (v29463.cellIndex+1 <wgGetCellCount(ve2524)) { vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,null); vf9e53.cellIndex =v29463.cellIndex +1; vf9e53.rowIndex =v29463.rowIndex; vf9e53.type ="Cell"; vf9e53.element =wgGetCellByPosition(ve2524,vf9e53.cellIndex); vea843 =true; } } else  { var vb2012 =v29463.GetRowElement(); if (wgIsRecordRow(vb2012)&&v88e10.Get("AllowEdit")=="Yes") { var vd0456 =wgGetNextEditableCell(vaf821.ActiveEditCell.element,vb2012); if (vd0456) { vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,null); vf9e53.cellIndex =vd0456.element.cellIndex; vf9e53.rowIndex =vb2012.rowIndex; vf9e53.type ="Cell"; vf9e53.element =vd0456.element; } vea843 =true; } } } v37477 =true; break;  case 38: var v96511;  var v41d13 =v29463.element; if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v1f86.ctrlKey) { vf9e53 =wgGetPrevSiblingRow(tbl,v41d13); if (!vf9e53)vf9e53 =wgGetPrevVisibleRow(tbl,v41d13); } else vf9e53 =wgGetPrevVisibleRow(tbl,v41d13); if (v88e10.Get("AllowEdit")=="Yes" &&!wgActiveCellValid(vaf821,v41d13)) { if (!wgIsColumnSetRow(v41d13)) wgd4b96.m83b92(v41d13); else vaf163 =false; } else  { if (wgIsColumnSetRow(v41d13)&&(v88e10.Get("AllowEdit")=="Yes" ||wgIsFilterRow(v41d13))) { var vbf681 =vaf821.ActiveEditCell.element; var v9a167 =wgGetCSPrevEditableRow(tbl,vbf681,vbf681.cs,vbf681.c,true);  if (v9a167 &&v9a167.element &&v9a167.element.type !="GroupHeader" &&v9a167.element.type !="NewRow") { if (v9a167 &&v88e10.Id ==v9a167.tblName) { if (wgIsSameRow(v9a167.rowElement,v41d13)) { v6c551 =true; v5d180 =true; vaf163 =false; va1c16 =v9a167.element; vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,null); vf9e53.type ="Row"; vf9e53.element =v9a167.rowElement; } else  { vaf163 =false; vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,null); vf9e53.type ="Row"; vf9e53.element =v9a167.rowElement; if (v9a167.element) { v5d180 =true; va1c16 =v9a167.element; } } } } else  { if (!event.ctrlKey) vf9e53 =wgGetPrevVisibleRow(tbl,vbf681.parentElement); } } }  if (vf9e53) { var v35490 =vaf821.Tables[vf9e53.tblName].Get("CellClickAction");  if (v35490 =="RowSelect" ||vf9e53.element.type =="GroupHeader" ||vf9e53.element.type =="NewRow" ||vf9e53.element.type =="FilterRow") vf9e53.type ="Row"; else if (v35490 =="CellSelect") { vf9e53.type ="Cell"; if (v29463.tblName ==vf9e53.tblName) { vf9e53.cellIndex =v29463.cellIndex; vf9e53.element =wgGetCellByPosition(vf9e53.element,vf9e53.cellIndex); } else  { if (vaf821.Tables[vf9e53.tblName].LastAECIndex !=-1) { vf9e53.cellIndex =vaf821.Tables[vf9e53.tblName].LastAECIndex; vf9e53.element =wgGetValidActiveCell(vf9e53.element.cells[vf9e53.cellIndex]); } else vf9e53.element =wgGetCellByPosition(vf9e53.element,vf9e53.cellIndex); } } vea843 =true; v37477 =true; } break; case 40: var v96511; var v41d13 =v29463.element; if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v29463.tblName !=tbl.tblName)tbl =wg54183.m3471(v41d13); if (v1f86.ctrlKey) { vf9e53 =wgGetNextSiblingRow(tbl,v41d13); if (!vf9e53)vf9e53 =wgGetNextVisibleRow(tbl,v41d13); } else vf9e53 =wgGetNextVisibleRow(tbl,v41d13); if (v88e10.Get("AllowEdit")=="Yes" &&!wgActiveCellValid(vaf821,v41d13)) { if (!wgIsColumnSetRow(v41d13)) wgd4b96.m83b92(v41d13); else vaf163 =false; } else  { if (wgIsColumnSetRow(v41d13)&&(v88e10.Get("AllowEdit")=="Yes" ||wgIsFilterRow(v41d13))) { var vbf681 =vaf821.ActiveEditCell.element; var v9a167 =wgGetCSNextEditableRow(tbl,vbf681,vbf681.cs,vbf681.c,true); if (v9a167 &&v9a167.element &&v9a167.element.type !="GroupHeader" &&v9a167.element.type !="NewRow") { if (v9a167 &&v88e10.Id ==v9a167.tblName) { if (wgIsSameRow(v9a167.rowElement,v41d13)) { v6c551 =true; v5d180 =true; vaf163 =false; va1c16 =v9a167.element; vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,null); vf9e53.type ="Row"; vf9e53.element =v9a167.rowElement;  } else  { vaf163 =false; vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,null); vf9e53.type ="Row"; vf9e53.element =v9a167.rowElement; if (v9a167.element) { v5d180 =true; va1c16 =v9a167.element; } } } } else  { if (!event.ctrlKey) vf9e53 =wgGetNextVisibleRow(tbl,vbf681.parentElement); } } }  if (vf9e53) { var v35490 =vaf821.Tables[vf9e53.tblName].Get("CellClickAction"); if (v35490 =="RowSelect" ||vf9e53.element.type =="GroupHeader" ||vf9e53.element.type =="NewRow") vf9e53.type ="Row"; else if (v35490 =="CellSelect") { vf9e53.type ="Cell"; if (v29463.tblName ==vf9e53.tblName) { vf9e53.cellIndex =v29463.cellIndex; vf9e53.element =wgGetCellByPosition(vf9e53.element,vf9e53.cellIndex); } else  { if (vaf821.Tables[vf9e53.tblName].LastAECIndex !=-1) { vf9e53.cellIndex =vaf821.Tables[vf9e53.tblName].LastAECIndex; vf9e53.element =wgGetValidActiveCell(vf9e53.element.cells[vf9e53.cellIndex]); } else  { vf9e53.element =wgGetCellByPosition(vf9e53.element,vf9e53.cellIndex); } } } vea843 =true; v37477 =true; } break; case 46: var v41d13 =v29463.element; if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v88e10.Get("AllowDelete")=="Yes" &&wgIsRecordRow(v41d13)) { var v47d80 =true; if (vaf821.LayoutSettings.PromptBeforeDelete) v47d80 =confirm(vaf821.GetString("MessageBoxText/DeleteRow"));  if (v47d80) { wgd4b96.meed72(vaf821,v41d13); v37477 =true; } else { event.cancelBubble =true; } } break; case 107: if (v60373 =="RowSelect") { var vb2012 =v29463.element; if (v29463.type =="Cell")vb2012 =vb2012.parentElement; if (wgIsRecordRow(vb2012)) { var ve8699; vb2012 =wgGetRootRow(vb2012); for (var v67f38=0; v67f38<vb2012.cells.length;v67f38++) { if (vb2012.cells[v67f38].type =="CellExpander") { ve8699 =vb2012.cells[v67f38]; break; } } if (ve8699 &&(vb2012.childExpanded =="True")){ wg0bb8.mfb793(vaf821,ve8699,"True"); wg0bb8.m3f372(null,vb2012); } } } v37477 =true; break; case 109: if (v60373 =="RowSelect") { var vb2012 =v29463.element; if (v29463.type =="Cell")vb2012 =vb2012.parentElement; if (wgIsRecordRow(vb2012)) { var ve8699; for (var v67f38=0; v67f38<vb2012.cells.length;v67f38++){ if (vb2012.cells[v67f38].type =="CellExpander"){ ve8699 =vb2012.cells[v67f38]; break; } } if (ve8699 &&(vb2012.childExpanded =="False" ||!vb2012.childExpanded)) { wg0bb8.mfb793(vaf821,ve8699,"False"); wg0bb8.m3f372(null,vb2012); } } } v37477 =true; break; case 27: if (v88e10.Get("AllowAddNew")=="Yes" ||v88e10.Get("AllowEdit")=="Yes" ||wgIsFilterRow(v41d13)) { var v0a659 =vaf821.ExitEdit(-1)[0]; if (v0a659) vaf821.IsInEditMode =false; } break; case 82: if (v1f86.ctrlKey) { vaf821.Refresh(); v1f86.keyCode =0; v37477 =true; break; } case 76: if (v1f86.ctrlKey) { wgLoadMore(vaf821.Name); v1f86.keyCode =0; v37477 =true; break; } case 69: if (v1f86.ctrlKey) { if (typeof(wgd4218.m61739)=="function" &&vaf821.LayoutSettings.AllowExport =="Yes") { wgExport(vaf821.Name); } v1f86.keyCode =0; v37477 =true; break; } case 115: if (v1f86.keyCode ==115) { if (wgIsFilterRow(v41d13)) { wgad280.m7d537(vaf821.ActiveEditCell.element.childNodes[0]); v1f86.keyCode =0; v37477 =true; } else if (vaf821.ActiveEditCell) { var vaa529 =v88e10.Columns.GetNamedItem(wgGetColNameByCell(vaf821.ActiveEditCell.element)); if (vaa529 &&vaa529.EditType =="Custom") { var vd5070 =vaf821.CustomEditors[vaa529.CustomEditorName]; if (vd5070.ImplementationObject) vd5070.ImplementationObject.OnDropdown(); v1f86.keyCode =0; v37477 =true; } } } default: if(v1f86.keyCode>=48 &&v1f86.keyCode<=57 ||v1f86.keyCode>=54 &&v1f86.keyCode<=90 ||v1f86.keyCode>=96 &&v1f86.keyCode<=111 ||v1f86.keyCode>=186 &&v1f86.keyCode<=192 ||v1f86.keyCode>=219 &&v1f86.keyCode<=222 ||v1f86.keyCode==113 ||v1f86.keyCode ==13 ||v1f86.keyCode ==32 ||v1f86.keyCode ==229) { if (!v1f86.ctrlKey) { var v41d13 =v29463.element; if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if ((v88e10.Get("AllowAddNew")=="Yes" &&v41d13.type =="NewRow")||(v88e10.Get("AllowEdit")=="Yes" &&wgIsRecordRow(v41d13))||wgIsFilterRow(v41d13)) { if (v1f86.shiftKey &&v1f86.keyCode ==13) { vaf821.ExitEdit(0,false); v37477 =true; } else  { var v3a122 =wgd4b96.mb5317(vaf821,true);  if (v1f86.keyCode ==13) v37477 =true;  else if (v3a122) { wgd4b96.m8ff21(vaf821); v1f86.cancelBubble =true; } } } else  { var v4a00 =v88e10.GetRowCheckerColumn(); if (v4a00) { wgad280.m49126(v41d13); v37477 =true; } } } else  { if (v1f86.keyCode ==84) { if (v88e10.Get("AllowFilter")=="Yes" &&v88e10.IsFilterRowVisible()) { vf9e53 =new SelectedObject(v29463.tblName,v29463.gridId,v88e10.GetFilterRow()); vf9e53.type ="Row"; vea843 =true; } v37477 =true; } else if (v1f86.keyCode ==32) { var v4a00 =v88e10.GetRowCheckerColumn(); if (v4a00) { wgad280.m49126(v41d13); v37477 =true; } } } } } if (va4929) { var v41d13 =v29463.element; if (v60373 =="RowSelect" ||v29463.element.type =="GroupHeader" ||v41d13.type =="NewRow") { if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v41d13.type =="GroupHeader" &&v41d13.expanded =="False") { wgad280.m13f0(vaf821,wgGetCellByPosition(v41d13,0).childNodes[0],v41d13.expanded); wgad280.m33b10(null,v41d13); } else if (v41d13.type =="Record") { var ve8699; for (var v67f38=0; v67f38<v41d13.cells.length;v67f38++) { if (v41d13.cells[v67f38].type =="CellExpander") { ve8699 =v41d13.cells[v67f38]; break; } } if (ve8699 &&(v41d13.childExpanded =="False" ||!v41d13.childExpanded)) { wg0bb8.mfb793(vaf821,ve8699,"False"); wg0bb8.m3f372(null,v41d13); } } } } else if (vf9d42) { var v41d13 =v29463.element; if (v60373 =="RowSelect" ||v41d13.type =="GroupHeader" ||v41d13.type =="NewRow") { if (v29463.type =="Cell")v41d13 =v41d13.parentElement; if (v41d13.type =="GroupHeader" &&v41d13.expanded =="True") { wgad280.m13f0(vaf821,wgGetCellByPosition(v41d13,0).childNodes[0],v41d13.expanded); wgad280.m33b10(null,v41d13); } else if (v41d13.type =="Record") { var ve8699; for (var v67f38=0; v67f38<v41d13.cells.length;v67f38++) { if (v41d13.cells[v67f38].type =="CellExpander") { ve8699 =v41d13.cells[v67f38]; break; } }  if (ve8699 &&(v41d13.childExpanded =="True")) { wg0bb8.mfb793(vaf821,ve8699,"True"); wg0bb8.m3f372(null,v41d13); } } } } if (vea843) { var vda239 =ISGetObject(vf9e53.gridId); var v33f38 =vda239.Tables[vf9e53.tblName]; var vdc346 =v33f38.GetSelRowStyle(); var vb5668 =v33f38.GetFocusCellStyle(); var v2c651 =vda239.LayoutSettings.ImageSettings.Folder +vda239.LayoutSettings.ImageSettings.CurrentRowImage; if (vaf821.ActiveEditCell ||vaf821.LastEditObj) {  if (!wgIsSameRow(v29463.GetRowElement(),vf9e53.GetRowElement())) { var v0a659 =vaf821.ExitEdit(2)[0]; if (!v0a659)return; } } if (vf9e53.type =="Row") { if (vf9e53.element.type =="NewRow") wg3bc89.m41472(vda239,vf9e53.element);  if (!v6c551) { wg3bc89.m20e12(vf9e53.element,v2c651); wg3bc89.me5432(vf9e53.element,vdc346,vb5668); }  if (vaf163) { var vc5786 =wgGetCellByPosition(vf9e53.element,0); vc5786.setActive();  if (vf9e53.element.type =="NewRow" ||wgIsFilterRow(vf9e53.element)||(vf9e53.element.type =="Record" &&v33f38.Get("AllowEdit")=="Yes")) wgSetLastAEC(vf9e53.element); else  { wg3bc89.m42232(vaf821,vc5786); vda239.ActiveEditCell =null; } } else  { if (v5d180) { if (va1c16.cellIndex ==-1) { if (vf9e53.element.type =="NewRow") va1c16 =wgGetCSFirstEditableCell(vf9e53.element); } wg3bc89.m42232(vaf821,va1c16); va1c16.setActive(); }  }  if (v5d180) { wgd4b96.m21f13(va1c16); }  } else if (vf9e53.type =="Cell") { if (!wgIsSameRow(v29463.GetRowElement(),vf9e53.GetRowElement())) { wg3bc89.m20e12(vf9e53.element.parentElement,v2c651); } wg3bc89.m65847(vf9e53.element,vdc346,vb5668); vf9e53.element.setActive(); wg3bc89.m42232(vda239,vf9e53.element); } } if (v37477) { event.cancelBubble =true; event.returnValue =false; }  wg_Global.LastKeyDownProcessed =v37477; }, m42232:function(v3c414,v99b97) { var vd8617 =v3c414.GetRootTable().GetElement(WG40.BODY,WG40.HTMLDIV); var v75093 =vd8617.scrollLeft; var vd9a57 =vd8617.scrollTop; var v56a3 =v99b97.parentElement; if (v56a3.type =="NewRow" ||v56a3.type =="FilterRow") { tblName =wg54183.m3fa51(v56a3); if (v3c414.Tables[tblName].IsRootTable) { if (vd8617.childNodes[0].rows.length ==0) vd8617 =wg54183.m3471(v56a3).parentElement; } } var vb7514 =ISPosLib.getClientLeft(v99b97)+v99b97.offsetWidth +vd8617.scrollLeft; var vc2090 =vd8617.offsetWidth +vd8617.scrollLeft +ISPosLib.getClientLeft(vd8617); var v31053 =posLib2.getLeftAbs(v3c414.FrameObj,v3c414); if (vc2090 <vb7514)vd8617.scrollLeft +=vb7514 -vc2090 +20; if (v31053 ==0)v31053 =ISPosLib.getClientLeft(vd8617); var vbcc68 =ISPosLib.getClientLeft(v99b97)-v31053; if (vbcc68 <0)vd8617.scrollLeft +=vbcc68 -20; var vbf191 =ISPosLib.getClientTop(v99b97); var v63236 =vbf191 +v99b97.offsetHeight +17; var vd1118 =ISPosLib.getClientTop(vd8617); var vceb43 =vd1118 +vd8617.offsetHeight; if (vbf191 <vd1118 &&vd8617.contains(v99b97))vd8617.scrollTop -=vd1118 -vbf191; if (v63236 >vceb43)vd8617.scrollTop +=v63236 -vceb43;  if (IS.moz &&(v75093 !=vd8617.scrollLeft ||vd9a57 !=vd8617.scrollTop)) wg54183.me8133(v3c414); }};function WebGridEventDestructor(){ delete wg3bc89;  window.detachEvent("onunload",WebGridEventDestructor); IS.RegisterUnloadVariables("wg3bc89");}window.attachEvent("onunload",WebGridEventDestructor);