function bookmarkUs() 
{
	window.external.AddFavorite('http://www.grootvadersbosch.co.za', 'Groot Vaders Bosch - Helderberg Accommodation');
}

function openMap(prefix) 
{
	window.open(prefix+'heidelberg-map.html', '', 'resizable=no,scrollbars=no,width=700,height=580,toolbar=no');
}
 
function showEnlarged(prefix, picUrl) 
{
	window.open(prefix+"display-popup.html?"+picUrl, "poppis", "resizable=1,HEIGHT=200,WIDTH=200,Left=20%,Top=20%");
	}
 
function validateContactForm()
{
	fv =  new formValidator();
	
	if (fv.isEmpty("your_name"))
		fv.raiseError("Your name must be specified.");

		
	if (fv.isEmpty("your_email"))
		fv.raiseError("An email address must be specified");
	else
	{	
  		if (!fv.isEmailAddress("your_email"))
			fv.raiseError("A valid email address must be specified");
	}
				
	if (fv.isEmpty("email_subject"))
		fv.raiseError("A subject must be specified.");
		
	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_email"))
		fv.raiseError("An email address must be specified.");
	else
	{	
  		if (!fv.isEmailAddress("your_email"))
			fv.raiseError("A valid email address must be specified.");
	}
				
	if (fv.isEmpty("arrival_date") || (fv.findObj("arrival_date").value == "yyyymmdd"))
		fv.raiseError("An arrival date must be specified.");
		
	if (fv.isEmpty("departure_date") || (fv.findObj("departure_date").value == "yyyymmdd"))
		fv.raiseError("An departure date must be specified.");
		
	if (fv.isEmpty("telephone"))
		fv.raiseError("A telephone number must be specified.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
	  return true;
}
