
function checkFormContact(form)
{
	var errorstring = "The following errors were encountered:\n\n";
	var formerrors = new Array();
	if(empty(document.contactform.frmName.value))
	{
		formerrors.push(" - must specify name");
	}
	
	if(empty(document.contactform.frmEmail.value))
	{
		formerrors.push(" - must specify an email address");
	}
	else
	{
		if(empty(document.contactform.frmEmail2.value))
		{
			formerrors.push(" - must specify a second email address");
		}
		else
		{
			if(!is_valid_email(document.contactform.frmEmail.value))
			{
				formerrors.push(" - must specify a valid email address");
			}
			else
			{
				if(!is_valid_email(document.contactform.frmEmail2.value))
				{
					formerrors.push(" - must specify a valid second email address");
				}
				else
				{
					if(document.contactform.frmEmail.value != document.contactform.frmEmail2.value)
					{
						formerrors.push(" - email's dont match");
					}					
				}
			}
		}
	}
	if(formerrors.length > 0)
	{
		errorstring += formerrors.join("\n");
		window.alert(errorstring);
		return false;
	}
	return true;
}