<!--
function validateCityAndExperience()
{
	fv = new formValidator();

	if (!fv.isSelected("city"))
		fv.raiseError("Please specify a city.");
		
	if (!fv.isSelected("experience"))
		fv.raiseError("Please specify an experience.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;

}

function confirmDelete(entity, entityValue) 
{
	return confirm("Are you sure you want to delete this " + entity + " (" + entityValue + ")?");
}

function validateAttribute()
{
	fv = new formValidator();

	if (fv.isEmpty("attribute_name"))
		fv.raiseError("Please specify an attribute name.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

function validateCountry()
{
	fv = new formValidator();

	if (fv.isEmpty("country_name"))
		fv.raiseError("Please specify a country name.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

function validateCity()
{
	fv = new formValidator();

	if (fv.isEmpty("city"))
		fv.raiseError("Please specify a city name.");

	if (!fv.isSelected("country"))
		fv.raiseError("Please specify a country.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

function validateLuxuryLevel()
{
	fv = new formValidator();

	if (fv.isEmpty("luxury_level_name"))
		fv.raiseError("Please specify a luxury level name.");

	if (!fv.isSelected("sort_order"))
		fv.raiseError("Please specify a sort order.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

function validateExperience()
{
	fv = new formValidator();

	if (fv.isEmpty("experience_name"))
		fv.raiseError("Please specify a luxury level name.");

	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

function validatePage()
{
	fv = new formValidator();

	if (fv.isEmpty("page_name"))
		fv.raiseError("Please specify a page name.");

	if (fv.isEmpty("constant_name"))
		fv.raiseError("Please specify a page constant.");
		
	if (fv.isEmpty("page_text"))
		fv.raiseError("Please specify page text.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

function validateServiceProvider()
{
	fv = new formValidator();
	
	if (fv.isEmpty("service_provider_name"))
		fv.raiseError("Please specify a service provider name.");
		
	if (fv.isEmpty("contact_person"))
		fv.raiseError("Please specify a contact person.");
		
	if (fv.isEmpty("address"))
		fv.raiseError("Please specify an address.");
		
	if (fv.isEmpty("telephone"))
		fv.raiseError("Please specify a telephone number.");
		
	if (fv.isEmpty("email_address"))
		fv.raiseError("Please specify an email address.");
	else
	if (!fv.isEmailAddress("email_address"))
		fv.raiseError("Please specify a valid email address.");

	if (fv.isEmpty("website_address"))
		fv.raiseError("Please specify a website address.");

	if (fv.isEmpty("places_to_book"))
		fv.raiseError("Please specify places to book.");

	if (fv.isEmpty("stellar_performance"))
		fv.raiseError("Please specify stellar performance.");
		
	if (fv.isEmpty("guide_price"))
		fv.raiseError("Please specify the guide price.");
		
	//if (fv.isEmpty("reason_to_buy"))
	//	fv.raiseError("Please specify the reason to buy.");
		
	if (!fv.isSelected("experience"))
		fv.raiseError("Please specify an experience.");
		
	if (!fv.isSelected("city"))
		fv.raiseError("Please specify a city.");
		
	if (!fv.isSelected("luxury_level"))
		fv.raiseError("Please specify a luxury_level.");
		
	if (fv.isEmpty("username"))
		fv.raiseError("Please specify a username.");
		
	if (fv.isEmpty("password"))
		fv.raiseError("Please specify a password.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

function validateServiceProviderFind()
{
	fv = new formValidator();
	
	if (fv.isEmpty("search_term"))
		fv.raiseError("Please specify a search term.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}
-->
