// check for errors, display appropriate message
function check_err() {

	var errtype = read_param('err');

	switch (errtype) {
		case 'vname':
			self.document.write('You must supply your first and last name! &nbsp; Please try again.');
			break;
		case 'oname':
			self.document.write('You must supply an organization and contact name! &nbsp; Please try again.');
			break;
		case 'len':
			self.document.write('Password length must be 6 to 12 characters long! &nbsp; Please try again.');
			break;
		case 'match': 
			self.document.write('Passwords don\'t match! &nbsp; Please try again.');
			break;
		case 'log': 
			self.document.write('Incorrect email address or password! &nbsp; Please try again.');
			break;
		case 'used':
			output = 'That user name is already registered! &nbsp; If you have forgotten ';
			output += 'your password <a href="/pvsn/resetpwd.html">click here</a>, or try again.';
			self.document.write(output);
			break;
		case 'acct': 
			self.document.write('Login failed! &nbsp; Incorrect email address or password. &nbsp; Please try again.');
			break;
		case 'sys': 
			self.document.write('System Error! &nbsp; Login failed! &nbsp; Please try again.');
			break;
		case 'reg': 
			self.document.write('System Error! &nbsp; Registration failed! &nbsp; Please try again later.');
			break;
		case 'chg': 
			self.document.write('System Error! &nbsp; Account change failed! &nbsp; Please try again later.');
			break;
		case 'usedchg':
			self.document.write('That account is already setup in our database! &nbsp; Please try again.');
			break;
		case 'nochg':
			self.document.write('No changes have been made! &nbsp; Please try again.');
			break;
		case 'nouser':
			self.document.write('User account could not be found! &nbsp; Please try again.');
			break;
		case 'noagree':
			self.document.write('Agreement to "Terms of Use" required to create account! &nbsp; Account not created!');
			break;
		case 'nomail':
			self.document.write('Confirmation e-mail could not be sent! &nbsp; Account not created!');
			break;
		default:
			self.document.write('&nbsp;');
			break;
	}
	return;
}
