
function enableField() {
//	alert("boo");
	document.getElementById("checkoutButtonShield").id = "checkoutButtonNoShield";
}

function checkFormStatus() {
	var show_pass = false;
	var qty_pass = false;
	// check to see that a qty has been selected
	var qty = document.getElementById("qty").value;
	if(qty > 0) { qty_pass = true; }
	
	// check to see that a show has been selected
	var show = document.getElementById("show").value;
	if(show != "") { show_pass = true; }
	
	if(show_pass && qty_pass) { 
//		alert("show_pass:" + show_pass + " -- qty_pass:"+ qty_pass);
		if(updateCheckoutForm()) {
			enableField();
		} else {
			alert("We're sorry, there was a problem.  Please contact the box office.");
		}
	}
}

function updateCheckoutForm() {
	var show = document.getElementById("show").value;
	var qty = document.getElementById("qty").value;
	var price = 41.00;  // Google expects a per-item prioce, not the total
	
//	alert("show:" + show + " -- qty:"+ qty + " -- price/ea:" + price);
	document.getElementById("BB_BuyButtonForm").item_name_1.value = show;
	document.getElementById("BB_BuyButtonForm").item_description_1.value = show + " -- Please remember, doors open at 6:00pm and the show starts shortly thereafter. Thank you!";
	document.getElementById("BB_BuyButtonForm").item_quantity_1.value = qty;
	document.getElementById("BB_BuyButtonForm").item_price_1.value = price;

	return true;
}



function ticketCost() {
	var qty = document.getElementById("qty").value;
	var price = (qty * 40) + (qty * 1);
	price = "$" + price + ".00";
	document.getElementById("price").innerHTML = price;
	checkFormStatus();
}

