
function checkForm(frm)
{
	frm = document.getElementById(frm);

	failed = new Array();

	if (frm["firstname"].value == "") failed.push("First name");
	if (frm["surname"].value == "") failed.push("Surname");
	if (frm["email"].value == "") failed.push("E-mail");
	if (frm["telephone"].value == "") failed.push("Telephone");
	if (frm["address"].value == "") failed.push("Address");
	if (frm["city"].value == "") failed.push("City");
	if (frm["county"].value == "") failed.push("County");
	if (frm["country"].value == "") failed.push("Country");


	if ( (frm["password"].value != frm["confirmp"].value) || frm["password"].value =="" )  failed.push("Passwords do not match");


	if (failed.length > 0)
	{
	fails = "";
		for (i=0; i<failed.length; i++)
		{
			fails += failed[i] + "\n";
		}

		alert("You haven't filled in the following:\n"+ fails);
	} else {
		frm.submit();
	}


}