function adjustField(){var t=20,e=1,k=5,u=5,l="false",b=document.getElementById("viewTable");if(null==b)return!1;var v=b.parentNode,m=b.rows.length,n=b.rows[0].cells.length,w=Array(n),a=document.getElementsByTagName("iField");if(null==a||0==a.length||null==a[0].getAttribute("cols"))return!1;var f=parseInt(a[0].getAttribute("cols"),10);if(null!=a[0].getAttribute("colsWidth")){var p=a[0].getAttribute("colsWidth").split(",");if(p.length!=f)return alert("The number of the set value of colsWidth isn't parallel with cols."),
!1}null!=a[0].getAttribute("cellHeight")&&(t=parseInt(a[0].getAttribute("cellHeight"),10));null!=a[0].getAttribute("tables")&&(e=parseInt(a[0].getAttribute("tables"),10));null!=a[0].getAttribute("tableMargin")&&(k=parseInt(a[0].getAttribute("tableMargin"),10));null!=a[0].getAttribute("tableBorder")&&(u=parseInt(a[0].getAttribute("tableBorder"),10));null!=a[0].getAttribute("useTitle")&&(l=a[0].getAttribute("useTitle"));if("true"==l)for(i=0;i<n;i++)w[i]=$(b.rows[0].cells[i]).text();a=document.createElement("table");
var c=0,d=0;a.cellPadding=k;v.insertBefore(a,b);a.style.width="10000px";var x=0;for(i=1;i<m;i++){0==(i-1)%e&&(pageTr=a.insertRow(x),x++);pageTd=pageTr.insertCell((i-1)%e);pageTd.align="left";pageTd.vAlign="top";var g=document.createElement("table");g.border=u;g.cellSpacing="0";g.style.emptycells="show";pageTd.appendChild(g);var y=0;for(j=0;j<n;j++){if(0==j%f){var h=g.insertRow(y);y++;h.className=b.rows[i].className;1==i&&(d=d<c?c:d,c=0)}var z=b.rows[i].cells[j],q=z.childNodes;if("true"==l){var r=
h.insertCell(j%f*2);$(r).text(w[j]+":");r.className="label";1==i&&(c+=r.offsetWidth);lineTd=h.insertCell(j%f*2+1)}else lineTd=h.insertCell(j%f);null!=p&&(lineTd.style.width=p[j%f]);lineTd.style.height=t+"px";lineTd.className=z.className;for(0==q.length&&$(lineTd).text(" ");0<q.length;)lineTd.appendChild(q[0]);1==i&&(c+=lineTd.offsetWidth)}d=d<c?c:d}a.style.width=d*(m-1>e?e:m-1)+e*k*2+"px";v.removeChild(b)};
