     function countPrices() {
          var order_total = 0;
          var subtotal = 0;
          var sumTotal = 0;
          var tmpvar = 0;

//          for (i=1; document.getElementById("stock"+i) != null; i++) {
//               document.getElementById("total"+i).value = document.getElementById("stock"+i).value*document.getElementById("price"+i).value;
//               sumTotal += document.getElementById("total"+i).value * 1; /* WTF????????????*/
//          }

//          round(($subtotal / 100) * $this->getVAT(), 2)

          subtotal += document.getElementById("partcost").value * 1;
          subtotal += document.getElementById("delivery").value * 1;

          tmpvar = (subtotal / 100) * document.getElementById("vat_const").value;
//          alert(tmpvar);
          
//          document.getElementById("vat").value = Math.round((subtotal / 100) * document.getElementById("vat_const").value);
          document.getElementById("vat").value = tmpvar;
          document.getElementById("total").value = subtotal;
          document.getElementById("order_total").value = subtotal + tmpvar;

     
     }
