function toggleGift()
	{
	
	if (document.getElementById('gift').checked == true)
		{
		$('#giftbox').show('slow');
		}
	else
		{
		$('#giftbox').hide('slow');
		}
	}

function validateEventForm()
	{
	var reqErrors = "";
	var ccErrors = "";
	
	// Personal Details //
	if (document.getElementById('event').value == "")
		{
		reqErrors += "- Event Selection\n";
		}
	if (document.getElementById('attendees').value == "" || document.getElementById('attendees').value == "0")
		{
		reqErrors += "- Number of Attendees\n";
		}
	if (document.getElementById('name').value == "")
		{
		reqErrors += "- Your Name\n";
		}
	if (document.getElementById('email').value == "")
		{
		reqErrors += "- Email Address \n";
		}
	else
		{
		// Check email validity //
		if (document.getElementById('email').value.indexOf("@") == -1)
			{
			reqErrors += "- Valid Email Address\n";
			}
		else if (document.getElementById('email').value.indexOf(".") == -1)
			{
			reqErrors += "- Valid Email Address\n";
			}
		}
	if (document.getElementById('tel').value == "")
		{
		reqErrors += "- Telephone Number \n";
		}
	
	// Credit Card Details //
	if (document.getElementById('ccnumber').value == "")
		{
		ccErrors += "- Credit Card Number\n";
		}
	else
		{
		// Check credit card validity //
		myCardNo = document.getElementById('ccnumber').value;
		myCardType = document.getElementById('cctype').value;
		if (checkCreditCard (myCardNo,myCardType))
			{
			}
		else
			{
			ccErrors += "- Valid Credit Card Number\n";
			}
		}
	if (document.getElementById('ccexpirationmonth').value == "MM" || document.getElementById('ccexpirationyear').value == "YY")
		{
		ccErrors += "- Expiration Date\n";
		}
	if (document.getElementById('ccsecuritycode').value == "")
		{
		ccErrors += "- Security Code (CSC/CVD)\n";
		}
	if (document.getElementById('ccname').value == "")
		{
		ccErrors += "- Card Holder's Name\n";
		}
	if (document.getElementById('ccaddress1').value == "")
		{
		ccErrors += "- Billing Address\n";
		}
	if (document.getElementById('cccity').value == "")
		{
		ccErrors += "- City\n";
		}
	if (document.getElementById('ccstate').value == "")
		{
		ccErrors += "- State / County / Province\n";
		}
	if (document.getElementById('cczip').value == "")
		{
		ccErrors += "- Zip / Postal Code\n";
		}
	if (document.getElementById('cccountry').value == "")
		{
		ccErrors += "- Country\n";
		}
		
	
	// Check for errors and submit //
	if (reqErrors && ccErrors)
		{
		alert('Please enter the following missing information:\n\n'+reqErrors+'\n\nAlso, please enter the following credit card information:\n\n'+ccErrors);
		return false;
		}
	else if (reqErrors)
		{
		alert('Please enter the following missing information:\n\n'+reqErrors);
		return false;
		}
	else if (ccErrors)
		{
		alert('Please enter the following credit card information:\n\n'+ccErrors);
		return false;
		}
	else
		{
		if (confirm('By clicking \'OK\' you agree for your credit card to be billed for the cost of attendance for the number of attendees specified.\n\nAre you sure?'))
			{
			return true;
			}
		else
			{
			return false;
			}
		}
	}

function validateClubForm()
	{
	var reqErrors = "";
	var ccErrors = "";
	
	// Personal Details //
	if (document.getElementById('bottles').value == "")
		{
		reqErrors += "- Number of Bottles\n";
		}
	if (document.getElementById('name').value == "")
		{
		reqErrors += "- Your Name\n";
		}
	if (document.getElementById('email').value == "")
		{
		reqErrors += "- Email Address \n";
		}
	else
		{
		// Check email validity //
		if (document.getElementById('email').value.indexOf("@") == -1)
			{
			reqErrors += "- Valid Email Address\n";
			}
		else if (document.getElementById('email').value.indexOf(".") == -1)
			{
			reqErrors += "- Valid Email Address\n";
			}
		}
	if (document.getElementById('tel').value == "")
		{
		reqErrors += "- Telephone Number \n";
		}
	if (document.getElementById('same').checked != true)
		{
		if (document.getElementById('deladdress1').value == "")
			{
			reqErrors += "- Delivery Address\n";
			}
		if (document.getElementById('delcity').value == "")
			{
			reqErrors += "- Delivery City\n";
			}
		if (document.getElementById('delstate').value == "")
			{
			reqErrors += "- Delivery State / County / Province\n";
			}
		if (document.getElementById('delzip').value == "")
			{
			reqErrors += "- Delivery Zip / Postal Code\n";
			}
		if (document.getElementById('delcountry').value == "")
			{
			reqErrors += "- Delivery Country\n";
			}
		}
	if (document.getElementById('gift').checked == true)
		{
		if (document.getElementById('recipname').value == "")
			{
			reqErrors += "- Recipient Name for Gift\n";
			}
		if (document.getElementById('giftmessage').value == "")
			{
			reqErrors += "- Personal Message for Gift\n";
			}
		}
	
	// Credit Card Details //
	if (document.getElementById('ccnumber').value == "")
		{
		ccErrors += "- Credit Card Number\n";
		}
	else
		{
		// Check credit card validity //
		myCardNo = document.getElementById('ccnumber').value;
		myCardType = document.getElementById('cctype').value;
		if (!(checkCreditCard (myCardNo,myCardType)))
			{
			ccErrors += "- Valid Credit Card Number\n";
			}
		}
	if (document.getElementById('ccexpirationmonth').value == "MM" || document.getElementById('ccexpirationyear').value == "YY")
		{
		ccErrors += "- Expiration Date\n";
		}
	if (document.getElementById('ccsecuritycode').value == "")
		{
		ccErrors += "- Security Code (CSC/CVD)\n";
		}
	if (document.getElementById('ccname').value == "")
		{
		ccErrors += "- Card Holder's Name\n";
		}
	if (document.getElementById('ccaddress1').value == "")
		{
		ccErrors += "- Billing Address\n";
		}
	if (document.getElementById('cccity').value == "")
		{
		ccErrors += "- City\n";
		}
	if (document.getElementById('ccstate').value == "")
		{
		ccErrors += "- State / County / Province\n";
		}
	if (document.getElementById('cczip').value == "")
		{
		ccErrors += "- Zip / Postal Code\n";
		}
	if (document.getElementById('cccountry').value == "")
		{
		ccErrors += "- Country\n";
		}
		
	
	// Check for errors and submit //
	if (reqErrors && ccErrors)
		{
		alert('Please enter the following missing information:\n\n'+reqErrors+'\n\nAlso, please enter the following credit card information:\n\n'+ccErrors);
		return false;
		}
	else if (reqErrors)
		{
		alert('Please enter the following missing information:\n\n'+reqErrors);
		return false;
		}
	else if (ccErrors)
		{
		alert('Please enter the following credit card information:\n\n'+ccErrors);
		return false;
		}
	else
		{
		if (confirm('By clicking \'OK\' you agree for your credit card to be billed for the cost of wine shipments and for any membership fees that might apply (we will contact you if this is necessary).\n\nAre you sure?'))
			{
			return true;
			}
		else
			{
			return false;
			}
		}
	}
