﻿<!--
function VF_user_login(){ //v2.0
	var theForm = document.form5;
	var numRE = /^\d+$/;
	var alphaRE = /^[a-zA-Z0-9]+$/;
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var errMsg = "";
	var setfocus = "";

	if (theForm['user_pass'].value.length < 6 || theForm['user_pass'].value.length > 18){
		errMsg = "密码长度在6-18位之间，请重新输入！";
		setfocus = "['user_pass']";
	}
		if (theForm['user_pass'].value != ""){
		if (!alphaRE.test(theForm['user_pass'].value)){
			errMsg = "用户密码由字母和数字组成，请重新输入！";
			setfocus = "['user_pass']";
		}
	}
	if (theForm['user_pass'].value == ""){
		errMsg = "密码不能为空，请重新输入！";
		setfocus = "['user_pass']";
	}
	if (theForm['user_name'].value.length < 2 || theForm['user_name'].value.length > 18){
		errMsg = "用户名长度在2-18位之间，请重新输入！";
		setfocus = "['admin_name']";
	}
	if (theForm['user_name'].value != ""){
		if (!alphaRE.test(theForm['user_name'].value)){
			errMsg = "用户名由字母和数字组成，请重新输入！";
			setfocus = "['user_name']";
		}
	}

	if (theForm['user_name'].value == ""){
		errMsg = "用户名不能为空，请重新输入！";
		setfocus = "['user_name']";
	}
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	else theForm.submit();
}
//-->
