function CheckForm () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a company name
	if (document.frmEnquiry.CName.value == ""){
		errorMsg += "\n\Company Name \t- Please enter your Company Name";	
	}
	
	//Check for a contact name
	if (document.frmEnquiry.Name.value == ""){
		errorMsg += "\n\Contact Name \t- Please enter your Contact Name";	
	}
	
	//Check for a phone number
	if (document.frmEnquiry.Phone.value == ""){
		errorMsg += "\n\Phone \t- Please enter your Phone Number";	
	}

	//Check for a city & state
	if (document.frmEnquiry.CityState.value == ""){
		errorMsg += "\n\City, State \t- Please enter your City & State";	
	}

	//Check for a number of employees
	if (document.frmEnquiry.Employees.value == ""){
		errorMsg += "\n\Number of Employees \t- Please enter Number of Employees";	
	}

	//Check for an e-mail address and that it is valid
	if ((document.frmEnquiry.Email.value == "") || (document.frmEnquiry.Email.value.length > 0 && (document.frmEnquiry.Email.value.indexOf("@",0) == - 1 || document.frmEnquiry.Email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\Email Address \t- Please enter a valid e-mail address";
	}
			
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Your inquiry can not been sent because there are problems 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;
}
