<%@ page language="C#" autoeventwireup="true" inherits="Passport_Login, WebApp_deploy" enableviewstate="false" %>

<!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>登录</title>
    <link href="Css/LoginSheet.css" rel="stylesheet" type="text/css" />
    <link href="../Skin/TopStyle/Basic.css" rel="stylesheet" type="text/css" />
    <script src="../Skin/CommStyle/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="../Js/Howave_ShopBuyProduct.js" type="text/javascript"></script>
    <script type="text/javascript">
        //页面加载时，用户名文本框获取焦点
        function SetFocus() {
            var obj = document.getElementById("H_UserName"); //用户名
            if (obj.value == "") {
                obj.focus();
            }
        }
        $(function () {
            $("#<%=H_UserName.ClientID %>").blur(function () {
                if ($("#<%=H_UserName.ClientID %>").val() == "") {
                    $("#<%=H_UserName.ClientID %>").addClass("form_dashed");
                    $("#lblname").text('请输入用户名');
                } else {
                    $("#<%=H_UserName.ClientID %>").removeClass("form_dashed");
                    $("#lblname").text('');
                }
            });
            $("#<%=H_UserPassword.ClientID %>").blur(function () {
                if ($("#<%=H_UserPassword.ClientID %>").val() == "") {
                    $("#<%=H_UserPassword.ClientID %>").addClass("form_dashed");
                    $("#lblPass").text('请输入密码');
                } else {
                    $("#<%=H_UserPassword.ClientID %>").removeClass("form_dashed");
                    $("#lblPass").text('');
                }
            });
            $("#<%=CheckCode.ClientID %>").blur(function () {
                if ($("#<%=CheckCode.ClientID %>").val() == "") {
                    $("#<%=CheckCode.ClientID%>").addClass("form_dashed");
                    $("#lblcode").text('请输入验证码');
                } else {
                    $("#<%=CheckCode.ClientID%>").removeClass("form_dashed");
                    $("#lblcode").text('');
                }
            });

        });
        function LoginSubmit() {
            if ($("#<%=H_UserName.ClientID %>").val() == "") {
                $("#<%=H_UserName.ClientID %>").addClass("form_dashed");
                $("#lblname").text('请输入用户名');
                return false;
            } else {
                $("#<%=H_UserName.ClientID %>").removeClass("form_dashed");
                $("#lblname").text('');
            }
            if ($("#<%=H_UserPassword.ClientID %>").val() == "") {
                $("#<%=H_UserPassword.ClientID %>").addClass("form_dashed");
                $("#lblPass").text('请输入密码');
                return false;
            } else {
                $("#<%=H_UserPassword.ClientID %>").removeClass("form_dashed");
                $("#lblPass").text('');
            }
            if ($("#<%=CheckCode.ClientID %>").val() == "") {
                $("#<%=CheckCode.ClientID%>").addClass("form_dashed");
                $("#lblcode").text('请输入验证码');
                return false;
            } else {
                $("#<%=CheckCode.ClientID%>").removeClass("form_dashed");
                $("#lblcode").text('');
            }
            return true;
        }

    </script>
</head>
<body onload="SetFocus();">
    <form id="form1" runat="server">
  
    <div class="content">
        <hl:Top ID="Top1" runat="server" />
        <div class="module_common">
            <div class="wrap">
                <div class="wrap_child">
                    <div class="login_con">
                        <div class="login_left">
                            <h2>
                                <b title="用户登录" runat="server" id="div">用户登录</b>LOGIN</h2>
                             <div id="login_form" class="bg" runat="server">
                            <table>
                                <tbody>
                                    <tr>
                                        <th>
                                            用户名:
                                        </th>
                                        <td>
                                            <asp:TextBox ID="H_UserName" runat="server" CssClass="text width180" 
                                                TabIndex="1" />
                                        </td>
                                        <td class="padding3 fontColor4">
                                            <label class="error" id="lblname"></label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            密&nbsp;&nbsp;&nbsp;码:
                                        </th>
                                        <td>
                                            <asp:TextBox ID="H_UserPassword" runat="server" TextMode="password" 
                                                CssClass="text width180" TabIndex="2"/>
                                        </td>
                                        <td class="padding3 fontColor4">
                                            <label class="error" id="lblPass"></label>
                                        </td>
                                    </tr>
                                    <asp:PlaceHolder runat="server" ID="show_checkcode" Visible="false">
                                        <asp:Panel ID="checkcode_panel" runat="server" CssClass="login_input">
                                            <tr>
                                                <th>
                                                    验证码:
                                                </th>
                                                <td>
                                                    <asp:TextBox ID="CheckCode" runat="server" CssClass="text" MaxLength="10" Width="90" TabIndex="3" />
                                                    <a onclick="javascript:refreshCode();" href="#" id="ImgCheckCode"> </a>
                                                </td>
                                                <td class="padding3 fontColor4">
                                                     <label class="error" id="lblcode"></label>
                                                </td>
                                            </tr>
                                        </asp:Panel>
                                    </asp:PlaceHolder>
                                    <tr class="distance">
                                        <th>
                                        </th>
                                        <td colspan="2">
                                            <asp:Button ID="LoginButton" runat="server" CssClass="enter" 
                                                OnClientClick="return LoginSubmit()" TabIndex="4" />
                                            <asp:HyperLink ID="hlforgetpwd" NavigateUrl="forget_password.aspx" runat="server"
                                                Text="忘记密码" CssClass="clew" />
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                             
                               </div>
                            <div>
                               
                            </div>
                        </div>
                       
                        <div class="login_right">
                            <h4>
                                友情提示: 如果您还不是会员，请注册</h4>
                            <p>
                                注册之后你就可以</p>
                            <ol>
                                <li class="ico01">保存您的个人资料</li>
                                <li class="ico02">收藏您关注的商品</li>
                                <li class="ico03">收藏您关注的店铺</li>
                                <li class="ico04">开设店铺销售商品</li>
                            </ol>
                            <a title="立即注册" class="login_btn" href="UserReg.aspx">
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <asp:HiddenField ID="H_ComeUrl" runat="server" />
    
        <script type="text/javascript">
            function keydown() {
                if (event.keyCode == 13) {
                    WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("LoginSubmit", "", true, "", "", false, true));
                }
            } 
            function refreshCode() {
                document.getElementById("ImgCheckCode").innerHTML = "<img src='CheckCode.aspx?rnd=" + Math.random() + "' title='看不清楚，请点击更换验证码' />";
            }
            refreshCode();
    </script>
    <hl:Foot ID="Foot1" runat="server" />
    </form>
</body>
</html>
