<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员登陆</title>
<link href="img/css.css" rel="stylesheet" type="text/css" />
</head>
<script>
function ureg()
{
 window.parent.location.href='getreg.html';
}
function upass()
{
 window.parent.location.href='getpass.html';
}

function checkusername(name)
{
	if (name=="")
	{
	   var divobj = document.getElementById("divusername");
       divobj.innerHTML = "<font color=red>请输入用户名!</font>";
		return false;
	}
	if (name.length>16 |name.length<4)
	{
	   var divobj = document.getElementById("divusername");
       divobj.innerHTML = "<font color=red>长度不正确!</font>";
		return false;
	}
	else
	{

		  var divobj = document.getElementById("divusername");  
		   divobj.innerHTML = "<font color='red'>√ 检查通过。</font>";			 
			return true;
	}
}
function checkpassword(password)
{
	if (password=="")
	{
	   var divobj = document.getElementById("divpassword");
       divobj.innerHTML = "<font color=red>请输入密码!</font>";
		return false;
	}
	if (password.length>16 |password.length<4)
	{
	   var divobj = document.getElementById("divpassword");
       divobj.innerHTML = "<font color=red>长度不正确!</font>";
		return false;
	}
	else
	{

		  var divobj = document.getElementById("divpassword");  
		   divobj.innerHTML = "<font color='red'>√ 检查通过。</font>";			 
			return true;
	}
}
function CheckF()
{   
    var L=document.form1;
	var Fla=false;
	var A= checkusername(L.username.value);
	var B= checkpassword(L.password.value);
	Fla= A&&B;
	if(!Fla)
	{
		alert("请输入用户名和密码！");
		return false;
	}
	else
	{
		return true;
	}
}
</script>
<body >
<form id="form1" name="form1" method="post" action="login.Asp?action=login&id=<%=Request("id")%>" onsubmit="return CheckF()">
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0" class="box">
  <tr>
    <td height="25" colspan="2" align="center" valign="top" class="boxbg">会员登陆 <a href="javascript:window.parent.close_div()" class="cd" title="关闭"><img src="img/close.gif"  align="absmiddle"/></a></td>
    </tr>
  <tr>
    <td width="64" height="28" class="lc">用户名：</td>
    <td width="234"><input name="username" class="ipt" type="text" id="username" maxlength="16" onblur=checkusername(this.value) /> <span id="divusername"></span></td>
  </tr>
  <tr>
    <td height="28" class="lc">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
    <td><input name="password"  class="ipt" type="password" id="password" maxlength="16"  onblur=checkpassword(this.value) /> <span id="divpassword"></span></td>
  </tr>
  <tr>
    <td height="20" class="lc">记住我：</td>
    <td><label>
    <input name="checkbox" type="checkbox" id="checkbox" value="30" checked="checked" />
    保存30天</label></td>
  </tr>
  <tr>
    <td height="40" class="lc"><input type="image"  src="img/login.gif" name="button" id="button" />
 </td>
    <td height="40" class="lc"><a href="/ui/UserRegister.Asp" target="_blank">免费注册</a> <a href="/ui/GetLostedPassword.Asp" target="_blank">找回密码</a></td>
  </tr>
</table>

</form>
</body>
</html>
