function calc_total() {
	qty = 0;
	pr = 0;
	totl = 0;
	n_total = 0;
	total = document.getElementById("total").value;

	itm1 = document.getElementById("101-1200").value;
    itm1 = itm1.replace(/,/, "");
    itm1 = parseFloat(itm1);
	itm2 = document.getElementById("101-1720").value;
    itm2 = itm2.replace(/,/, "");
    itm2 = parseFloat(itm2);

	itm3 = document.getElementById("401-1200").value;
    itm3 = itm3.replace(/,/, "");
    itm3 = parseFloat(itm3);
	itm4 = document.getElementById("401-1720").value;
    itm4 = itm4.replace(/,/, "");
    itm4 = parseFloat(itm4);

	itm5 = document.getElementById("601-1200").value;
    itm5 = itm5.replace(/,/, "");
    itm5 = parseFloat(itm5);
	itm6 = document.getElementById("601-1720").value;
    itm6 = itm6.replace(/,/, "");
    itm6 = parseFloat(itm6);

	itm7 = document.getElementById("501-2100").value;
    itm7 = itm7.replace(/,/, "");
    itm7 = parseFloat(itm7);
	itm8 = document.getElementById("501-2500").value;
    itm8 = itm8.replace(/,/, "");
    itm8 = parseFloat(itm8);

	if (itm1 > 0) {
		n_total = parseFloat(document.getElementById("101-1200-price").value) * itm1;
	}
	if (itm2 > 0) {
		n_total += parseFloat(document.getElementById("101-1720-price").value) * itm2;
	}
	if (itm3 > 0) {
		n_total += parseFloat(document.getElementById("401-1200-price").value) * itm3;
	}
	if (itm4 > 0) {
		n_total += parseFloat(document.getElementById("401-1720-price").value) * itm4;
	}
	if (itm5 > 0) {
		n_total += parseFloat(document.getElementById("601-1200-price").value) * itm5;
	}
	if (itm6 > 0) {
		n_total += parseFloat(document.getElementById("601-1720-price").value) * itm6;
	}
	if (itm7 > 0) {
		n_total += parseFloat(document.getElementById("501-2100-price").value) * itm7;
	}
	if (itm8 > 0) {
		n_total += parseFloat(document.getElementById("501-2500-price").value) * itm8;
	}
	document.getElementById("total").value = "$" + fmt_Money(n_total);
}


function fmt_Money(num) {
         num = num.toString().replace(/\$|\,/g,'');
         if(isNaN(num)) num = "0";
         sign = (num == (num = Math.abs(num)));
         num = Math.floor(num*100+0.50000000001);
         cents = num%100; num = Math.floor(num/100).toString();
         if(cents<10) cents = "0" + cents;
         for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
         num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3));
         return (((sign)?'':'-') + num + '.' + cents);
}