// JavaScript Validation for Contact Form
//Check the enquiry form is filled in correctly
function CheckForm () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a Title
	if (document.frmStockSearchFacility.txtLocation.value == ""){
		errorMsg += "Please Enter a location -\n";	
	}
	//Check for a first name
	if (document.frmStockSearchFacility.txtFurnitureType.value == ""){
		errorMsg += "Please Enter a furniture type -\n";	
	}
		

	//If there is a problem with the form then display an error
	if (errorMsg != ""){
		msg = "Please correct the following error(s): -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}
