
function checkFields(form){

	if (parseFloat(form.amount.value) == 0){
		alert("Please choose the type of ticket and quantity you would like to purchase.");
		form.quantity_1.focus();
		return false;
	}

	return true;
}

function updateTotal(form){

	var type1_cost = parseInt(form.quantity_1.options[form.quantity_1.selectedIndex].value, 10) * parseFloat(form.type1_cost.value);
	var type2_cost = 0; //parseInt(form.quantity_2.options[form.quantity_2.selectedIndex].value, 10) * parseFloat(form.type2_cost.value);
	var type3_cost = 0; //parseInt(form.quantity_3.options[form.quantity_3.selectedIndex].value, 10) * parseFloat(form.type3_cost.value);

    var total = type1_cost + type2_cost + type3_cost;
       form.amount.value = total;
    
    form.os0.value = form.quantity_1.value + ' tickets @ $' + parseFloat(form.type1_cost.value).toFixed(2);
   // form.os1.value = "0"; //form.quantity_2.value + ' tickets @ $' + parseFloat(form.type2_cost.value).toFixed(2);
   // form.os2.value = "0"; //form.quantity_3.value + ' tickets @ $' + parseFloat(form.type3_cost.value).toFixed(2);
    
    var l = document.getElementById('gTotal');
    l.innerHTML = '<strong>Grand Total $' + total.toFixed(2) + '</strong>';
}
