<!--
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, "用戶名稱必須於4-15字長之間、及只接受文字和數位。");	
		errfound=true;
	}
	if (!errfound){
		//forceChgPwd();
	}
	return !errfound;
}

function forceChgPwd() {
	if (document.frmLogin.uid.value == document.frmLogin.pwd.value) {
		error(document.frmLogin.uid, "用戶名稱與登入密碼相同，請更改登入密碼。");
		document.frmLogin.changepwd.checked = true;
	}
}
//-->
