function checkReg(form) {
	var fieldtofocus;
	var msg = new Array();
	var idx = 0;
	var phone = new Boolean(false);

	if(!checkEmail(form.e)) {
		msg[idx++] = 'Please enter your email address.';
		if (!fieldtofocus) {
			fieldtofocus = form.e;
		}
	}
	if(isEmpty(form.pw)) {

		msg[idx++] = 'Please enter a password.';
		if (!fieldtofocus) {
			fieldtofocus = form.pw;
		}
	}

	if (msg.length > 0) {
		location.href="#top";
		displayErrors(msg, fieldtofocus);
		
		return false;
	}
	
	return true;
}
