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

	
// Check entry URL exists.
	if (fv.isEmpty(document.forms[0].entryLink.value))
	{
		fv.raiseError("don't forget to enter your link!");
	}
	
// Check entry URL valid. (see minimal implementation in fv.js)
	if ( !fv.isURL(document.forms[0].entryLink.value) )
	{
		fv.raiseError("enter a valid URL");
	}

//check that email is valid
	if (!fv.isEmpty(document.forms[0].entryEmail.value) && !fv.isEmailAddress(document.forms[0].entryEmail.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;
	}
	
}

	  

