
function addTotal() {
	//-- basic
	var dwelling 		= document.getElementById('dwelling').value;
	var large 			= document.getElementById('large').checked == true;
	var existing 		= document.getElementById('existing').checked == true;
	var guesthouse 		= document.getElementById('guesthouse').checked == true;
	//-- extras
	var chimney 		= document.getElementById('chimney').checked == true;
	var skylight_flashing = document.getElementById('skylight_flashing').checked == true;
	var skylight 		= document.getElementById('skylight').checked == true;
	var crickets 		= document.getElementById('crickets').checked == true;
	var dryer_exhaust 	= document.getElementById('dryer_exhaust').checked == true;
	var gas_furnace 	= document.getElementById('gas_furnace').checked == true;
	var water_heater 	= document.getElementById('water_heater').checked == true;
	//-- 3year
	var three_year 		= document.getElementById('3year').checked == true;
	//-- element handle
	//var total_box 		= document.getElementById('total');
		
	//-- calulate basic costs
	var total = 0;
	switch (dwelling) {
		case '1':
			total = parseFloat(409.00);
			break;
		case '2':
			total = parseFloat(409.00);
			break;
		case '3':
			total = parseFloat(509.00);
			break;
		case '4':
			total = parseFloat(509.00);
			break;
		case '5':
			total = parseFloat(609.00);
			break;
	}

	//-- special cases
	if ( large ) 		{ total =  parseFloat(709.00) }
	if ( guesthouse ) 	{ total = parseFloat(total) + parseFloat(200.00) }
	if ( existing ) 	{ total = parseFloat(total) + parseFloat(100.00) }
		
	//-- calculate optional costs
	var count = 0;
	if ( chimney )			{ total = total + parseFloat(25.00); count += 1; }
	if ( skylight_flashing ){ total = total + parseFloat(25.00); count += 1; }
	if ( skylight )			{ total = total + parseFloat(25.00); count += 1; }
	if ( crickets )			{ total = total + parseFloat(25.00); count += 1; }
	if ( dryer_exhaust )	{ total = total + parseFloat(25.00); count += 1; }
	if ( gas_furnace )		{ total = total + parseFloat(25.00); count += 1; }
	if ( water_heater )		{ total = total + parseFloat(25.00); count += 1; }
	if ( count == 7 ) 		{ total = total - parseFloat(50.00); }				// discount for choosing all
	
	//-- extend to 3 year plan?
	if ( three_year ) 		{ total = total*2; }
	
	//alert("Total cost: "+ total);
	//total_box.value = total+".00";
	document.getElementById('grandtotal').value = total+".00";
}			