﻿function LoginFormgotopwd(theform)
{
var tt="";
var regW =/\W/;
var regEmail =/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
  if(theform.username.value.length < 6){tt=tt+"1) 用户名不正确。\n";}
  if(theform.userpwd1.value.length < 6){tt=tt+"2) 密码不正确。\n";}
  if(theform.userpwd2.value.length < 6){tt=tt+"3) 密码不正确。\n";}
  if(theform.userpwd1.value != theform.userpwd2.value){tt=tt+"4) 二次密码不一致。\n";}
  if(theform.userma.value.length != 5){tt=tt+"5) 请输入5位验证码。\n";}
  if (regEmail.test(theform.email.value) && theform.email.value.length>7){}else{tt=tt+"6) 请输入正确的邮箱。\n";}
   if (tt.length<=0){
       return true;
   }else{
       tt="请输入正确的登录资料\n\n"+tt;
       alert(tt); 
       return false;
   } 
}
function LoginFormgotopwdEN(theform)
{
var tt="";
var regW =/\W/;
var regEmail =/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
  if(theform.username.value.length < 6){tt=tt+"1) Username is incorrect.\n";}
  if(theform.userpwd1.value.length < 6){tt=tt+"2) Password is incorrect.\n";}
  if(theform.userpwd2.value.length < 6){tt=tt+"3) Password is incorrect.\n";}
  if(theform.userpwd1.value != theform.userpwd2.value){tt=tt+"4) Second password inconsistent.\n";}
  if(theform.userma.value.length != 5){tt=tt+"5) Please enter the code 5.\n";}
  if (regEmail.test(theform.email.value) && theform.email.value.length>7){}else{tt=tt+"6) Please enter the correct e-mail.\n";}
   if (tt.length<=0){
       return true;
   }else{
       tt="Please enter the correct login information\n\n"+tt;
       alert(tt); 
       return false;
   } 
}

