<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_With_VfyCode.aspx.cs" Inherits="VA.FX.Web.entry.login_With_VfyCode" %>

<!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=utf-8" />
<title><% = base.webSiteConfig.WebSiteName %></title>
<link rel="stylesheet" type="text/css" href="/app_themes/default/css/main.css" />
<link rel="stylesheet" type="text/css" href="/app_themes/default/css/login.css" />
<script type="text/javascript" src="/scripts/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">

    function setLayout() {
        var windowHeight = $(window).outerHeight();
        var mainHeight = $("#main").outerHeight();
        var mainTop = (windowHeight - mainHeight) / 2;
        $("#main").css("top", mainTop);
    }

    $(function () {

        $("#txtUserID").focus();

        $("#txtUserID").keydown(function (e) {
            if (e.keyCode == 13) {
                $("#txtPassword").focus();
            }
        });

        $("#txtPassword").keydown(function (e) {
            if (e.keyCode == 13) {
                $(".vfycode").focus();
                return false;
            }
        });

        //        $(".vfycode").keydown(function (e) {
        //            if (e.keyCode == 13) {
        //                $("#btnSubmit").focus();
        //            }
        //        });

        setLayout();

        //绑定窗体resize事件；
        $(window).resize(function () {
            setLayout();
        });
    });

</script>
</head>
<body>   
<form id="form1" runat="server">
<div id="main">
    <div id="title"></div>
    <div id="loginbox">
    
    <p style="left:330px;top:102px;border:solid 0px red;position:absolute;">
         <asp:TextBox ID="txtUserID" runat="server" 
             CssClass="input"
             Width="290px" />
        <asp:RequiredFieldValidator id="rfvUserID" runat="server" 
	         ErrorMessage="登录名错误." 
	         ControlToValidate="txtUserID" 
	         Display="None" />
	    <asp:RegularExpressionValidator id="revUserID" runat="server"
		     EnableViewState="False" 
		     ErrorMessage="帐号错误."
		     Display="None"
		     ControlToValidate="txtUserID" 
		     ValidationExpression="[a-zA-Z0-9_]{1,16}" />
    </p>

    <p style="left:330px;top:165px;border:solid 0px red;position:absolute;">
        <asp:TextBox ID="txtPassword" runat="server" 
             CssClass="input"
             TextMode="Password"
             Width="290px" />
        <asp:RequiredFieldValidator id="rfvPassword" runat="server" 
	         ErrorMessage="密码错误." 
	         ControlToValidate="txtPassword" 	         
	         Display="None" />
    </p>

    <p style="left:525px;top:227px;border:solid 0px red;position:absolute;">
         <div style="left:390px;top:224px;border:solid 0px red;position:absolute;width:250px;height:30px;">
            <p style="position:absolute;left:3px;top:0px;border:solid 0px red;"><input name="vfycode" type="text" class="vfycode" size="12" /></p>
            <p style="position:absolute;left:140px;top:7px;border:solid 0px red;"><img src="VfyImage.aspx" border="0" align="absmiddle" /></p>
        </div>       		        
    </p>

    <p style="left:292px;top:287px;border:solid 0px red;position:absolute;">
        <asp:Button ID="btnSubmit" runat="server"
             Text=" 登录 "     
             CssClass="btn"        
             Width="150px"
             OnClick="btnSubmit_Click"
             /><a href="frame.aspx">frame.aspx</a>
        <asp:Label ID="lblLoginInfo" runat="server" ForeColor="Red"></asp:Label>
        <asp:ValidationSummary id="ValidationSummary1"  runat="server" 
	         ShowMessageBox="True" 
	         ShowSummary="False" />   
    </p>

    </div>

    <div id="copyright">
        <p>Copyright &copy;2001-<% = DateTime.Now.Year.ToString() %> Powered By  金彤科技</p>
    </div>

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