function checktext(text)
{
			allValid = false;
		if (text.length < 2)
		{
    		allValid = true;
		}

    	var notuser = "〓＾＼１２３４５６７８９０～！＂＇·＃￥％……ˇ＠¨〈〉「」『』．‖々〃〔〕〖〗—（），。【】《》？；‘：“”［］｛｝—＋＝｜｀、《》~`!@#$%^&*()_+|-=\'?/<>{}[],.:;";

		for (i = 0;  i < text.length;  i++)
		{
			for (j = 0;  j < notuser.length;  j++)
			{
              if (text.charAt(i) == notuser.charAt(j))
              {
				allValid = true;
				break;
              }
			}
			if (text.charAt(i) == " ")
			{
				allValid = true;
				break;
			}
		}

return allValid;
}
//测试用户名是否已经存在
function testname_click() {

  if (edituser.UserName.value == "")
  {
    alert("请输入您的注册名!");
    edituser.UserName.focus();
    return false;
  }

  if (!isNaN(edituser.UserName.value)) {
    alert("不能注册全部为数字帐号!");
    edituser.UserName.focus();
    return false;

  }

  if (checktext(edituser.UserName.value)){
    alert("注册名包含无效字符!");
    edituser.UserName.focus();
    return false;
  }

	loginname=edituser.UserName.value;
	aheight=160;
	awidth=380;
	atop=(screen.height-aheight)/2;
	aleft=(screen.width-awidth)/2;
	window.open("UserRegCheck.asp?UserName="+loginname,"testregname","top="+atop+",left="+aleft+",width="+awidth+",height="+aheight+",resize=no,scrollbars=no");

}
function VF_edituser(){ //v2.0
<!--start_of_saved_settings-->
<!--type,text,name,UserEmail,required,true,isEmail,errMsg,请正确填写邮箱地址。-->
<!--type,text,name,UserQuesion,required,true,errMsg,请填写找回密码的安全问题。-->
<!--type,password,name,Pswc,required,true,isEqualTo,Psw,errMsg,请正确输入确认密码。-->
<!--type,password,name,Psw,required,true,errMsg,请输入密码，最少6个字符。-->
<!--type,text,name,UserName,required,true,fLen,2,15,errMsg,请正确填写您的用户名。-->
<!--end_of_saved_settings-->
	var theForm = document.edituser;
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var errMsg = "";
	var setfocus = "";

	if (!emailRE.test(theForm['UserEmail'].value)){
		errMsg = "请正确填写邮箱地址。";
		setfocus = "['UserEmail']";
	}
	if (theForm['UserQuesion'].value == ""){
		errMsg = "请填写找回密码的安全问题。";
		setfocus = "['UserQuesion']";
	}
	if (theForm['UserName'].value.length < 2 || theForm['UserName'].value.length > 15){
		errMsg = "请正确填写您的用户名。";
		setfocus = "['UserName']";
	}
	if (checktext(theForm['UserName'].value)){
		errMsg = "用户名中包含非法字符，请正确填写您的用户名。";
		setfocus = "['UserName']";
	}
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	else theForm.submit();
}//-->