var totalIn = 0;
var totalOut = 0;
for (i=0; i < values.length-1; i++) {
    totalIn += values[i][3];
    totalOut += values[i][4];
    document.write("<tr><td><div title=\"" + values[i][1] + " (" + values[i][2] + ")" + "\">" + values[i][0] + "</div></td>");
    for (j=3; j < 6; j++)
        document.write("<td>" + getSize(values[i][j]) + "</td>");
    document.write("<td>" + values[i][6] + "</td><td>" + values[i][7] + "</td></tr>");
}
document.write("<tr><td>TOTAL</td><td>" + getSize(totalIn) + "</td><td>" + getSize(totalOut) + "</td><td>" + getSize(totalIn + totalOut) + "</td><td></td><td></td></tr>");
</script></table>
<br /><small>This page was generated on (date)</small>
</body></html>
