<!--

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; 
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
  	x.src=x.oSrc;
}

function swopPhoto(imgName, imgIdx, imgPage) {
	
	if (ns3up || ie4up) 
		imgOn = ("" + imgName);
		
	document.mainpic.src = "images/gallery/"+imgOn;
	
	document.photoform.imgName.value=imgOn;
	document.photoform.pagevalue.value=imgPage;
	document.photoform.photo.value=imgIdx;
}

function validateSendToFriend()
{
	fv = new formValidator();
		
	if (fv.isEmpty("your_email"))
		fv.raiseError("Please specify your email address.");
	else
	{
		if (!fv.isEmailAddress("your_email"))
			fv.raiseError("Please specify a your valid email address.");
	}
	
	if (fv.isEmpty("friends_email"))
		fv.raiseError("Please specify your friends email address.");
	else
	{
		if (!fv.isEmailAddress("friends_email"))
			fv.raiseError("Please specify a valid email address for your friend.");
	}
	
	if (fv.isEmpty("code"))
		fv.raiseError("Please specify the spam prevention code.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;	
}

function openPhoto(n,c) {
	theURL = "";
	theURL = "photo-display.php?id="+n+"&event="+c;
	window.open(theURL, '', 'resizable=no,scrollbars=no,width=600,height=420');
}

function openEvent(event) 
{
	window.open("event-popup.php?id="+event, "pops2", "scrollbars=no, resizable=no,height=530,width=550,Top=20px;");
}

function openBooking() 
{
	window.open("booking-popup.php", "pops", "scrollbars=yes, resizable=1,height=530,width=550,Top=20px;");
}

function openVIPBooking() 
{
	window.open("vip-popup.php", "pops", "scrollbars=yes, resizable=1,height=530,width=550,Top=20px;");
}

function openSkyyBooking() 
{
	window.open("skyy-popup.php", "pops", "scrollbars=yes, resizable=1,height=590,width=550,Top=20px;");
}

function openEventBooking()
{
	window.open("event-booking.php", "pops", "scrollbars=yes, resizable=1,height=530,width=550,Top=20px;");
}

function validateBookingForm()
{
	fv = new formValidator();
	
	if (fv.findObj("bookingType").value == "Not Specified")
		fv.raiseError("Please specify the booking type.");
	
	if (fv.isEmpty("yourName"))
		fv.raiseError("Please specify your name.");
		
	if (fv.isEmpty("yourTelNo"))
		fv.raiseError("Please specify your telephone number.");
	
	if (fv.isEmpty("email"))
		fv.raiseError("Please specify your email address.");
	else
	{
		if (!fv.isEmailAddress("email"))
			fv.raiseError("Please specify a valid email address.");
	}
	
	if (fv.isEmpty("bookingDate"))
		fv.raiseError("Please specify the booking date.");
		
	if (fv.isEmpty("bookingTime"))
		fv.raiseError("Please specify the booking time.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

-->