Currency formating
Code: Select all
<td class="money" style="text-align:right"><TMPL_VAR xxxxxx></td>

<script type="text/javascript">
  function currency(n) {n = parseFloat(n); return isNaN(n) ? 0 : n.toFixed(2);}
  var elements= document.getElementsByClassName("money");
  for (var i = 0; i < elements.length; i++) {elements[i].innerHTML = currency(elements[i].innerHTML);}
</script>
</html>