function checkForm()
{
	aError = new Array();
	oForm = document.forms[0];
	n = 0;
	
	if ( ( oForm.firstname.value == "" ) || ( oForm.lastname.value == "" ) || ( oForm.company.value == "" ) || ( oForm.title.value == "" ) || ( oForm.email.value == "" ) || ( oForm.email_confirm.value == "" ) || ( oForm.zipcode.value == "" ) )
	{
		aError[n] = "All fields are required.";
		n++;
	} 
	
	if ( oForm.email.value != oForm.email_confirm.value )
	{
		aError[n] = "Email addresses do not match.";
		n++;
	}
	
	if ( aError.length > 0 )
	{
		displayAlert(aError);
		return true;
	}
}

function displayAlert(aError)
{
	sError = "Please correct the following and submit the form again:\r\n";

	for ( n = 0; n < aError.length; n++ )
	{
		sError += aError[n] + "\r\n";
	}
	
	alert(sError);
}