function CheckForm(theForm)
{if(!check_mail(theForm.identity.value))
{alert("您填入的Email格式不正确，请检查有无拼写错误");theForm.identity.focus();return(false);}
if(theForm.pwd.value.length<4){alert("密码不能小于4位.");theForm.pwd.focus();return(false);}
return true}
function check_mail(myint)
{var checkOK="@";var checkStr=myint;var allValid=true;var decPoints=0;var allNum="";if(checkStr.charAt(0)=='@')return(false);if(checkStr.charAt(checkStr.length-1)=='@')
return(false);if(checkStr.charAt(checkStr.length-1)=='.')
return(false);a_valid=0;a_count=0;d_valid=0;for(i=0;i<checkStr.length;i++)
{ch=checkStr.charAt(i);if(ch=='@'){a_valid=1;a_count++;}
if(ch=='.'){d_valid=1;}}
if(a_count>1)return(false);if(a_valid==1&&d_valid==1)return(true);else return(false);}