<!--
var REG_EXP=/\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-|\s/;
function isValidCode(code) {
	return ((code.length>0)&&(code.length<=15)&&(!REG_EXP.test(code)));
}

function error(elem, text) {
	if (errfound) return;
	window.alert (text);
	elem.select();
	elem.focus();
}
function Validate() {
	errfound= false
	if (!isValidCode(document.frmLogin.uid.value)){
		error(document.frmLogin.uid, "Username must be at least 4-15 characters.  It can only contain alphabets and numbers, spaces and punctuation are not allowed.");
		errfound=true;
	}
	if (!errfound){
		//forceChgPwd();
	}
	return !errfound;
}

function forceChgPwd() {
	if (document.frmLogin.uid.value == document.frmLogin.pwd.value) {
		error(document.frmLogin.uid, "Username is the same as Password, please change the Password.");
		document.frmLogin.changepwd.checked = true;
	}
}
//-->
