
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 
// Generated Datetime : 8/23/2006 3:40:09 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 wg37547 ={ m39652:function(v45384,v96986,va1831) { var v3e583 =wg_getTable(v45384); if (!v45384 ||!v3e583)return; var vbe625 =ISGetObject(v3e583.gridId); var v08849 =vbe625.Tables[v3e583.tblName]; var v71532 =v08849.GetSelRowStyle(); var vd9593 =v08849.GetFocusCellStyle(); var v97b0 =false; var v5799; var v7a16 =false; var v30955 =0; if (vd9593 !="") vd9593 =vd9593.substring(vd9593.indexOf(":")+1); if (va1831) { v71532 =vbe625.GetBlurRowStyle(); vd9593 ="0px"; } else  { if (v96986 =="CheckedRow") { v71532 =v08849.GetCheckedRowStyle(); if (v71532 =="")return; vd9593 =""; } } var ve7448 =new Array(); if (wgIsColumnSetRow(v45384)) ve7448 =wgGetColumnSetRows(v45384); else ve7448[ve7448.length] =wgGetPreviewRowParent(v45384);  if (v08849.PreviewRowVisible &&v45384.type !="NewRow" &&v45384.type !="FilterRow") ve7448[ve7448.length] =wgGetPreviewRow(v45384); var v5f264 =false; for (var vaf549=0; vaf549<ve7448.length; vaf549++) { v97b0 =false; var v08865 =wgGetCellCount(ve7448[vaf549]); if (v7a16) { v30955--; if (v30955 ==1)v7a16 =false; v97b0 =true; } v5799 =null;  for (var v32f5=0; v32f5<ve7448[vaf549].cells.length; v32f5++) { var vd7375 =ve7448[vaf549].cells[v32f5]; if (wgIsValidCell(vd7375)) { if (v96986 =="Clear") { with (vd7375.runtimeStyle) { cssText =""; if (vd7375.stripedClass) { vd7375.className +=" " +vd7375.stripedClass; vd7375.stripedClass =null; } } } else  { if (v96986 !="Redraw") { vd7375.runtimeStyle.cssText =v71532; } if (!v97b0) { v97b0 =true; if (!v7a16 &&vd7375.rowSpan >1) { v7a16 =true; v30955 =vd7375.rowSpan; } vd7375.runtimeStyle.borderLeft =vd9593; if (vaf549 ==0) vd7375.runtimeStyle.borderTop =vd9593; else vd7375.runtimeStyle.borderTopWidth ="0px"; if (vaf549 ==ve7448.length-1 ||vd7375.rowSpan+vaf549-1 ==ve7448.length-1) vd7375.runtimeStyle.borderBottom =vd9593; else vd7375.runtimeStyle.borderBottomWidth ="0px";  if (v08865 >1 ||vd7375.type =="GroupCell") vd7375.runtimeStyle.borderRightWidth ="0px"; else vd7375.runtimeStyle.borderRight =vd9593;  } else  { v5799 =vd7375; if (vaf549 ==0) vd7375.runtimeStyle.borderTop =vd9593; else vd7375.runtimeStyle.borderTopWidth ="0px";  if (vaf549 ==ve7448.length-1 ||vd7375.rowSpan+vaf549-1 ==ve7448.length-1) vd7375.runtimeStyle.borderBottom =vd9593; else vd7375.runtimeStyle.borderBottomWidth ="0px"; vd7375.runtimeStyle.borderLeftWidth ="0px"; vd7375.runtimeStyle.borderRightWidth ="0px"; } } } } if (v5799) { with (v5799.runtimeStyle) { borderRight =vd9593;  if (vaf549 ==0) borderTop =vd9593; else borderTopWidth ="0px";  if (!v5f264) { v5f264 =vaf549+v5799.rowSpan-1 ==ve7448.length-1; if (vaf549 ==ve7448.length-1 ||v5f264) borderBottom =vd9593; else borderBottomWidth ="0px"; } else borderRightWidth ="0px"; borderLeftWidth ="0px";  if (borderRightWidth !="0px" &&v5799.className.indexOf("DefNoBrdRight")>=0) { v5799.stripedClass ="DefNoBrdRight"; v5799.className =v5799.className.replace(/DefNoBrdRight/g,""); } } } } if (v96986 !="Clear" &&v96986 !="CheckedRow") { if (wgIsColumnSetRow(v45384)||v08849.PreviewRowVisible) wg37547.m72549(vbe625,v45384); } else if (v96986 =="Clear" &&v45384.isRowChecked &&!va1831)wg37547.m39652(v45384,"CheckedRow"); }, m5ac67:function(v0ca95,v94699,v00010,ve258) { var vc7043 =wg_getTable(v00010); v00010.origColSpan =ve258.colSpan; v00010.origRowSpan =ve258.rowSpan; v00010.infoText =ve258.innerText; v00010.oldClassName =ve258.className; v00010.oldHeight =v00010.style.height; ve258.removeNode(true); v00010.style.height =v00010.h;  var vc9e15 =v94699.ColumnSets; var v80d32 =v94699.ColumnSetSettings.RowCount; var va0528 =v00010; for (var vfe167=0; vfe167<v80d32; vfe167++) { va0528.type ="NewRow"; for (var v0f813=0; v0f813<vc9e15.length; v0f813++) { var v1f690 =vc9e15[v0f813]; if (v1f690.Visible) { var v9ca1 =parseInt(v1f690.ColumnCount); for (var v6278=0; v6278<v9ca1; v6278++) { var v19972 =v1f690.GetRowLayout(vfe167,v6278); var v25e68 =v19972.ColumnMember; var v99026 =v19972.Spanned; if (v99026 ==null)v99026 =""; if (v25e68 !="" ||v99026 =="None") { var v6310 =wgInsertCell(va0528); v6310.type =(v25e68 !="" ? "Cell" : "ECell"); v6310.className =v0ca95.RowClass; v6310.cs =v1f690.Position; v6310.r =vfe167; v6310.c =v6278; var veb044 =v19972.ColSpan; var v9c914 =v19972.RowSpan; if (veb044) v6310.colSpan =veb044; if (v9c914) v6310.rowSpan =v9c914; } } } }  va0528 =wgGetNextRow(vc7043,va0528); if (vfe167+1 <v80d32) { if (vfe167+1 ==v80d32-1) { if (parseFloat(va0528.h)>0) va0528.style.height =va0528.h; else va0528.style.height =v00010.h; } else { if (parseFloat(va0528.h)>0) va0528.style.height =va0528.h; else va0528.style.height =v00010.h; } va0528.csRowPos =vfe167+1; } } if (v94699.IsRootTable)v0ca95.NeedHeightResize =true; wg37547.maf610(v0ca95,v00010); }, mbb783:function(vf4b61) { var v67025 =wgGetCSFirstEditableCell(vf4b61); if (v67025){ wgd4b96.m21f13(v67025); } }, m72549:function(v94550,vd0233) { var vcc845 =v94550.GetRootTable().GetElement(WG40.BODY,WG40.HTMLDIV); if (vd0233.type =="NewRow") { tblName =wg_getTableNameByRow(vd0233); if (v94550.Tables[tblName].IsRootTable) { if (vcc845.childNodes[0].rows.length ==0) vcc845 =wg_getTable(vd0233).parentElement; } } var vacc77 =new Array(); if (wgIsColumnSetRow(vd0233)) vacc77 =wgGetColumnSetRows(vd0233); else vacc77[vacc77.length] =wgGetPreviewRowParent(vd0233); var vbe615 =v94550.Tables[wg_getTable(vd0233).tblName]; if (vbe615.PreviewRowVisible &&vd0233.type !="NewRow" &&vd0233.type !="FilterRow") vacc77[vacc77.length] =wgGetPreviewRow(vd0233); var v71b38 =ISPosLib.getClientTop(vacc77[0]); var v9d141 =0;  for (var v19799=0; v19799<vacc77.length; v19799++) v9d141 +=vacc77[v19799].offsetHeight;  var v5a23 =v71b38 +v9d141 +30; var v5a630 =ISPosLib.getClientTop(vcc845); var v22411 =v5a630 +vcc845.offsetHeight; if (v71b38 <v5a630 &&vcc845.contains(vd0233))vcc845.scrollTop -=v5a630 -v71b38; if (v5a23 >v22411)vcc845.scrollTop +=v5a23 -v22411; }, maf610:function(vb1710,v31b68) { var v16d41 =wgGetColumnSetRows(v31b68); var v1c582 =wgGetColumnSetRow(v31b68); var v2de8 =vb1710.Tables[ wg_getTableNameByRow(v31b68)]; var v44216 =null; if (v1c582.rowValidated)v1c582.rowValidated =false;  if (!v2de8.IsRootTable) { var v3fb51 =v2de8.GetSubTableById(wg_getTable(v31b68).subId); v44216 =ISXml.CreateXmlDocument(); v44216.loadXML(v3fb51.RelNames); } for (var v15845=0; v15845<v16d41.length; v15845++) { var v04722 =v16d41[v15845]; var v48d75 =v04722.cells;  for (var vc142=0; vc142<v48d75.length; vc142++) { if (v48d75[vc142].type =="Cell") { var vfdf75 =wgGetColNameByCell(v48d75[vc142]); wgd4b96.mcdc13(vb1710,v2de8,vfdf75,v48d75[vc142],v44216); } else if (v48d75[vc142].type =="ECell") { v48d75[vc142].innerText =" "; } }  v44216 =null;  } }, mc9f42:function(vba996,v81815,vbda1) { var vd6966 =wgGetColumnSetRows(vbda1); vbda1.style.height =vbda1.oldHeight; for (var vcae48=0; vcae48<vd6966.length; vcae48++) { var vdb664 =vd6966[vcae48].cells; for (var v4ad10=0; v4ad10<vdb664.length; v4ad10++) { if (vdb664[v4ad10].type =="Cell" ||vdb664[v4ad10].type =="ECell") { vdb664[v4ad10].removeNode(true); v4ad10--; } }  if (vcae48 ==0) { var vd0f16 =vd6966[vcae48]; var v7eb94 =vd0f16.insertCell(-1); v7eb94.colSpan =vbda1.origColSpan; v7eb94.innerText =vbda1.infoText; v7eb94.type ="NewRowInfoCell"; v7eb94.style.cssText =""; v7eb94.className =vbda1.oldClassName; } else  { vd6966[vcae48].style.height =""; } } if (v81815.IsRootTable) vba996.NeedHeightResize =true; }};function wgGetColumnSetRows(vdd183){ var v2dd17 =new Array(); var v33d58 =wg_getTable(vdd183); var vcbb58 =vdd183; v2dd17[0] =wgGetColumnSetRow(vdd183); var vd3c13 =ISGetObject(v33d58.gridId); var va253 =vd3c13.Tables[v33d58.tblName]; var v8e544 =v2dd17[0]; for (var v76138=1; v76138<va253.ColumnSetSettings.RowCount; v76138++) { v8e544 =wgGetNextRow(v33d58,v8e544); v2dd17[v2dd17.length] =v8e544; } return v2dd17;}function wgGetLowestColumnSetRow(ve1739){ var veb219 =wgGetColumnSetRows(ve1739); return veb219[veb219.length-1];}function wgGetColumnSetRowByPos(vcab39,v5c375){ for (var v9a839=0; v9a839<vcab39.length; v9a839++){ if (vcab39[v9a839].csRowPos ==v5c375) return vcab39[v9a839]; } return null;}function wgGetColumnSetRow(v49753){ var v7bb58 =null; if (v49753.tagName =="TD")v7bb58 =v49753.parentElement; else if (v49753.tagName =="TR")v7bb58 =v49753; var vc1d84 =wg_getTable(v7bb58); if (v7bb58.type =="HierRecord")v7bb58 =wgGetPreviousRow(vc1d84,v7bb58); if (v7bb58.type =="PR")v7bb58 =wgGetPreviousRow(vc1d84,v7bb58); var v73566 =parseFloat(v7bb58.csRowPos); var ve1a87 =v7bb58; while (v73566 >0) { ve1a87 =wgGetPreviousRow(vc1d84,ve1a87); v73566--; } return ve1a87;}function wgGetCSCellByPosition(v62c83,vd9e50,vda422,vf4782){ var v08a25 =wgGetColumnSetRows(v62c83); for (var v5c921=0; v5c921<v08a25.length; v5c921++) { for (var v11722=0; v11722<v08a25[v5c921].cells.length; v11722++) { var v53897 =v08a25[v5c921].cells[v11722]; wg54183.mdf49(v53897); if (v53897.r ==vd9e50 &&v53897.c ==vda422 &&v53897.cs ==vf4782) return v53897; } } return null;}function wgGetCSCellByName(vb7713,veba18){ var v5a674 =wg_getTable(vb7713); var v0e499 =wgGetGridById(v5a674.gridId); var v92726 =v0e499.Tables[v5a674.tblName]; var v4a627 =v92726.GetRowLayoutByColName(veba18); if (v4a627){ return wgGetCSCellByPosition(vb7713,v4a627.Row,v4a627.Col,wgGetCSPosByRL(v4a627)); }}function wgGetCSPosByRL(v8ef85){ return v8ef85.Parent.Position;}function wgGetLastEditableCSCell(v57315,v98525,v30f34){ var v30f85 =v57315.ColumnSetSettings.RowCount; var v6c057 =v98525.ColumnCount; for (var vb9a97=v30f85-1; vb9a97>=0; vb9a97--) { for (var v50233=v6c057-1; v50233>=0; v50233--) { var v3f043 =v57315.GetColNameByRowLayout(v98525.Position,vb9a97,v50233); if (v3f043) { var v9e752 =v57315.GetColumn(v3f043); var v20b69 =wgGetCSCellByName(v30f34,v3f043); if (v9e752.EditType !="NoEdit" &&(v20b69.noEdit !="True")){ return v20b69; } } } } return null;}function wgGetPrevEditableCSCell(v7011,vc8471){ var vccb55 =null; if (v7011.tagName =="TD")vccb55 =v7011.parentElement; else vccb55 =v7011; var vc9144 =wg_getTable(vccb55); var v86568 =wgGetGridById(vc9144.gridId); var v8f624 =v86568.Tables[vc9144.tblName]; for (var ve7686=vc8471; ve7686>=0; ve7686--) { var v09e94 =v8f624.GetColumnSetByPos(ve7686); if (!v09e94.Visible)continue; var v1fa48 =wgGetLastEditableCSCell(v8f624,v09e94,vccb55); if (v1fa48)return v1fa48; }}function wgGetCSPrevEditableCell(vb5b12,vaca84){ var vbb976 =vb5b12.parentElement; if (!vbb976)vbb976 =vaca84; var vf3460 =wg_getTable(vbb976); var v13c9 =wgGetGridById(vf3460.gridId); var vaf537 =v13c9.Tables[vf3460.tblName]; var v9e974 =vaf537.GetColumnSetByPos(vb5b12.cs); var v9bf23 =null; var ve1572 =null; var vc6b38 =parseFloat(vb5b12.c)-1; for (var vb4f63=vb5b12.r; vb4f63>=0; vb4f63--) { if (vc6b38 <0 &&vb4f63 >0) { vc6b38 =v9e974.ColumnCount; vb4f63--; } for (var v02590=vc6b38; v02590>=0; v02590--) { v9bf23 =vaf537.GetColNameByRowLayout(vb5b12.cs,vb4f63,v02590); if (v9bf23) { var vb9846 =vaf537.GetColumn(v9bf23); ve1572 =wgGetCSCellByName(vbb976,v9bf23); if (vb9846.EditType !="NoEdit" &&(ve1572.noEdit !="True")) { break; } else  { ve1572 =null; } } } vc6b38 =v9e974.ColumnCount; if (ve1572)break; } if (!ve1572) { if (parseFloat(vb5b12.cs)>0) { ve1572 =wgGetPrevEditableCSCell(vb5b12,vb5b12.cs-1); } } if (!ve1572) { var vfce31 =wgGetPrevEditableRow(vf3460,vbb976); if (vfce31 &&vfce31.element &&vaf537.Get("AllowEdit")=="Yes") { var vd1e33 =new wgActiveCell(vf3460.gridId,vf3460.tblName); vd1e33.rowChanged =true;  if (vfce31.element &&vfce31.element.type =="GroupHeader") vd1e33.rowElement =vfce31.element;  if (vfce31.element.type =="Record" ||vfce31.element.type =="NewRow") { if (vfce31.element.type =="NewRow") vd1e33.element =wgGetCSFirstEditableCell(vfce31.element); else vd1e33.element =wgGetCSLastEditableCell(vfce31.element);  if (vd1e33.element) { vd1e33.rowElement =vd1e33.element.parentElement; pos =vd1e33.element.cellIndex; } else  { pos =vaf537.LastAECIndex; vd1e33.element =vfce31.element.cells[pos]; } vd1e33.cellIndex =pos; } else  { pos =0; vd1e33.element =null; vd1e33.cellIndex =null; } return vd1e33; } } else  { var vd1e33 =new wgActiveCell(vf3460.gridId,vf3460.tblName); vd1e33.element =ve1572; vd1e33.rowElement =ve1572.parentElement; vd1e33.cellIndex =ve1572.cellIndex; return vd1e33; }}function wgGetCSLastEditableCell(v56c42){ if (!v56c42)return; var v23367 =wg_getTable(v56c42); var v3ac63 =wgGetGridById(v23367.gridId); var v34521 =v3ac63.Tables[v23367.tblName]; var v07941 =v34521.ColumnSets; var vdca5 =wgGetPrevEditableCSCell(v56c42,v07941.length-1); return vdca5;}function wgGetCSFirstEditableCell(v01936){ if (!v01936)return; var vab726 =wg_getTable(v01936); var v4b392 =wgGetGridById(vab726.gridId); var v55621 =v4b392.Tables[vab726.tblName]; var v3a626 =wgGetNextEditableCSCell(v01936,0); if (!v3a626 &&v01936.type =="NewRow")v3a626 =v01936.cells[v01936.cells.length-1]; return v3a626;}function wgGetCSPrevEditableRow(vb3d88,v24e34,v15d70,v7c613,v84a79){ var v9ca56 =null; if (v24e34.tagName =="TD")v9ca56 =v24e34.parentElement; else v9ca56 =v24e34; if (!v9ca56)return; var vb7f60 =wg_getTable(v9ca56); var v4bb59 =wgGetGridById(vb7f60.gridId); var ve8894 =v4bb59.Tables[vb7f60.tblName]; var vaa347 =ve8894.GetColumnSetByPos(v24e34.cs); var vab445 =null; var v42641 =v9ca56.csRowPos; if (v84a79)v42641--; for (var v87488=v42641; v87488>=0; v87488--) { var ve5a0 =ve8894.GetColNameByRowLayout(v15d70,v87488,v7c613); if (ve5a0) { var va8f57 =ve8894.GetColumn(ve5a0); vab445 =wgGetCSCellByName(v9ca56,ve5a0); if (va8f57.EditType !="NoEdit" &&(vab445.noEdit !="True")){ break; } else  { vab445 =null; if (v87488==0) { v9ca56 =wgGetColumnSetRow(v9ca56); break; } } } } if (!vab445) { var v96034 =wgGetPrevEditableRow(vb7f60,v9ca56); if (v96034 &&v96034.element &&ve8894.Get("AllowEdit")=="Yes") { if (v96034.tblName !=vb7f60.tblName ||v96034.element.type =="GroupHeader" ||(v96034.element.type =="NewRow" &&v9ca56.type !="NewRow")) return v96034; var v68828 =wgGetLowestColumnSetRow(v96034.element); return wgGetCSPrevEditableRow(vb7f60,v68828,v15d70,v7c613); } } else  { var vefc99 =new wgActiveCell(vb7f60.gridId,vb7f60.tblName); vefc99.element =vab445; vefc99.rowElement =vab445.parentElement; vefc99.cellIndex =vab445.cellIndex; return vefc99; }}function wgGetPrevCSRow(v11e35,vd6416){ var vadb47 =wgGetPreviousRow(v11e35,vd6416); if (vd6416.type =="NewRow")vadb47 =null;  while (vadb47 !=null) { if (vadb47.type =="HierRecord") { if (vadb47.style.display =="none") vadb47 =wgGetPreviousRow(v11e35,vadb47); else  { var v7e163 =vadb47.cells[vadb47.cells.length-1]; var v17d71 =v7e163.childNodes[v7e163.childNodes.length-1]; var ve6598 =document.getElementById("dvTB_" +v17d71.gridId +"_" +v17d71.tblName +"_" +v17d71.subId).childNodes[0]; var v23178 =wgGetLastVisibleRow(ve6598); if (v23178) { if (v23178.element.type =="HierRecord") v23178 =wgGetLastChildVisibleRow(v23178.element); if (v23178)return v23178; } else vadb47 =wgGetPreviousRow(v11e35,vadb47); } } else  { if (vadb47.style.display =="none" ||vadb47.type =="GroupTotalRow" ||vadb47.type =="PR") vadb47 =wgGetPreviousRow(v11e35,vadb47); else  { var v4db16 =new SelectedObject(v11e35.tblName,v11e35.gridId,vadb47); return v4db16; } } }  if (vadb47 ==null &&vd6416.type !="NewRow") { var v0ed43 =wg_States[v11e35.gridId]; var v4d41 =v0ed43.Tables[v11e35.tblName]; var v59c39 =v4d41.Get("AllowAddNew"); if (v59c39 =="Yes") { var ve5585 =v4d41.GetNewRow(vd6416); if (ve5585) { vadb47 =ve5585; var v4db16 =new SelectedObject(v11e35.tblName,v11e35.gridId,vadb47); return v4db16; } } }  if (vadb47 ==null) { var v0ed43 =ISGetObject(v11e35.gridId); var v4d41 =v0ed43.Tables[v11e35.tblName]; if (!v4d41.IsRootTable) {  var v47186 =v4d41.GetElement(WG40.COLHEADER,WG40.HTMLDIV,vd6416).parentElement; if (v47186) { if (v47186.previousSibling) { v47186 =v47186.previousSibling.previousSibling; var v6cd87 =document.getElementById("dvTB_" +v47186.gridId +"_" +v47186.tblName +"_" +v47186.subId).childNodes[0]; return wgGetLastVisibleRow(v6cd87); } }  var v8a720 =v4d41.GetParentRow(vd6416); if (v8a720) { var v78976 =wg_getTable(v8a720); return new SelectedObject(v78976.tblName,v78976.gridId,v8a720);  } } } return null;}function wgGetCSNextEditableCell(vb3e1,v0668){ var v93274 =vb3e1.parentElement; if (!v93274)v93274 =v0668; if (typeof(vb3e1.cs)=="undefined")return null; var v45b36 =wg_getTable(v93274); var v1bd1 =wgGetGridById(v45b36.gridId); var v8ce44 =v1bd1.Tables[v45b36.tblName]; var v42231 =v8ce44.GetColumnSetByPos(vb3e1.cs); var v31686 =v8ce44.ColumnSetSettings.RowCount; var vc6f63 =parseFloat(v42231.ColumnCount); var v8cd17 =null; var vff277 =null; var v5413 =parseFloat(vb3e1.c)+1;  for (var vf8268=vb3e1.r; vf8268<v31686; vf8268++) { if (v5413 >=vc6f63 &&vf8268 <v31686) { v5413 =0; vf8268++; } for (var v0e330=v5413; v0e330<vc6f63; v0e330++) { v8cd17 =v8ce44.GetColNameByRowLayout(vb3e1.cs,vf8268,v0e330); if (v8cd17) { var vc8957 =v8ce44.GetColumn(v8cd17); vff277 =wgGetCSCellByName(v93274,v8cd17); if (vc8957.EditType !="NoEdit" &&(vff277.noEdit !="True")) { break; }else { vff277 =null; } } } v5413 =0; if (vff277)break; } var v51528 =v8ce44.ColumnSets.length; if (!vff277) { if (parseFloat(vb3e1.cs)<v51528) { vff277 =wgGetNextEditableCSCell(vb3e1,parseFloat(vb3e1.cs)+1); } } if (!vff277) { var vcb356 =wgGetNextEditableRow(v45b36,v93274);  if (vcb356 &&vcb356.element &&v8ce44.Get("AllowEdit")=="Yes") { var v65638 =new wgActiveCell(v45b36.gridId,v45b36.tblName); v65638.rowChanged =true;  if (vcb356.element &&(vcb356.element.type =="GroupHeader" ||vcb356.element.type =="GroupTotalRow")) v65638.rowElement =vcb356.element;  if (vcb356.element.type =="Record" ||vcb356.element.type =="NewRow") { if (vcb356.element.type =="NewRow") v65638.element =wgGetCSFirstEditableCell(vcb356.element); else v65638.element =wgGetCSFirstEditableCell(vcb356.element);  if (v65638.element) { v65638.rowElement =v65638.element.parentElement; pos =v65638.element.cellIndex; } else  { pos =v8ce44.LastAECIndex; v65638.element =vcb356.element.cells[pos]; } v65638.cellIndex =pos; } else  { pos =0; v65638.element =null; v65638.cellIndex =null; } return v65638; } } else  { var v65638 =new wgActiveCell(v45b36.gridId,v45b36.tblName); v65638.element =vff277; v65638.rowElement =vff277.parentElement; v65638.cellIndex =vff277.cellIndex; return v65638; }}function wgGetNextEditableCSCell(va2470,v06b95){ var v59820 =null; if (va2470.tagName =="TD")v59820 =va2470.parentElement; else v59820 =va2470; var vbaa18 =wg_getTable(v59820); var vf8098 =wgGetGridById(vbaa18.gridId); var vdcd51 =vf8098.Tables[vbaa18.tblName]; var v5bf84 =vdcd51.ColumnSets.length; for (var vba864=v06b95; vba864<v5bf84; vba864++) { var v78171 =vdcd51.GetColumnSetByPos(vba864); if (!v78171.Visible)continue; var v51088 =wgGetFirstEditableCSCell(vdcd51,v78171,v59820); if (v51088)return v51088; }}function wgGetFirstEditableCSCell(vd0c56,v7cf42,vf2e25){ var va3a25 =vd0c56.ColumnSetSettings.RowCount; var v05574 =v7cf42.ColumnCount; for (var v52d88=0; v52d88<va3a25; v52d88++) { for (var v71684=0; v71684<v05574; v71684++) { var vbf949 =vd0c56.GetColNameByRowLayout(v7cf42.Position,v52d88,v71684); if (vbf949) { var v33c4 =vd0c56.GetColumn(vbf949); var vec966 =wgGetCSCellByName(vf2e25,vbf949); if (v33c4.EditType !="NoEdit" &&(vec966 &&vec966.noEdit !="True")) { return vec966; } } } } return null;}function wgGetCSNextEditableRow(ve5b47,v16145,vce937,vc4c56,v82023){ var vcab31 =null; if (v16145.tagName =="TD")vcab31 =v16145.parentElement; else vcab31 =v16145; if (!vcab31)return; var v0d731 =wg_getTable(vcab31); var v33077 =wgGetGridById(v0d731.gridId); var v4c317 =v33077.Tables[v0d731.tblName]; var va1314 =v4c317.GetColumnSetByPos(v16145.cs); var v8a844 =null; var vfdf62 =vcab31.csRowPos; var vea656 =v4c317.ColumnSetSettings.RowCount; if (v82023)vfdf62++; for (var vb8220=vfdf62; vb8220<vea656; vb8220++) { var vf4b36 =v4c317.GetColNameByRowLayout(vce937,vb8220,vc4c56); if (vf4b36) { var v9fa69 =v4c317.GetColumn(vf4b36); v8a844 =wgGetCSCellByName(vcab31,vf4b36); if (v9fa69.EditType !="NoEdit" &&(v8a844.noEdit !="True")) { break; }else { v8a844 =null; } } } if (!v8a844) { var v12273 =wgGetNextEditableRow(v0d731,vcab31); if (v12273 &&v12273.element &&v4c317.Get("AllowEdit")=="Yes") { if (v12273.tblName !=v0d731.tblName ||v12273.element.type =="GroupHeader" ||(v12273.element.type =="NewRow" &&vcab31.type !="NewRow")) return v12273;  var vc2478 =wgGetColumnSetRow(v12273.element); return wgGetCSNextEditableRow(v0d731,vc2478,vce937,vc4c56); } } else  { var v41a5 =new wgActiveCell(v0d731.gridId,v0d731.tblName); v41a5.element =v8a844; v41a5.rowElement =v8a844.parentElement; v41a5.cellIndex =v8a844.cellIndex; return v41a5; }}function wgInsertCell(v01941){ var v7c357 =v01941.insertCell(-1); while (v7c357.parentElement ==null) v7c357 =v01941.insertCell(v01941.cells.length); return v7c357;}function wgAnimateRH(v71052,v62f2,va3a27){ if (v71052.style.posHeight <v62f2){ var vea477 =v62f2 -v71052.style.posHeight; var v8b713 =parseInt(vea477/2); if (v8b713 ==0)v8b713 =1; v71052.style.height =v71052.style.posHeight +v8b713; var vc2f75 =function(){wgAnimateRH(v71052,v62f2,va3a27);}; window.setTimeout(vc2f75,50); }else { if (va3a27){ var v15f24 =wg_getTable(v71052); var vc2c67 =wgGetGridById(v15f24.gridId); vc2c67.NeedHeightResize =true; } }}