//Check the enquiry form is filled in correctly
function CheckForm () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a name
	if (document.frmEnquiry.realname.value == ""){
		errorMsg += "\n\tName \t\t- Enter your Name";	
	}
	//Check for a email address
	if (document.frmEnquiry.email.value == ""){
		errorMsg += "\n\tEmail \t\t- Enter your email address";	
	}
	//Check for a country
	if (document.frmEnquiry.country.options[document.frmEnquiry.country.options.selectedIndex].value == ""){
		errorMsg += "\n\tCountry \t\t- Enter your Country";	
	}
	//Check for a subject
	if (document.frmEnquiry.subject.value == ""){
		errorMsg += "\n\tSubject \t\t- Enter a subject";	
	}
			
	//Check for enquiry
	if (document.frmEnquiry.message.value == "") { 
 		errorMsg += "\n\tEnquiry \t\t- Please enter your enquiry";
	}
		
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Your enquiry has not been sent because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}

