// JavaScript Document
function galleryPopup(url, windowname) {
	window.open(url, windowname, 'toolbar=no,resizable=yes,height=550,width=550,left=100,top=100,scrollbars=yes');
}

function imageViewerPopup(url, windowname, features) {
	window.open(url, windowname, features);
}

function validateBookingForm() {
		
		if (document.forms['BookingForm'].Name.value == "" || document.forms['BookingForm'].EMail.value == "")
		{
			alert('Please ensure that you have entered your Name, E-Mail Address and 1st Date choice before submitting the form. \n\nClick OK to go back and amend.');
			return false;
		} 
		else if (document.forms['BookingForm'].EMail.value.indexOf('@') == -1 || document.forms['BookingForm'].EMail.value.indexOf('.') == -1)
		{
			alert('Please enter a valid email address');
			return false;
		}
		else if (document.forms['BookingForm'].FirstDayChoice.value == "" || document.forms['BookingForm'].FirstMonthChoice.value == "" || document.forms['BookingForm'].FirstYearChoice.value == "")
		{
			alert('Please choose your first date choice')
			return false;
		}
		else if ($("input.holidayChoice:checked").length <= 0)
		{
			alert('Please choose at least one preferred holiday choice.')
			return false;
		}
		
								
		if(confirm('Submit booking form?\n\nClick OK to confirm, or Cancel to go back and amend any information you have filled out'))
		{
		return true;
		}
	return false;
}