

<TABLE WIDTH="330" BORDER="0" CELLSPACING="0" CELLPADDING="0"   background="images/login_pay_bg.png" >
  <tr> 
    <TD colspan="2"  height=40 style='padding-left:40px;color:#333333;font-weight: bold;'>还未注册会员的可以在这里快速注册</TD>
  </tr>
  <FORM NAME="userinfo" METHOD="post" ACTION="payment_reg.asp?action=save" >
    <TR> 
      <TD  WIDTH="80" align="right" >会员帐户：</TD>
      <TD ><INPUT NAME="username" TYPE="text" size="15" maxlength="15" >
        </TD>
    </TR>
    <TR> 
      <TD WIDTH="80" align="right">密　　码：</TD>
      <TD > <INPUT NAME="UserPassword" type="Password" size="15" maxlength="15">
      </TD>
    </TR>
    <TR> 
      <TD WIDTH="80" align="right">确认密码：</TD>
      <TD> <INPUT NAME="UserPassword1" type="Password" size="15" maxlength="15"> </TD>
    </TR>
    <TR> 
      <TD WIDTH="80" align="right">电子信箱：</TD>
      <TD > <INPUT NAME="useremail" TYPE="text" size="15">
        </TD>
    </TR>
	
     <tr> 
   
    <TD colspan=2 height=20>提示：帐户和密码由字母、数字、下划线组成（6-16位）。</TD>
  </tr>
	
    <TR> 
     
      <TD  colspan=2 style='padding-left:30px' height=40>  
<INPUT ONCLICK="return check();" TYPE="submit" NAME="Submit3" STYLE="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee"VALUE="提  交" >&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="Submit5" STYLE="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" value="清  除"> </TD>
    </TR>
  </FORM>
</TABLE>


<SCRIPT LANGUAGE="JavaScript">
<!--
function checkname(str){
exp=/[^\w]/gi;
if(str.search(exp)!=-1)
{return false;}
return true;
}

function check()
{

   if(checkspace(document.userinfo.username.value)) {
	document.userinfo.username.focus();
    alert("会员帐户不能为空，请重新输入！");
	return false;
  }
 if(!checkname(document.userinfo.username.value)) {
	document.userinfo.username.focus();
    alert("字母、数字、下划线组成，请重新输入！");
	return false;
  }
    if(checkspace(document.userinfo.username.value) || document.userinfo.username.value.length < 4) {
	document.userinfo.username.focus();
    alert("会员帐户必须大于4位，请重新输入！");
	return false;
  }

    if(checkspace(document.userinfo.UserPassword.value) || document.userinfo.UserPassword.value.length < 6) {
	document.userinfo.UserPassword.focus();
    alert("密码长度不能小于6，请重新输入！");
	return false;
  }
    if(document.userinfo.UserPassword.value != document.userinfo.UserPassword1.value) {
	document.userinfo.UserPassword.focus();
	document.userinfo.UserPassword.value = '';
	document.userinfo.UserPassword1.value = '';
    alert("两次输入的密码不同，请重新输入！");
	return false;
  }

 if(document.userinfo.useremail.value.length!=0)
  {
    if (document.userinfo.useremail.value.charAt(0)=="." ||        
         document.userinfo.useremail.value.charAt(0)=="@"||       
         document.userinfo.useremail.value.indexOf('@', 0) == -1 || 
         document.userinfo.useremail.value.indexOf('.', 0) == -1 || 
         document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 || 
         document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1)
     {
      alert("Email地址格式不正确！");
      document.userinfo.useremail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空！");
   document.userinfo.useremail.focus();
   return false;
   }

}

function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}


function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>

