shoopik,
для первой ТДшки trs[0%5] = tr[0]
для седьмой ТДшки trs[6%5] = tr[1]
для восьмой ТДшки trs[7%5] = tr[2]
<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
</tr>
<tr>
<td>9</td>
<td>10</td>
</tr>
</table>
<table>
<tbody><tr>
<td>1</td><td>6</td></tr>
<tr>
<td>2</td><td>7</td></tr>
<tr>
<td>3</td><td>8</td></tr>
<tr>
<td>4</td><td>9</td></tr>
<tr>
<td>5</td><td>10</td></tr>
</tbody></table>