function calc_total(this_form){var bott_price = 20.00;var case_price = 240;var case_ordered = 0;var bott_total_qty = 0;var club_mem_price = 185;this_form.grand_total.value = 0;this_form.delv_total.value = 0;// do bottlesif (this_form.ssb_bott_qty.value > 0){var ssb_bott_total = this_form.ssb_bott_qty.value * bott_price;bott_total_qty = bott_total_qty + eval(this_form.ssb_bott_qty.value);}else{var ssb_bott_total = 0.00;}if (this_form.gsm_bott_qty.value > 0){var gsm_bott_total = this_form.gsm_bott_qty.value * bott_price;bott_total_qty = bott_total_qty + eval(this_form.gsm_bott_qty.value);}else{var gsm_bott_total = 0.00;}if (this_form.s_bott_qty.value > 0){var s_bott_total = this_form.s_bott_qty.value * bott_price;bott_total_qty = bott_total_qty + eval(this_form.s_bott_qty.value);}else{var s_bott_total = 0.00;}if (this_form.scfm_bott_qty.value > 0){var scfm_bott_total = this_form.scfm_bott_qty.value * bott_price;bott_total_qty = bott_total_qty + eval(this_form.scfm_bott_qty.value);}else{var scfm_bott_total = 0.00;}if (this_form.cs_bott_qty.value > 0){var cs_bott_total = this_form.cs_bott_qty.value * bott_price;bott_total_qty = bott_total_qty + eval(this_form.cs_bott_qty.value);}else{var cs_bott_total = 0.00;}if (this_form.tp_bott_qty.value > 0){var tp_bott_total = this_form.tp_bott_qty.value * bott_price;bott_total_qty = bott_total_qty + eval(this_form.tp_bott_qty.value);}else{var tp_bott_total = 0.00;}if (this_form.evoo_bott_qty.value > 0){var evoo_bott_total = this_form.evoo_bott_qty.value * bott_price;bott_total_qty = bott_total_qty + eval(this_form.evoo_bott_qty.value);}else{var evoo_bott_total = 0.00;}// do casesif (this_form.ssb_case_qty.value > 0){var ssb_case_total = this_form.ssb_case_qty.value * case_price;case_ordered = 1;}else{var ssb_case_total = 0.00;}if (this_form.gsm_case_qty.value > 0){var gsm_case_total = this_form.gsm_case_qty.value * case_price;case_ordered = 1;}else{var gsm_case_total = 0.00;}if (this_form.s_case_qty.value > 0){var s_case_total = this_form.s_case_qty.value * case_price;case_ordered = 1;}else{var s_case_total = 0.00;}if (this_form.scfm_case_qty.value > 0){var scfm_case_total = this_form.scfm_case_qty.value * case_price;case_ordered = 1;}else{var scfm_case_total = 0.00;}if (this_form.cs_case_qty.value > 0){var cs_case_total = this_form.cs_case_qty.value * case_price;case_ordered = 1;}else{var cs_case_total = 0.00;}if (this_form.tp_case_qty.value > 0){var tp_case_total = this_form.tp_case_qty.value * case_price;case_ordered = 1;}else{var tp_case_total = 0.00;}if (this_form.evoo_case_qty.value > 0){var evoo_case_total = this_form.evoo_case_qty.value * case_price;case_ordered = 1;}else{var evoo_case_total = 0.00;}// do wine line totalsthis_form.ssb_total.value = ssb_bott_total + ssb_case_total;this_form.gsm_total.value = gsm_bott_total + gsm_case_total;this_form.s_total.value = s_bott_total + s_case_total;this_form.scfm_total.value = scfm_bott_total + scfm_case_total;this_form.cs_total.value = cs_bott_total + cs_case_total;this_form.tp_total.value = tp_bott_total + tp_case_total;this_form.evoo_total.value = evoo_bott_total + evoo_case_total;// do deliveryif (case_ordered == 1){	this_form.delv_total.value = 0;}else if (bott_total_qty >= 12){	this_form.delv_total.value = 0;}else if (bott_total_qty == 0){	this_form.delv_total.value = 0;}else if (this_form.delv_state.value == 'SA'){	if (bott_total_qty > 0 && bott_total_qty <= 1)	{		this_form.delv_total.value = 7.05;	}	else if (bott_total_qty >= 2 && bott_total_qty <= 3)	{		this_form.delv_total.value = 7.90;	}	else if (bott_total_qty >= 4 && bott_total_qty <= 6)	{		this_form.delv_total.value = 9.15;	}	else if (bott_total_qty >= 7 && bott_total_qty <= 11)	{		this_form.delv_total.value = 10.94;	}}else if (this_form.delv_state.value == 'QLD'){	if (bott_total_qty > 0 && bott_total_qty <= 1)	{		this_form.delv_total.value = 8.25;	}	else if (bott_total_qty >= 2 && bott_total_qty <= 3)	{		this_form.delv_total.value = 10.90;	}	else if (bott_total_qty >= 4 && bott_total_qty <= 6)	{		this_form.delv_total.value = 14.90;	}	else if (bott_total_qty >= 7 && bott_total_qty <= 11)	{		this_form.delv_total.value = 21.05;	}}else if (this_form.delv_state.value == 'VIC'){	if (bott_total_qty > 0 && bott_total_qty <= 1)	{		this_form.delv_total.value = 7.45;	}	else if (bott_total_qty >= 2 && bott_total_qty <= 3)	{		this_form.delv_total.value = 9.00;	}	else if (bott_total_qty >= 4 && bott_total_qty <= 6)	{		this_form.delv_total.value = 11.40;	}	else if (bott_total_qty >= 7 && bott_total_qty <= 11)	{		this_form.delv_total.value = 15.11;	}}else if (this_form.delv_state.value == 'WA'){	if (bott_total_qty > 0 && bott_total_qty <= 1)	{		this_form.delv_total.value = '8.50';	}	else if (bott_total_qty >= 2 && bott_total_qty <= 3)	{		this_form.delv_total.value = 12.00;	}	else if (bott_total_qty >= 4 && bott_total_qty <= 6)	{		this_form.delv_total.value = 17.15;	}	else if (bott_total_qty >= 7 && bott_total_qty <= 11)	{		this_form.delv_total.value = 24.81;	}}else if (this_form.delv_state.value == 'NSW' || this_form.delv_state.value == 'ACT'){	if (bott_total_qty > 0 && bott_total_qty <= 1)	{		this_form.delv_total.value = 7.55;	}	else if (bott_total_qty >= 2 && bott_total_qty <= 3)	{		this_form.delv_total.value = 9.40;	}	else if (bott_total_qty >= 4 && bott_total_qty <= 6)	{		this_form.delv_total.value = 12.15;	}	else if (bott_total_qty >= 7 && bott_total_qty <= 11)	{		this_form.delv_total.value = 16.28;	}}else if (this_form.delv_state.value == 'NT'){	if (bott_total_qty > 0 && bott_total_qty <= 1)	{		this_form.delv_total.value = 8.30;	}	else if (bott_total_qty >= 2 && bott_total_qty <= 3)	{		this_form.delv_total.value = 11.65;	}	else if (bott_total_qty >= 4 && bott_total_qty <= 6)	{		this_form.delv_total.value = 16.65;	}	else if (bott_total_qty >= 7 && bott_total_qty <= 11)	{		this_form.delv_total.value = 24.22;	}}else if (this_form.delv_state.value == 'TAS'){	if (bott_total_qty > 0 && bott_total_qty <= 1)	{		this_form.delv_total.value = '7.90';	}	else if (bott_total_qty >= 2 && bott_total_qty <= 3)	{		this_form.delv_total.value = 10.60;	}	else if (bott_total_qty >= 4 && bott_total_qty <= 6)	{		this_form.delv_total.value = 14.75;	}	else if (bott_total_qty >= 7 && bott_total_qty <= 11)	{		this_form.delv_total.value = 21.26;	}}// do club membershipif (this_form.club_mem.value == 1){	this_form.club_mem_total.value = club_mem_price;}else{	this_form.club_mem_total.value = 0.00;}// do grand totalthis_form.grand_total.value = eval(this_form.ssb_total.value) + eval(this_form.gsm_total.value) + eval(this_form.s_total.value) + eval(this_form.scfm_total.value) + eval(this_form.cs_total.value) + eval(this_form.tp_total.value) + eval(this_form.evoo_total.value) + eval(this_form.delv_total.value) + eval(this_form.club_mem_total.value);}function update_delivery(this_form){this_form.delv_name.value = this_form.card_name.value;this_form.delv_street.value = this_form.card_street.value;this_form.delv_suburb.value = this_form.card_suburb.value;this_form.delv_state.value = this_form.card_state.value;this_form.delv_state.value = this_form.delv_state_alt.value;this_form.delv_postcode.value = this_form.card_postcode.value;}