function checkSubmission() 
    {

        if (document.Bookingform.GuestName.value == "") 
        {
        alert("Please enter your name.");
        return false;
        }
       
       if (document.Bookingform.Mailfrom.value.indexOf("@") == -1 ||
            document.Bookingform.Mailfrom.value == "") 
        {
        alert("Please include a valid email address.");
        return false;
        }
       
    }
    
function checkSubmission2() 
    {

        if (document.Wineform.Name.value == "") 
        {
        alert("Please enter your name.");
        return false;
        }
       
       if (document.Wineform.Mailfrom.value.indexOf("@") == -1 ||
            document.Wineform.Mailfrom.value == "") 
        {
        alert("Please include a valid email address.");
        return false;
        }
		
		if (document.Wineform.AgeConfirmed.value == "No") {
		alert("Wine can only be sold to persons 18 years and over, please select yes from the confirmation menu if applicable.");
		return false;
		}

       
    }
  $(document).ready(function() {
            $('.cc-container').ccvalidate({ onvalidate: function(isValid) {
                if (!isValid) {
                    alert('Incorrect Credit Card format');
                    return false;
                }
            }
            });

            $('#check').click(function() {
                var cnumber = $('#cnumber').val();
                var type = $('#ctype').val();
                alert(isValidCreditCard(cnumber, type) ? 'Valid' : 'Invalid');
            });
        });
