function  fnmtxputhtm4( mtxnam1ref, mtxval1ref, rowuno, rowlas, coluno, collas, colnmx, tblid_ref, tblclsref, tblwidref, tblbrwref, tblcpdref, tblstlref, tblttlref, dbrcol1ref, fmicolttlidx, celttlstl, chrwidpxl ) {
var mtxnamloc = fntrmall(mtxnam1ref); var mtxnamlen = mtxnamloc.length; var rowntl =rowlas +1 -rowuno; var rownmx =mtxval1ref.length; var rowidx; var colntl = collas +1 -coluno; var coloutnmx =colntl; var colidx = 0; var colnamloc ='';
var coltyploc =''; var collenloc =0; var colfrcloc =0; var rowcelmatidc =[]; var celmatntl =0; var rowttlvly =vln; var rowhtmstr =''; var fn_out1loc; fn_out1loc =''; var fmidetloc =-1; var fmidetstr =''; var fmidetfrs =''; var celtypstr ='';
var celtypchk =''; var celmatloc; var celmatidc =0; var celmatvly =vln; var celvalstr =''; var celhtmstr =''; var colspnloc = 1; var colalvloc ="top"; var colalhloc ="left"; var rowspnloc = 1;
fn_out1loc += fnmtxputnam1('lb1tbl03.','fnmtxputhtm4', tblid_ref, mtxnam1ref, mtxval1ref, rowuno, rowlas, coluno, collas ); var tblcolwidstr =[]; var tblwidloc =0; var tblwidstr = fnhtmtbl_tblcolwid3( tblwidref,tblbrwref,chrwidpxl, coluno,collas,
dbrcol1ref, tblcolwidstr ); tblbrwloc =tblbrwref; fn_out1loc += fnhtmtbl_tagtbl1(tblid_ref,tblclsref,tblwidstr,tblbrwref,tblcpdref,tblstlref ); fn_out1loc += fnhtmtblcolstr3(coluno,collas, tblcolwidstr ); fn_out1loc += fnhtmtblhdrstr3(
tblwidstr,tblttlref, coluno,collas, dbrcol1ref, tblcolwidstr ); if (rownmx > 0 ) { fn_out1loc +='<tbody>'; fn_out1loc +=lfdflostr; fn_out1loc +=lfdflostr; for (rowidx =rowuno; (rowidx < (rowlas +1) ); rowidx++ ) { rowhtmstr =''; rowttlvly =vln;
if (vly) { rowcelmatidc =[]; celmatntl =0; rowttlvly =vln; rowcelmatidc = fnmtxrowcelmatidc1( mtxval1ref, rowidx, coluno, collas, colnmx, -1, '', ''  ); celmatntl = fnmtxrowcelmatntl1( rowcelmatidc, coluno, collas, colnmx );
rowttlvly = fnmtxrowttlvly1( rowcelmatidc, coluno, collas, colnmx, celmatntl, fmicolttlidx, vln ); rowhtmstr = fnfmihtm4rowstr1( mtxnam1ref, mtxval1ref, [], rowidx, coluno, collas, colnmx, tblid_ref, dbrcol1ref, fmicolttlidx, celttlstl, chrwidpxl,
tblcolwidstr, vln, vln, vln, -1, vln, vln, -1, -1 ); fn_out1loc +=rowhtmstr; rowhtmstr =''; if (vln) { rowhtmstr =''; rowhtmstr +='<tr>'; rowhtmstr +=lfdflostr; if (celmatntl < 1 ) { colspnloc =coloutnmx; colalhloc ='left'; celmatloc ='&nbsp;';
rowhtmstr += '<td'; rowhtmstr +=' colspan=' +'"' +colspnloc +'"'; rowhtmstr +=' align='   +'"' +colalhloc +'"'; rowhtmstr += '>'; rowhtmstr +=lfdflostr; rowhtmstr += celmatloc; rowhtmstr += '</td>'; rowhtmstr +=lfdflostr; } else {
for (colidx =coluno; (colidx < (collas+1) ); colidx++ ) { celmatloc = fnmtxcelgetval1(mtxval1ref, rowidx,colidx, colnmx ); celhtmprfstr = ''; if (vln) { celhtmprfstr = mtxnam1ref +'[' +rowidx +'][' +colidx +']'; } celhtmstr = fnfmihtm4celstr1(
tblid_ref, rowidx, colidx, vln, chrwidpxl, tblcolwidstr[colidx], (colidx !=fmicolttlidx ), 'celid_loc', celmatloc, dbrcol1ref[colidx][dbrtypidx], dbrcol1ref[colidx][dbrlenidx], dbrcol1ref[colidx][dbrfrcidx], dbrcol1ref[colidx][dbrlenidx],
(colidx ==fmicolttlidx ), celttlstl, vln, '', '', celhtmprfstr ); rowhtmstr += celhtmstr; } } rowhtmstr +='</tr>'; rowhtmstr +=lfdflostr; rowhtmstr +=lfdflostr; fn_out1loc +=rowhtmstr; rowhtmstr =''; } } } fn_out1loc +='</tbody>';
fn_out1loc +=lfdflostr; fn_out1loc +=lfdflostr; } fn_out1loc +='</table>'; fn_out1loc +=lfdflostr; fn_out1loc +=lfdflostr; return fn_out1loc; } function  fnmtxputhtmdiv5( mtxnam1ref, mtxval1ref, rowuno, rowlas, coluno, collas, colnmx, tblid_ref,
tblclsref, tblwidref, tblbrwref, tblcpdref, dbrcolref, lstttlref, tblstlref, lstclsref, rowclsref, celclsref, colttlidx,colttlstlref, chrwidpxl ) { var mtxnam1loc = fntrmall(mtxnam1ref); var mtxnam1len = mtxnam1loc.length; var lfdstrloc;
lfdstrloc =lfdflostr; var clsdv1str ='clsdv1'; var clsdv2str ='clsdv2'; var clsdv3str ='clsdv3'; var clsdv4str ='clsdv4'; var clsdv5str ='clsdv5'; var lstclsstr ='clsdv6'; var rowclsstr ='clsdv7'; var clsdv8str ='clsdv8'; var celclsstr ='clsdv9';
var lstttlstl =''; lstttlstl = colttlstlref; lstttlstl += 'padding:12px;'; lstttlstl += 'font-weight:bold;'; lstttlstl += 'font-size:150%;'; var colttlstl =''; colttlstl = colttlstlref; colttlstl += 'font-weight:bold;';
colttlstl += 'font-size:125%;'; var rowttlstl =''; var rownmx =mtxval1ref.length; var rowidx; var colntl = collas +1 -coluno; var colidx = 0; var colnamloc =''; var coltyploc =''; var collenloc =0; var colfrcloc =0; colspnloc = 1;
colalvloc ="top"; colalhloc ="left"; rowspnloc = 1; var celmatstr; var celmatvly; var valtyp; var valstr; var fn_out1loc =''; var outtblstr; var outhdrstr; var outrowstr; var outcolstr; var regttlstr; var regrowstr; var regcolstr; var regcelstr;
outtblstr =''; outhdrstr =''; outlststr =''; outrowstr =''; outcolstr =''; regttlstr =''; regrowstr =''; regcolstr =''; regcelstr ='';
fn_out1loc += fnmtxputnam1('lb1tbl01.','fnmtxputhtmdiv5', tblid_ref, mtxnam1ref, mtxval1ref, rowuno, rowlas, coluno, collas ); var tblwidloc =0; var tblwidstr =''; var tblbrwloc =0; var colwidloc =0; tblwidloc =0;
tblwidloc =Math.min(tblwidloc, tblwidref ); tblbrwloc =tblbrwref; outtblstr += fnhtmtbl_tagtbl1(tblid_ref,tblclsref,tblwidstr,tblbrwref,tblcpdref,tblstlref ); outtblstr +=lfdstrloc; outtblstr +='<thead>'; outtblstr +=lfdstrloc;
outtblstr +=lfdstrloc; outtblstr +='<tr>'; outtblstr +='<th>'; outtblstr +=lfdstrloc; regttlstr  =''; regttlstr +='<div'; regttlstr +=' style='   +'"' +lstttlstl +'"'; regttlstr +=' align='   +'"' +'left'    +'"'; regttlstr +='>';
regttlstr +=lfdstrloc; regttlstr +=lstttlref; regttlstr +=lfdstrloc; regttlstr +='</div>'; regttlstr +=lfdstrloc; regttlstr +=lfdstrloc; outtblstr +=regttlstr; outtblstr +=lfdstrloc; outtblstr +=lfdstrloc; outtblstr +='</th>'; outtblstr +='</tr>';
outtblstr +=lfdstrloc; outtblstr +=lfdstrloc; outtblstr +='</thead>'; outtblstr +=lfdstrloc; outtblstr +=lfdstrloc; outtblstr +='<tbody>'; outtblstr +=lfdstrloc; outtblstr +=lfdstrloc; outtblstr +='<tr>'; outtblstr +='<td'; outtblstr +='>';
outtblstr +=lfdstrloc; if (rownmx > 0 ) { outlststr +=lfdstrloc; outlststr +='<br>'; outlststr +=lfdstrloc; outlststr +='<div'; if (lstclsref.length > 0 ) { outlststr +=' class=' +'"' +lstclsref +'"'; } outlststr +='>'; outlststr +=lfdstrloc;
colspnloc = 1; colalvloc ="top"; colalhloc ="left"; for (rowidx =rowuno; (rowidx < (rowlas +1) ); rowidx++ ) { rowttlvly =vln; rowcelmatidc =[]; celmatntl =0; rowttlvly =vln; rowcelmatidc = fnmtxrowcelmatidc1( mtxval1ref, rowidx,
coluno, collas, colnmx, -1, '', ''  ); celmatntl = fnmtxrowcelmatntl1( rowcelmatidc, coluno, collas, colnmx ); rowttlvly = fnmtxrowttlvly1( rowcelmatidc, coluno, collas, colnmx, celmatntl, fmicolttlidx, vln ); regrowstr =''; regrowstr +=lfdstrloc;
regrowstr +=lfdstrloc; outlststr +=regrowstr; regrowstr =''; if (colttlidx > -1 ) { colidx =colttlidx; if (colidx ==colttlidx ) { if (rowidx > 0 ) { regrowstr +='<br>'; regrowstr +=lfdstrloc; }
regcelstr = fntblhtmdiv1celstr1(colttlidx, rowidx,colidx ); regrowstr += regcelstr; } } outlststr +=regrowstr; regrowstr =''; regrowstr +=lfdstrloc; if (rowidx > 0 ) { regrowstr +=lfdstrloc; } regrowstr +='<div'; if (rowclsref.length > 0 ) {
regrowstr +=' class=' +'"' +rowclsref +'"'; } regrowstr +='>'; regrowstr +=lfdstrloc; if (celmatntl < 1 ) { colspnloc =colntl; colalhloc ='left'; regcelstr += '<div'; if (celclsref.length > 0 ) { regcelstr +=' class='   +'"' +celclsref +'"'; }
regcelstr +=' colspan=' +'"' +colspnloc +'"'; regcelstr +=' align='   +'"' +colalhloc +'"'; regcelstr += '>'; regcelstr +=lfdstrloc; regcelstr += celmatstr; regcelstr +=lfdstrloc; regcelstr += '</div>'; regcelstr +=lfdstrloc;
regcelstr +=lfdstrloc; regrowstr +=regcelstr; } else { for (colidx =coluno; (colidx < (collas+1) ); colidx++ ) { if (colidx !=colttlidx ) { regcelstr =fntblhtmdiv1celstr1(colttlidx, rowidx,colidx ); regrowstr += regcelstr; } } }
regrowstr +='</div>'; regrowstr +=lfdstrloc; outlststr +=regrowstr; regrowstr =''; } outlststr +='</div>'; outlststr +=lfdstrloc; outlststr +=lfdstrloc; outtblstr +=outlststr; } outtblstr +='</td>'; outtblstr +=lfdstrloc; outtblstr +='</tr>';
outtblstr +=lfdstrloc; outtblstr +=lfdstrloc; outtblstr +='</tbody>'; outtblstr +=lfdstrloc; outtblstr +='</table>'; outtblstr +=lfdstrloc; outtblstr +=lfdstrloc; fn_out1loc += outtblstr; return fn_out1loc; function fntblhtmdiv1celstr1(
colttlidx, rowidx,colidx ) { var regcelstr; var celclsloc; var attclscel; var celstlloc; var attstlcel; regcelstr =''; rowitgstr =''; rowitg =rowidx +1; if (colidx ==colttlidx ) { rowitgstr +='('; rowitgstr +=rowitg; rowitgstr +=') '; }
collenloc =dbrcolref[colidx][dbrlenidx]; if (collenloc > 0 ) { colwidloc =(collenloc *chrwidpxl ); colnamloc =dbrcolref[colidx][dbrnamidx]; coltyploc =dbrcolref[colidx][dbrtypidx]; colfrcloc =dbrcolref[colidx][dbrfrcidx]; celtyploc =coltyploc;
cellenloc =collenloc; celfrcloc =colfrcloc; celmatstr = fnmtxcelgetval1(mtxval1ref, rowidx,colidx, colnmx ); celtypstr =fnvaltypstr1(celmatstr); celmatvly =fnvalmatvly1(celmatstr, celtypstr ); celtypcue =coltyploc; if (celmatvly ) {
if (celmatstr =='_' ) { celvalstr ='&nbsp;'; } else if (celmatstr =='$' ) { celvalstr ='&nbsp;'; } else { celtypcue =dbrcolref[colidx][dbrtypidx]; celvallen =dbrcolref[colidx][dbrlenidx]; celvalfrc =dbrcolref[colidx][dbrfrcidx];
celvallmx =dbrcolref[colidx][dbrlenidx]; if (celtypcue.charAt(0) !='C' ) { celvalstr =fnvalfmt2('_','_',celmatstr,celtypcue,celvallen,celvalfrc,celvallmx ); } else { celvalstr =celmatstr; } if (celtypcue.charAt(0) =='N' ) {
fntstr ="Courier, 'Courier new', fixedsys, monospace"; celvalstr = '<span' +' style="' +fntstr +'">' +lfdflostr +celvalstr +lfdflostr +'</span>'; } } } else { celvalstr ='&nbsp;'; } if (celtypcue.charAt(0) =='C' ) { colalhloc ='left'; } else
if (celtypcue.charAt(0) =='L' ) { colalhloc ='left'; } else { colalhloc ='right'; } colalvloc ='top'; celstlloc =''; attstlcel =''; if (colidx == colttlidx ) { if (colttlstl.length > 0 ) { celstlloc = colttlstl;
attstlcel =' style='   +'"' +celstlloc +'"'; } } celclsloc =''; attclscel =''; if (colidx !=colttlidx ) { if (celclsref.length > 0 ) { celclsloc = celclsref; attclscel =' class='   +'"' +celclsloc +'"'; } } regcelstr += '<div';
regcelstr += attclscel; regcelstr += attstlcel; regcelstr += ' align='   +'"' +colalhloc +'"'; regcelstr += ' valign='  +'"' +colalvloc +'"'; regcelstr += '>'; regcelstr +=lfdstrloc; regcelstr += rowitgstr; if (colidx !=colttlidx ) {
if (colnamloc.length > 0 ) { regcelstr +='<span style="'; regcelstr +='font-size:x-small'; regcelstr +='">'; regcelstr +=lfdstrloc; regcelstr += colnamloc +':'; regcelstr +=lfdstrloc; regcelstr +='</span>'; regcelstr +='&nbsp;';
regcelstr +=lfdstrloc; } regcelstr +=celvalstr; } else if (colidx == colttlidx ) { if (rowttlstl.length > 0 ) { regcelstr +='<h4><b>'; regcelstr +='<span style="'; regcelstr += rowttlstl; regcelstr +='">'; regcelstr +=lfdstrloc;
regcelstr +=celvalstr; regcelstr +=lfdstrloc; regcelstr +='</span>'; regcelstr +='</b></h4>'; } else { regcelstr +='<h4><b>'; regcelstr +='<!h4><u>'; regcelstr +=lfdstrloc; regcelstr +=celvalstr; regcelstr +=lfdstrloc; regcelstr +='</u><!/h4>';
regcelstr +='</b></h4>'; } } regcelstr += '</div>'; regcelstr +=lfdstrloc; regcelstr +=lfdstrloc; } return regcelstr; } }

