
function validateForm () {

	var ref = document.business;
	var error = "";

	if (emptyText(ref.company_name)) error += "- Company Name\n";
	if (emptyText(ref.primary_contact)) error += "- Primary Contact\n";
	if (emptyText(ref.telephone)) error += "- Telephone\n";
	if (emptyText(ref.email)) error += "- Email\n";
	if (!emptyText(ref.email) && !validEmail(ref.email.value)) error += "- Invalid Email\n";
	if (emptyText(ref.category)) error += "- Category\n";
	if (emptyText(ref.funds_sought)) error += "- Funds sought (£)\n";
	if (emptyText(ref.funds_todate)) error += "- Funds raised to date (£)\n";

	if (error != "") {
		alert("Please ensure you fill in the following fields in the form:\n" + error);
		return false;
	}
	else {
		return true;
	}
}

function popWin(URL, WIDTH, HEIGHT) {
	window.open(URL, "popup", "width="+WIDTH+"; HEIGHT="+HEIGHT+"");
}

