	// check form values
function checkForm()
{
	// instantiate object
	fv = new formValidator();
	
	// perform checks
// check for correctly entered topic
	if (fv.isEmpty(document.forms[0].topicName.value))
	{
		fv.raiseError("enter your name");
	}
	if (!fv.isEmpty(document.forms[0].topicName.value) && !fv.isAlphabetic(document.forms[0].topicName.value))
	{
		fv.raiseError("enter a correct name");
	}

	
//check for entered topic
	if (fv.isEmpty(document.forms[0].topicTitle.value))
	{
		fv.raiseError("don't forget to enter a topic!");
	}
	if (!fv.isEmpty(document.forms[0].topicTitle.value) && !fv.isAlphaNumeric(document.forms[0].topicTitle.value))
	{
		fv.raiseError("enter a valid title (no special characters)");
	}
	
//check that email is valid
	if (!fv.isEmpty(document.forms[0].topicEmail.value) && !fv.isEmailAddress(document.forms[0].topicEmail.value))
	{
		fv.raiseError("enter a valid email address");
	}
// all done

	// if errors, display, else proceed
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
	{
		return true;
	}
	
}

	  

