function startCalc(){
  interval = setInterval("calc()",1);
}
function calc(){
  q1 = document.form.quantity_1.value;
  q2 = document.form.quantity_2.value;
  q3 = document.form.quantity_3.value;
  q4 = document.form.quantity_4.value;
  q5 = document.form.quantity_5.value;
  //q6 = document.form.quantity_6.value;
  q7 = document.form.quantity_7.value;
  q8 = document.form.quantity_8.value;
  q9 = document.form.quantity_9.value;
  q10 = document.form.quantity_10.value;
	q11 = document.form.quantity_11.value;
  q12 = document.form.quantity_12.value;
  q13 = document.form.quantity_13.value;
  q14 = document.form.quantity_14.value;
	q15 = document.form.quantity_15.value;

 
  c1 = document.form.cost_1.value = CurrencyFormatted((q1 * 1) * (1500));
  c2 = document.form.cost_2.value = CurrencyFormatted((q2 * 1) * (1400));
  c3 = document.form.cost_3.value = CurrencyFormatted((q3 * 1) * (1300));
  c4 = document.form.cost_4.value = CurrencyFormatted((q4 * 1) * (13.80));
  c5 = document.form.cost_5.value = CurrencyFormatted((q5 * 1) * (50));
  //c6 = document.form.cost_6.value = CurrencyFormatted((q6 * 1) * (100));
  c7 = document.form.cost_7.value = CurrencyFormatted((q7 * 1) * (250));
  c8 = document.form.cost_8.value = CurrencyFormatted((q8 * 1) * (250));
  c9 = document.form.cost_9.value = CurrencyFormatted((q9 * 1) * (150));
  c10 = document.form.cost_10.value = CurrencyFormatted((q10 * 1) * (100));
	c11 = document.form.cost_11.value = CurrencyFormatted((q11 * 1) * (13.80));
  c12 = document.form.cost_12.value = CurrencyFormatted((q12 * 1) * (100));
  c13 = document.form.cost_13.value = CurrencyFormatted((q13 * 1) * (250));
  c14 = document.form.cost_14.value = CurrencyFormatted((q14 * 1) * (200));
	c15 = document.form.cost_15.value = CurrencyFormatted((q15 * 1) * (100));

  
  af = document.form.additional_fee.value = CurrencyFormatted((+c4) + (+c5) + (+c7) + (+c8) + (+c9) + (+c10) + (+c11) + (+c12) + (+c13) + (+c14) + (+c15));
  bf = document.form.booth_fees.value = CurrencyFormatted((+c1) + (+c2) + (+c3));
  
  document.form.total.value = CurrencyFormatted((af * 1) +  (bf * 1));
}

function stopCalc(){
  clearInterval(interval);
}

function CurrencyFormatted(amount)
{
	var i = parseFloat(amount);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	return s;
}
