function jsmarty_function_html_table(A,X){if(!A.loop){X.trigger_error("html_table: missing 'loop' parameter");return ;}var h,s,G,w,z,a;var W=new JSmarty.Classes.Buffer();var H=jsmarty_function_html_table_cycle;var P=A.loop;var j=3;var S=3;var R="down";var Z="right";var B="cols";var q="";var o="";var D="&nbsp;";var d=" border=\"1\"";var C=P.length;for(w in A){G=A[w];switch(w){case "loop":P=G;break;case "cols":j=parseInt(G);break;case "rows":S=parseInt(G);break;case "hdir":Z=G;break;case "vdir":R=G;break;case "inner":B=G;break;case "trailpad":D=G;break;case "table_attr":d=" "+G;break;case "tr_attr":q=G;break;case "td_attr":o=G;break;}}if(A.rows==void (0)){S=Math.ceil(C/j);}if(A.cols==void (0)){j=Math.ceil(C/S);}W.append("<table",d,">");for(s=0;s<S;s++){W.append("<tr",H("tr",q,s),">");a=(R=="down")?s*j:(S-1-s)*j;for(h=0;h<j;h++){z=(Z=="right")?a+h:a+j-1-h;if(B!="cols"){z=Math.floor(z/j)+(z%j)*S;}if(z<C){W.append("<td",H("td",o,h),">",P[z],"</td>");}else{W.append("<td",H("td",o,h),">",D,"</td>");}}W.append("</tr>");}W.append("</table>");return W.toString("\n");}function jsmarty_function_html_table_cycle(Z,k,Z){var o=(k instanceof Array)?k[Z%k.length]:k;return (o)?" "+o:"";}