function validateUserRegister() {
		
	var username = document.getElementById('username').value;
	var password = document.getElementById('password').value;
	var password_confirm = document.getElementById('password_confirm').value;
		
	var msg = '';
	if (username.length == 0) msg = msg + 'A username is required\r\n';
	if (password.length == 0) msg = msg + 'A password is required\r\n';
	if (password_confirm.length == 0) msg = msg + 'A password confirmation is required\r\n';
	//alert("message = " + msg);
	//return false;
	
	if (msg.length > 0) {
		alert(msg);
		return false;
	} else {
		if (password != password_confirm) {
			alert('The password and confirm password do not match');
			return false;
		}
		else if (password.length < 6) {
			alert('The password must be at least 6 characters');
			return false;
		}
			
		return true;
	}
} 