<!--
function openWindow(url,name) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (392+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = (window.screen.height/2) - (225+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	var popupwindow = window.open(url,name,"directories=0,status=yes,width=785,height=450,resizable=no,scrollbars=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}
		
function openMembership(url,name) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (250+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = (window.screen.height/2) - (175+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	var popupwindow = window.open(url,name,"directories=0,status=yes,width=500,height=350,resizable=no,scrollbars=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}
		
function openTemp(url,name) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (310+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = (window.screen.height/2) - (160+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	var popupwindow = window.open(url,name,"directories=0,status=yes,width=619,height=319,resizable=no,scrollbars=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}
		
function openMBar(url,name) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (385+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = (window.screen.height/2) - (230+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	var popupwindow = window.open(url,name,"directories=0,status=yes,width=760,height=450,resizable=no,scrollbars=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}
		
function openMenu(url,name) {
	var iMyWidth;
	var iMyHeight;
	var browHigh;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (392+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = 0; //half the screen height minus half the new window height (plus 2 pixel edge).
	//iMyHeight = (window.screen.height/2) - (225+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  browHigh = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  browHigh = document.body.offsetHeight;
	 }
	}
var scrnHeight = screen.height -100;

	var popupwindow = window.open(url,name,"directories=0,status=yes,width=785,height=" + scrnHeight + ",resizable=no,scrollbars=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}
		
function openEntertain(url,name) {
	var iMyWidth;
	var iMyHeight;
	var browHigh;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (392+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = 0; //half the screen height minus half the new window height (plus 2 pixel edge).
	//iMyHeight = (window.screen.height/2) - (225+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  browHigh = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  browHigh = document.body.offsetHeight;
	 }
	}
var scrnHeight = screen.height -100;

	var popupwindow = window.open(url,name,"directories=0,status=yes,width=785,height=" + scrnHeight + ",resizable=no,scrollbars=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}

// Centre popups on screen for Photo Gallery //
function openGalleryPage(url,name) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (380+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = (window.screen.height/2) - (300+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	var popupwindow = window.open(url,name,"directories=0,status=yes,width=760,height=600,resizable=no,scrollbars=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}

// Centre popups on screen for Photo Gallery Sub Pages//
function openGalleryIndividual(url,name) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (240+4); //half the screen width minus half the new window width (plus 2 pixel edge).
	iMyHeight = (window.screen.height/2) - (240+4); //half the screen height minus half the new window height (plus 2 pixel edge).
	var popupwindow = window.open(url,name,"directories=0,status=yes,width=480,height=480,resizable=no,scrollbars=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "");
	popupwindow.focus();
		}

// Copyright 2003 Bontrager Connection, LLC
// Code obtained from http://WillMaster.com/
//
// Each required form field can be checked with JavaScript. Here are 
//    the function names for the different kinds of checks:
//
//       1. WithoutContent() -- check if the text, textarea, password, 
//              or file fields has no content.
//       2. NoneWithContent() -- check if none of the set of text, 
//              textarea, password, or file fields have content. 
//              (Set: More than one with the same field name.)
//
//       3. NoneWithCheck() -- check if none of the set of radio buttons 
//              or checkboxes are checked. (Set: More than one with the 
//              same field name.)
//       4. WithoutCheck() -- check if the single radio button or checkbox 
//              is unchecked.
//
//       5. WithoutSelectionValue() -- check if selected drop-down list or 
//              select box entries have no value.
//
//
// The format for using the above functions is
//             if(       WithoutContent([FORMFIELDVALUE])) [ERRORMESSAGE]
//             if(      NoneWithContent([FORMFIELD])     ) [ERRORMESSAGE]
//             if(        NoneWithCheck([FORMFIELD])     ) [ERRORMESSAGE]
//             if(         WithoutCheck([FORMFIELD])     ) [ERRORMESSAGE]
//             if(WithoutSelectionValue([FORMFIELD])     ) [ERRORMESSAGE]
//
// The if(...) part and the error message part may be on separate lines, like
//             if(WithoutContent([FORMFIELDVALUE]))
//                [ERRORMESSAGE]
//             if(NoneWithContent([FORMFIELD]))
//                [ERRORMESSAGE]
//             if(NoneWithCheck([FORMFIELD]))
//                [ERRORMESSAGE]
//             if(WithoutCheck([FORMFIELD]))
//                [ERRORMESSAGE]
//             if(WithoutSelectionValue([FORMFIELD]))
//                [ERRORMESSAGE]
//
//
//      FORMFIELD -- The format for specifying a "form field" is 
//                         document.[FORMNAME].[FIELDNAME]
// FORMFIELDVALUE -- The format for specifying a "form field value" is 
//                         document.[FORMNAME].[FIELDNAME].value
//   ERRORMESSAGE -- The format for specifying an "error message" is
//                         { errormessage += "\n\n[MESSAGE]"; }
//                   If the message itself contains quotation marks, 
//                      they must be preceded with a back slash. 
//                      Example: \"
//
//
//      FORMNAME -- The name assigned to the form in the <FORM... tag. 
//     FIELDNAME -- The field name being checked.
// 
//
// For use with this JavaScript, the only non-alphanumeric character a 
//    fieldname may have is the underscore. Replace any hyphens, colons, 
//    spaces, or other non-alphanumeric characters in your field names 
//    with an underscore character.
//
//
// Put field checks into the function CheckRequiredFields(), in the order 
//    you want the fields checked.
//


function CheckRequiredFields() {
var errormessage = new String();
// Put field checks below this point.

if(WithoutContent(document.booking.Booking_Date.value))
	{ errormessage += "\n\nPlease enter the proposed booking date.";}
if(WithoutSelectionValue(document.booking.Booking_Time))
	{ errormessage += "\n\nPlease select the proposed bookign date from the dropdown.";}
if(WithoutContent(document.booking.Booking_Name.value))
	{ errormessage += "\n\nPlease enter a name for your booking i.e. Joe's Party.";}
if(WithoutContent(document.booking.Number_Of_Guests.value))
	{ errormessage += "\n\nPlease enter the proposed number of guests.";}
if(WithoutContent(document.booking.Contact_Name.value))
	{ errormessage += "\n\nPlease enter your name.";}
if(WithoutContent(document.booking.Telephone.value))
	{ errormessage += "\n\nPlease enter your contact telephone number.";}
if(WithoutContent(document.booking.email.value))
	{ errormessage += "\n\nPlease enter your email address.";}
/*if(WithoutContent(document.booking.redirect.value))
	{ errormessage += "\n\nPlease enter some details.";}*/
if(WithoutContent(document.booking.captcha.value))
	{ errormessage += "\n\nPlease enter the spam captcha word.";}

// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].value.length > 0) { return false; }
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
//		if(ss[i].value != 'Select' || ss[i].value.length) { 
		if(ss[i].value.length) { 
		return false; 
		}
		} 
	} 
return true;
}

////////////////

function CheckRequiredFieldsMember() {
var errormessage = new String();
// Put field checks below this point.

if(WithoutContent(document.membership.Contact_Name.value))
	{ errormessage += "\n\nPlease enter your name.";}
if(WithoutContent(document.membership.Telephone.value))
	{ errormessage += "\n\nPlease enter your contact telephone number.";}
if(WithoutContent(document.membership.email.value))
	{ errormessage += "\n\nPlease enter your email address.";}

// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].value.length > 0) { return false; }
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
//		if(ss[i].value != 'Select' || ss[i].value.length) { 
		if(ss[i].value.length) { 
		return false; 
		}
		} 
	} 
return true;
}

////////////////

function CheckRequiredFieldsBookingMember() {
var errormessage = new String();
// Put field checks below this point.

if(WithoutContent(document.bookingmembership.Contact_Name.value))
	{ errormessage += "\n\nPlease enter your name.";}
if(WithoutContent(document.bookingmembership.email.value))
	{ errormessage += "\n\nPlease enter your email address.";}

// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].value.length > 0) { return false; }
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
//		if(ss[i].value != 'Select' || ss[i].value.length) { 
		if(ss[i].value.length) { 
		return false; 
		}
		} 
	} 
return true;
}
