<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>

<%@ Register Src="uc/style.ascx" TagName="style" TagPrefix="uc1" %>
<!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 runat="server">
    <title>环球DOENT电子商务系统---后台管理</title>
    <uc1:style ID="style1" runat="server" />
</head>
<body>

    <script type="text/javascript">
    var returnvalue = false;
    function loginback(){
        var name = document.getElementById("UserName");
        var pass = document.getElementById("PassWord");
        var checkcode = document.getElementById("CheckCode");
        if(name.value == ""){
            alert("您没有用户名称！");
            form.UserName.focus();
            return;
        }
        if(pass.value == ""){
            alert("您没有填写密码！");
            form.PassWord.focus();
            return;
        }   
        if(checkcode.value == ""){
            alert("请填写验证码!");
            form.CheckCode.focus();
            return;
        }
        submitForm('form','hidden1','yes');
     }
     function sub(){
        var name = document.getElementById("UserName");
        var pass = document.getElementById("PassWord");
        var checkcode = document.getElementById("CheckCode");
	    if (event.keyCode==13)
	    {
            if(name.value == ""){
                alert("您没有用户名称！");
                form.UserName.focus();
                return;
            }
            if(pass.value == ""){
                alert("您没有填写密码！");
                form.PassWord.focus();
                return;
            }
            if(checkcode.value == ""){
                alert("请填写验证码!");
                form.CheckCode.focus();
                return;
             }
             submitForm('form','hidden1','yes');
	    }
     }
     function clearclick(){
         var name = document.getElementById("UserName");
         var pass = document.getElementById("PassWord");
         var checkcode = document.getElementById("CheckCode");
         name.value = "";
         pass.value = "";
         checkcode.value = "";
         form.UserName.focus();
     }
    </script>

    <form id="form" name="form" method="post" action="">
        <input type="hidden" id="hidden1" name="hidden1" />
        &nbsp;
        <table width="460" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#73A2D6"
            style="margin-top: 100px;">
            <tr>
                <td width="460" class="font3">
                    环球DOENT电子商务系统后台登陆</td>
                <td width="20" align="center" class="font3">
                    <a href="javascript:window.close();">
                        <img src="image/close.gif" alt="关闭窗口" width="8" height="8" border="0"></a></td>
            </tr>
            <tr>
                <td colspan="2" bgcolor="#FFFFFF">
                    <table width="100%" border="0" cellspacing="0" cellpadding="20">
                        <tr>
                            <td width="25%" height="138">
                                <img src="image/wel_2.gif" width="80" height="75"></td>
                            <td width="75%" align="left">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td height="30" style="width: 71px">
                                            用户名：</td>
                                        <td width="81%">
                                            <input id="UserName" name="UserName" type="text" size="25" runat="server" style="width:160px;"></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 71px; height: 30px;">
                                            密&nbsp;&nbsp;&nbsp;码：</td>
                                        <td style="height: 30px">
                                            <input id="PassWord" name="PassWord" type="password" size="25" runat="server" style="width:160px;"></td>
                                    </tr>
                                    <tr>
                                        <td height="30" style="width: 71px">
                                            验证码：</td>
                                        <td>
                                            <input name="CheckCode" id="CheckCode" type="text" size="10" onkeypress="sub();">
                                            <img src="main/validateCode.aspx" align="absmiddle" onclick="this.src='main/validateCode.aspx?randomnumber='+Math.random();" style="cursor:pointer;"></td>
                                    </tr>
                                    <tr>
                                        <td height="40" style="width: 71px">
                                            &nbsp;</td>
                                        <td>
                                            <a href="javascript:loginback();" style="cursor: hand" class="btn" onkeypress="sub();">
                                                登陆</a> <a href="javascript:clearclick();" class="btn">取消</a></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
