function checkout() 
{
	var myTotal = 0;
	
	// Update the ticket price here
	var ticket_price1 = 25; // Sections 5(L), 5(R), 5(C)
	var ticket_price11 = 20; // with Student/Senior/Child/Disability Discount
	var ticket_price111 = 35; // with Dance
	var ticket_price1111 = 30; // with Dance & Student/Senior/Child/Disability Discount
	var ticket_price2 = 35; // Sections 3(L), 3(R), 4(C)
	var ticket_price22 = 30; // with Student/Senior/Child/Disability Discount
	var ticket_price222 = 40; // with Dance
	var ticket_price2222 = 35; // with Dance & Student/Senior/Child/Disability Discount
	var ticket_price3 = 50; // Sections 2(L), 2(R), 3(C)
	var ticket_price33 = 45; // with Student/Senior/Child/Disability Discount
	var ticket_price4 = 75; // Sections 1(L), 1(R), 2(C)
	var ticket_price44 = 70; // with Student/Senior/Child/Disability Discount
	var ticket_price5 = 100; // Section 1(C)
	var ticket_price55 = 95; // with Student/Senior/Child/Disability Discount
	var ticket_price6 = 20; // Wheelchair Seating Sections W1(L), W1(R), W5(L)
	var ticket_price66 = 15; // with Student/Senior/Child
	var ticket_price7 = 15; // Dance Only
	var ticket_price77 = 10; // with Student/Senior/Child/Disability Discount
	var ticket_price18 = 20; // VIP Reception Only
	var ticket_price188 = 15; // with Student/Senior/Child/Disability Discount

	var description = '03 - A Taste of the Arts Gala - ';
	var quantity = 0;
	eventName = 'A Taste of the Arts Gala';
	//Calculate Values...
	
	//Cast all the form fields to integers...
	document.donation.user1.value=parseInt(document.donation.user1.value);
	document.donation.user11.value=parseInt(document.donation.user11.value);
	document.donation.user111.value=parseInt(document.donation.user111.value);
	document.donation.user1111.value=parseInt(document.donation.user1111.value);
	document.donation.user2.value=parseInt(document.donation.user2.value);
	document.donation.user22.value=parseInt(document.donation.user22.value);
	document.donation.user222.value=parseInt(document.donation.user222.value);
	document.donation.user2222.value=parseInt(document.donation.user2222.value);
	document.donation.user3.value=parseInt(document.donation.user3.value);
	document.donation.user33.value=parseInt(document.donation.user33.value);
	document.donation.user4.value=parseInt(document.donation.user4.value);
	document.donation.user44.value=parseInt(document.donation.user44.value);
	document.donation.user5.value=parseInt(document.donation.user5.value);
	document.donation.user55.value=parseInt(document.donation.user55.value);
	document.donation.user6.value=parseInt(document.donation.user6.value);
	document.donation.user66.value=parseInt(document.donation.user66.value);
	document.donation.user7.value=parseInt(document.donation.user7.value);
	document.donation.user77.value=parseInt(document.donation.user77.value);
	document.donation.user18.value=parseInt(document.donation.user18.value);
	document.donation.user188.value=parseInt(document.donation.user188.value);
	document.donation.user49.value=parseInt(document.donation.user49.value);

	myTotal += (ticket_price1 * parseInt(document.donation.user1.value));
	myTotal += (ticket_price11 * parseInt(document.donation.user11.value));
	myTotal += (ticket_price111 * parseInt(document.donation.user111.value));
	myTotal += (ticket_price1111 * parseInt(document.donation.user1111.value));
	myTotal += (ticket_price2 * parseInt(document.donation.user2.value));
	myTotal += (ticket_price22 * parseInt(document.donation.user22.value));
	myTotal += (ticket_price222 * parseInt(document.donation.user222.value));
	myTotal += (ticket_price2222 * parseInt(document.donation.user2222.value));
	myTotal += (ticket_price3 * parseInt(document.donation.user3.value));
	myTotal += (ticket_price33 * parseInt(document.donation.user33.value));
	myTotal += (ticket_price4 * parseInt(document.donation.user4.value));
	myTotal += (ticket_price44 * parseInt(document.donation.user44.value));
	myTotal += (ticket_price5 * parseInt(document.donation.user5.value));
	myTotal += (ticket_price55 * parseInt(document.donation.user55.value));
	myTotal += (ticket_price6 * parseInt(document.donation.user6.value));
	myTotal += (ticket_price66 * parseInt(document.donation.user66.value));
	myTotal += (ticket_price7 * parseInt(document.donation.user7.value));
	myTotal += (ticket_price77 * parseInt(document.donation.user77.value));
	myTotal += (ticket_price18 * parseInt(document.donation.user18.value));
	myTotal += (ticket_price188 * parseInt(document.donation.user188.value));
	myTotal += parseInt(document.donation.user49.value);
	myTotal += parseInt(document.donation.hiddendonationlevel.value);

	document.donation.total.value=myTotal;
	document.donation.AMOUNT.value=myTotal;
	
	if (document.donation.user1.value != 0)	{
		description += document.donation.user1.value + ' $25 Performance Ticket(s) ';}

	if (document.donation.user11.value != 0)	{
		description += ', ' + document.donation.user11.value + ' $20 S/S/C/D Performance Ticket(s) ';}

	if (document.donation.user111.value != 0)	{
		description += ', ' + document.donation.user111.value + ' $35 Performance and Dance Ticket(s) ';}

	if (document.donation.user1111.value != 0)	{
		description += ', ' + document.donation.user1111.value + ' $30 S/S/C/D Performance and Dance Ticket(s) ';}

	if (document.donation.user2.value != 0)	{
		description += ', ' + document.donation.user2.value + ' $35 Performance Ticket(s)';}

	if (document.donation.user22.value != 0)	{
		description += ', ' + document.donation.user22.value + ' $30 S/S/C/D Performance Ticket(s) ';}

	if (document.donation.user222.value != 0)	{
		description += ', ' + document.donation.user222.value + ' $40 Performance and Dance Ticket(s) ';}

	if (document.donation.user2222.value != 0)	{
		description += ', ' + document.donation.user2222.value + ' $35 S/S/C/D Performance and Dance Ticket(s) ';}

	if (document.donation.user3.value != 0)	{
		description += ', ' + document.donation.user3.value + ' $50 Performance Ticket(s) (VIP Reception and Dance Included) ';}

	if (document.donation.user33.value != 0)	{
		description += ', ' + document.donation.user33.value + ' $45 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included) ';}	

	if (document.donation.user4.value != 0)	{
		description += ', ' + document.donation.user4.value + ' $75 Performance Ticket(s) (VIP Reception and Dance Included) ';}

	if (document.donation.user44.value != 0)	{
		description += ', ' + document.donation.user44.value + ' $70 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included) ';}	

	if (document.donation.user5.value != 0)	{
		description += ', ' + document.donation.user5.value + ' $100 Performance Ticket(s) (VIP Reception and Dance Included) ';}

	if (document.donation.user55.value != 0)	{
		description += ', ' + document.donation.user55.value + ' $95 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included) ';}	

	if (document.donation.user6.value != 0)	{
		description += ', ' + document.donation.user6.value + ' $20 Wheelchair Performance Ticket(s) (VIP Reception and Dance Included) ';}

	if (document.donation.user66.value != 0)	{
		description += ', ' + document.donation.user66.value + ' $15 S/S/C Wheelchair Performance Ticket(s) (VIP Reception and Dance Included) ';}	

	if (document.donation.user7.value != 0)	{
		description += ', ' + document.donation.user7.value + ' $15 Social Dance Only Ticket(s) ';}

	if (document.donation.user77.value != 0)	{
		description += ', ' + document.donation.user77.value + ' $10 S/S/C/D Social Dance Only Ticket(s) ';}	
		
	if (document.donation.user18.value != 0)	{
		description += ', ' + document.donation.user18.value + ' $20 VIP Reception Only Ticket(s) ';}

	if (document.donation.user188.value != 0)	{
		description += ', ' + document.donation.user188.value + ' $15 S/S/C/D VIP Reception Only Ticket(s) ';}	

	description += ' for ' + document.donation.eventDate.value;

	// If there is a donation level, then add it to the description.
	if (document.donation.hiddendonationlevel.value != 0) 
	{ description += ', and a $' + document.donation.hiddendonationlevel.value + ' donation.';}

	if (document.donation.user49.value != 0) 
	{ description += ', and a $' + document.donation.user49.value + ' donation.';}

	quantity = eval(parseInt(document.donation.user1.value) + parseInt(document.donation.user11.value) + parseInt(document.donation.user111.value) + parseInt(document.donation.user1111.value) + parseInt(document.donation.user2.value) + parseInt(document.donation.user22.value) + parseInt(document.donation.user222.value) + parseInt(document.donation.user2222.value) + parseInt(document.donation.user3.value) + parseInt(document.donation.user33.value) + parseInt(document.donation.user4.value) + parseInt(document.donation.user44.value) + parseInt(document.donation.user5.value) + parseInt(document.donation.user55.value) + parseInt(document.donation.user6.value) + parseInt(document.donation.user66.value) + parseInt(document.donation.user7.value) + parseInt(document.donation.user77.value) + parseInt(document.donation.user18.value) + parseInt(document.donation.user188.value));
	//alert(document.donation.hiddendonationlevel.value);

	//Assign Values to the form fields...
	document.donation.USER8.value = quantity;
	document.donation.DESCRIPTION.value = description;
	document.donation.USER9.value = eventName + ' - ' + document.donation.eventDate.value;
	
} // end checkout()
	
function validateForm(theForm)
	{
	  //Assume everything to be ok.
	  var returnVal=true;
	
	  //But return false if the name has not been entered.
	  if (!validRequired(theForm.name,"Name"))
		return returnVal=false;

	  //But return false if the phone number has not been entered.
	  if (!validRequired(theForm.phone,"Phone number"))
		return returnVal=false;

	  //Return false if the email is not valid.
	  //Don't require the email though, validate only if they enter something.
	  if (theForm.email != "") {
	  if (!validEmail(theForm.email,"Email Address",false))
		return returnVal=false;
	  }

	  //Make sure they enter a quantity of tickets.
	  if ( parseInt(theForm.user1.value)==0 && parseInt(theForm.user11.value)==0 && parseInt(theForm.user111.value)==0 && parseInt(theForm.user1111.value)==0 && parseInt(theForm.user2.value)==0 && parseInt(theForm.user22.value)==0 && parseInt(theForm.user222.value)==0 && parseInt(theForm.user2222.value)==0 && parseInt(theForm.user3.value)==0 && parseInt(theForm.user33.value)==0 && parseInt(theForm.user4.value)==0 && parseInt(theForm.user44.value)==0 && parseInt(theForm.user5.value)==0 && parseInt(theForm.user55.value)==0 && parseInt(theForm.user6.value)==0 && parseInt(theForm.user66.value)==0 && parseInt(theForm.user7.value)==0 && parseInt(theForm.user77.value)==0 && parseInt(theForm.user18.value)==0 && parseInt(theForm.user188.value)==0)
	  {
		alert("Ticket quantity cannot be zero, please enter a quantity.");
		theForm.user1.focus();
		return returnVal=false;
	  }
	  
	  if (!isNotNum(theForm.user1,'$25 Performance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user1,'$25 Performance Ticket')) {return returnVal=false;}
	  
	  if (!isNotNum(theForm.user11,'$20 S/S/C/D Performance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user11,'$20 S/S/C/D Performance Ticket')) {return returnVal=false;}

	  if (!isNotNum(theForm.user111,'$35 Performance and Dance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user111,'$35 Performance and Dance Ticket')) {return returnVal=false;}

	  if (!isNotNum(theForm.user1111,'$30 S/S/C/D Performance and Dance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user1111,'$30 S/S/C/D Performance and Dance Ticket')) {return returnVal=false;}

	  if (!isNotNum(theForm.user2,'$35 Performance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user2,'$35 Performance Ticket')) {return returnVal=false;}

	  if (!isNotNum(theForm.user22,'$30 S/S/C/D Performance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user22,'$30 S/S/C/D Performance Ticket')) {return returnVal=false;}

	  if (!isNotNum(theForm.user222,'$40 Performance and Dance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user222,'$40 Performance and Dance Ticket')) {return returnVal=false;}

	  if (!isNotNum(theForm.user2222,'$35 S/S/C/D Performance and Dance Ticket')) {return returnVal=false;}
	  if (!isPositive(theForm.user2222,'$35 S/S/C/D Performance and Dance Ticket')) {return returnVal=false;}

	  if (!isNotNum(theForm.user3,'$50 Performance Ticket (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user3,'$50 Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user33,'$45 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user33,'$45 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user4,'$75 Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user4,'$75 Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user44,'$70 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user44,'$70 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user5,'$100 Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user5,'$100 Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user55,'$95 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user55,'$95 S/S/C/D Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user6,'$20 Wheelchair Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user6,'$20 Wheelchair Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user6,'$15 S/S/C Wheelchair Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}
	  if (!isPositive(theForm.user6,'$15 S/S/C Wheelchair Performance Ticket(s) (VIP Reception and Dance Included)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user7,'$15 Social Dance Only Ticket(s)')) {return returnVal=false;}
	  if (!isPositive(theForm.user7,'$15 Social Dance Only Ticket(s)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user77,'$10 S/S/C/D Social Dance Only Ticket(s)')) {return returnVal=false;}
	  if (!isPositive(theForm.user77,'$10 S/S/C/D Social Dance Only Ticket(s)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user18,'$20 VIP Reception Only Ticket(s)')) {return returnVal=false;}
	  if (!isPositive(theForm.user18,'$20 VIP Reception Only Ticket(s)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user188,'$15 S/S/C/D VIP Reception Only Ticket(s)')) {return returnVal=false;}
	  if (!isPositive(theForm.user188,'$15 S/S/C/D VIP Reception Only Ticket(s)')) {return returnVal=false;}

	  if (!isNotNum(theForm.user49,'Donation')) {return returnVal=false;}
	  if (!isPositive(theForm.user49,'Donation')) {return returnVal=false;}
	  
	  return returnVal;
	}
	
function isNotNum(theField, fieldLabel) { 
	if (isNaN(theField.value)) {
		alert('Please check the "' + fieldLabel + '" quantity field!');
		theField.value=0;
		return false;
	} else {return true;}
}

function isPositive(theField, fieldLabel) {
	if (theField.value < 0) {
		alert ('The "' + fieldLabel + '" field cannot be negative!');
		theField.focus();
		return false;
	} else {return true;}
}