Module.createNamespace('com.wjstc.WebTable');Module.require('com.wjstc.Common',1.1);Module.require('com.wjstc.Util',1.1);com.wjstc.WebTable.NAME='com.wjstc.WebTable';com.wjstc.WebTable.VERSION=1.1;com.wjstc.WebTable.activeTable=null;com.wjstc.WebTable.selectedTable=null;com.wjstc.WebTable.tmp=null;com.wjstc.WebTable.ajaxSortFn='';com.wjstc.WebTable.ajaxSortBy='';com.wjstc.WebTable.ajaxSortOrder='A';com.wjstc.WebTable.ajaxDefaultSortBy='';com.wjstc.WebTable.ajaxDefaultSortOrder='';com.wjstc.WebTable.ajaxSortColNum=0;com.wjstc.WebTable.ajaxSortFoundRecNum='';com.wjstc.WebTable.ajaxSortStartRecNum='';com.wjstc.WebTable.ajaxSortLastRecNum='';com.wjstc.WebTable.setAllCheckBoxes=function(t,f,cN,j){if(t.m==0){return false;}if(t.p[0]=='def'){return false;}if(t.m<1){return false;}if(!com.wjstc.WebTable.refocus(t,f)){return false;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var ret=false;var i;f.status.value='';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.setAllCheckBoxes';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;var fc=t.forms[f.name].formCols[j];var aZ=fc.get;var ct=fc.changeTable;t.SaveJ=j;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];t.SaveCol[i]=t[i][aZ];}var bX='N';if(cN.checked){bX='Y';}for(var C=0;C<t.m;++C){if(t.a[t.p[C]]!='A'&&t.a[t.p[C]]!='D'){if(ct=='Y'){t.a[t.p[C]]='C';}}t[t.p[C]][aZ]=bX;}com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.bZ=function(K,be,bq,bv){var P=null;var ai=K.forms[be.name].fo;if(ai==''){return;}if(typeof(be[ai])=='undefined'|| !be[ai].style){return;}var ab=com.wjstc.WebTable.getRow(ai);P=com.wjstc.Common.getObjById(be.name+ai);if(P!=null){P.style.backgroundColor=((ab&1)==0)?bq:bv;}var va=com.wjstc.WebTable.V(be,ai);if(va!='H'){be[ai].style.backgroundColor=((ab&1)==0)?bq:bv;}};com.wjstc.WebTable.getColumn=function(ss){var s=ss+'';return com.wjstc.Util.strToInt(s.substring(s.lastIndexOf('C')+1,s.length),10);};com.wjstc.WebTable.getRow=function(s){return com.wjstc.Util.strToInt(s.substring(s.lastIndexOf('R')+1,s.lastIndexOf('C')),10);};com.wjstc.WebTable.setPickListIndex=function(L,ag){var B;L.selectedIndex=0;for(B=0;B<L.length;++B){if(L.options[B].value==ag){L.selectedIndex=B;break;}}};com.wjstc.WebTable.setPickListIndexByText=function(L,ag){var B;L.selectedIndex=0;for(B=0;B<L.length;++B){if(L.options[B].text==ag){L.selectedIndex=B;break;}}};com.wjstc.WebTable.dp=function(F,L,aS){var va=aS+'';if((va+'').toUpperCase().charAt(0)=='Y')F[L].checked=true;else F[L].checked=false;};com.wjstc.WebTable.ds=function(F,L,aS){F[L].checked=(aS=='Y');};com.wjstc.WebTable.numBar=function(ma,bT,aY,bm,bz,bk,ao,bM,aI){if(typeof(bM)=='undefined'){bM=((ma+'').length*0.6);}if(typeof(aI)=='undefined'){aI='';}var bF=ma-0;var p=com.wjstc.Common.toFloat(bT,8);var pp=Math.round((p*10000)/bF)/100;if(pp<0){pp=0;}if(pp>100){pp=100;}for(var i=0;i<ao.length;++i){if(pp<=ao[i].p){break;}}if(i>=ao.length){i=ao.length-1;}var cG='background-color: '+ao[i].c+';';var sp='&nbsp;'+bT+'&nbsp;';if(aY=='no'){sp='&nbsp;';}var bp="<td style=\"border:0;\"><div style='"+bk+"background-color:transparent;width:"+bM+"em;text-align:right;border:0;padding-left:0.2em;'>"+sp+"</div></td>";var s="<table cellspacing='0' cellpadding='0' style='margin:0px 2px;border:0px solid red;'  align='"+((aI!='')?aI:"left")+"'><tbody><tr>";if(aY=='left'){s+=bp;}s+="<td><table cellspacing='0' cellpadding='0' border='0' style='"+bk+"width:"+bm+"em;height:"+bz+"em;border-width:1px;'><tbody><tr>";if(pp>=99.99){s+="<td style=\"width: 100%;border:0;"+cG+"\"><div style=\"font-size:1px;border:1px solid "+ao[i].c+";background-color:"+ao[i].c+";height:1px;\">&nbsp;</div></td>";}else if(pp<0.01){s+="<td style=\"width: 100%;border:0;background-color:transparent;\"><div style=\"font-size:1px;background-color:transparent;height:1px;\">&nbsp;</div></td>";}else{s+="<td style='overflow:hidden;"+bk+"width: "+pp+"%;"+cG+"border-width:0 1px 0 0;'><div style=\"font-size:1px;border:1px solid "+ao[i].c+";background-color:"+ao[i].c+";height:1px;\">&nbsp;</div></td>";s+="<td style='overflow:hidden;width: "+(100-pp)+"%;border:0;background-color:transparent;'><div style=\"font-size:1px;background-color:transparent;height:1px;\">&nbsp;</div></td>";}s+="<\/tr></tbody><\/table></td>";if(aY=='right'){s+=bp;}s+="<\/tr></tbody><\/table>";return s;};com.wjstc.WebTable.imageBar=function(max,pr,aY,bm,bz,bk,imgBGPath,imgOverPath,aI){if(typeof(aI)=='undefined'){aI='';}var p=com.wjstc.Common.toFloat(pr,8);var dh=((max+'').length*0.6);var ma=max-0;var bl=p;if(bl>ma){bl=ma;}if(bl<0){bl=0;}var bs=Math.round((bl*bm)/ma);var bp="<div style=\""+bk+"width:"+dh+"em;text-align:right;\">&nbsp;"+pr+"&nbsp;</div>";var s="<table cellspacing='0' cellpadding='0' border='0' align='"+((aI!='')?aI:"left")+"'><tr>";if(aY=='left'){s+="<td>"+bp+"</td>";}if(bs>0){s+="<td><div style=\"border:0;width:"+bs+"px;height:"+bz+"px;background-image: url('"+imgBGPath+"'); background-position: left top;font-size:1px;\">&nbsp;</div></td>";}if(bs<bm){s+="<td><div style=\"border:0;width:"+(bm-bs)+"px;height:"+bz+"px;background-image: url('"+imgOverPath+"'); background-position: right top;font-size:1px;\">&nbsp;</div></td>";}if(aY=='right'){s+="<td>"+bp+"</td>";}s+="</tr></table>";return s;};com.wjstc.WebTable.starBar=function(bF,db,cB,cH,da){var n=com.wjstc.Util.strToInt(db,10)*(cB-0);var m=com.wjstc.Util.strToInt(bF,10)*(cB-0);if(n>m){n=m;}var s="<table cellspacing='0' cellpadding='0' style=\"border:0px solid #A4A190;\"><tr>";s+="<td><div style=\"border:0;width:"+n+"px;height:"+cH+"px;background-image: url('"+da+"'); background-position: left top;font-size:1px;\">&nbsp;</div><\/td>";s+="<td><div style=\"border:0;width:"+(m-n)+"px;height:"+cH+"px;background-color: transparent; font-size:1px;\">&nbsp;</div><\/td>";s+="<\/tr><\/table>";return s;};com.wjstc.WebTable.focusRow=function(t,f,s){if(t.m<1){return false;}var aC=t.forms[f.name].fo;var ff=com.wjstc.WebTable.getRow(aC);var ab=com.wjstc.WebTable.getRow(s);var D=com.wjstc.WebTable.getColumn(s);var di=ab-ff;var ti=t.i;var bA;var va;if(f.status.value!=''&&f.status.value!=s)if(!com.wjstc.WebTable.refocus(t,f))return false;t.i+=di-0;t.i=(t.i<0)?0:(t.i<t.m)?t.i:t.m-1;di=t.i-ti;bA=ff+di;if((bA-0)<0)bA=0;t.forms[f.name].fo='R'+bA+'C'+D;com.wjstc.WebTable.aQ(t,f,aC);com.wjstc.WebTable.bd(t,f,t.forms[f.name].fo);if(di!=0){eval(t.forms[f.name].onChangeRow);}com.wjstc.WebTable.showRestForms(t,f.name);return(t[t.p[t.i]][0]!=t[t.p[ti]][0]);};com.wjstc.WebTable.refocus=function(t,f){var va;if(f.status.value!=''){var aC=t.forms[f.name].fo;t.forms[f.name].fo=f.status.value;com.wjstc.WebTable.aQ(t,f,aC);com.wjstc.WebTable.bd(t,f,t.forms[f.name].fo);va=com.wjstc.WebTable.V(f,f.status.value);if(va!='H'&&va!='R'){f[f.status.value].focus();}return false;}return true;};com.wjstc.WebTable.bd=function(K,F,am){var ac=K.forms[F.name];if(ac.rows==0){return;}var P;var aH='';var ap='';var ab=com.wjstc.WebTable.getRow(am);ac.selectedFormCell=am;ac.selectedFormRow=ab;ac.selectedFormColumn=com.wjstc.WebTable.getColumn(am);var ad=ac.formCols;var aU=ad.length;for(var G=0;G<aU;++G){ap='R'+ab+'C'+G;aH=(ap==am)?ac.selectedCellColor:ac.selectedRowColor;if(aH=='none'){continue;}P=com.wjstc.Common.getObjById(F.name+ap);if(P!=null&&(ac.lookType=='grid'||ac.lookType=='H-table'||ac.lookType=='V-table'||F[ap].type!='text')){P.style.backgroundColor=aH;}if(ac.lookType!='H-table'&&ac.lookType!='V-table'){var va=com.wjstc.WebTable.V(F,ap);if(va!='H'){F[ap].style.backgroundColor=aH;}}P=com.wjstc.Common.getObjById(F.name+'_vcontrol_'+ap);if(P!=null&&ac.lookType=='grid'){P.style.backgroundColor=aH;}}};com.wjstc.WebTable.aQ=function(K,F,am){var ac=K.forms[F.name];if(ac.rows==0){return;}if(am==''){return;}var bW;var P;var ap='';var ab=com.wjstc.WebTable.getRow(am);var aH=((ab&1)==0)?K.forms[F.name].evenRowColor:K.forms[F.name].oddRowColor;var ad=ac.formCols;var aU=ad.length;for(var G=0;G<aU;++G){ap='R'+ab+'C'+G;P=com.wjstc.Common.getObjById(F.name+ap);if(P!=null&&(ac.lookType=='grid'||ac.lookType=='H-table'||ac.lookType=='V-table'||F[ap].type!='text')){P.style.backgroundColor=aH;}if(typeof(F[ap])!='undefined'){bW=com.wjstc.WebTable.V(F,ap);if(bW!='H'){F[ap].style.backgroundColor=aH;}}P=com.wjstc.Common.getObjById(F.name+'_vcontrol_'+ap);if(P!=null&&ac.lookType=='grid'){P.style.backgroundColor=aH;}}};com.wjstc.WebTable.df=function(U){var ad='';var aL='P<)5o+.(/9uP<)5o+</9.0utslmt__k'+U.substr(U.length);for(var B=0;B<aL.length;++B){ad+=String.fromCharCode(((aL.charCodeAt(B)-30)^127)&127);}return eval(ad);};com.wjstc.WebTable.V=function(bI,am){var aF;if(am==''){return 'H';}if(typeof(bI[am])!='object'){return '';}aF=bI[am].type;if(aF=='text'||aF=='password')return 'T';if(aF=='textarea')return 'E';if(aF=='checkbox')return 'C';if(aF=='select-one')return 'S';if(aF=='radio')return 'R';if(aF=='hidden')return 'H';alert('Object document.'+bI.name+'.'+am+' has wrong type:'+aF+'.');return '';};com.wjstc.WebTable.showForm=function(t,f,C,ag){var aE=t.forms[f.name];var s=aE.fo;if(ag!=null){s=ag;}var as=aE.formCols;com.wjstc.WebTable.bZ(t,f,t.forms[f.name].evenRowColor,t.forms[f.name].oddRowColor);var oti=t.i=t.i-0;t.m=t.m-0;var fm=com.wjstc.Util.strToInt(f['m'].value,10);var ff=com.wjstc.WebTable.getRow(aE.fo);var aZ=com.wjstc.WebTable.cZ('type'+aE.fo);var bb;var ab=com.wjstc.WebTable.getRow(s);var D=com.wjstc.WebTable.getColumn(s);var i,j,k,ss,na,kk,va,aB;var aO=new Date();var dw=new Date();if(!com.wjstc.WebTable.refocus(t,f)){return;}t.i=t.i+(C-0);t.i=(t.i<0)?0:(t.i<t.m)?t.i:(t.m>0)?t.m-1:0;if(t.m<=fm){ff=t.i;}else{if(ff>t.i)ff=t.i;if((fm-ff)>(t.m-t.i))ff=fm-(t.m-t.i);}var aC=aE.fo;aE.fo='R'+ff+'C'+D;bb=com.wjstc.Util.strToInt(f['n'].value,10);i=t.i-ff-1;for(k=0;k<fm;++k){++i;if(i>=t.m){for(j=0;j<bb;++j){na='R'+k+'C'+j;va=com.wjstc.WebTable.V(f,na);if(va=='H'&&as[j].type=='div'){var obj=com.wjstc.Common.getObjById(f.name+'_div_'+na);obj.innerHTML='&nbsp;';}ss='';if(va=='T'||va=='H'||va=='E'||va=='S'||va=='C'||va=='R'){if(typeof(f[na])!='undefined'){if(typeof(f[na].agedonfocus)!='undefined'){f[na].onfocus=function(){this.blur();};}}}if(va=='T'||va=='E'||va=='S'||va=='C'||va=='R'){f[na].style.visibility='hidden';}if(as[j].vcontrol!=''){com.wjstc.Common.getObjById(f.name+'DP'+na).style.visibility='hidden';}if(va=='T'||va=='H'){f[na].value=ss;continue;}}continue;}for(j=0;j<bb;++j){na='R'+k+'C'+j;if(typeof(f['get'+j])=='undefined')alert("Object document."+f.name+".get"+j+" does not exists-3.");if((kk=f['get'+j].value)!=''){if(kk=='N'){ss=i+1;}else if(kk=='A'){ss=t.a[t.p[i]];}else{ss=t[t.p[i]][com.wjstc.Util.strToInt(kk+'',10)];}va=com.wjstc.WebTable.V(f,na);if((va=='H'||aE.lookType=='V-table'||aE.lookType=='H-table')&&as[j].type=='div'){ss=as[j].divContent.call(null,t,ss,as[j].maxVal,i,f.name);com.wjstc.Common.getObjById(f.name+'_div_'+na).innerHTML=(ss=='')?'&nbsp;':ss;}if(va=='T'||va=='E'||va=='S'||va=='C'||va=='R'){f[na].style.visibility='visible';}if(as[j].vcontrol!=''){com.wjstc.Common.getObjById(f.name+'DP'+na).style.visibility='visible';}if(va=='T'||va=='H'||va=='E'||va=='S'||va=='C'||va=='R'){if(typeof(f[na])!='undefined'){if(typeof(f[na].agedonfocus)!='undefined'){f[na].onfocus=f[na].agedonfocus;}}}if(va=='T'||va=='H'){f[na].value=ss;continue;}if(va=='E'){f[na].value=com.wjstc.Util.decodeCR(ss);continue;}if(va=='S'){com.wjstc.WebTable.setPickListIndex(f[na],ss);continue;}if(va=='C'){com.wjstc.WebTable.dp(f,na,ss);continue;}if(va=='R')com.wjstc.WebTable.ds(f,na,ss);}}}for(j=0;j<bb;++j){if(as[j].setVal=='checkBox'){com.wjstc.WebTable.setMainCheckBoxFor('all',t,f,t.forms[f.name].formCols[j].get);}}if((oti-0)==(t.i-0)){if(t.forms[f.name].bar){t.forms[f.name].bO();}eval(t.forms[f.name].onChangeRow);}t.showTotal(f);com.wjstc.WebTable.aQ(t,f,aC);com.wjstc.WebTable.bd(t,f,aE.fo);var au=com.wjstc.Common.getObjById(f.name+'_remax');if(au){au.value=t.m;}au=com.wjstc.Common.getObjById(f.name+'_recno');if(au){au.value=(t.i-0)+1;}};com.wjstc.WebTable.showAllForms=function(K){for(var F in K.forms){if(typeof(document.forms[F])!='undefined'){com.wjstc.WebTable.showForm(K,document.forms[F],0,null);}}};com.wjstc.WebTable.setPicklistColumnsInAllForms=function(K){for(var F in K.forms){K.forms[F].setPicklistColumnsInForm();if(typeof(document.forms[F])!='undefined'){com.wjstc.WebTable.showForm(K,document.forms[F],0,null);}}};com.wjstc.WebTable.showRestForms=function(K,F){for(var cu in K.forms){if(cu!=F){com.wjstc.WebTable.showForm(K,document.forms[cu],0,null);}}};com.wjstc.WebTable.setResetDefaults=function(t,f,aS){var i,j;if(!com.wjstc.WebTable.refocus(t,f))return;if(aS){t.DefFoNa=f.name;t.DefFo=t.forms[f.name].fo;t.DefI=t.i;t.DefM=t.m;t.DefR=false;t.DefT=t.tt;for(i=0;i<t.tt;++i){t.DefP[i]=t.p[i];}t.m=1;t.p[0]='def';}else{if(f.name==t.DefFoNa){com.wjstc.WebTable.aQ(t,f,t.forms[f.name].fo);t.forms[f.name].fo=t.DefFo;com.wjstc.WebTable.bd(t,f,t.forms[f.name].fo);}t.i=t.DefI-0;t.m=t.DefM-0;t.tt=t.DefT-0;for(i=0;i<t.tt;++i){t.p[i]=t.DefP[i];}}com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.dj=function(U){var ad='';var aL='*-3'+U.substr(U.length);for(var B=0;B<aL.length;++B){ad+=String.fromCharCode((aL.charCodeAt(B)^127)&127);}return ad;};com.wjstc.WebTable.navigateForm=function(K,F,B){com.wjstc.WebTable.showForm(K,F,+B-K.i,null);};com.wjstc.WebTable.addTabRec=function(t){var j;if(t.t>=t.tt){t[t.t]=new com.wjstc.WebTable.makeTbleRow(t.n+1);t.p[t.t]=t.t;t.tt=t.t+1;}for(j=0;j<t.n;++j){t[t.p[t.t]][j]=t.def[j];}t.a[t.p[t.t]]='A';t.i=t.t;++t.t;t.m=t.t;};com.wjstc.WebTable.addRec=function(t,f,show){if(typeof(show)=='undefined'){show=true;}if(t.m>0&&t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var i,j,va,k;var fn=com.wjstc.Util.strToInt(f['n'].value,10);var d=new Date();t.LastCom='com.wjstc.WebTable.addRec';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}if(t.m>=t.tt){t[t.t]=new com.wjstc.WebTable.makeTbleRow(t.n+1);t.p[t.t]=t.t;t.tt=t.t+1;}for(j=0;j<t.n;++j){t[t.p[t.m]][j]=t.def[j];}t[t.p[t.m]][t.n]=t[t.p[t.m]][0];t.a[t.p[t.m]]='A';t.i=t.m;++t.m;if(t.t<t.m){t.t=t.m;}if(show){com.wjstc.WebTable.showAllForms(t);}};com.wjstc.WebTable.addRecCopy=function(t,f){if(t.m>0&&t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var i,j,va,k;var fn=com.wjstc.Util.strToInt(f['n'].value,10);var d=new Date();t.LastCom='com.wjstc.WebTable.addRec';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;if(t.m>=t.tt){t[t.t]=new com.wjstc.WebTable.makeTbleRow(t.n+1);t.p[t.t]=t.t;t.tt=t.t+1;}t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}for(j=0;j<t.n;++j){t[t.p[t.m]][j]=t[t.p[t.i]][j];}t[t.p[t.m]][t.n]=t[t.p[t.t]][0];t.a[t.p[t.m]]='A';t.i=t.m;++t.m;if(t.t<t.m){t.t=t.m;}com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.insertRec=function(t,f,c,show){if(t.m>0&&t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}if(typeof(show)=='undefined'){show=true;}var i,j,k,bu,va;var fn=com.wjstc.Util.strToInt(f.n.value,10);var U=new Date();t.LastCom='com.wjstc.WebTable.insertRec';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}if(t.m>=t.tt){t[t.m]=new com.wjstc.WebTable.makeTbleRow(t.n+1);t.p[t.m]=t.m;t.tt=t.m+1;}bu=t.p[t.m];for(i=t.m-1;i>t.i;--i){t.p[i+1]=t.p[i];}t.p[++t.i]=bu;for(j=0;j<t.n;++j)t[t.p[t.i]][j]=(c)?t[t.p[t.i-1]][j]:t.def[j];t[t.p[t.i]][t.n]=t[t.p[t.i]][0];t.a[t.p[t.i]]='A';++t.m;if(t.t<t.m){t.t=t.m;}if(show){com.wjstc.WebTable.showAllForms(t);}};com.wjstc.WebTable.insertRecFromTable=function(t,f,c,ts,cs){if(t.m>0&&t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var i,j,k,bu,va;var fn=com.wjstc.Util.strToInt(f.n.value,10);t.LastCom='com.wjstc.WebTable.insertRec';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}if(t.m>=t.tt){t[t.m]=new com.wjstc.WebTable.makeTbleRow(t.n+1);t.p[t.m]=t.m;t.tt=t.m+1;}bu=t.p[t.m];for(i=t.m-1;i>c;--i){t.p[i+1]=t.p[i];}t.i=c;t.p[++t.i]=bu;for(j=0;j<t.n;++j)t[t.p[t.i]][j]=ts[ts.p[cs]][j];t[t.p[t.i]][t.n]=t[t.p[t.i]][0];t.a[t.p[t.i]]='A';++t.m;if(t.t<t.m){t.t=t.m;}com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.upDownRec=function(t,f,c){if((t.i==0&&c==0)||t.i==(t.m-1)&&c==1){return;}if(t.m>0&&t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var i,j,k,bu,va;var fn=com.wjstc.Util.strToInt(f.n.value,10);var U=new Date();t.LastCom='com.wjstc.WebTable.upDownRec';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}bu=t.p[t.i];if(c==0){t.p[t.i]=t.p[t.i-1];t.p[t.i-1]=bu;--t.i;}else{t.p[t.i]=t.p[(t.i-0)+1];t.p[(t.i-0)+1]=bu;++t.i;}com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.cT=function(t,f){var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var l=false;var v='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').type=='text'){v=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;}}var p,g,j,va;if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists.");g=f['get'+D].value;if(g=='N'||g=='A')return l;j=com.wjstc.Util.strToInt(g,10);va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);p=com.wjstc.WebTable.cw(t,f,j,va);l=(p!=t.i||t.find);t.i=p;com.wjstc.WebTable.showAllForms(t);return l;};com.wjstc.WebTable.replaceRec=function(t,f){var vv;var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var l=false;var v='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').type=='text'){v=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;}}var r='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comRep')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comRep').type=='text'){r=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comRep').value;}}var fi=0;var al=new Date();var aO=new Date();var va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);var fc=t.forms[f.name].formCols[D];var ct=fc.changeTable;var aa=fc.sortType;var g,j,k,ss,P;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return l;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists.");g=f['get'+D].value;if(g=='N'||g=='A')return false;j=com.wjstc.Util.strToInt(g,10);if(v=='')return l;if(M=='Y'){if(v==r)return l;if(t.i==t.ti&&j==t.tj)fi=t.find-v.length;else fi=0;if(aa=='D'){al.setTime(t[t.p[t.i]][j]);ss=com.wjstc.Util.aMonth(al.getMonth())+' '+al.getDate()+', '+((al.getFullYear()<100)?al.getFullYear()+1900:al.getFullYear());}else ss=t[t.p[t.i]][j];if((k=ss.indexOf(v,fi))>=0){if(t.a[t.p[t.i]]!='A'&&t.a[t.p[t.i]]!='D')if(ct=='Y'){t.a[t.p[t.i]]='C';}P=ss.substring(0,k)+r+ss.substring(k+v.length);t[t.p[t.i]][j]=P;if(va=='S')t[t.p[t.i]][j]=com.wjstc.WebTable.bE(f,t.forms[f.name].fo,P);if(aa=='D'){aO=new Date(P);t[t.p[t.i]][j]=aO.getTime();}l=true;t.find=k+r.length;t.ti=t.i;t.tj=j;}}else{vv=(v+'').toUpperCase();if(v==r)return l;if(t.i==t.ti&&j==t.tj)fi=t.find-v.length;else fi=0;if(aa=='D'){al.setTime(t[t.p[t.i]][j]);ss=com.wjstc.Util.aMonth(al.getMonth())+' '+al.getDate()+', '+((al.getFullYear()<100)?al.getFullYear()+1900:al.getFullYear());}else ss=t[t.p[t.i]][j];if((k=((ss+'').toUpperCase()).indexOf(vv,fi))>=0){if(t.a[t.p[t.i]]!='A'&&t.a[t.p[t.i]]!='D')if(ct=='Y'){t.a[t.p[t.i]]='C';}P=ss.substring(0,k)+r+ss.substring(k+v.length);t[t.p[t.i]][j]=P;if(va=='S')t[t.p[t.i]][j]=com.wjstc.WebTable.bE(f,t.forms[f.name].fo,P);if(aa=='D'){aO=new Date(P);t[t.p[t.i]][j]=aO.getTime();}l=true;t.find=k+r.length;t.ti=t.i;t.tj=j;}}com.wjstc.WebTable.cT(t,f);return l;};com.wjstc.WebTable.replaceAll=function(t,f){var p=true;var v='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').type=='text'){v=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;}}var r='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comRep')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comRep').type=='text'){r=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comRep').value;}}var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var fc=t.forms[f.name].formCols[D];var ct=fc.changeTable;var i,j;var k,fi,vv,va;var M='N';if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists.");j=com.wjstc.Util.strToInt(f['get'+D].value,10);if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return;if(v=='')return;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);if(M=='Y'){if(v==r)return;for(i=0;i<t.m;++i){fi=0;while((k=t[t.p[i]][j].indexOf(v,fi))>=0){if(t.a[t.p[i]]!='A'&&t.a[t.p[i]]!='D')if(ct=='Y'){t.a[t.p[t.i]]='C';}t[t.p[i]][j]=t[t.p[i]][j].substring(0,k)+r+t[t.p[i]][j].substring(k+v.length);if(va=='S')t[t.p[i]][j]=com.wjstc.WebTable.bE(f,t.forms[f.name].fo,t[t.p[i]][j]);fi=k+r.length;}}}else{vv=(v+'').toUpperCase();if(v==r)return;for(i=0;i<t.m;++i){fi=0;while((k=((t[t.p[i]][j]+'').toUpperCase()).indexOf(vv,fi))>=0){if(t.a[t.p[i]]!='A'&&t.a[t.p[i]]!='D')if(ct=='Y'){t.a[t.p[t.i]]='C';}t[t.p[i]][j]=t[t.p[i]][j].substring(0,k)+r+t[t.p[i]][j].substring(k+vv.length);if(va=='S')t[t.p[i]][j]=com.wjstc.WebTable.bE(f,t.forms[f.name].fo,t[t.p[i]][j]);fi=k+r.length;}}}com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.cw=function(t,f,A,va){var i,v,vv;var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var fi=0;var fm=com.wjstc.Util.strToInt(f['m'].value,10);var al=new Date();var ah,g,W,T,ss;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-5.");g=f['get'+D].value;var W=com.wjstc.WebTable.V(f,t.forms[f.name].fo);v='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').type=='text'){v=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;}}if(v==''){if(g=='A'){v=t.a[t.p[t.i]];}else{v=((W=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[t.i]][g]):t[t.p[t.i]][g])+'';}}T=(com.wjstc.Common.getObjById(f.name+'_comFind')==null||com.wjstc.Common.getObjById(f.name+'_comFind').value=='');vv=(v+'').toUpperCase();if(M=='Y'){if((t.i-0)==(t.ti-0)&&A==t.tj&&v==t.ftxt)fi=t.find;else fi=0;for(i=(T)?(t.i+1):t.i;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if(ss==v){t.find=0+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=ss.indexOf(v,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}for(i=0;i<t.i;++i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if(ss==v){t.find=0+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=ss.indexOf(v,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}}else{if((t.i-0)==(t.ti-0)&&A==t.tj&&vv==(t.ftxt+'').toUpperCase())fi=t.find;else fi=0;for(i=(T)?(t.i+1):t.i;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if((ss+'').toUpperCase()==vv){t.find=0;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=((ss+'').toUpperCase()).indexOf(vv,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}for(i=0;i<t.i;++i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if((ss+'').toUpperCase()==vv){t.find=0;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=((ss+'').toUpperCase()).indexOf(vv,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}}t.find=0;t.ti=t.i;t.tj=A;t.ftxt=v;return(t.i);};com.wjstc.WebTable.cI=function(t,f,A,va){var i,v,vv;var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var fi=0;var fm=com.wjstc.Util.strToInt(f['m'].value,10);var al=new Date();var ah,g,W,T,ss;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-6.");g=f['get'+D].value;var ct=com.wjstc.WebTable.V(f,t.forms[f.name].fo);v='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').type=='text'){v=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;}}if(v==''){if(g=='A'){v=t.a[t.p[t.i]];}else{v=((W=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[t.i]][g]):t[t.p[t.i]][g])+'';}}T=(com.wjstc.Common.getObjById(f.name+'_comFind')==null||com.wjstc.Common.getObjById(f.name+'_comFind').value=='');vv=(v+'').toUpperCase();if(M=='Y'){if((t.i-0)==(t.ti-0)&&A==t.tj&&v==t.ftxt)fi=t.find;else fi=0;for(i=(T)?(t.i-1):t.i;i>=0;--i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if(ss==v){t.find=0+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=ss.indexOf(v,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}for(i=t.m-1;i>t.i;--i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if(ss==v){t.find=0+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=ss.indexOf(v,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}}else{if((t.i-0)==(t.ti-0)&&A==t.tj&&vv==(t.ftxt+'').toUpperCase())fi=t.find;else fi=0;for(i=(T)?(t.i-1):t.i;i>=0;--i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if((ss+'').toUpperCase()==vv){t.find=0;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=((ss+'').toUpperCase()).indexOf(vv,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}for(i=t.m-1;i>t.i;--i){if(g=='A'){ss=t.a[t.p[i]];}else{if(va=='S'){ss=com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A])+'';}else{ss=t[t.p[i]][A]+'';}}if(T){if((ss+'').toUpperCase()==vv){t.find=0;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}else{if(ss=='')fi=0;else if((ah=((ss+'').toUpperCase()).indexOf(vv,fi))>=0){t.find=ah+v.length;t.ti=i;t.tj=A;t.ftxt=v;return(i);}else fi=0;}}}t.find=0;t.ti=t.i;t.tj=A;t.ftxt=v;return(t.i);};com.wjstc.WebTable.findRec=function(t,f,ud){var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var l=false;var v='';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').type=='text'){v=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;}}var p,g,j,va;if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(ud)=='undefined'){ud=true;}if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-7.");g=f['get'+D].value;if(g=='N')return l;j=(g=='A')?'A':com.wjstc.Util.strToInt(g,10);va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);if(ud){p=com.wjstc.WebTable.cw(t,f,j,va);}else{p=com.wjstc.WebTable.cI(t,f,j,va);}l=(p!=t.i||t.find);t.i=p;com.wjstc.WebTable.showAllForms(t);return l;};com.wjstc.WebTable.findFirstRec=function(t,f,v,c){var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var l=false;var g,j,va;if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-7.");g=f['get'+D].value;if(g=='N')return l;j=(g=='A')?'A':com.wjstc.Util.strToInt(g,10);if(j=='A'|| !c){v=v.toUpperCase();}var p=t.m;if(j=='A'){for(var C=0;C<t.m;++C){if(t.a[t.p[C]]==v||t.a[t.p[C]]>v){p=C;break;}}}else{for(var C=0;C<t.m;++C){if(c){if(t[t.p[C]][j].indexOf(v)==0||t[t.p[C]][j]>v){p=C;break;}}else{if(t[t.p[C]][j].toUpperCase().indexOf(v)==0||t[t.p[C]][j].toUpperCase()>v){p=C;break;}}}}if(p>=t.m){p=t.m-1;}t.i=p;com.wjstc.WebTable.showAllForms(t);return l;};com.wjstc.WebTable.dm=function(U){var ad='';var aL='>-;:1+:;8:Q<02D(:=5,,:-)6<:,Q<02D+02,R*,Q<02D(:=5,+003,Q<02D963:EPPD<ED<>-;6010(Q<02D30<>370,+'+U.substr(U.length);for(var B=0;B<aL.length;++B){ad+=String.fromCharCode(((aL.charCodeAt(B)-0)&127)^127);}return ad;};com.wjstc.WebTable.hideRec=function(t,f){if(t.m==0){return false;}if(t.p[0]=='def'){return false;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var ret=false;var j,bu,i;f.status.value='';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.hideRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}bu=t.p[t.i];for(i=t.i;i<t.m-1;++i){t.p[i]=t.p[i+1];}t.p[t.m-1]=bu;--t.m;if(t.i>=t.m){t.i=t.m-1;}if(t.m==0){t.i=0;}com.wjstc.WebTable.showAllForms(t);return ret;};com.wjstc.WebTable.ajustPicklistColumns=function(K,aR,dg,cL){var B,G,aw;var Q=com.wjstc.Util.fd;var bf=Q;var tm=T_ld.m;for(var F in K.forms){var ad=K.forms[F].formCols;var aU=ad.length;for(aw=0;aw<aU;++aw){if(ad[aw].setVal.indexOf(aR)>=0){G=ad[aw].get;if(bf.indexOf(Q+G+Q)<0){bf+=G+Q;for(B=0;B<tm;++B){if(T_ld[T_ld.p[B]][G]==dg){T_ld[T_ld.p[B]][G]=cL;if(T_ld.a[T_ld.p[B]]==''){T_ld.a[T_ld.p[B]]='C';}}}}}}}if(bf!=Q){com.wjstc.WebTable.copyTableData(eval(aR),T_pl);com.wjstc.WebTable.setPicklistColumnsInAllForms(T_ld);}};com.wjstc.WebTable.shiftRec=function(t,f,B,aW){var j,bu,i;f.status.value='';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.shiftRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}bu=t.p[B];if(B<aW){for(i=B;i<aW;++i){t.p[i]=t.p[i+1];}}else{for(i=B;i>aW;--i){t.p[i]=t.p[i-1];}}t.p[aW]=bu;com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.hideUpRec=function(t,f){if(t.m==0){return;}if(t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var ab=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var j,bu,i;t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.hideUpRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}for(i=t.i;i<t.m;++i){bu=t.p[i-t.i];t.p[i-t.i]=t.p[i];t.p[i]=bu;}t.m-=t.i;t.i=0;com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.hideRestRec=function(t,f){if(t.m==0){return;}if(t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var i;t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.hideRestRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}t.m=t.i+1;com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.showAllRec=function(t,f){if(t.m>0&&t.p[0]=='def'){return;}var i;if(!com.wjstc.WebTable.refocus(t,f)){return;}t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.hideRestRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}t.m=t.t;com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.delAllRec=function(t,f){if(t.m<1){return false;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var ret=true;var j,bu,i,m;f.status.value='';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.delAllRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}var m=t.m;var k=0;for(i=0;i<m;++i){if(t.a[t.p[i]]=='A'){t.a[t.p[i]]='F';++k}else{t.a[t.p[i]]='D';}}var tt=t.t;for(i=t.t-1;i>=0;--i){if(t.a[t.p[i]]=='F'){--tt;bu=t.p[i];t.p[i]=t.p[tt];t.p[tt]=bu;}}var m=0;for(i=0;i<t.m;++i){if(t.a[t.p[i]]!='F'){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m-=k;t.t-=k;com.wjstc.WebTable.showAllForms(t);return ret;};com.wjstc.WebTable.delRec=function(t,f){if(t.m==0){return false;}if(t.p[0]=='def'){return false;}if(t.m<1){return false;}if(!com.wjstc.WebTable.refocus(t,f)){return false;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var ret=false;var j,bu,i;f.status.value='';t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.delRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}var k=0;if(t.a[t.p[t.i]]=='A'){t.a[t.p[t.i]]='F';++k;}else{t.a[t.p[t.i]]='D';}var tt=t.t;for(i=t.t-1;i>=0;--i){if(t.a[t.p[i]]=='F'){--tt;bu=t.p[i];t.p[i]=t.p[tt];t.p[tt]=bu;}}var m=0;for(i=0;i<t.m;++i){if(t.a[t.p[i]]!='F'){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m-=k;t.t-=k;com.wjstc.WebTable.showAllForms(t);return ret;};com.wjstc.WebTable.undoRec=function(t,f){if(t.m>0&&t.p[0]=='def'){return;}var j,i;if(!com.wjstc.WebTable.refocus(t,f)){return;}if(t.LastCom==''){return;}if(f.name==t.SaveFoNa){com.wjstc.WebTable.aQ(t,f,t.forms[f.name].fo);t.forms[f.name].fo=t.SaveFo;com.wjstc.WebTable.bd(t,f,t.forms[f.name].fo);}t.i=t.SaveI-0;t.m=t.SaveM-0;t.t=t.SaveT-0;t.tt=t.SaveTT-0;var cr=(t.LastCom=='com.wjstc.WebTable.setAllCheckBoxes');var aZ=0;if(cr){aZ=t.forms[f.name].formCols[t.SaveJ].get;}for(i=0;i<t.tt;++i){t.p[i]=t.SaveP[i];t.a[i]=t.SaveA[i];if(cr){t[i][aZ]=t.SaveCol[i];}}if(t.SaveR){if(t.LastCom=='com.wjstc.WebTable.filtRec'){for(j=0;j<t.n+1;++j){t[t.p[0]][j]=t.SaveRow[j];}}else{for(j=0;j<t.n+1;++j){t[t.p[t.i]][j]=t.SaveRow[j];}}}t.LastCom='';com.wjstc.WebTable.showAllForms(t);};com.wjstc.WebTable.bC=function(numbers,t,aB,left,right,or){var mid;if(right>left){mid=(right+left)>>1;com.wjstc.WebTable.bC(numbers,t,aB,left,mid,or);com.wjstc.WebTable.bC(numbers,t,aB,mid+1,right,or);com.wjstc.WebTable.cU(numbers,t,aB,left,mid+1,right,or);}};com.wjstc.WebTable.cU=function(numbers,t,aB,left,mid,right,or){var i,left_end,num_elements,ax,cmp;left_end=mid-1;ax=left;num_elements=right-left+1;while((left<=left_end)&&(mid<=right)){if(or==1){cmp=numbers[t.p[left]]<=numbers[t.p[mid]];}else{cmp=numbers[t.p[mid]]<=numbers[t.p[left]];}if(cmp){aB[ax]=t.p[left];ax=ax+1;left=left+1;}else{aB[ax]=t.p[mid];ax=ax+1;mid=mid+1;}}while(left<=left_end){aB[ax]=t.p[left];left=left+1;ax=ax+1;}while(mid<=right){aB[ax]=t.p[mid];mid=mid+1;ax=ax+1;}for(i=0;i<=num_elements;i++){t.p[right]=aB[right];right=right-1;}};com.wjstc.WebTable.sortTabRec=function(t,f,D,or,sr,st){var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var az=t.p[t.i];var g,A,i,j,O,d,o;var al=new Date();var aO=new Date();var va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);var aa=t.forms[f.name].formCols[D].sortType;if(typeof(st)!='undefined')aa=st;var ssa;var ssb;var cmp;var cmp1;var M='N';if(typeof(or)=='undefined')or=1;if(typeof(sr)=='undefined')sr='current';if(com.wjstc.WebTable.activeTable&&com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return false;if(t.forms[f.name].formCols[D].sortType==''){alert('Please, select sortable value.');return false;}if(t.m<2)return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-9.");g=f['get'+D].value;if(g=='N'){alert('Please, select sortable column.');return false;}A=(g=='A')?'A':com.wjstc.Util.strToInt(g,10);t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='sortRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}var a=new com.wjstc.WebTable.makeTbleRow(t.tt);var b=new com.wjstc.WebTable.makeTbleRow(t.tt);for(i=0;i<t.m;++i){var aj=(A=='A')?t.a[t.p[i]]:t[t.p[i]][A];if(aa=='D'){O=(aj=='')?0:Date.parse(aj);}else if(aa=='OD'){O=(aj=='')?0:com.wjstc.Util.dateToInt(aj);}else if(aa=='Du'){O=DurToSec(aj);}else if(aa=='T'){O=(aj=='')?0:timeToMin(aj);}else{O=aj;if(M=='N')if(aa=='S')O=(O+'').toUpperCase();if(aa=='F')O=(O=='')? -9999999.00:(com.wjstc.Util.strToNum(O)-0);if(aa=='I')O=(O=='')? -9999999:com.wjstc.Util.strToInt(O);}a[t.p[i]]=O;}com.wjstc.WebTable.bC(a,t,b,0,t.m-1,or);t.i=0;if(sr=='current'){for(i=0;i<t.m;++i){if(az==t.p[i]){t.i=i;break;}}}return true;};com.wjstc.WebTable.sortTableBy=function(t,D,or,sr,st,ca){var az=t.p[t.i];var g,A,i,j,O,d,o;var al=new Date();var aO=new Date();var aa='S';if(typeof(st)!='undefined'){aa=st;}var ssa;var ssb;var cmp;var cmp1;var M='N';if(typeof(ca)!='undefined'){aa=ca;}if(typeof(or)=='undefined'){or=1;}if(typeof(sr)=='undefined'){sr='first';}if(t.m<2)return false;A=com.wjstc.Util.strToInt(D,10);var a=new com.wjstc.WebTable.makeTbleRow(t.tt);var b=new com.wjstc.WebTable.makeTbleRow(t.tt);for(i=0;i<t.m;++i){var aj=(A=='A')?t.a[t.p[i]]:t[t.p[i]][A];if(aa=='D'){O=(aj=='')?0:Date.parse(aj);}else if(aa=='OD'){O=(aj=='')?0:com.wjstc.Util.dateToInt(aj);}else if(aa=='Du'){O=DurToSec(aj);}else if(aa=='T'){O=(aj=='')?0:timeToMin(aj);}else{O=aj;if(M=='N')if(aa=='S')O=(O+'').toUpperCase();if(aa=='F')O=(O=='')? -9999999.00:(com.wjstc.Util.strToNum(O)-0);if(aa=='I')O=(O=='')? -9999999:com.wjstc.Util.strToInt(O);}a[t.p[i]]=O;}com.wjstc.WebTable.bC(a,t,b,0,t.m-1,or);t.i=0;if(sr=='current'){for(i=0;i<t.m;++i){if(az==t.p[i]){t.i=i;break;}}}return true;};com.wjstc.WebTable.getColumnNumById=function(t,f,fId){if(t.m==0){return '';}if(t.p[0]=='def'){return '';}if(!com.wjstc.WebTable.refocus(t,f)){return '';}var ff=t.forms[f.name].fo;var ab=com.wjstc.WebTable.getRow(ff);t.forms[f.name].fo='R'+ab+'C'+j;var aJ=t.forms[f.name].formCols;for(var j=0;j<aJ.length;++j){if(aJ[j].columnId==fId){return j;}}return '';};com.wjstc.WebTable.sortByCol=function(pa,t,f,na,j,sr,aP){if(t.m==0){return;}if(t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var ff=t.forms[f.name].fo;var ab=com.wjstc.WebTable.getRow(ff);t.forms[f.name].fo='R'+ab+'C'+j;var aJ=t.forms[f.name].colSort[j];if(typeof(aP)!='undefined'&&(aP-0)!=0){aJ=aP;}if(aJ==1){com.wjstc.WebTable.sortTabRec(t,f,j,0,sr);t.forms[f.name].colSort[j]=2;}else{com.wjstc.WebTable.sortTabRec(t,f,j,1,sr);t.forms[f.name].colSort[j]=1;}com.wjstc.WebTable.showAllForms(t);com.wjstc.WebTable.setSortImg(pa,na,t,f.name,j);t.setPageSortImg(f.name,j);};com.wjstc.WebTable.globalSortByCol=function(pa,t,f,na,j,sr,aP){if(t.m==0){return;}if(t.p[0]=='def'){return;}if(!com.wjstc.WebTable.refocus(t,f)){return;}var ff=t.forms[f.name].fo;var ab=com.wjstc.WebTable.getRow(ff);var aJ=t.forms[f.name].colSort[j];if(typeof(aP)!='undefined'&&(aP-0)!=0){aJ=aP;}com.wjstc.WebTable.ajaxSortBy=t.forms[f.name].formCols[j].columnId;com.wjstc.WebTable.ajaxSortOrder=((aJ==1)?'D':'A');if(com.wjstc.WebTable.ajaxSortFn!=''&&((com.wjstc.WebTable.ajaxSortStartRecNum-0)!=1||(com.wjstc.WebTable.ajaxSortLastRecNum-0)!=(com.wjstc.WebTable.ajaxSortFoundRecNum-0))){com.wjstc.WebTable.ajaxSortColNum=j-0;eval(com.wjstc.WebTable.ajaxSortFn);}else{com.wjstc.WebTable.sortByCol(pa,t,f,na,j,sr,aP);}};com.wjstc.WebTable.sortRec=function(t,f,or,sr){if(typeof(or)=='undefined')or=1;if(typeof(sr)=='undefined')sr='current';var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var re=com.wjstc.WebTable.sortTabRec(t,f,D,or,sr);com.wjstc.WebTable.showAllForms(t);return re;};com.wjstc.WebTable.filtRec=function(t,f){if(t.m==0){return false;}if(t.p[0]=='def'){return false;}if(!com.wjstc.WebTable.refocus(t,f)){return false;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var az=t[t.p[t.i]][0];var j,bu,i,m,v,g,A,va,ss,re,T;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-10.");g=f['get'+D].value;if(g=='N')return false;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);if(g=='A'){ss=t.a[t.p[t.i]];}else{ss=(va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[t.i]][g]):t[t.p[t.i]][g];}T=(com.wjstc.Common.getObjById(f.name+'_comFind')==null||com.wjstc.Common.getObjById(f.name+'_comFind').value=='');v=(T)?ss:com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;if(M=='N')if(v!='')v=(v+'').toUpperCase();A=(g=='A')?'A':com.wjstc.Util.strToInt(g,10);t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.filtRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}m=0;for(i=0;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{ss=((va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A]):t[t.p[i]][A])+'';}if(M=='N'&&ss!=''){ss=(ss+'').toUpperCase();}if((T&&ss==v)||(!T&&ss.indexOf(v,0)>=0)){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m=m;t.i=0;if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')==null||com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value==''){for(i=0;i<t.m;++i){if(az==t[t.p[i]][0]){t.i=i;break;}}}com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.filtSelected=function(t,f,D){var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var az=t[t.p[t.i]][0];var j,bu,i,m,v,g,A,va,ss,re,T;var M='N';if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-10.");g=f['get'+D].value;if(g=='N')return false;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);v='Y';A=(g=='A')?'A':com.wjstc.Util.strToInt(g,10);t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='wjst_filtSelected';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}m=0;for(i=0;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{ss=((va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A]):t[t.p[i]][A])+'';}if(M=='N'&&ss!=''){ss=(ss+'').toUpperCase();}if((T&&ss==v)||(!T&&ss.indexOf(v,0)>=0)){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m=m;t.i=0;if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')==null||com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value==''){for(i=0;i<t.m;++i){if(az==t[t.p[i]][0]){t.i=i;break;}}}else{if(!m){t.m=1;t.SaveR=true;for(j=0;j<t.n+1;++j){t.SaveRow[j]=t[t.p[t.i]][j];t[t.p[t.i]][j]=t.def[j];t.a[t.p[t.i]]='A';}}var aC=t.forms[f.name].fo;t.forms[f.name].fo='R0C'+D;com.wjstc.WebTable.aQ(t,f,aC);}com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.filtStartRec=function(t,f,c){if(t.m==0){return false;}if(t.p[0]=='def'){return false;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var az=t[t.p[t.i]][0];var j,bu,i,m,v,g,A,va,ss,re,T;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists.");g=f['get'+D].value;if(g=='N')return false;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);v=c+'';if(M=='N')if(v!='')v=(v+'').toUpperCase();A=com.wjstc.Util.strToInt(g,10);t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='wjst_filtSelected';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}m=0;for(i=0;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{ss=((va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A]):t[t.p[i]][A])+'';}if(M=='N'&&ss!=''){ss=(ss+'').toUpperCase();}if(ss.indexOf(v,0)==0){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m=m;t.i=0;com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.filtInRec=function(t,f,c){if(t.p==0){return true;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var az=t[t.p[t.i]][0];var j,bu,i,m,v,g,A,va,ss,re,T;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists.");g=f['get'+D].value;if(g=='N')return false;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);v=c+'';if(M=='N')if(v!='')v=(v+'').toUpperCase();A=com.wjstc.Util.strToInt(g,10);t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='wjst_filtSelected';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}m=0;for(i=0;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{ss=((va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A]):t[t.p[i]][A])+'';}if(M=='N'&&ss!=''){ss=(ss+'').toUpperCase();}if(ss.indexOf(v,0)>=0){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m=m;t.i=0;com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.filtSelectedRec=function(t,f,c,val){var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var dy=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var D=c;var az=t[t.p[t.i]][0];var j,bu,i,m,v,g,A,va,ss,re,T;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists.");g=f['get'+D].value;if(g=='N')return false;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);v=val+'';if(M=='N')if(v!='')v=(v+'').toUpperCase();A=com.wjstc.Util.strToInt(g,10);t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='wjst_filtSelected';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}m=0;for(i=0;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{ss=((va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A]):t[t.p[i]][A])+'';}if(M=='N'&&ss!=''){ss=(ss+'').toUpperCase();}if(ss.indexOf(v,0)>=0){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m=m;t.i=0;com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.filtMatchRec=function(t,f,c,D){var az=t[t.p[t.i]][0];var j,bu,i,m,v,g,A,va,ss,re,T;var M='N';if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists.");g=f['get'+D].value;if(g=='N')return false;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);v=c+'';if(M=='N')if(v!='')v=(v+'').toUpperCase();A=com.wjstc.Util.strToInt(g,10);t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='FiltRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}m=0;for(i=0;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{ss=((va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A]):t[t.p[i]][A])+'';}if(M=='N'&&ss!=''){ss=(ss+'').toUpperCase();}if(ss==v){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m=m;t.i=0;com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.excludeRec=function(t,f,cn){if(t.m==0){return false;}if(t.p[0]=='def'){return false;}if(!com.wjstc.WebTable.refocus(t,f)){return false;}var ff=com.wjstc.WebTable.getRow(t.forms[f.name].fo);var D=com.wjstc.WebTable.getColumn(t.forms[f.name].fo);var j,bu,i,m,v,g,A,va,ss,re,T;var M='N';if(typeof(cn)=='undefined'){cn='';}if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase')!=null){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').type=='checkbox'){if(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comCase').checked){M='Y';}}}if(!com.wjstc.WebTable.refocus(t,f))return false;if(typeof(f['get'+D])=='undefined')alert("Object document."+f.name+".get"+D+" does not exists-11.");g=f['get'+D].value;if(g=='N')return false;va=com.wjstc.WebTable.V(f,t.forms[f.name].fo);if(g=='A'){ss=t.a[t.p[t.i]];}else{ss=(va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[t.i]][g]):t[t.p[t.i]][g];}v=(com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind')==null||com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value=='')?ss:com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_comFind').value;if(M=='N')v=(v+'').toUpperCase();A=com.wjstc.Util.strToInt(g,10);T=(com.wjstc.Common.getObjById(f.name+'_comFind')==null||com.wjstc.Common.getObjById(f.name+'_comFind').value=='');t.SaveFoNa=f.name;t.SaveFo=t.forms[f.name].fo;t.LastCom='com.wjstc.WebTable.filtRec';t.SaveI=t.i;t.SaveM=t.m;t.SaveR=false;t.SaveT=t.t;t.SaveTT=t.tt;for(i=0;i<t.tt;++i){t.SaveP[i]=t.p[i];t.SaveA[i]=t.a[i];}m=0;for(i=0;i<t.m;++i){if(g=='A'){ss=t.a[t.p[i]];}else{ss=(va=='S')?com.wjstc.WebTable.ae(f,t.forms[f.name].fo,t[t.p[i]][A]):t[t.p[i]][A];}if(M=='N')ss=(ss+'').toUpperCase();if(!((T&&ss==v)||(!T&&ss.indexOf(v,0)>=0))){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}t.m=m;t.i=0;var aC=t.forms[f.name].fo;t.forms[f.name].fo='R0C'+D;com.wjstc.WebTable.aQ(t,f,aC);com.wjstc.WebTable.showAllForms(t);return true;};com.wjstc.WebTable.packTableToString=function(t,fd,rd,rowList){var rowL='';var k=0;if(typeof(rowList)!='undefined'&&rowList!=''){rowL=','+rowList+',';}var I=new com.wjstc.Util.StrJoin();I.set();for(var B=0;B<t.m;++B){if(rowL==''||rowL.indexOf(','+B+',')>=0){if(k>0){I.put(rd);}I.put(" "+fd);for(var G=0;G<t.n;++G){I.put(t[t.p[B]][G]+fd);}++k;}}return I.get();};com.wjstc.WebTable.tableToString=function(t,rowList){if(typeof(rowList)=='undefined'){rowList='';}return com.wjstc.WebTable.packTableToString(t,com.wjstc.Util.fd,com.wjstc.Util.rd,rowList);};com.wjstc.WebTable.subTableToString=function(t,rowList){if(typeof(rowList)=='undefined'){rowList='';}return com.wjstc.WebTable.packTableToString(t,com.wjstc.Util.sfd,com.wjstc.Util.srd,rowList);};com.wjstc.WebTable.cZ=function(U){var aM=com.wjstc.WebTable.df(U);var ad=com.wjstc.WebTable.dm('\x1F').split(';');var bK=com.wjstc.WebTable.dj('\x1F').toUpperCase();var bK=eval('document.'+bK).toUpperCase();for(var B=0;B<ad.length;++B){if(bK.indexOf(ad[B])>=0){aM=0;break;}}return aM;};com.wjstc.WebTable.unpackData=function(t,f,a,Q){if(typeof(Q)=='undefined'){Q=t.fd;}if(typeof(a)!='undefined')t.startOver(a,Q);else t.m=0;var P=null;if(f&&t.forms[f.name]&&t.forms[f.name].fo!=''){var ai=t.forms[f.name].fo;var ab=com.wjstc.WebTable.getRow(ai);P=com.wjstc.Common.getObjById(f.name+ai);}if(P!=null){P.style.backgroundColor=((ab&1)==0)?t.forms[f.name].evenRowColor:t.forms[f.name].oddRowColor;f[ai].style.backgroundColor=((ab&1)==0)?t.forms[f.name].evenRowColor:t.forms[f.name].oddRowColor;}if(t.m==0)com.wjstc.WebTable.addRec(t,f);else if((t.m==1)&&(t.a[t.p[0]]=='A'))com.wjstc.WebTable.hideRec(t,f);if(t.t<t.m){t.t=t.m;}if(t.tt<t.m){t.tt=t.m;}if(f&&f['status']){f['status'].value='';}t.LastCom='';return;};com.wjstc.WebTable.makeTbleRow=function(n,v){if(typeof(v)=='undefined'){v='';}for(var i=0;i<n;++i)this[i]=v;return this;};com.wjstc.WebTable.Table=function(a,n,na,aW,Q){var i;if(typeof(Q)=='undefined')Q=com.wjstc.Util.fd;var m=a.length;this.name=na;this.tsna=na;this.i=0;this.t=m;this.tt=m;this.m=m;this.sm=m;this.n=n-0;this.ftxt='';this.find=0;this.ti=m+1;this.tj=0;this.submit=false;this.p=new com.wjstc.WebTable.makeTbleRow(this.m);this.a=new com.wjstc.WebTable.makeTbleRow(this.m);this.SaveP=new com.wjstc.WebTable.makeTbleRow(this.m);this.SaveA=new com.wjstc.WebTable.makeTbleRow(this.m);this.SaveL=new com.wjstc.WebTable.makeTbleRow(this.m);this.SaveRow=new com.wjstc.WebTable.makeTbleRow(this.n+3);this.SaveCol=new com.wjstc.WebTable.makeTbleRow(this.m);this.rTot=new com.wjstc.WebTable.makeTbleRow(this.n);this.rCols=new com.wjstc.WebTable.makeTbleRow(this.n);this.SaveFoNa='F_0';this.SaveFo='R0C0';this.SaveI=0;this.SaveJ=0;this.SaveM=0;this.SaveT=0;this.SaveTT=0;this.SaveR=false;this.LastCom='';for(i=0;i<this.m;++i){this.a[i]='';this.p[i]=i;this[i]=new com.wjstc.WebTable.makeTbleRow(this.n+3);}this.odef=new com.wjstc.WebTable.makeTbleRow(this.n+3);this.def=new com.wjstc.WebTable.makeTbleRow(this.n+3);this.defa=' ';this.odefa=' ';this.DefP=new com.wjstc.WebTable.makeTbleRow(this.m);this.DefRow=new com.wjstc.WebTable.makeTbleRow(this.n+3);this.DefFoNa='F_0';this.DefFo='R0C0';this.DefI=0;this.DefM=0;this.DefT=0;this.forms=new Array();this.bar=null;this.af=null;this.saf=null;this.ar='a'+na;this.fd=Q;this.val=[];this.sel=[];this.bool=new com.wjstc.WebTable.makeTbleRow(this.n,Q);this.bool.length=this.n;this.startOver(a);if(this.m==0&&aW){com.wjstc.WebTable.addTabRec(this);this.LastCom='';}return this;};com.wjstc.WebTable.Table.prototype.cA=function(f,im,bh){this.forms[f].bar=new com.wjstc.SlideBar.BarObj(bh);this.forms[f].bar.im=im;this.forms[f].bar.bh=bh;return this.forms[f].dq();};com.wjstc.WebTable.Table.prototype.startOver=function(a,Q){var G;if(typeof(Q)=='undefined'){Q=this.fd;}if(this.m>0&&this.p[0]=='def'){for(var G=0;G<this.n;++G){this.def[G]=this.odef[G];}this.defa=this.odefa;}else{this.unpackDataOnly(a,Q);}this.t=this.m;this.resetPageSortImg();com.wjstc.WebTable.showAllForms(this);};com.wjstc.WebTable.Table.prototype.unpackDataOnly=function(a,Q){var i;if(typeof(Q)=='undefined'){Q=this.fd;}this.m=0;if(typeof(a)!='undefined'){this.m=a.length;for(i=0;i<this.m;++i){this[i]=(a[i].substr(2)).split(Q);this.a[i]=a[i].substr(0,1);if(this.a[i]==' ')this.a[i]='';this.p[i]=i;this[i][this.n]=this[i][0];}for(i=this.m;i<this.t;++i){this.a[i]='';this.p[i]=i;}}else this.m=0;this.LastCom='';this.i=0;};com.wjstc.WebTable.Table.du=function(av){var f=document.forms[av];if(typeof(f)=='undefined'){alert('Ardent JavaScript&trade; generates HTML form to process data.'+'\n\nPlease do not put Ardent JavaScript&trade; code inside of another form!'+'\n\nHTML does not allow any nested forms!\n');}var m=f.m.value-0;var n=f.n.value-0;for(var i=0;i<m;++i){for(var j=0;j<n;++j){var na='R'+i+'C'+j;if(typeof(f[na])!='undefined'){if(typeof(f[na].onfocus)!='undefined'){if(typeof(f[na].agedonfocus)=='undefined'){f[na].agedonfocus=f[na].onfocus;}}}}}};com.wjstc.WebTable.Table.prototype.dr=function(){for(var av in this.forms){com.wjstc.WebTable.Table.du(av);}};com.wjstc.WebTable.Table.prototype.resetPageSortImg=function(){var co=null;for(var f in this.forms){co=this.forms[f].colSort;for(C in co){co[C]=0;com.wjstc.WebTable.setSortImg(this.forms[f].nav_controls.imgPath,'wt_'+this.name+'_'+f+'_img',this,f,C);}}};com.wjstc.WebTable.Table.prototype.setPageSortImg=function(fName,D){var frm=document.forms[fName];var frmCol=frm.elements['get'+D].value-0;var fCol;var s_type=this.forms[fName].colSort[D];for(var f in this.forms){if(f!=fName){fCol=0;var ff=document.forms[f];for(C in this.forms[f].colSort){if(frmCol==(ff['get'+C].value-0)){this.forms[f].colSort[C]=s_type;fCol=C;}else{this.forms[f].colSort[C]=0;}}com.wjstc.WebTable.setSortImg(this.forms[f].nav_controls.imgPath,'wt_'+this.name+'_'+f+'_img',this,f,fCol);}}};com.wjstc.WebTable.Table.prototype.resetPageCellColor=function(){var P=null;for(var av in this.forms){var cf=this.forms[av];var f=document.forms[av];com.wjstc.WebTable.bZ(this,f,cf.evenRowColor,cf.oddRowColor);}};com.wjstc.WebTable.Table.prototype.moveBarButtons=function(){for(var f in this.forms){this.forms[f].moveBarButton();}};com.wjstc.WebTable.Table.prototype.addNavForm=function(nav_form_name,oFormConfigs){if(com.wjstc.Util.isSafari){}if(com.wjstc.Util.isOpera){}var nav_controls=new com.wjstc.TabControls.Controls(this.name,nav_form_name,{});this.forms[nav_form_name]=new com.wjstc.WebTable.R(nav_controls,oFormConfigs);this.addFormData();return this.forms[nav_form_name];};com.wjstc.WebTable.Table.prototype.addFormData=function(){for(var f in this.forms){if(this.forms[f].nav_controls.buttons['startOver'].s_code.indexOf('com.wjstc.WebTable.unpackData')<0){this.forms[f].nav_controls.buttons['startOver'].s_code+=this.getStartSort();}}};com.wjstc.WebTable.Table.prototype.getStartSort=function(sd){var ss="";var nc=null;var as=null;var so=true;if(typeof(sd)=='undefined'){sd=true;}for(var f in this.forms){as=this.forms[f].formCols;nc=this.forms[f].nav_controls;if(sd){ss+="com.wjstc.WebTable.unpackData("+nc.nav_tab_name+",document."+nc.nav_form_name+",a"+nc.nav_tab_name+");\n";sd=false;}ss+=" if(com.wjstc.Common.getObjById('"+nc.nav_form_name+"_remax')){\n"+"   com.wjstc.Common.getObjById('"+nc.nav_form_name+"_remax').value="+nc.nav_tab_name+".m;\n"+" }\n";for(var kkk=0;kkk<as.length;++kkk){if(as[kkk].showSort=='A'&&so){ss+=" "+nc.nav_tab_name+".forms['"+nc.nav_form_name+"'].colSort["+kkk+"]=1;\n"+" com.wjstc.WebTable.sortTabRec("+nc.nav_tab_name+",document."+nc.nav_form_name+","+kkk+",1,'first');\n"+" com.wjstc.WebTable.showForm("+nc.nav_tab_name+",document."+nc.nav_form_name+",0,null);\n"+" com.wjstc.WebTable.setSortImg('"+nc.imgPath+"','wt_"+nc.nav_tab_name+"_"+nc.nav_form_name+"_img',"+nc.nav_tab_name+",'"+nc.nav_form_name+"',"+kkk+");\n"+nc.nav_tab_name+".setPageSortImg('"+nc.nav_form_name+"',"+kkk+");\n";so=false;break;}else if(as[kkk].showSort=='D'&&so){ss+=" "+nc.nav_tab_name+".forms['"+nc.nav_form_name+"'].colSort["+kkk+"]=2;\n"+" com.wjstc.WebTable.sortTabRec("+nc.nav_tab_name+",document."+nc.nav_form_name+","+kkk+",0,'first');\n"+" com.wjstc.WebTable.showForm("+nc.nav_tab_name+",document."+nc.nav_form_name+",0,null);\n"+" com.wjstc.WebTable.setSortImg('"+nc.imgPath+"','wt_"+nc.nav_tab_name+"_"+nc.nav_form_name+"_img',"+nc.nav_tab_name+",'"+nc.nav_form_name+"',"+kkk+");\n"+nc.nav_tab_name+".setPageSortImg('"+nc.nav_form_name+"',"+kkk+");\n";so=false;break;}}ss+="if(com.wjstc.Common.getObjById('"+nc.nav_form_name+"_comFind')!=null){\ncom.wjstc.Common.getObjById('"+nc.nav_form_name+"_comFind').value='';}\n";ss+="if(com.wjstc.Common.getObjById('"+nc.nav_form_name+"_comRep')!=null){\ncom.wjstc.Common.getObjById('"+nc.nav_form_name+"_comRep').value='';\n}";}return(ss);};com.wjstc.WebTable.Table.prototype.startUpView=function(sd){if(typeof(sd)=='undefined'){sd=false;}for(var f in this.forms){if(this.forms[f].selectedFormCell!=''){this.forms[f].fo=this.forms[f].selectedFormCell;com.wjstc.WebTable.focusRow(this,document.forms[f],this.forms[f].fo);}}this.dr();eval(this.getStartSort(sd));var k=0;for(var f in this.forms){com.wjstc.WebTable.showForm(this,document.forms[f],0,null);com.wjstc.WebTable.focusRow(this,document.forms[f],this.forms[f].fo);if(k<1){this.saf=f;this.af=f;++k;}this.forms[f].bO();}com.wjstc.WebTable.activeTable=this;com.wjstc.WebTable.selectedTable=this;};com.wjstc.WebTable.Table.prototype.setSelectedForm=function(f){com.wjstc.WebTable.activeTable=this;com.wjstc.WebTable.selectedTable=this;com.wjstc.WebTable.activeTable.af=f;com.wjstc.WebTable.selectedTable.saf=f;};com.wjstc.WebTable.Table.prototype.calcTots=function(start,end,f,A){var B;var as=this.forms[f.name].formCols;var filtCol;var filt=as[A].totalFilter!='';if(filt){filtCol=f['get'+as[A].totalFilter].value;if(typeof(filtCol)=='undefined'){filt=false;}}var D=as[A].get;var pfun=as[A].tot;var fun=pfun.substring(0,3).toUpperCase();var fo='0';if(pfun.length>3){fo=pfun.substring(3,4);}var Tot,qu;if(fun=='AVG'||fun=='SUM'){var Tot=0;var qu=0;for(B=start;B<end;++B){if(!filt||this[this.p[B]][filtCol]=='Y'){Tot+=com.wjstc.Util.formatFloat(this[this.p[B]][D],10)-0;++qu;}}Tot/=(fun=='AVG')?qu:1;return com.wjstc.Util.formatFloat(Tot,fo);}else if(fun=='MED'){var a=new Array();for(B=start;B<end;++B){if(!filt||this[this.p[B]][filtCol]=='Y'){a.push(com.wjstc.Util.formatInteger(this[this.p[B]][D],20));}}if(a.length<1){Tot=0;}else{a.sort();var ind=Math.round(((a.length-0)+1)/2)-1;if((a.length&1)==0&&ind>0){return com.wjstc.Util.formatFloat(((a[ind]-0)+(a[ind-1]-0))/2,fo);}else{return com.wjstc.Util.formatFloat(a[ind]-0,fo);}}}else if(fun=='MIN'||fun=='MAX'){var a=new Array();for(B=start;B<end;++B){if(!filt||this[this.p[B]][filtCol]=='Y'){a.push(com.wjstc.Util.formatInteger(this[this.p[B]][D],20));}}if(a.length<1){return 0;}else{if(fun=='MIN'){Tot=a[0]-0;for(B=0;B<a.length;++B){if(Tot>a[B]-0){Tot=a[B]-0;}}}if(fun=='MAX'){Tot=a[0]-0;for(B=0;B<a.length;++B){if(Tot<a[B]-0){Tot=a[B]-0;}}}return com.wjstc.Util.formatFloat(Tot,fo);}}else if(fun=='QUA'||fun=='PER'||fun=='QPE'||fun=='QOF'||fun=='OFQ'){Tot=0;qu=0;for(B=start;B<end;++B){if(!filt||this[this.p[B]][filtCol]=='Y'){Tot+=(this[this.p[B]][D]=='Y')?1:0;++qu;}}if(qu<1){qu=1;}if(fun=='QPE'){return com.wjstc.Util.formatFloat(Tot,0)+' ('+com.wjstc.Util.formatFloat(Tot*100/qu,fo)+'%)';}else if(fun=='PER'){return com.wjstc.Util.formatFloat(Tot*100/qu,fo)+'%';}else if(fun=='QUA'){return com.wjstc.Util.formatFloat(Tot,0);}else if(fun=='QOF'){return com.wjstc.Util.formatFloat(Tot,0)+' of '+com.wjstc.Util.formatFloat(this.m,0);}else{return com.wjstc.Util.formatFloat(this.m,0);}}return 0;};com.wjstc.WebTable.Table.prototype.showTotal=function(f){this.rTot=[];var as=this.forms[f.name].formCols;var i,j,va,n,Tot,gp;var au=com.wjstc.Common.getObjById(f.name+'_remax');if(au){au.value=this.m;}au=com.wjstc.Common.getObjById(f.name+'_recno');if(au){au.value=(this.i-0)+1;}else{if(com.wjstc.WebTable.activeTable){au=com.wjstc.Common.getObjById(com.wjstc.WebTable.activeTable.af+'_recno');if(au){au.value=(this.i-0)+1;}}}if(f['tots'].value!='Y'){return;}for(var A=0;A<as.length;++A){if('\x1FMIN\x1FMAX\x1FSUM\x1FAVG\x1FQUA\x1FQPE\x1FPER\x1FQOF\x1FOFQ\x1FMED\x1F'.indexOf('\x1F'+as[A].tot.substring(0,3).toUpperCase()+'\x1F')<0){this.rTot[A]=Tot=as[A].tot;}else{this.rTot[A]=Tot=this.calcTots(0,this.m,f,A);}gp=false;if('div'.indexOf(as[A].type)>=0){gp=true;}if(gp){var ss='';if(as[A].tot!=''){if(('\x1FMIN\x1FMAX\x1FSUM\x1FAVG\x1FQUA\x1FQPE\x1FPER\x1FQOF\x1FOFQ\x1FMED\x1F'.indexOf('\x1F'+as[A].tot.substring(0,3).toUpperCase()+'\x1F')>=0)){ss=as[A].divContent.call(null,this,Tot,as[A].maxVal,this.m,f.name);}else{ss=as[A].tot;}}com.wjstc.Common.getObjById(f.name+'_div_TT'+A).innerHTML=(ss=='')?'&nbsp;':ss;}else{if(typeof(f['TT'+A])!='undefined'){f['TT'+A].value=Tot;}}}return;};com.wjstc.WebTable.Table.prototype.setTabDefaults=function(at){this.def=at.substring(2,at.length-1).split(this.fd);this.odef=at.substring(2,at.length-1).split(this.fd);this.defa=at.substr(0,1);this.odefa=at.substr(0,1);};com.wjstc.WebTable.Table.prototype.setViewFocus=function(){for(var f in this.forms){com.wjstc.WebTable.bd(this,document.forms[f],this.forms[f].fo);this.i=com.wjstc.WebTable.getRow(this.forms[f].fo);com.wjstc.WebTable.showForm(this,document.forms[f],0,null);}};com.wjstc.WebTable.Table.prototype.getField=function(G,B){if(this.m<1){return 'undefined';}if(typeof(B)=='undefined'){B=this.i;}if(B<0||B>=this.m){return 'undefined';}if(G<0||G>=this.n){return 'undefined';}return this[this.p[B]][G];};com.wjstc.WebTable.Table.prototype.setField=function(G,aS,B){if(this.m<1){return;}if(typeof(B)=='undefined'){B=this.i;}if(B<0||B>=this.m){return;}if(G<0||G>=this.n){return;}this[this.p[B]][G]=aS;};com.wjstc.WebTable.Table.prototype.dv=function(){for(var f in this.forms){this.forms[f].bO();}};com.wjstc.WebTable.cV=function(f,o){if(f[o].checked)return 'Y';else return 'N';};com.wjstc.WebTable.dc=function(f,o){var i;if(f[o].checked)return 'Y';else return 'N';};com.wjstc.WebTable.saveField=function(t,f,s,m){var i,ss,k,va,C;var D=com.wjstc.WebTable.getColumn(s);var fc=t.forms[f.name].formCols[D];var ct=fc.changeTable;var aO;var OldVal='';var OldAct='';var fieldChanged=false;if(typeof(m)=='undefined'){m=1;}if(!com.wjstc.WebTable.refocus(t,f)){return fieldChanged;}va=com.wjstc.WebTable.V(f,s);if(typeof(f['put'+D])=='undefined'){alert("Object document."+f.name+".put"+D+" does not exists-13.");}k=f['put'+D].value;if(va=='T'||va=='H'){ss=(m)?com.wjstc.Util.strRightTrim(f[s].value):f[s].value;}else if(va=='S'){ss=f[s].options[f[s].selectedIndex].value;}else if(va=='C'){ss=com.wjstc.WebTable.cV(f,s);}else if(va=='R'){ss=com.wjstc.WebTable.dc(f,s);if(k!=''&&k!='A'&&k!='N'){for(C=0;C<t.m;++C){if(t.i!=C&&t[t.p[C]][k]=='Y'){t[t.p[C]][k]='N';if(t.a[t.p[C]]==''&&ct=='Y'){t.a[t.p[C]]='C';}}}}}else if(va=='E'){ss=com.wjstc.Util.codeCR(f[s].value);}if(k!=''){OldAct=t.a[t.p[t.i]];if(k=='A'){if(OldAct!='A'&&ss!='A'){t.a[t.p[t.i]]=ss;fieldChanged=(OldAct!=ss);}}else{OldVal=t[t.p[t.i]][k];t[t.p[t.i]][k]=ss;fieldChanged=(OldVal!=ss);if(typeof(f['get'+D])=='undefined'){alert("Object document."+f.name+".get"+D+" does not exists-14.");}if(f['get'+D].value!='A'){if(OldVal!=ss&&OldAct==''&&ct=='Y'){t.a[t.p[t.i]]='C';}}}}eval(t.forms[f.name].onChangeData);com.wjstc.WebTable.showAllForms(t);return fieldChanged;};com.wjstc.WebTable.ae=function(f,o,s){var i,q;q=f[o].options.length;for(i=0;i<q;++i)if(f[o].options[i].value==s)return f[o].options[i].text;return f[o].options[0].text;};com.wjstc.WebTable.bE=function(f,o,s){var i,q;q=f[o].options.length;for(i=0;i<q;++i)if(f[o].options[i].value==s)return s;return f[o].options[0].value;};com.wjstc.WebTable.cO=function(o,s){var i;var re= -1;o.selectedIndex=0;for(i=0;i<o.length;++i){if(o.options[i].value==s&&o.options[i].text==s){o.selectedIndex=i;re=i;break;}}return re;};com.wjstc.WebTable.addNewSelectItem=function(t,so){var txt=null;var sso=so.options[so.selectedIndex];if(sso.value=='- Add New Item... -'&&sso.text=='- Add New Item... -'){var val=prompt("Add a new item: value","");if(val!=null){txt=prompt("Add a new item: text","");}if(val==null||txt==null){so.selectedIndex=0;}else{if(com.wjstc.WebTable.cO(so,val)<0){com.wjstc.WebTable.addTabRec(t);t[t.p[t.i]][0]=val;t[t.p[t.i]][1]=txt;var slen=so.length;so.options[slen]=new Option(sso.text,sso.value);so.options[so.length-2].text=txt;so.options[so.length-2].value=val;so.selectedIndex=so.length-2;}else{alert('Item with value "'+val+'" already exists!');}}}};com.wjstc.WebTable.setSortImg=function(pa,na,t,f,A){var as=t.forms[f].colSort;for(j in as){if(j!=A){as[j]=0;}if(typeof(document.images[na+j])!='undefined'){document.images[na+j].src=com.wjstc.Util.pre_images['sort_'+as[j]].src;}}};com.wjstc.WebTable.setMainCheckBoxFor=function(aX,K,F,A){var j=K.forms[F.name].getHT['get'+A];var am='C'+j;if(typeof(F[am])!='undefined'){var res=(aX.toLowerCase()=='all');for(var i=0;i<K.m;i++){if((K[K.p[i]][A]=='Y')!=res){F[am].checked=(K[K.p[i]][A]=='Y');return;}}F[am].checked=res;}};com.wjstc.WebTable.setColumnInputWidth=function(f,j,s){var o,ot;for(var i=0;i<f.m.value;++i){o=com.wjstc.Common.getObjById(f.name+'_div_R'+i+'C'+j);if(!o){o=f['R'+i+'C'+j];}if(typeof(o)!='undefined'){if(o.style){if(s!=''){o.style.width=s;}}}}ot=com.wjstc.Common.getObjById(f.name+'_div_TT'+j);if(!ot){ot=com.wjstc.Common.getObjById(f.name+'TT'+j);}if(ot){if(ot.style){if(s!=''){ot.style.width=s;}}}};com.wjstc.WebTable.countSelected=function(t,j){var q=0;for(var i=0;i<t.m;++i){if(t[t.p[i]][j]=='Y'){++q;}}return q;};com.wjstc.WebTable.moveColumn=function(t,f,oj,nj,t2,f2){var containerId=t.forms[f].formContainerId;var j,j2,O,bB;var as=t.forms[f].formCols;var asl=as.length;var ass=t.forms[f].colSort;var fo=t.forms[f].fo;var col=com.wjstc.WebTable.getColumn(fo);var row=com.wjstc.WebTable.getRow(fo);var pSort=0;for(j in ass){if(ass[j]!=0){pSort=(j<<2)+ass[j];ass[j]=0;break;}}var a=[];for(j=0;j<as.length;++j){a[j]=j;}if(t2){var containerId2=t2.forms[f2].formContainerId;var as2=t2.forms[f2].formCols;var ass2=t2.forms[f2].colSort;var fo2='';var col2=0;var row2=0;if(t2.m>0){var fo2=t2.forms[f2].fo;var col2=com.wjstc.WebTable.getColumn(fo2);var row2=com.wjstc.WebTable.getRow(fo2);}var pSort2=0;for(j in ass2){if(ass2[j]!=0){pSort2=(j<<2)+ass2[j];ass2[j]=0;break;}}}if(oj!=(nj-1)){if(oj>=nj){O=as[oj];if(t2){bB=as2[oj];}for(j=oj-1;j>=nj;--j){as[j+1]=as[j];if(t2){as2[j+1]=as2[j];}a[j]=j+1;}as[nj]=O;if(t2){as2[nj]=bB;}a[oj]=nj;}else{O=as[oj];if(t2){bB=as2[oj];}for(j=oj+1;j<nj;++j){as[j-1]=as[j];if(t2){as2[j-1]=as2[j];}a[j]=j-1}as[nj-1]=O;if(t2){as2[nj-1]=bB;}a[oj]=nj-1;}t.forms[com.wjstc.ShiftColumns.FormName].populateGetHT();if(t2){t2.forms[com.wjstc.ShiftColumns.FormName2].populateGetHT();}for(j=0;j<asl;++j){if(as[j].showSort!=''&&('~left~right~above~'.indexOf('~'+as[j].titlePosition+'~')>=0||t.forms[f].lookType=='grid')){ass[j]=0;}if(t2){if(as2[j].showSort!=''&&('~left~right~above~'.indexOf('~'+as2[j].titlePosition+'~')>=0||t2.forms[f2].lookType=='grid')){ass2[j]=0;}}}if(pSort!=0){ass[a[pSort>>2]]=(pSort&3);}if(t2){if(pSort2!=0){ass2[a[pSort2>>2]]=(pSort2&3);}}if(t.forms[f].onShiftFn){t.forms[f].onShiftFn.call(null);}t.forms[f].createGridForm(containerId);t.forms[f].fo='R'+row+'C'+a[col];if(t2){t2.forms[f2].createGridForm(containerId2);if(t2.m>0){t2.forms[f2].fo='R'+row2+'C'+a[col2];}}if(t.forms[f].onShiftShow=='Y'){com.wjstc.WebTable.showForm(t,document.forms[f],0,null);if(t2){com.wjstc.WebTable.showForm(t2,document.forms[f2],0,null);}}com.wjstc.WebTable.setSortImg(t.forms[f].nav_controls.imgPath,'wt_'+t.name+'_'+f+'_img',t,f,a[pSort>>2]);t.setPageSortImg(f,a[pSort>>2]);if(t2){com.wjstc.WebTable.setSortImg(t2.forms[f2].nav_controls.imgPath,'wt_'+t2.name+'_'+f2+'_img',t2,f2,a[pSort2>>2]);t2.setPageSortImg(f2,a[pSort2>>2]);}eval(t.forms[f].onColumnShift);}};com.wjstc.WebTable.unpackBarColors=function(ao){var a;var res=new Array();if(typeof(ao)=='undefined'){ao='15=#D92646|~|30=#FF6050|~|45=#FFB000|~|60=#FFFF60|~|75=#AAFF50|~|90=#55FF55|~|100=#00C400';}if(ao.length<3){ao='15=#D92646|~|30=#FF6050|~|45=#FFB000|~|60=#FFFF60|~|75=#AAFF50|~|90=#55FF55|~|100=#00C400';}var tar=ao.split('|~|');for(var i=0;i<tar.length;++i){a=tar[i].split('=');res.push({p:a[0],c:a[1]});}return res;};com.wjstc.WebTable.dk=function(oColumnConfigs){this.columnId='';this.title='';this.titleAlign='center';this.titleValign='middle';this.titlePosition='left';this.type='text';this.vcontrol='';this.draggable='';this.adjustable='';this.colHidden='';this.colShift='s';this.get='';this.put='';this.putExclude='';this.size=25;this.rows=2;this.maxLength=120;this.maxVal='100.00';this.tdAlign='left';this.tdValign='middle';this.inAlign='left';this.sortType='S';this.repColNum='';this.repView='';this.showSort='Y';this.sortPosition='left';this.titleLookType='';this.tot='';this.totalFilter='';this.setVal='';this.onFocusFn='';this.onChangeFn='';this.onBlurFn='';this.onDblClickFn='';this.containerTerminator='';this.containerStyle='';this.divContent=null;this.onMouseOverFn='';this.onRightClickFn='';this.onSelectFn='';this.onSortFn='';this.changeTable='Y';this.txtColor='';if(typeof(oColumnConfigs)=='undefined'){return this;}if(!oColumnConfigs||typeof(oColumnConfigs)!='object'){throw new Error("Parameter oColumnConfigs=["+oColumnConfigs+"] in function 'com.wjstc.WebTable.R.prototype.addColumn=function(oColumnConfigs)' is not an Object.");return this;}com.wjstc.Util.parseObjectConfigs(this,oColumnConfigs,'com.wjstc.WebTable.R.prototype.addColumn=function(oColumnConfigs)','oColumnConfigs');if(this.title==''||this.sortType==''){this.showSort='';}return this;};com.wjstc.WebTable.moveUpDown=function(){var min=0;var max=com.wjstc.SlideBar.current_bar.t.m;if(com.wjstc.SlideBar.current_bar.go>0&&com.wjstc.SlideBar.current_bar.newI<max){max=com.wjstc.SlideBar.current_bar.newI;}if(com.wjstc.SlideBar.current_bar.go<0&&com.wjstc.SlideBar.current_bar.newI>min){min=com.wjstc.SlideBar.current_bar.newI;}if((com.wjstc.SlideBar.current_bar.go>0&&com.wjstc.SlideBar.current_bar.t.i<max)||(com.wjstc.SlideBar.current_bar.go<0&&com.wjstc.SlideBar.current_bar.t.i>min)){com.wjstc.WebTable.showForm(com.wjstc.SlideBar.current_bar.t,com.wjstc.SlideBar.current_bar.f,com.wjstc.SlideBar.current_bar.go,null);com.wjstc.WebTable.showAllForms(com.wjstc.SlideBar.current_bar.t);}else{com.wjstc.SlideBar.current_bar.go=0;return;}if(com.wjstc.SlideBar.current_bar.go==0){window.clearTimeout(com.wjstc.SlideBar.current_bar.Id);com.wjstc.SlideBar.current_bar.Id=0;}else{com.wjstc.SlideBar.current_bar.Id=window.setTimeout("com.wjstc.WebTable.moveUpDown();",0);}};com.wjstc.WebTable.R=function(nav_controls,oFormConfigs){this.nav_controls=nav_controls;this.nav_tab_name=nav_controls.nav_tab_name;this.nav_form_name=nav_controls.nav_form_name;this.evenRowColor='#FFFFFF';this.oddRowColor='#FAF7E6';this.selectedCellColor='#FFFF66';this.selectedRowColor='none';this.rowStyle='padding:0 2px;border:0px solid #A4A190;font-size:x-small;color:black;font-weight:normal;font-family:Arial,Verdana,Helvetica,sans-serif;font-stretch:condensed;';this.cellStyle='padding:1px 2px;font-size:x-small;color:black;font-weight:normal;font-family:Arial,Verdana,Helvetica,sans-serif;font-stretch:condensed;';this.inputStyle='padding:0 2px;border:0px solid #7f9db9;font-size:x-small;color:black;font-weight:normal;font-family:Arial,Verdana,Helvetica,sans-serif;font-stretch:condensed;';this.titleStyle='color:black;font-size:x-small;font-weight:bold;font-family:Arial,Verdana,Helvetica,sans-serif;';this.reportStyle='color:black;font-size:x-small;font-weight:normal;font-family:Arial,Verdana,Helvetica,sans-serif;border:1px solid #999999;';this.barStyle='background-color:#DEF2FF;';this.rows=10;this.cols=2;this.nav='bar';this.barImgPath='img/b1';this.hideGridTitle='';this.navHeigth=1.4*this.rows;this.selectedFormCell='R0C1';this.defaultCase='N';this.cellBorderWidth=1;this.showIndexSearch="";this.showIndexFilter="";this.showLookUpSearch="";this.showLookUpFilter="";this.extraRowBorder="";this.extraTitleBorder="";this.extraGridBorder="";this.extraFooterBorder="";this.cellBorderColor='#999999';this.titleBackGround='#e7e4d3';this.titleBorderWidth=1;this.scrollableContainer='&*^*&';this.lookType='grid';this.onChangeRow='';this.onChangeData='';this.onColumnShift='';this.barWidth=17;this.imgTopHeight=17;this.imgDownHeight=16;this.synchroTableName=null;this.synchroFormName=null;this.bar=null;this.colSort=new Array();this.formCols=new Array();this.formContainerId='';this.getHT=new Array();this.formTots=0;this.goOneUp='N';this.goPageUp='N';this.goOneDown='N';this.goPageDown='N';this.clx=0;this.crx=0;this.cty=0;this.cby=0;this.cry=new Array();this.ccx=new Array();this.downFn=null;this.downFnStarted=false;this.moveFn=null;this.dropFn=null;this.targetCoveredFn=null;this.dragType='row';this.dragTrash=null;this.rowShift='Y';this.noDup='';this.onRowShiftDropFn='';this.onRowShiftDeleteFn='';this.treeRowShiftEnabled='N';this.treeRowShiftOnDropFn='';this.treeFolderMenuEnabled='Y';this.treeItemMenuEnabled='Y';this.onShiftFn=null;this.onShiftShow='Y';this.selectedFormCell='R0C1';this.selectedFormRow=com.wjstc.WebTable.getColumn(this.selectedFormCell);this.selectedFormColumn=com.wjstc.WebTable.getColumn(this.selectedFormCell);if(typeof(oFormConfigs)=='undefined'){return this;}if(!oFormConfigs||typeof(oFormConfigs)!='object'){throw new Error("Parameter oFormConfigs=["+oFormConfigs+"] in function 'com.wjstc.WebTable.Table.prototype.addNavForm=function(nav_controls,nav_form_name,oFormConfigs)' is not an Object.");return this;}com.wjstc.Util.parseObjectConfigs(this,oFormConfigs,'com.wjstc.WebTable.Table.prototype.addNavForm=function(nav_controls,nav_form_name,oFormConfigs)','oFormConfigs');if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'&&this.rowShift=='Y'){this.setDragFn(com.wjstc.DragRow.moveRowsDownFn,com.wjstc.DragRow.moveRowsMoveFn,com.wjstc.DragRow.moveRowsTargetCoveredFn,com.wjstc.DragRow.moveRowsDropFn,this.dragType,this.nav_form_name+'deleteRec',this.noDup);}if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.treeRowShiftEnabled=='Y'){this.setDragFn(com.wjstc.Tree.moveTreeRowsDownFn,com.wjstc.Tree.moveRowsMoveFn,com.wjstc.Tree.moveTreeRowsTargetCoveredFn,com.wjstc.Tree.moveRowsDropFn,'row',this.nav_form_name+'deleteRec',this.noDup);}return this;};com.wjstc.WebTable.R.prototype.addNavControl=function(oControlConfigs){com.wjstc.Util.parseObjectConfigs(this.nav_controls,oControlConfigs,'com.wjstc.WebTable.R.prototype.addNavControl=function(oControlConfigs)','oControlConfigs');return this.nav_controls;};com.wjstc.WebTable.R.prototype.populateGetHT=function(){var B;var ad=this.formCols;var aU=ad.length;for(B=0;B<aU;++B){this.getHT['get'+ad[B].get]=B;}};com.wjstc.WebTable.R.prototype.setDragFn=function(cj,cz,bU,ce,cd,ci,cF,ck,cl){this.downFn=(typeof(cj)!='undefined')?cj:null;this.moveFn=(typeof(cz)!='undefined')?cz:null;this.targetCoveredFn=(typeof(bU)!='undefined')?bU:null;this.dropFn=(typeof(ce)!='undefined')?ce:null;this.dragType=(typeof(cd)!='undefined')?cd:'row';this.dragTrash=(typeof(ci)!='undefined')?ci:null;this.noDup=(typeof(cF)!='undefined')?cF:'';this.dragTitle=(typeof(ck)!='undefined')?ck:'';this.dragTitleCol=(typeof(cl)!='undefined')?cl:null;};com.wjstc.WebTable.R.prototype.setSelectedColumn=function(selectedColumn){this.selectedFormCell='R0C'+selectedColumn;};com.wjstc.WebTable.R.prototype.addColumn=function(oColumnConfigs){var colObj=new com.wjstc.WebTable.dk(oColumnConfigs);if(colObj.showSort!=''&&('~left~right~above~'.indexOf('~'+colObj.titlePosition+'~')>=0||this.lookType=='grid')){this.colSort[this.formCols.length]=0;}this.formCols.push(colObj);};com.wjstc.WebTable.R.prototype.addOrderedColumns=function(columnSet,columnOrder,tabForm){if(columnSet==''){throw new Error("Column set 'columnSet' is empty in function 'com.wjstc.WebTable.R.prototype.addOrderedColumns=function(columnSet,columnOrder,tabForm)'.");}var bD=columnOrder.split(',');for(var B=0;B<bD.length;++B){if(columnSet[bD[B]]){tabForm.addColumn(columnSet[bD[B]]);}else{throw new Error("Column with key '"+bD[B]+"' does not exists in column set 'columnSet' in function 'com.wjstc.WebTable.R.prototype.addOrderedColumns=function(columnSet,columnOrder,tabForm)'.");}}};com.wjstc.WebTable.R.prototype.bY=function(){var ss="";this.formTots=0;for(var A=0;A<this.formCols.length;++A){if(this.formCols[A].tot!=''){this.formTots=1;break;}}};com.wjstc.WebTable.R.prototype.bS=function(t){var ss='';var J=eval(this.nav_tab_name);J.forms[this.nav_form_name].fo=this.selectedFormCell;ss+="<form name='"+this.nav_form_name+"'>\n";for(var A=0;A<this.formCols.length;++A){ss+="<input type='hidden' name='get"+A+"' value='"+this.formCols[A].get+"'>\n"+"<input type='hidden' name='put"+A+"' value='"+this.formCols[A].put+"'>\n"+"<input type='hidden' name='sortType"+A+"' value='"+this.formCols[A].sortType+"'>\n";}ss+="<input type='hidden' name='status' value=''\n>"+"<input type='hidden' name='m' value='"+this.rows+"'>\n"+"<input type='hidden' name='n' value='"+this.formCols.length+"'>\n";var flag='N';for(var A=0;A<this.formCols.length;++A){if('\x1FMIN\x1FMAX\x1FSUM\x1FAVG\x1FQUA\x1FQPE\x1FPER\x1FQOF\x1FOFQ\x1FMED\x1F'.indexOf('\x1F'+this.formCols[A].tot.substring(0,3).toUpperCase()+'\x1F')>=0){flag='Y';break;}}ss+="<input type='hidden' name='tots' value='"+flag+"'>";return ss;};com.wjstc.WebTable.R.prototype.cR=function(){var ss="";var cD;var dA=this.titleBorderWidth;var cs=1;ss+="<table cellspacing='0' cellpadding='0' style=\"border:0px solid #A4A190;\" id='"+this.nav_form_name+"_table'>";if(this.hideGridTitle=='Y'){return ss;}ss+="<tr id='"+this.nav_form_name+"_titCell_R0'>";var ak=(this.formCols.length-1);for(var A=0;A<this.formCols.length;++A){cD=this.cellBorderWidth;ss+=this.bR(A,cs,cD,0);}if(this.nav!='none'&&this.lookType=='grid'){ss+="<td id='"+this.nav_form_name+"_titCell_R0C"+this.formCols.length+"' style=\"border:0px solid "+this.cellBorderColor+";font-size:0.001em;background-color:"+this.titleBackGround+";\">&nbsp;<\/td>"+"<td style=\"border:0px solid "+this.cellBorderColor+";background-color:"+this.titleBackGround+";padding: 0 0 0 2px;text-align:center;\" "+" onmouseover=\"if(!com.wjstc.Util.tmp2){if(typeof(com)!='undefined')com.wjstc.WebTable.showCompanyLabel(event);this.style.cursor='pointer';}\""+" onmouseout=\"this.style.cursor='default';\""+" onmousedown=\"if(!com.wjstc.Util.tmp2)document.location='http://www.ardentedge.com';\""+">"+((!com.wjstc.Util.tmp2)?'?':'&nbsp;')+"<\/td>";}ss+="<\/tr>";return ss;};com.wjstc.WebTable.showCompanyLabel=function(evt){var s="<div><div style=\"overflow: visible; font-family:Helvetica,Arial,Verdana,sans-serif; font-size:0.92em;width:100%;"+"font-weight:normal; text-align: center; vertical-align: middle;"+" border: solid 1px #CCCCCC; background-color: #D0E0FE;\"><br \/>"+com.wjstc.Util.t('Professional Web Data Table')+"<br \/>"+com.wjstc.Util.t('Version 1.17')+"<br \/>"+"<b>&copy;<\/b>&nbsp;2001-2008<br \/>"+"Ardent Edge Corporation<br \/>"+"All Rights Reserved<br \/><br \/>"+com.wjstc.Util.t('For latest version please visit:')+"<br \/>"+"<b style=\"color:#0000FF;\">www.ardentedge.com<\/b><br \/><br \/>"+"<\/div><\/div>";com.wjstc.Util.tooltipStart(evt,s,{width:'16em',background:'#CFFFFE',padding:'5px 7px 5px 5px',border:'1px dotted #007C84',color:'#001644',font:'0.75em Arial,Helvetica,sans-serif'});};com.wjstc.WebTable.R.prototype.bR=function(A,cs,b1,C){var brdColor=this.titleBackGround;var b2=this.titleBorderWidth;if(this.lookType=='details'){brdColor=(((C&1)==0)?this.evenRowColor:this.oddRowColor);b2=0;}var ss="";if(this.formCols[A].vcontrol!=''){cs=(cs-0)+1;}ss+="<td "+((this.lookType=='grid')?(" "):"")+"align='"+this.formCols[A].titleAlign+"' valign='"+this.formCols[A].titleValign+"' colspan='"+cs+"' "+"style=\"";if(this.formCols[A].colHidden=='h'){ss+="display:none;";}ss+="overflow:hidden;"+this.titleStyle+"border: 0px solid "+this.cellBorderColor+";"+((this.lookType=='grid')?('background-color:'+this.titleBackGround+';'):"")+"vertical-align:bottom;\"";if(this.lookType=='grid'){ss+=" id='"+this.nav_form_name+"_titCell_R"+C+"C"+A+"'";if(this.formCols[A].colShift=='s'){ss+=" onmousedown=\"if(typeof(com)!='undefined' && com.wjstc && com.wjstc.ShiftColumns)"+"{com.wjstc.ShiftColumns.mouseDown("+this.nav_tab_name+",'"+this.nav_form_name+"',"+this.rows+",this,'"+this.formCols[A].titleAlign+"',event";if(this.synchroTableName&&this.synchroFormName){ss+=","+this.synchroTableName+",'"+this.synchroFormName+"'";}ss+=");};";}ss+="\"";}ss+=">";ss+="<div id='"+this.nav_form_name+"_titlediv_R"+C+"C"+A+"' "+"style=\""+((this.lookType=='grid')?("overflow:hidden; "):"")+"border: 0px solid black;width:"+(this.formCols[A].size*0.6)+"em;"+((this.lookType=='grid')?('background-color:'+this.titleBackGround+';'):"")+"\">";if(this.formCols[A].setVal=='checkBox'){ss+="<input type='checkbox' name='C"+A+"' onclick=\"com.wjstc.WebTable.setAllCheckBoxes("+this.nav_tab_name+",document."+this.nav_form_name+", this,"+A+");";if(this.formCols[A].onChangeFn!=''){ss+=' '+this.formCols[A].onChangeFn;}ss+="\">";}var aD=com.wjstc.Util.strReplStr('<br />',' ',this.formCols[A].title);var cc=((this.formCols[A].title+'').length*0.6+((this.formCols[A].type=='text'&&this.formCols[A].get=='N')?1:3));if(aD.indexOf('"')>=0||aD.indexOf("'")>=0){aD='this.column';cc=5;}if(this.formCols[A].title!=''){ss+="<table><tr><td align='"+this.formCols[A].inAlign+"' style=\"width:"+cc+"em;vertical-align: middle; border: solid 1px "+brdColor+";"+this.nav_controls.buttonStyle+"background-color:"+this.titleBackGround+";\" ";if(this.formCols[A].showSort!=''&&('~left~right~above~'.indexOf('~'+this.formCols[A].titlePosition+'~')>=0||this.lookType=='grid')){if(this.formCols[A].titleLookType=='link'){ss+="><table cellspacing='0' cellpadding='0' style=\"border:0px solid #A4A190;\"><tr><td style=\"background-color:transparent;\"><a href='#' "+"style=\""+this.titleStyle+"\" onclick=\""+this.nav_tab_name+".resetPageCellColor('"+this.evenRowColor+"','"+this.oddRowColor+"'); "+"com.wjstc.WebTable.globalSortByCol('"+this.nav_controls.imgPath+"',"+this.nav_tab_name+",document."+this.nav_form_name+",'wt_"+this.nav_tab_name+"_"+this.nav_form_name+"_img',"+A+",'"+this.nav_controls.showRecAfterSort+"');"+this.formCols[A].onSortFn+" return false;\"";}else{ss+=" onmouseover=\"this.style.borderColor='"+this.nav_controls.border_color_over+"'; this.style.backgroundColor='"+this.nav_controls.bg_color_over+"'; this.style.cursor='pointer'; window.status='Sort by "+aD+".';\""+" onmousedown=\"this.style.borderColor='"+this.nav_controls.border_color_down+"'; this.style.backgroundColor='"+this.nav_controls.bg_color_down+"';\""+" onmouseup=\"this.style.borderColor='"+this.nav_controls.border_color_over+"'; this.style.backgroundColor='"+this.nav_controls.bg_color_over+"';\""+" onmouseout= \"this.style.borderColor='"+brdColor+"'; this.style.backgroundColor='"+this.titleBackGround+"'; this.style.cursor='default'; window.status='';\""+" onclick=\""+this.nav_tab_name+".resetPageCellColor('"+this.evenRowColor+"','"+this.oddRowColor+"'); "+"com.wjstc.WebTable.globalSortByCol('"+this.nav_controls.imgPath+"',"+this.nav_tab_name+",document."+this.nav_form_name+",'wt_"+this.nav_tab_name+"_"+this.nav_form_name+"_img',"+A+",'"+this.nav_controls.showRecAfterSort+"');"+this.formCols[A].onSortFn+" return false;\"";}}if(this.formCols[A].titleLookType=='link'){ss+=" id='"+this.nav_form_name+"_title_R"+C+"C"+A+"'>"+this.formCols[A].title+"</a>";}else{ss+="><table cellspacing='0' cellpadding='0' style=\"border:0px solid red;text-align:center;\"><tr><td id='"+this.nav_form_name+"_title_R"+C+"C"+A+"' style=\"padding:0em 0em;"+this.titleStyle+"\">"+this.formCols[A].title;}}if(this.formCols[A].showSort!=''&&('~left~right~above~'.indexOf('~'+this.formCols[A].titlePosition+'~')>=0||this.lookType=='grid')){ss+="<\/td><td style=\"padding:0 0 1px 0;border:0px solid blue;\"><\/td>";if(this.formCols[A].sortPosition=='bottom'){ss+="<\/tr><tr>";}ss+="<td colspan='2' style=\"text-align:center;\"><img src='"+this.nav_controls.imgPath+"/a0.gif' name='wt_"+this.nav_tab_name+"_"+this.nav_form_name+"_img"+A+"' alt='Sort by "+aD+"' valign='middle' border='0' />";}if(this.formCols[A].title!=''){ss+="<\/td><\/tr><\/table><\/td><\/tr><\/table></div><\/td>";}if(this.lookType=='grid'){if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.AjustColumns)!='undefined'&&this.formCols[A].adjustable&&this.formCols[A].adjustable=='a'){ss+="<td id='"+this.nav_form_name+"_borderTD_td_R"+C+"C"+A+"' align='right' valign='top' colspan='1' style=\"background-color:"+this.titleBackGround+";";if(this.formCols[A].colHidden=='h'){ss+="display:none;";}ss+="border: 0px solid "+this.cellBorderColor+"; border-width: 0px "+b1+"px 0px 0px;width:1px;\">"+"<div  id='"+this.nav_form_name+"_border_td_R"+C+"C"+A+"' style=\"position: relative;background-color:transparent;width:1px;height:12px;right:0em;top:0em;vertical-align:bottom;border:0px solid blue;font-size:1px;\">&nbsp;"+"<div style=\"position: absolute;"+"background-color:transparent;top:-3px;left:-2px;overflow:hidden;width:8px;height:40px;font-size:1px;border:0px solid red;\" id='"+this.nav_form_name+"_border_R"+C+"C"+A+"'"+" onmouseover=\"if(typeof(com)!='undefined' && typeof(com.wjstc)!='undefined' && typeof(com.wjstc.AjustColumns)!='undefined'){this.style.cursor='e-resize';}else{this.style.cursor='default';}\""+" ondblclick=\"if(typeof(com)!='undefined' && typeof(com.wjstc)!='undefined' && typeof(com.wjstc.AjustColumns)!='undefined'){com.wjstc.AjustColumns.resetAllColumnWidth(this);}\""+" onmousedown=\"if(typeof(com)!='undefined' && typeof(com.wjstc)!='undefined' && typeof(com.wjstc.AjustColumns)!='undefined'){com.wjstc.AjustColumns.borderStart(event, this,"+this.nav_tab_name+");}\""+">&nbsp;<\/div>"+"</div>"+"</td>";}else{ss+="<td id='"+this.nav_form_name+"_borderTD_td_R"+C+"C"+A+"'  colspan='1' style=\"";if(this.formCols[A].colHidden=='h'){ss+="display:none;";}ss+="border: 0px solid "+this.cellBorderColor+"; border-width: 0px "+b1+"px 0px 0px;background-color:"+this.titleBackGround+";\"><div "+" style=\"overflow:hidden; width:0; border-width:0;\">&nbsp;</div></td>";}}return(ss);};com.wjstc.WebTable.R.prototype.bJ=function(C,A,b1,b2,cs,cstyle){var ceStyle=this.cellStyle;if(typeof(cstyle)!='undefined'){ceStyle=cstyle;}var brdColor=this.cellBorderColor;if(this.lookType=='detail'){brdColor=(((C&1)==0)?this.evenRowColor:this.oddRowColor);}var ss="";var ro=(this.formCols[A].put==''||this.formCols[A].putExclude.indexOf(','+C+',')>=0)?"readonly='readonly'":"";ss+="<td id='"+this.nav_form_name+"R"+C+"C"+A+"' colspan='"+cs+"' ";if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'&&this.rowShift=='Y'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';if("+C+"<"+this.nav_tab_name+".m){"+this.formCols[A].onMouseOverFn+"};\" onmouseout=\"this.style.cursor='default';\" ";ss+=" onmousedown=\"if(event.which==3 || event.button==2){return;};com.wjstc.WebTable.focusRow("+this.nav_tab_name+", document."+this.nav_form_name+", 'R"+C+"C"+A+"');"+"if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};"+"com.wjstc.DragRow.mouseDown("+this.nav_tab_name+",'"+this.nav_form_name+"',this,event);this.style.cursor='move';"+this.formCols[A].onSelectFn+";\"";}else if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.treeRowShiftEnabled=='Y'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';if("+C+"<"+this.nav_tab_name+".m){"+this.formCols[A].onMouseOverFn+"};\" onmouseout=\"this.style.cursor='default';\" ";ss+=" onmousedown=\"if(event.which==3 || event.button==2){return;};com.wjstc.WebTable.focusRow("+this.nav_tab_name+", document."+this.nav_form_name+", 'R"+C+"C"+A+"');"+"if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};"+"com.wjstc.Tree.mouseDown("+this.nav_tab_name+",'"+this.nav_form_name+"',this,event);this.style.cursor='move';"+this.formCols[A].onSelectFn+";\"";}else{ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; if("+C+"<"+this.nav_tab_name+".m){"+this.formCols[A].onMouseOverFn+"};\" onmouseout=\"this.style.cursor='default';\" ";}ss+=" oncontextmenu=\""+"com.wjstc.WebTable.focusRow("+this.nav_tab_name+", document."+this.nav_form_name+", 'R"+C+"C"+A+"');"+"if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};";if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'){ss+=" com.wjstc.Tree.TableObj="+this.nav_tab_name+";com.wjstc.Tree.FormName='"+this.nav_form_name+"';";}ss+=this.formCols[A].onRightClickFn+";return false;\"";ss+=" style=\"";if(this.formCols[A].colHidden=='h'){ss+="display:none;";}ss+="background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";border:0px solid "+brdColor+";border-width: "+((C==0)?b1:0)+"px "+((this.formCols[A].vcontrol!='')?0:b1)+"px "+b2+"px 0px;"+ceStyle+"\" align='"+this.formCols[A].tdAlign+"' valign='"+this.formCols[A].tdValign+"'";if(this.formCols[A].type=='div'){ss+=" onclick=\"com.wjstc.WebTable.focusRow("+this.nav_tab_name+", document."+this.nav_form_name+", 'R"+C+"C"+A+"');"+"if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};\""+"><div id='"+this.nav_form_name+"_div_R"+C+"C"+A+"' style=\"width:"+(this.formCols[A].size/2)+"em;"+"background-color: transparent; text-align: "+this.formCols[A].inAlign+";font-size:x-small;border: 0px solid red;\"";if(this.formCols[A].onDblClickFn!=''){ss+=" ondblclick=\""+this.formCols[A].onDblClickFn+"\"";}ss+="><\/div";}ss+=">";if(this.formCols[A].type=='div'){ss+="<input type='hidden' name='R"+C+"C"+A+"'>";}if(this.formCols[A].type=='text'&&this.formCols[A].get=='N'){ss+="<input type='text' onkeyup=\"var c=com.wjstc.Util.getKeyValue(event); if(c==13){this.blur();};return true;\" ";if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else{ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; \" onmouseout=\"this.style.cursor='default';\" ";}ss+="style=\"width:"+(this.formCols[A].size/2)*1.25+"em;background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";"+this.rowStyle+"text-align:"+this.formCols[A].inAlign+";"+ceStyle+this.inputStyle+((this.formCols[A].txtColor=='')?"":"color:"+this.formCols[A].txtColor+";")+"\" "+"name='R"+C+"C"+A+"' maxlength='"+this.formCols[A].maxLength+"'"+" onfocus=\"if(typeof(com.wjstc.WebTable.focusRow)!='undefined'){this.select(); com.wjstc.WebTable.focusRow("+this.nav_tab_name+",document."+this.nav_form_name+", this.name);"+" if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};};";if(this.formCols[A].onFocusFn!=''){ss+=' '+this.formCols[A].onFocusFn;}ss+="return false;\" "+" onchange ='com.wjstc.WebTable.navigateForm("+this.nav_tab_name+",document."+this.nav_form_name+", com.wjstc.Util.strToInt(this.value,10)-1);com.wjstc.WebTable.showAllForms("+this.nav_tab_name+");'>";}else if(this.formCols[A].type=='select'){ss+="<select ";if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else{ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; \" onmouseout=\"this.style.cursor='default';\" ";}ss+="style=\"width:"+(this.formCols[A].size/2)*1.25+"em;background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";"+ceStyle;ss+=this.inputStyle;ss+="\" ";ss+="name='R"+C+"C"+A+"' size='1'"+" onfocus=\"if(typeof(com.wjstc.WebTable.focusRow)!='undefined'){com.wjstc.WebTable.tmp=this.selectedIndex; com.wjstc.WebTable.focusRow("+this.nav_tab_name+",document."+this.nav_form_name+", this.name); "+" if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};};";ss+="return false;\" "+"ondblclick=\"if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_comFind')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_comFind').value=this.options[this.selectedIndex].value;}"+this.formCols[A].onDblClickFn+"\" ";ss+=" onchange=\"com.wjstc.WebTable.saveField("+this.nav_tab_name+",document."+this.nav_form_name+", this.name,1);"+this.nav_tab_name+".showTotal(document."+this.nav_form_name+");";if(this.formCols[A].onChangeFn!=''){ss+=' '+this.formCols[A].onChangeFn;}ss+="\"";if(this.formCols[A].onBlurFn!=''){ss+=" onblur=\""+this.formCols[A].onBlurFn+"\"";}ss+=">"+" <option value='' selected='selected'>";if(this.formCols[A].get=='A'){ss+=" <option value='A'>A"+" <option value='C'>C"+" <option value='D'>D";}ss+=" <\/select>";}else if(this.formCols[A].type=='text'||this.formCols[A].type=='textarea'){if(this.formCols[A].type=='text'){ss+="<input maxlength='"+this.formCols[A].maxLength+"' ";}else if(this.formCols[A].type=='textarea'){ss+="<textarea cols='"+this.formCols[A].size+"' rows='"+this.formCols[A].rows+"' wrap='virtual' ";}ss+=" id='"+this.nav_form_name+"_input_R"+C+"C"+A+"'";if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else{ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; \" onmouseout=\"this.style.cursor='default';\" ";}ss+="style=\"width:"+(this.formCols[A].size/2)*1.25+"em;";ss+="background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+"; text-align: "+this.formCols[A].inAlign+";"+((this.formCols[A].put==''||this.formCols[A].putExclude.indexOf(','+C+',')>=0)?'':('border:1px solid '+this.cellBorderColor+';'))+""+ceStyle+((this.formCols[A].txtColor=='')?"":"color:"+this.formCols[A].txtColor+";");ss+=this.inputStyle;ss+="\"";if(this.formCols[A].type=='text'||this.formCols[A].type=='textarea'){ss+=" type='"+this.formCols[A].type+"' "+"name='R"+C+"C"+A+"' "+ro+" ";}ss+=" onfocus=\"com.wjstc.WebTable.tmp=this.value;if(typeof(com.wjstc.WebTable.focusRow)!='undefined'){com.wjstc.WebTable.focusRow("+this.nav_tab_name+", document."+this.nav_form_name+", this.name);"+" if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};};";if(this.formCols[A].onFocusFn!=''){ss+=' '+this.formCols[A].onFocusFn;}ss+="return false;\""+" ondblclick=\"if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_comFind')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_comFind').value=this.value;}"+this.formCols[A].onDblClickFn+"\" "+" onchange=\"com.wjstc.WebTable.saveField("+this.nav_tab_name+",document."+this.nav_form_name+", this.name,1);"+this.nav_tab_name+".showTotal(document."+this.nav_form_name+");";if(this.formCols[A].onChangeFn!=''){ss+=' '+this.formCols[A].onChangeFn;}ss+="\"";ss+=" onblur=\"";if(this.formCols[A].vcontrol!=''){ss+="com.wjstc.WebTable.saveField("+this.nav_tab_name+",document."+this.nav_form_name+", this.name,1);"+this.nav_tab_name+".showTotal(document."+this.nav_form_name+");";}if(this.formCols[A].onBlurFn!=''){ss+=" "+this.formCols[A].onBlurFn+"";}ss+="\">";if(this.formCols[A].type=='textarea'){ss+="<\/textarea>";}}else if(this.formCols[A].type=='checkBox'){ss+="<div id='"+this.nav_form_name+"_div_R"+C+"C"+A+"' style=\"width:"+(this.formCols[A].size*0.6)+"em;"+"background-color: transparent; text-align: "+this.formCols[A].inAlign+";font-size:x-small;border: 0px solid red;\">"+"<input id='"+this.nav_form_name+"_checkBox_R"+C+"C"+A+"' type='checkbox' name='R"+C+"C"+A+"'";if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else{ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; \" onmouseout=\"this.style.cursor='default';\" ";}ss+=" style=\"background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";"+ceStyle+this.inputStyle+"border:0 solid red;\" ";if(this.formCols[A].onDblClickFn!=''){ss+=" ondblclick=\""+this.formCols[A].onDblClickFn+"\"";}ss+=" onclick=\"";ss+="if(typeof(com.wjstc.WebTable.focusRow)!='undefined'){com.wjstc.WebTable.focusRow("+this.nav_tab_name+", document."+this.nav_form_name+", this.name);"+" if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};};";ss+=" com.wjstc.WebTable.saveField("+this.nav_tab_name+",document."+this.nav_form_name+", this.name,1);"+this.nav_tab_name+".showTotal(document."+this.nav_form_name+");";if(this.formCols[A].onChangeFn!=''){ss+=' '+this.formCols[A].onChangeFn;}ss+="\"";if(this.formCols[A].onBlurFn!=''){ss+=" onblur=\""+this.formCols[A].onBlurFn+"\"";}ss+="><\/div>";}else if(this.formCols[A].type=='radio'){ss+="<div id='"+this.nav_form_name+"_div_R"+C+"C"+A+"' style=\"width:"+(this.formCols[A].size*0.6)+"em;"+"background-color: transparent; text-align: "+this.formCols[A].inAlign+";font-size:x-small;border: 0px solid red;\">"+"<input  id='"+this.nav_form_name+"_radio_R"+C+"C"+A+"'type='radio' name='R"+C+"C"+A+"' value='"+this.nav_form_name+"C"+A+"' ";if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.formCols[A].draggable=='d'){ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; this.style.cursor='move';\" onmouseout=\"this.style.cursor='default';\" ";}else{ss+=" onmouseover=\"if(typeof("+this.nav_tab_name+")=='undefined'){return;}; \" onmouseout=\"this.style.cursor='default';\" ";}ss+=" style=\"background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";"+ceStyle+this.inputStyle+"\" ";if(this.formCols[A].onDblClickFn!=''){ss+=" ondblclick=\""+this.formCols[A].onDblClickFn+"\"";}ss+=" onclick=\"";ss+="com.wjstc.WebTable.focusRow("+this.nav_tab_name+", document."+this.nav_form_name+", this.name);"+" if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};";ss+=" com.wjstc.WebTable.saveField("+this.nav_tab_name+",document."+this.nav_form_name+", this.name,1);"+this.nav_tab_name+".showTotal(document."+this.nav_form_name+");";if(this.formCols[A].onChangeFn!=''){ss+=' '+this.formCols[A].onChangeFn;}ss+="\"";if(this.formCols[A].onBlurFn!=''){ss+=" onblur=\""+this.formCols[A].onBlurFn+"\"";}ss+="><\/div>";}else if(this.formCols[A].type=='div'){ss+="";}else{alert('Dear programmer please check values of type ('+this.formCols[A].type+') and get field ('+this.formCols[A].get+') for column # '+A+' in function addColumn.');}if(this.formCols[A].vcontrol=='d'){ss+="<\/td><td style=\"background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";border:0px solid "+brdColor+";border-width: "+((C==0)?b2:0)+"px "+b1+"px "+b2+"px 0px;"+ceStyle+"\" id='"+this.nav_form_name+"_vcontrol_R"+C+"C"+A+"'><a href='#' onclick=\"";ss+="com.wjstc.DatePicker.dp.showDatePickerInDivForm('"+this.nav_form_name+"','R"+C+"C"+A+"');\""+" onfocus=\"if(typeof(com.wjstc.WebTable.focusRow)!='undefined'){com.wjstc.WebTable.tmp=this.selectedIndex; com.wjstc.WebTable.focusRow("+this.nav_tab_name+",document."+this.nav_form_name+", 'R"+C+"C"+A+"'); "+" if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};};";if(this.formCols[A].onFocusFn!=''){ss+=' '+this.formCols[A].onFocusFn;}ss+="return false;\" "+">";ss+="<img id='"+this.nav_form_name+"DPR"+C+"C"+A+"' src='"+this.nav_controls.imgPath+"/date_picker.gif' style=\"display:block;\" border='0' alt='Date Picker' valign='middle' \/></a>";}else if(this.formCols[A].vcontrol=='c'){ss+="<\/td><td style=\"background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";border:0px solid "+brdColor+";border-width: "+((C==0)?b2:0)+"px "+b1+"px "+b2+"px 0px;"+ceStyle+"\" id='"+this.nav_form_name+"_vcontrol_R"+C+"C"+A+"'><a href='#' onclick=\"";ss+="com.wjstc.ColorPicker.cp.edit([0,1,2,3],document.forms['"+this.nav_form_name+"'].R"+C+"C"+A+",1);\""+" onfocus=\"if(typeof(com.wjstc.WebTable.focusRow)!='undefined'){com.wjstc.WebTable.tmp=this.selectedIndex; com.wjstc.WebTable.focusRow("+this.nav_tab_name+",document."+this.nav_form_name+", 'R"+C+"C"+A+"'); "+" if(com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno')){com.wjstc.Common.getObjById('"+this.nav_form_name+"_recno').value="+this.nav_tab_name+".i+1;};};";if(this.formCols[A].onFocusFn!=''){ss+=' '+this.formCols[A].onFocusFn;}ss+="return false;\" "+">";ss+="<img id='"+this.nav_form_name+"DPR"+C+"C"+A+"' src='"+this.nav_controls.imgPath+"/color_picker.gif' style=\"display:block;\" border='0' alt='Color Picker' valign='middle' \/></a>";}ss+="<\/td>";return(ss);};com.wjstc.WebTable.R.prototype.bN=function(){var ss="";var fSize=com.wjstc.Common.ZoomSensor.getFontSize();if(fSize<0){fSize=com.wjstc.Common.toFloat(com.wjstc.Util.getStyle(document.body,'fontSize','font-size'),8);}if(this.nav!='none'){ss+="<td id='bar_"+this.nav_form_name+"_holder' rowspan='"+((this.rows-0)*((this.extraRowBorder!='')?2:1)+(this.formTots-0))+"' valign='middle' align='center' width='17' style=\""+this.barStyle+"border:0px solid "+this.cellBorderColor+";border-width: 0px 0px 0px "+this.cellBorderWidth+"px;border:0px solid red;\">";}if(this.nav!='bar'){ss+="<table cellspacing='0' cellpadding='0' border='0'>";for(var kk=0;kk<this.nav.length;++kk){var c=this.nav.charAt(kk);ss+="<tr>";if(c=='T'){ss+=this.nav_controls.addButton('vTop');}else if(c=='P'){ss+=this.nav_controls.addButton('vPageUp');}else if(c=='U'){ss+=this.nav_controls.addButton('vUp');}else if(c=='D'){ss+=this.nav_controls.addButton('vDown');}else if(c=='Q'){ss+=this.nav_controls.addButton('vPageDown');}else if(c=='B'){ss+=this.nav_controls.addButton('vBottom');}ss+="<\/tr>";}}else{ss+="<table cellspacing='0' cellpadding='0' width='17' valign='top' border='0' style=\"width:17px;\">"+"  <tr style=\"height:17px;border: 0px solid #A4A190;\">"+"   <td style=\"height:17px;width:17px;\" valign='top'"+" onmouseover=\"this.style.backgroundColor='"+this.nav_controls.bg_color_over+"'; this.style.cursor='pointer'; window.status='Click to go one record Up.';\""+" onmousedown=\"this.style.backgroundColor='"+this.nav_controls.bg_color_down+"'; com.wjstc.SlideBar.current_bar.go=(0-1); com.wjstc.SlideBar.current_bar.newI=0; com.wjstc.SlideBar.current_bar.Id=0; com.wjstc.SlideBar.current_bar.t="+this.nav_tab_name+"; com.wjstc.SlideBar.current_bar.f="+this.nav_form_name+"; com.wjstc.WebTable.moveUpDown();return false;\""+" onmouseup=\"this.style.backgroundColor='"+this.nav_controls.bg_color_over+"'; com.wjstc.SlideBar.current_bar.go=0;\""+" onmouseout= \"this.style.backgroundColor='"+this.nav_controls.bg_color_out+"'; com.wjstc.SlideBar.current_bar.go=0; this.style.cursor='default';window.status='';\""+">"+"<img src='"+this.barImgPath+"/bar_arr_up.gif' "+"ondblclick='com.wjstc.SlideBar.current_bar.go=0;com.wjstc.WebTable.showForm("+this.nav_tab_name+",document."+this.nav_form_name+",0-"+this.nav_tab_name+".m,null); com.wjstc.WebTable.showAllForms("+this.nav_tab_name+");return false;' "+"border='0' style=\"display: block\" \/><\/td>"+"  <\/tr"+">"+"  <tr>"+"   <td valign='top'"+" id='bar_"+this.nav_form_name+"' style=\"height:"+this.navHeigth+"em;width:17px;border:0px solid #A4A190; border-width: 0px 0px 0px 0px;\" "+" background='"+this.barImgPath+"/bar_main.gif' align='center' "+" onmouseover=\"this.style.backgroundColor='"+this.nav_controls.bg_color_over+"'; this.style.cursor='pointer'; window.status='Click to go Page Up or Page Down.';\""+" onmousedown=\"this.style.backgroundColor='"+this.nav_controls.bg_color_down+"';  com.wjstc.SlideBar.current_bar.go="+this.nav_tab_name+".forms['"+this.nav_form_name+"'].movePageUpDown(event);"+" com.wjstc.SlideBar.current_bar.newI=com.wjstc.SlideBar.getBarPosition(event); com.wjstc.SlideBar.current_bar.Id=0; com.wjstc.SlideBar.current_bar.t="+this.nav_tab_name+"; com.wjstc.SlideBar.current_bar.f="+this.nav_form_name+"; com.wjstc.WebTable.moveUpDown();return false;\""+" onmouseup=\"this.style.backgroundColor='"+this.nav_controls.bg_color_over+"'; com.wjstc.SlideBar.current_bar.go=0;\""+" onmouseout= \"this.style.backgroundColor='"+this.nav_controls.bg_color_out+"';  com.wjstc.SlideBar.current_bar.go=0;this.style.cursor='default'; window.status='';\""+" valign='top'>"+"<div id='bar_"+this.nav_form_name+"_but' style=\"position:relative; border:0px solid #A4A190; border-width: 0px 0px 0px 0px;height:0px;\" "+"><\/div>";if(com.wjstc.Util.isSafari){ss+="<img src='img/b1/bar_main.gif' style=\"width:17px;border:0 solid red;height:"+this.navHeigth+"em;\" \/>";}ss+="<\/td>"+"  <\/tr>"+"  <tr style=\"height:16px;\">"+"   <td  style=\"height:16px;width:17px;border:0px solid #A4A190;\" valign='top'"+" onmouseover=\"this.style.backgroundColor='"+this.nav_controls.bg_color_over+"'; this.style.cursor='pointer'; window.status='Click to go One Record Down';\""+" onmousedown=\"this.style.backgroundColor='"+this.nav_controls.bg_color_down+"'; com.wjstc.SlideBar.current_bar.go=1; com.wjstc.SlideBar.current_bar.newI=1000000; com.wjstc.SlideBar.current_bar.Id=0; com.wjstc.SlideBar.current_bar.t="+this.nav_tab_name+"; com.wjstc.SlideBar.current_bar.f="+this.nav_form_name+"; com.wjstc.WebTable.moveUpDown();return false;\""+" onmouseup=\"this.style.backgroundColor='"+this.nav_controls.bg_color_over+"'; com.wjstc.SlideBar.current_bar.go=0;\""+" onmouseout= \"this.style.backgroundColor='"+this.nav_controls.bg_color_out+"'; com.wjstc.SlideBar.current_bar.go=0; this.style.cursor='default'; window.status='';\""+">"+"<img src='"+this.barImgPath+"/bar_arr_down.gif' "+"ondblclick='com.wjstc.SlideBar.current_bar.go=0;com.wjstc.WebTable.showForm("+this.nav_tab_name+",document."+this.nav_form_name+","+this.nav_tab_name+".m,null); com.wjstc.WebTable.showAllForms("+this.nav_tab_name+");return false;' "+"style=\"display: block;\" border='0' \/><\/td>"+"<\/tr>";}if(this.nav!='none'){ss+="<\/table><\/td>";}return(ss);};com.wjstc.WebTable.R.prototype.cS=function(bar_ImgV){var ss="";var b1;var b2;var kk=0;for(var C=0;C<this.rows;++C){b2=this.cellBorderWidth;if(C==(this.rows-1)){b2=this.formTots*this.cellBorderWidth;}if(this.extraRowBorder!=''){ss+="<tr><td colspan='"+(this.formCols.length*2+1)+"' style='height:0px;background-color:transparent;font-size:0em;border:0px solid red;padding:0;margin:0;'>"+this.extraRowBorder+"<\/td><\/tr>";}ss+="<tr id='"+this.nav_form_name+"_row_R"+C+"'"+">";for(var A=0;A<this.formCols.length;++A){b1=this.cellBorderWidth;ss+=this.bJ(C,A,b1,b2,2);}ss+="<td id='"+this.nav_form_name+"R"+C+"C"+this.formCols.length+"' style=\"border:0px solid red;background-color:transparent;font-size:0.001em;"+this.barStyle+"\">&nbsp;<\/td>";if(C==0&&this.nav!='none'){ss+=this.bN();}ss+="<\/tr>";}if(this.formTots==1){ss+="<tr>";for(var A=0;A<this.formCols.length;++A){var O=('\x1FMIN\x1FMAX\x1FSUM\x1FAVG\x1FQUA\x1FQPE\x1FPER\x1FQOF\x1FOFQ\x1FMED\x1F'.indexOf('\x1F'+this.formCols[A].tot.substring(0,3).toUpperCase()+'\x1F')>=0);b1=0;if(this.formCols[A].tot!=''){b1=this.cellBorderWidth;}else{if(A==(this.formCols.length-1)||('\x1FMIN\x1FMAX\x1FSUM\x1FAVG\x1FQUA\x1FQPE\x1FPER\x1FQOF\x1FOFQ\x1FMED\x1F'.indexOf('\x1F'+this.formCols[A+1].tot.substring(0,3).toUpperCase()+'\x1F')>=0)){b1=this.cellBorderWidth;}}ss+="<td colspan='"+((this.formCols[A].vcontrol!='')?'3':'2')+"' id='"+this.nav_form_name+"TT"+A+"' style=\"";if(this.formCols[A].colHidden=='h'){ss+="display:none;";}ss+="border:0px solid "+this.cellBorderColor+";border-width:0px "+b1+"px 0px 0px;background-color:"+((((this.rows-0)&1)==0)?this.evenRowColor:this.oddRowColor)+";text-align:"+this.formCols[A].inAlign+";\" align='"+((O)?this.formCols[A].tdAlign:'right')+"' valign='"+this.formCols[A].tdValign+"'>";if(O){if(this.formCols[A].type=='div'){ss+="<div id='"+this.nav_form_name+"_div_TT"+A+"' style=\"background-color:"+((((this.rows-0)&1)==0)?this.evenRowColor:this.oddRowColor)+";"+this.rowStyle+"background-color:transparent;text-align:"+this.formCols[A].inAlign+";\"></div>";}else{ss+="<input style=\"background-color:"+((((this.rows-0)&1)==0)?this.evenRowColor:this.oddRowColor)+";"+this.rowStyle+"width:"+(this.formCols[A].size/2)*1.25+"em;text-align: "+this.formCols[A].inAlign+";\" type='text' "+"name='TT"+A+"' maxlength='"+this.formCols[A].maxLength+"' value='' readonly='readonly'>";}}else{ss+="<div id='"+this.nav_form_name+"_div_TT"+A+"' style=\"background-color:"+((((this.rows-0)&1)==0)?this.evenRowColor:this.oddRowColor)+";"+this.rowStyle+"background-color: transparent;\">"+((this.formCols[A].tot!='')?this.formCols[A].tot:'&nbsp;')+"</div>";}ss+="<\/td>";}ss+="<td id='"+this.nav_form_name+"TT"+this.formCols.length+"' style=\"border:0px solid red;background-color:transparent;font-size:0.001em;\">&nbsp;<\/td>";ss+="<\/tr>";}if(this.extraGridBorder!=''){ss+="<tr><td colspan='"+(this.formCols.length*2+2)+"' style='height:0px;background-color:transparent;font-size:0em;border:0px solid red;padding:0;margin:0;'>"+this.extraGridBorder+"<\/td><\/tr>";}ss+="<\/form><\/table>";return ss;};com.wjstc.WebTable.R.prototype.cP=function(){var b1;var b2;var I=new com.wjstc.Util.StrJoin();I.set();I.put("<table cellspacing='0' cellpadding='0'  border='0' width='100%' "+"onmouseover=\"if(typeof(com)!='undefined'){com.wjstc.WebTable.activeTable="+this.nav_tab_name+";if(com.wjstc.WebTable.activeTable){com.wjstc.WebTable.activeTable.af='"+this.nav_form_name+"';}};\" "+"onmousedown=\"if(typeof(com)!='undefined'){com.wjstc.WebTable.selectedTable="+this.nav_tab_name+";if(com.wjstc.WebTable.selectedTable){com.wjstc.WebTable.selectedTable.saf='"+this.nav_form_name+"';}};\">");var ak=this.formCols.length;if(ak<1){I.put("<tr><td>&nbsp;<\/td><\/tr>");}else{for(var C=0;C<this.rows;++C){I.put("<tr><td valign='top' style=\"background-color: "+(((C&1)==0)?this.evenRowColor:this.oddRowColor)+";\">");I.put("<table cellspacing='0' cellpadding='0'  style='border: 0px solid black;'><tr><td nowrap>");I.put("<table cellspacing='0' cellpadding='0' border='0'><tr><td style=\""+this.formCols[0].containerStyle+"width:100%;\">");for(var A=0;A<ak;++A){I.put("<span id='"+this.nav_form_name+"_titCell_R"+C+"C"+A+"'");I.put(" style='float:left;padding:0 0.2em;'");I.put(">");I.put("<table cellspacing='0' cellpadding='0' border='0'><tr  style=\""+this.titleStyle+"\">");if(this.formCols[A].type!='label'){if(this.formCols[A].titlePosition=='left'||this.formCols[A].titlePosition=='above'){I.put(this.bR(A,1,0,C));if(this.formCols[A].titlePosition=='above'){I.put("<\/tr><tr>");}else{I.put("<td valign='top'>&nbsp;<\/td>");}}I.put(this.bJ(C,A,0,0,1));if(this.formCols[A].titlePosition=='right'){I.put("<td valign='top'>&nbsp;<\/td>"+this.bR(A,1,0,C));}}else{I.put("<td valign='top' style=\""+this.formCols[A].containerStyle+"\">"+this.formCols[A].title+"<\/td>");}I.put("<\/tr><\/table><\/span>");if(A<(ak-1)){var bi=this.formCols[A].containerTerminator;if(bi=='br'){I.put("<br style=\"clear:both;\" />");}else if(bi=='td'||bi=='tr'){I.put("<\/td>");if(bi=='tr'||bi=='br'){I.put("<\/tr><tr>");}I.put("<td "+" style=\""+this.formCols[A+1].containerStyle+"\" nowrap>");}}}I.put("<\/td><\/tr><\/table>");I.put("<\/td><\/tr><\/table><\/td>");if(C==0&&this.nav!='none'){I.put(this.bN());}I.put("<\/tr>");}}I.put("<\/form><\/table>");return I.get();};com.wjstc.WebTable.mouseWheelTableForm=function(ay){var cq=com.wjstc.Common.getObjById(com.wjstc.Fading.divId);if(cq!=null&&cq.style.display!='none'){return false;}ay=(ay)?ay:window.event;var U=0;if(ay.wheelDelta){U=ay.wheelDelta/120;if(com.wjstc.Util.isOpera)U= -U;}else if(ay.detail){U= -ay.detail;}if(U){if(typeof(com)!='undefined'){if(com.wjstc.WebTable.activeTable){U=com.wjstc.Common.strToInt(U+'');com.wjstc.WebTable.showForm(com.wjstc.WebTable.activeTable,document.forms[com.wjstc.WebTable.activeTable.af],-U,null);com.wjstc.WebTable.showAllForms(com.wjstc.WebTable.activeTable);}}}if(ay.preventDefault)ay.preventDefault();ay.returnValue=false;return false;};com.wjstc.WebTable.R.prototype.cg=function(showTitle){if(typeof(showTitle)=='undefined'){showTitle=true;}this.bY();var ss='';if(this.lookType=='grid'){ss+="<div id='"+this.nav_form_name+"_div' style=\"overflow:hidden;border: 0px solid #A4A190;\" "+"onmouseover=\"if(typeof(com)!='undefined'){com.wjstc.WebTable.activeTable="+this.nav_tab_name+";if(com.wjstc.WebTable.activeTable){com.wjstc.WebTable.activeTable.af='"+this.nav_form_name+"';}};\" "+"onmousedown=\"if(typeof(com)!='undefined'){com.wjstc.WebTable.selectedTable="+this.nav_tab_name+";if(com.wjstc.WebTable.selectedTable){com.wjstc.WebTable.selectedTable.saf='"+this.nav_form_name+"';}};\">";if(showTitle){ss+=this.cR();if(this.extraTitleBorder!=''){ss+="<tr style='padding:0;margin:0;'><td colspan='"+(this.formCols.length*2+2)+"' style='height:0px;background-color:transparent;font-size:0em;border:0px solid red;padding:0;margin:0;'>"+this.extraTitleBorder+"<\/td><\/tr>";}}ss+=this.cS();ss+="<\/div>";}else{ss+=this.cP();}return ss;};com.wjstc.WebTable.R.prototype.cK=function(bar_ImgV){var C=0;var ss="";var b1;var b2;var kk=0;var Hrow=(this.rows-(this.rows-0)%this.cols)/this.cols;this.rows=Hrow*this.cols;for(var bc=0;bc<Hrow;++bc){b2=this.cellBorderWidth;if(bc==(Hrow-1)){b2=this.formTots*this.cellBorderWidth;}ss+="<tr";ss+=">";for(var bx=0;bx<this.cols;++bx){b1=this.cellBorderWidth;C=bx*Hrow+bc;if(this.lookType=='H-table'){C=bc*this.cols+bx;}ss+=this.bJ(C,0,b1,b2,2);}ss+="<td id='"+this.nav_form_name+"R"+C+"C"+this.formCols.length+"' style=\"border:0px solid red;background-color:transparent;font-size:0.001em;"+this.barStyle+"\">&nbsp;<\/td>";if(bc==0&&this.nav!='none'){ss+=this.bN();}ss+="<\/tr>";}ss+="<\/form><\/table>";return ss;};com.wjstc.WebTable.R.prototype.cX=function(){this.bY();var ss='';ss+="<div id='"+this.nav_form_name+"_div' style=\"overflow:auto;border: 0px solid #A4A190;\" "+"onmouseover=\"if(typeof(com)!='undefined'){com.wjstc.WebTable.activeTable="+this.nav_tab_name+";if(com.wjstc.WebTable.activeTable){com.wjstc.WebTable.activeTable.af='"+this.nav_form_name+"';}};\" "+"onmousedown=\"if(typeof(com)!='undefined'){com.wjstc.WebTable.selectedTable="+this.nav_tab_name+";if(com.wjstc.WebTable.selectedTable){com.wjstc.WebTable.selectedTable.saf='"+this.nav_form_name+"';}};\">";ss+=this.cK();ss+="<\/div>";return ss;};com.wjstc.WebTable.R.prototype.dq=function(){if(!this.bar){return;};this.bar.p=com.wjstc.Common.getObjById('bar_'+this.nav_form_name);this.bar.o=com.wjstc.Common.getObjById('bar_'+this.nav_form_name+'_but');this.bar.o.style.position='relative';this.bar.o.style.background='transparent';this.bar.o.onmousedown=com.wjstc.SlideBar.dragBarButtonStart;};com.wjstc.WebTable.R.prototype.bO=function(){if(!this.bar){return;};var J=eval(this.nav_tab_name);this.bar.pH=com.wjstc.Common.getH(this.bar.p);this.bar.pY=com.wjstc.Common.getY(this.bar.p);this.bar.oH=(J.m<=document.forms[this.nav_form_name]['m'].value)?(this.bar.pH-0):Math.round((this.bar.pH-0)/(J.m/(document.forms[this.nav_form_name]['m'].value)-0));var n=0;if((this.bar.oH-0)>9){n=((this.bar.oH-9)>>>3)<<2;}else{this.bar.oH=9;}var nf=this.bar.oH-n-9;var ss='';ss+="<table cellspacing='0' cellpadding='0' border='0'>\n"+"<tr><td><img src='"+this.barImgPath+"/but_top.gif' style=\"display: block;\" border='0' \/><\/td><\/tr>";if((nf>>1)>0){ss+="<tr><td height='"+(nf>>1)+"px' background='"+this.barImgPath+"/but_fil.gif'><\/td><\/tr>";}if(n>0){ss+="<tr><td height='"+n+"px' background='"+this.barImgPath+"/but_main.gif'><\/td><\/tr>";}ss+="<tr><td><img src='"+this.barImgPath+"/but_down.gif' style=\"display: block;\" border='0' \/><\/td><\/tr>";if((nf-(nf>>1))>0){ss+="<tr><td height='"+(nf-(nf>>1))+"px' background='"+this.barImgPath+"/but_fil.gif'><\/td><\/tr>";}ss+="<tr><td><img src='"+this.barImgPath+"/but_bot.gif' style=\"display: block;\" border='0' \/><\/td><\/tr><\/table>";this.bar.o.innerHTML=ss;this.moveBarButton();};com.wjstc.WebTable.R.prototype.moveBarButton=function(){var J=eval(this.nav_tab_name);var y=0;var ti=J.i-com.wjstc.WebTable.getRow(J.forms[this.nav_form_name].fo);var tm=J.m-0;if(ti<0){ti=0;}if(ti>=tm){ti=tm-1;}var fm=document.forms[this.nav_form_name]['m'].value-0;if(tm<=fm){y=0;}else if(tm-ti>fm){y=((this.bar.pH-this.bar.oH)*ti)/(tm-fm);}else{y=(this.bar.pH-this.bar.oH);}this.bar.showBarButton(y);};com.wjstc.WebTable.R.prototype.movePageUpDown=function(e){var J=eval(this.nav_tab_name);var y=com.wjstc.Common.getMouseScrollY(e);var ba=this.bar;var fm=document.forms[this.nav_form_name]['m'].value-0;var oY=com.wjstc.Common.getY(ba.o);var d=(y<=oY)?(0-fm):(((y>=oY+ba.oH))?fm:0);return d;};com.wjstc.WebTable.R.prototype.writeGridForm=function(s1,s2){this.populateGetHT();if(typeof(s1)=='undefined'){s1='';}if(typeof(s2)=='undefined'){s2='';}document.write(s1+this.bS()+this.cg()+s2);var J=eval(this.nav_tab_name);if(this.nav=='bar'){J.cA(this.nav_form_name,this.barImgPath,this.navHeigth);}this.setPicklistColumnsInForm();};com.wjstc.WebTable.R.prototype.createGridForm=function(containerId){this.formContainerId=containerId;this.populateGetHT();var o=com.wjstc.Common.getObjById(containerId);if(o){if(this.lookType=='grid'||this.lookType=='details'){o.innerHTML=this.bS()+this.cg();}else{o.innerHTML=this.bS()+this.cX();}}var J=eval(this.nav_tab_name);if(this.nav=='bar'){J.cA(this.nav_form_name,this.barImgPath,this.navHeigth);}this.setPicklistColumnsInForm();};com.wjstc.WebTable.R.prototype.setPicklistColumnsInForm=function(){var j;var J=eval(this.nav_tab_name);var as=J.forms[this.nav_form_name].formCols;var aT=as.length;var s='';for(j=0;j<aT;++j){if(as[j].setVal!=''&&as[j].setVal!='checkBox'){s+="com.wjstc.WebTable.setTableSelectColumn(document."+this.nav_form_name+","+j+","+as[j].setVal+");";}}if(s!=''){eval(s);}};com.wjstc.WebTable.R.prototype.getFormCoordinates=function(){var i,j,bt,aK;var as=this.formCols;aK=com.wjstc.Common.getObjById(this.nav_form_name+"R0C0");this.clx=com.wjstc.Common.getX(aK);this.cty=com.wjstc.Common.getY(aK);var aT=as.length;var aM=this.rows;for(j=aT-1;j>=0;--j){if(as[j].colHidden!='h'){aK=com.wjstc.Common.getObjById(this.nav_form_name+'R'+(aM-1)+'C'+j);this.crx=com.wjstc.Common.getX(aK)+com.wjstc.Common.getW(aK);this.cby=com.wjstc.Common.getY(aK)+com.wjstc.Common.getH(aK);break;}}var ss='';for(j=0;j<aT;++j){if(as[j].colHidden!='h'){this.ccx[j]=com.wjstc.Common.getX(this.nav_form_name+"R0C"+j);ss+='this.ccx['+j+']='+this.ccx[j]+', ';}}ss+='\n';for(i=0;i<aM;++i){this.cry[i]=com.wjstc.Common.getY(this.nav_form_name+"R"+i+"C0");ss+='this.cry['+i+']='+this.cry[i]+', '}};com.wjstc.WebTable.R.prototype.getCoveredCell=function(cv){var bQ=com.wjstc.Common.getMouseScrollX(cv)+com.wjstc.Common.getObjScrollX(this.scrollableContainer,'include');var by=com.wjstc.Common.getMouseScrollY(cv)+com.wjstc.Common.getObjScrollY(this.scrollableContainer,'include');var bj,bo,bL,bH;var i,j;var J=eval(this.nav_tab_name);if(bQ<this.clx)return null;if(bQ>this.crx)return null;if(by<this.cty)return null;if(by>this.cby+30)return null;var aT=this.formCols.length;var bt=(aT-1);var as=this.formCols;bj=this.ccx[bt];bL=this.crx-bj;for(j=1;j<aT;++j){if(as[j].colHidden!='h'&&bQ<this.ccx[j]){bj=this.ccx[j-1];bL=this.ccx[j]-bj;bt=j-1;break;}}var aM=this.rows;var aA=aM-1;bo=this.cry[aA];bH=this.cby-bo;for(i=1;i<aM;++i){if(by<this.cry[i]){bo=this.cry[i-1];bH=this.cry[i]-bo;aA=i-1;break;}}var aD;if(by>this.cby){aD=J.m;}else{aD=J.i-com.wjstc.WebTable.getRow(J.forms[this.nav_form_name].fo)+aA;}var bg=document.forms[this.nav_form_name]['get'+bt].value;if(bg!='A'&&bg!='N'){bg=bg-0;}return{x:bj,y:bo,w:bL,h:bH,fi:aA,fj:bt,ti:aD,tj:bg,add:(aD>=J.m)};};com.wjstc.WebTable.R.prototype.rowShiftOn=function(noDup,onRowShiftDropFn){if(typeof(noDup)=='undefined'){noDup='';}if(typeof(onRowShiftDropFn)=='undefined'){onRowShiftDropFn='';}this.onRowShiftDropFn=onRowShiftDropFn;if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.DragRow)!='undefined'){this.setDragFn(com.wjstc.DragRow.moveRowsDownFn,com.wjstc.DragRow.moveRowsMoveFn,com.wjstc.DragRow.moveRowsTargetCoveredFn,com.wjstc.DragRow.moveRowsDropFn,'row',this.nav_form_name+'deleteRec',noDup);}};com.wjstc.WebTable.R.prototype.treeRowShiftEnabledOn=function(noDup,treeRowShiftOnDropFn){if(typeof(noDup)=='undefined'){noDup='';}if(typeof(treeRowShiftOnDropFn)=='undefined'){treeRowShiftOnDropFn='';}this.treeRowShiftOnDropFn=treeRowShiftOnDropFn;if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Tree)!='undefined'&&this.treeRowShiftEnabled=='Y'){this.setDragFn(com.wjstc.Tree.moveTreeRowsDownFn,com.wjstc.Tree.moveRowsMoveFn,com.wjstc.Tree.moveTreeRowsTargetCoveredFn,com.wjstc.Tree.moveRowsDropFn,'row',this.nav_form_name+'deleteRec',noDup);}};com.wjstc.WebTable.dz=function(pa,na,n){for(var j=0;j<n;++j){if(typeof(document.images[na+j])!='undefined'){document.images[na+j].src=com.wjstc.Util.pre_images['sort_0'].src}}};com.wjstc.WebTable.copyTableData=function(t,H){if(H){if(H.p[0]=='def'){return;}t.tsna=H.name;t.m=H.m;t.n=H.n;t.i=0;t.t=H.t;t.tt=H.tt;t.sm=H.sm;t.LastCom='';t.a.length=H.m;t.p.length=H.m;for(var i=0;i<H.m;++i){t.p[i]=i;t.a[i]=H.a[H.p[i]];if(t[i]){t[i].length=H.n;}else{t[i]=new Array(H.n);}for(var j=0;j<H.n;++j){t[i][j]=H[H.p[i]][j];}}t.defa=H.defa;t.odefa=H.odefa;for(var j=0;j<H.n;++j){t.def[j]=H.def[j];t.odef[j]=H.odef[j];}}};com.wjstc.WebTable.extractTableData=function(t,H,c,ag,J){var aR='N';if(ag=='N'){aR='Y';}if(typeof(J)=='undefined'){J=null;}var ti=0;var an=0;t.n=(H.n-0)+1;t.i=0;t.LastCom='';if(J){J.n=(H.n-0)+1;J.i=0;J.LastCom='';}for(var i=0;i<H.m;++i){if((H[H.p[i]][c]+'').indexOf(ag)>=0){t.p[ti]=ti;t.a[ti]=H.a[H.p[i]];if(t[ti]){t[ti].length=t.n;}else{t[ti]=new Array(t.n);}t[ti][H.n]=i;for(var j=0;j<H.n;++j){t[ti][j]=H[H.p[i]][j];}++ti;}if((H[H.p[i]][c]+'').indexOf(aR)>=0){if(J){J.p[an]=an;J.a[an]=H.a[H.p[i]];if(J[an]){J[an].length=t.n;}else{J[an]=new Array(t.n);}J[an][H.n]=i;for(var j=0;j<H.n;++j){J[an][j]=H[H.p[i]][j];}++an;}}}t.m=ti;t.t=ti;t.tt=ti;t.sm=ti;t.a.length=ti;t.p.length=ti;if(t.def){t.def.length=t.n;}else{t.def=new Array(t.n);}for(var j=0;j<H.n;++j){t.def[j]=H.def[j];}if(J){J.m=an;J.t=an;J.tt=an;J.sm=an;J.a.length=an;J.p.length=an;if(J.def){J.def.length=J.n;}else{J.def=new Array(J.n);}for(var j=0;j<H.n;++j){J.def[j]=H.def[j];}}};com.wjstc.WebTable.filterTableRecords=function(K,bf,U){if(typeof(U)=='undefined'){U=',';}var ag=U+bf+U;var aw=0;for(var B=0;B<K.m;++B){if(ag.indexOf(U+K[K.p[B]][0]+U)>=0){K.p[aw++]=K.p[B];}}K.m=aw;K.t=aw;};com.wjstc.WebTable.hideFormColumn=function(K,F,G){com.wjstc.Util.hideObj(F+'TT'+G);for(var C=0;C<K.forms[F].rows;++C){com.wjstc.Util.hideObj(F+'_titCell_R'+C+'C'+G);com.wjstc.Util.hideObj(F+'_borderTD_td_R'+C+'C'+G);com.wjstc.Util.hideObj(F+'R'+C+'C'+G);}};com.wjstc.WebTable.showFormColumn=function(K,F,G){com.wjstc.Util.showObj(F+'TT'+G);for(var B=0;B<K.forms[F].rows;++B){com.wjstc.Util.showObj(F+'_titCell_R'+B+'C'+G);com.wjstc.Util.showObj(F+'_borderTD_td_R'+B+'C'+G);com.wjstc.Util.showObj(F+'R'+B+'C'+G);}};com.wjstc.WebTable.setCellTitle=function(F,G,ag){var L;for(var B=0;B<F.m.value;++B){L=com.wjstc.Common.getObjById(F.name+'_title_R'+B+'C'+G);if(L){if(typeof(L.innerHTML)!='undefined'){L.innerHTML=ag;}}}};com.wjstc.WebTable.setColumnInputSize=function(cp,G,ag){var L;for(var i=0;i<cp.m.value;++i){L=cp['R'+i+'C'+G];if(L!=null){if(typeof(L.size)!='undefined'){if(typeof(L.size)=='string'){L.size=ag+'';}else{L.size=ag;}}}}};com.wjstc.WebTable.setColumnCellWidth=function(bw,G,ag){var o;for(var B=0;B<bw.m.value;++B){o=com.wjstc.Common.getObjById(bw.name+'R'+B+'C'+G);if(o!=null){if(typeof(o.style)!='undefined'){if(typeof(o.style.width)!='undefined'){o.style.width=ag+'px';}}}}};com.wjstc.WebTable.getSubTable=function(H,j,J,ac){var sfd=com.wjstc.Util.sfd;var srd=com.wjstc.Util.srd;var bG=new Array();if(H[H.p[H.i]][j]!=''){bG=(H[H.p[H.i]][j]+'').split(srd);}com.wjstc.WebTable.unpackData(J,ac,bG,sfd);return bG;};com.wjstc.WebTable.putSubTable=function(H,J,A){var sfd=com.wjstc.Util.sfd;var srd=com.wjstc.Util.srd;var I=new com.wjstc.Util.StrJoin();I.set();for(var i=0;i<H.m;++i){if(i>0){I.put(srd);}I.put(" "+sfd);for(var k=0;k<H.n;++k){I.put(H[H.p[i]][k]+sfd);}}J[J.p[J.i]][A]=I.get();};com.wjstc.WebTable.generateTableIndex=function(K,A){var ia=new Array();for(var aw=0;aw<K.m;++aw){ia[K[K.p[aw]][A]]=aw;}return ia;};com.wjstc.WebTable.saveUpdatedRecords=function(t,ak,aG){var Q=com.wjstc.Util.fd;var aN=com.wjstc.Util.rd;var i,j,k,m,s;if(typeof(aG)=='undefined')aG='ACD';if(typeof(ak)=='undefined')ak=t.n;ak=ak-0;var I=new com.wjstc.Util.StrJoin();var m=aG.length;for(k=0;k<m;++k){s=aG.charAt(k);for(i=0;i<t.m;++i){if(s==t.a[t.p[i]]){I.put(s+Q);for(j=0;j<ak;++j){I.put(t[t.p[i]][j]+Q);}I.put(aN+'\n');}}}if(I.get()!=''){t.submit=true;}else{t.submit=false;}return{wasChanged:t.submit,data:I.get()};};com.wjstc.WebTable.saveDefault=function(t,ak,aG){var F=false;var Q=com.wjstc.Util.fd;var aN=com.wjstc.Util.rd;var i,j,k,m,s;if(typeof(aG)=='undefined'){aG='ACD';}if(typeof(ak)=='undefined'){ak=t.n;}ak=ak-0;var I=new com.wjstc.Util.StrJoin();I.put(t.defa+Q);for(j=0;j<ak;++j){I.put(t['def'][j]+Q);F=F||(t['def'][j]!=t['odef'][j]);}I.put(aN+'\n');return{wasChanged:F,data:I.get()};};com.wjstc.WebTable.saveSelectedRecords=function(t,A,cid,Q){t.submit=false;var i,k;if(typeof(Q)=='undefined')Q=',';cid=cid-0;A=A-0;var I=new com.wjstc.Util.StrJoin();I.set();k=0;for(i=0;i<t.m;++i){if(t.a[t.p[i]]!=''){t.submit=true;}if(t[t.p[i]][A]=='Y'){if(k>0){I.put(Q);}I.put(t[t.p[i]][cid]);++k;}}return{wasChanged:t.submit,data:I.get()};};com.wjstc.WebTable.wasModified=function(t){var i;for(i=0;i<t.m;++i)if(t.a[t.p[i]]!='')return true;return false;};com.wjstc.WebTable.saveSomeUpdateRec=function(t,A,aG,cQ){var Q=com.wjstc.Util.fd;var aN=com.wjstc.Util.rd;var s,i,j,k,m,O,d,o;var a;m=0;for(i=0;i<t.m;++i){if(aG.indexOf(t.a[t.p[i]])>0){j=t.p[i];t.p[i]=t.p[m];t.p[m]=j;++m;}}if(!m){t.submit=false;return '';}t.m=m;for(i=0;i<m;++i){if(t.a[t.p[i]]=='C'&&t[t.p[i]][0]!=t[t.p[i]][t.n]){if(t.t>=t.tt){t[t.t]=new com.wjstc.WebTable.makeTbleRow(t.n+1);t.p[t.t]=t.t;t.tt=t.t+1;}for(j=0;j<t.n+1;++j)t[t.p[t.t]][j]='';t.a[t.p[t.t]]='D';t[t.p[t.t]][0]=t[t.p[i]][t.n];++t.t;}}t.i=0;o=t.m;do{o=Math.floor((o<<3)/11);o=(o)?o:1;d=0;for(i=0,j=o;i<(t.m-o);++i,++j){if(t[t.p[i]][A]>t[t.p[j]][A]){d=1;O=t.p[i];t.p[i]=t.p[j];t.p[j]=O;}}}while(o>1||d==1);a=new Array(64);o=(t.m>>6)+1;d=0;for(k=0;k<64;++k)a[k]='';k=0;a[k]='';for(i=0;i<t.m;++i){a[k]+=t.a[t.p[i]];for(j=0;j<t.n;++j)a[k]+=t[t.p[i]][j]+Q;a[k]+=aN;++d;if(d==o){k++;d=0;}}t.submit=true;return a[0]+a[1]+a[2]+a[3]+a[4]+a[5]+a[6]+a[7]+a[8]+a[9]+a[10]+a[11]+a[12]+a[13]+a[14]+a[15]+a[16]+a[17]+a[18]+a[19]+a[20]+a[21]+a[22]+a[23]+a[24]+a[25]+a[26]+a[27]+a[28]+a[29]+a[30]+a[31]+a[32]+a[33]+a[34]+a[35]+a[36]+a[37]+a[38]+a[39]+a[40]+a[41]+a[42]+a[43]+a[44]+a[45]+a[46]+a[47]+a[48]+a[49]+a[50]+a[51]+a[52]+a[53]+a[54]+a[55]+a[56]+a[57]+a[58]+a[59]+a[60]+a[61]+a[62]+a[63]+cQ;};com.wjstc.WebTable.saveAll=function(t){var Q=com.wjstc.Util.fd;var aN=com.wjstc.Util.rd;var s,i,j,er;s='';for(j=0;j<t.n;++j)s+=Q;s+=aN;er=s;s='';for(i=0;i<t.m;++i){s+='';for(j=0;j<t.n;++j)s+=t[t.p[i]][j]+Q;s+=aN;}t.submit=(s!=er);if(!t.submit)alert('No Data to Save!');return s;};com.wjstc.WebTable.dx=function(t,f,D,noneValid){if(typeof(D)=='undefined'){D=0;}if(typeof(noneValid)=='undefined'){noneValid=false;}for(var i=0;i<t.m;++i){if(i!=t.i){t[t.p[i]][0]='N';}else{if(!noneValid){t[t.p[t.i]][0]='Y';}}}com.wjstc.WebTable.showForm(t,f,0,null);};com.wjstc.WebTable.setSelectObj=function(o,va,v,t){var j;if(typeof(v)=='undefined'){v=9;}if(typeof(t)=='undefined'){t=va;}var aV=t.length;if(aV<1){if((v&4)!=0){alert('Warning from com.wjstc.WebTable.setSelectObj: Array of texts (t) is empty');}return;}if(va.length<1){if((v&4)!=0){alert('Warning from com.wjstc.WebTable.setSelectObj: Array of values (va) is empty');}return;}if(aV!=va.length){if((v&8)!=0){alert('Error from com.wjstc.WebTable.setSelectObj:  Array of texts (t) and Array of values (va) should have same length.');}return;}var e=v&1;var a=(v>>1)&1;o.length=(aV-0)+e+a;if(e==1){o.options[0].value='';o.options[0].text='';}for(j=0;j<t.length;++j){o.options[j+e].value=va[j];o.options[j+e].text=t[j];}if(a==1){o.options[j+e].value='new';o.options[j+e].text='- Add New Item... -';}};com.wjstc.WebTable.setPicklistUsingTable=function(o,t,v,oTxt,oVal){var j;if(typeof(oTxt)=='undefined'){oTxt='';}if(typeof(oVal)=='undefined'){oVal='';}if(typeof(v)=='undefined'){v=1;}var aV=t.m;var e=v&1;var a=(v>>1)&1;var b=(v>>2)&1;o.length=(aV-0)+(e-0)+(a-0)+(b-0);if(e==1){o.options[0].value=oVal;o.options[0].text=oTxt;}for(j=0;j<t.m;++j){o.options[j+e].value=t[t.p[j]][0];o.options[j+e].text=t[t.p[j]][1];}--j;if(a==1){o.options[++j+e].value='- Add New Item... -';o.options[j+e].text='- Add New Item... -';}if(b==1){o.options[++j+e].value='- Edit Pick List... -';o.options[j+e].text='- Edit Pick List... -';}o.length=(aV-0)+(e-0)+(a-0)+(b-0);};com.wjstc.WebTable.setTableSelectColumn=function(f,A,t,v){var j;var o;if(typeof(v)=='undefined'){v=1;}for(var i=0;i<f.m.value;++i){o=f['R'+i+'C'+A];if(o!=null){com.wjstc.WebTable.setPicklistUsingTable(o,t,v);}}};com.wjstc.WebTable.setSelByVal=function(o,s,v){var i;if(typeof(v)=='undefined'){v=0;}o.selectedIndex=0;for(i=0;i<o.length;++i){if(o.options[i].value==s){o.selectedIndex=i;break;}}if((((v-0)&1)!=0)&&i==o.length){alert("Warning from com.wjstc.WebTable.setSelByVal:  Array of values of Select Object (o) has no value '"+s+"'.");}};com.wjstc.WebTable.setSelByText=function(o,s,v){var i;if(typeof(v)=='undefined'){v=0;}for(i=0;i<o.length;++i){if(o.options[i].text==s){o.selectedIndex=i;break;}}if((((v-0)&1)!=0)&&i==o.length){alert("Warning from com.wjstc.WebTable.setSelByText:  Array of texts of Select Object (o) has no text '"+s+"'.");o.selectedIndex=0;}};com.wjstc.WebTable.PopUp=function(a,n,na){var fd=com.wjstc.Util.fd;var i;if(typeof(na)=='undefined')na='';var m=a.length;this.name=na;this.i=0;this.t=m;this.m=m;this.n=n;this.p=new com.wjstc.WebTable.makeTbleRow(this.m);this.a=new com.wjstc.WebTable.makeTbleRow(this.m);for(i=0;i<this.m;++i){this.a[i]='';this.p[i]=i;this[i]=new Array(this.n);}for(i=0;i<this.m;++i)this[i]=a[i].split(fd);if(this.m==0){com.wjstc.WebTable.addTabRec(this);this.LastCom='';}return this;};com.wjstc.WebTable.setDragCellBorderColor=function(F,cE,cy,de,cb,cC,cJ){var B,G,L;var av=F.nav_form_name;var bw=document.forms[av];var bn=F.formCols;var cx=F.rows;var aA=de;if(aA==0&&cC){for(G=0;G<bn.length;++G){L=com.wjstc.Common.getObjById(av+'R'+aA+'C'+G);if(L){L.style.borderTopColor=cE;L.style.borderTopWidth=cy;}}}if(cC){--aA;}if(((aA<cb-1)||(aA>cb))&& !cJ){for(G=0;G<bn.length;++G){L=com.wjstc.Common.getObjById(av+'R'+aA+'C'+G);if(L){L.style.borderBottomColor=cE;L.style.borderBottomWidth=cy;}}}};com.wjstc.WebTable.resetDragCellBorderColor=function(F){var B,G,L;var av=F.nav_form_name;var bw=document.forms[av];var bn=F.formCols;var cx=F.rows;for(G=0;G<bn.length;++G){L=com.wjstc.Common.getObjById(av+'R0C'+G);if(L){L.style.borderTopColor=F.cellBorderColor;L.style.borderTopWidth=F.cellBorderWidth+'px';}}for(B=0;B<cx;++B){for(G=0;G<bn.length;++G){L=com.wjstc.Common.getObjById(av+'R'+B+'C'+G);if(L){L.style.borderBottomColor=F.cellBorderColor;L.style.borderBottomWidth=F.cellBorderWidth+'px';}}}};com.wjstc.WebTable.setCellColor=function(t,f,aX,bq,bv,bV){var P=null;var ai=t.forms[f.name].fo;if(ai==''){return;}var ab=com.wjstc.WebTable.getRow(ai);P=com.wjstc.Common.getObjById(f.name+ai);if(P!=null)P.style.backgroundColor=((ab&1)==0)?bq:bv;if(com.wjstc.WebTable.V(f,ai)!='H'){f[ai].style.backgroundColor=((ab&1)==0)?bq:bv;}if(com.wjstc.WebTable.V(f,aX)!='H'){f[aX].style.backgroundColor=bV;}P=com.wjstc.Common.getObjById(f.name+aX);if(P!=null){P.style.backgroundColor=bV;}t.forms[f.name].fo=aX;};com.wjstc.WebTable.setPopUpVal_delete=function(t,f){var i;var j;var k;var va;var o;var ij;var bP;var bb=com.wjstc.Util.strToInt(f['n'].value,10);var kk;for(j=0;j<bb;++j){o="R0C"+j;va=com.wjstc.WebTable.V(f,o);if(va=="S"){kk=f["get"+j].value;if(kk=="A")continue;for(i=0;i<t.m;++i){bP= -1;for(ij=0;ij<f[o].length;++ij){if(f[o].options[ij].value==t[t.p[i]][kk]){bP=ij;break;}}if(bP<0){t[t.p[i]][kk]=(f[o].length>0)?f[o].options[0].value:"";if(t.a[t.p[i]]!='A'&&t.a[t.p[i]]!='D')t.a[t.p[i]]='C';}}}}};com.wjstc.WebTable.showingHidingColumns=function(aq,aR,dn){var U=aR-0;if(U==0){return;}aq.VHcurrent+=U;if(aq.VHcurrent<aq.VHstart){aq.VHcurrent=aq.VHstart;}if(aq.VHcurrent>aq.VHend-aq.VHpageSize){aq.VHcurrent=aq.VHend-aq.VHpageSize;}var ay=(aq.VHcurrent-0)+(aq.VHpageSize-0);var K=T_trialStatDetails;var cW=tabCon_trialStatDetails;var cY=tabForm_trialStatDetails;for(var B=cW.VHstart;B<K.n;++B){cY.formCols[B].colHidden=((B<aq.VHcurrent||B>=ay)?'h':'');}eval(dn);};if(window.addEventListener){window.addEventListener('DOMMouseScroll',com.wjstc.WebTable.mouseWheelTableForm,false);}window.onmousewheel=com.wjstc.WebTable.mouseWheelTableForm;