function enlarge(prefix, picUrl) 
{
	window.open(prefix+"display-popup.html?"+picUrl, "poppis", "resizable=1,HEIGHT=350,WIDTH=350,Left=20%,Top=20%");
}

function openMap() {
	window.open('franschhoek-map.shtml','','resizable=no,scrollbars=no,width=430,height=470');
}
 
function validateContactForm()
{
	fv =  new formValidator();
	
	if (fv.isEmpty("your_name"))
		fv.raiseError("Your name must be specified.");

		
	if (fv.isEmpty("your_email"))
		fv.raiseError("Your email address must be specified");
	else
	{	
  		if (!fv.isEmailAddress("your_email"))
			fv.raiseError("A valid email address must be specified");
	}
	
	if (fv.isEmpty("your_subject"))
		fv.raiseError("Please specify a subject.");
		
	if (fv.isEmpty("comments"))
		fv.raiseError("Comment(s)/ Question(s) must be specified.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
	  return true;
}

function validateBookingForm()
{
	fv =  new formValidator();
	
	if (fv.isEmpty("your_name"))
		fv.raiseError("Your name must be specified.");
		
	if (fv.isEmpty("your_surname"))
		fv.raiseError("Please specify your surname.");

		
	if (fv.isEmpty("your_email"))
		fv.raiseError("Your email address must be specified");
	else
	{	
  		if (!fv.isEmailAddress("your_email"))
			fv.raiseError("A valid email address must be specified");
	}
	
	if (fv.isEmpty("your_postal"))
		fv.raiseError("Please specify a postal address.");
		
	if (fv.isEmpty("your_state"))
		fv.raiseError("Please specify your state/province.");
		
	if (fv.isEmpty("your_tel"))
		fv.raiseError("Please specify your telephone number.");
		
	if (fv.isEmpty("your_fax"))
		fv.raiseError("Please specify your fax number.");
		
	if (fv.isEmpty("your_arrival"))
		fv.raiseError("Please specify your date of arrival.");
		
	if (fv.isEmpty("your_departure"))
		fv.raiseError("Please specify your date of departure.");
		
	if (fv.isEmpty("your_rooms"))
		fv.raiseError("Please specify the number of rooms.");
		
	if (fv.isEmpty("your_people"))
		fv.raiseError("Please specify the number of people.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
	  return true;
}