function errorCheck()
{
	var errorMessage = "";
	var name = " ";
	var email = " ";
	var otherlocation = " ";

	// Getting variables from form
	name = document.forms['faultyreport'].elements['A01-Name'].value;
	email = document.forms['faultyreport'].elements['A02-Email'].value;
	otherlocation = document.forms['faultyreport'].elements['A05-Other_Actual_Location'].value;

	// Checking for empty name field
	if (!name)
	{
		errorMessage = errorMessage + "Please include a name for us to identify you as.\n";
	}

	// Checking for empty email field
	if (!email)
	{
		errorMessage = errorMessage + "Please include an email address for us to contact you!\n";
	}
	// Checking that email is entered in correctly
	else
	{
		emailValue = new String(email);
		emailHasAT = emailValue.indexOf("@");
		emailHasDOT = emailValue.indexOf(".");
		emailHasBLANK = emailValue.indexOf(" ");

		// Basic Email Check
		if((emailHasAT == -1)||(emailHasDOT == -1)||(emailHasBLANK != -1))
		{
			// Checking for blank spaces
			if (emailHasBLANK != -1)
			{
				errorMessage = errorMessage + "Given email contains illegal blank spaces!\n";
			}
			// Checking for missing '@'
			if (emailHasAT == -1)
			{
				errorMessage = errorMessage + "Given email is missing '@'!\n";
			}
			// Checking for missing '.'
			if (emailHasDOT == -1)
			{
				errorMessage = errorMessage + "Given email is missing '.'!\n";
			}
		}
		else // Secondary Email Check
		{
			// Checking for too many '@'s
			if (emailHasAT != emailValue.lastIndexOf("@"))
			{
				errorMessage = errorMessage + "Given email has too many '@'s!\n";
			}
			// Checking for missing domain, ie nothing between '@' & .
			if (emailHasDOT - emailHasAT == 1)
			{
				errorMessage = errorMessage + "Given email is missing a domain between '@' & '.'!\n";
			}
			// Checking for Illegal email, ending with a '.'
			if (emailValue.length - emailValue.lastIndexOf(".") == 1)
			{
				errorMessage = errorMessage + "Given email ended illegally with a '.'!\n";
			}
		}
	}
	if (document.forms['faultyreport'].elements['A03-Problem_Location'][0].checked)
	{
		if (document.forms['faultyreport'].elements['A04-Actual_Location'].selectedIndex == 0)
		{
			errorMessage = errorMessage + "Please select a site from the available options,\nor use the 'Please specify location below' option.\n";
		}
	}
	else
	{
		if (!otherlocation)
		{
			errorMessage = errorMessage + "Please include the location name/description/address for us to identify.\n";
		}
	}
	if (errorMessage)
	{
		alert(errorMessage);
	}
	else
	{
		document.forms['faultyreport'].submit();
	}
}