// check for a validly formatted email address
function checkEmail(testval) {
	if (testval.indexOf('\@') < 1 || testval.indexOf('.') == -1 ||
		testval.lastIndexOf('.') < testval.indexOf('\@') + 2 ||
		testval.lastIndexOf('.') >= testval.length - 2 ||
		testval.indexOf('\@') != testval.lastIndexOf('\@') ||
		testval.indexOf('\'') >= 0 || testval.indexOf(' ') >= 0
	) {
		return false;
	}
	return true;
}