
//ie bookmark functionality
function bookmarkUs()
{
	window.external.AddFavorite('http://www.blommenberg.co.za', 'Blommenberg Guest House - Clanwilliam Accommodation!');
}

//recommend Us pop up screen
//jc
function recommendUs(p)
{
	window.open(p+'recommend.php', '', 'width=420,height=300,scrollable=yes,resizeable=yes')
}

//validate Booking
function validateBooking()
{
	fv =  new formValidator();
	
	if (fv.isEmpty("your_name"))
		fv.raiseError("Please specify your name.");
		
	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("contact_number"))
		fv.raiseError("Please specify your contact number.");
	
	if (fv.isEmpty("arrival_date"))
		fv.raiseError("Please specify your arrival date.");
		
	if (fv.isEmpty("departure_date"))
		fv.raiseError("Please specify your departure date.");
		
	if (fv.isEmpty("no_of_people"))
		fv.raiseError("Please specify the number of people.");
		
	if (fv.isEmpty("comments"))
		fv.raiseError("Please specify your questions or comments");
		
	if (fv.isEmpty("code"))
		fv.raiseError("Please specify the code.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
	  return true;	
	
	return false;
}
