<%@ Page Language="C#" MasterPageFile="~/AngelShopMasters.Master" AutoEventWireup="true"
    CodeBehind="Zhuc.aspx.cs" Inherits="AngelShop.Zhuc" Title="Register" %>

<%@ Register Src="~/usercontrol/Login.ascx" TagName="login" TagPrefix="URL" %>
<%@ Register Src="~/usercontrol/ProductSort.ascx" TagName="sort" TagPrefix="URL" %>
<%@ Register Src="~/usercontrol/Sort.ascx" TagName="support" TagPrefix="URL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript" type="text/javascript">
        function checkUserName() {
            var name = document.getElementById("<%=txtAccout.ClientID%>");
            var Company = document.getElementById("<%=txtCompanyName.ClientID%>");
            var Firstname = document.getElementById("<%=txtFirstName.ClientID%>");
            var Lastname = document.getElementById("<%=txtLastName.ClientID%>");
            var Address = document.getElementById("<%=txtAddress.ClientID%>");
            var city = document.getElementById("<%=txtCity.ClientID%>");
            var tel = document.getElementById("<%=txtTel.ClientID%>");
            var country = document.getElementById("<%=txtCountry.ClientID%>");
            var drCode = document.getElementById("<%=drCode.ClientID%>");

            var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
            if (name.value.length == 0) {
                alert("Please enter a user name. ");
                name.focus();
                return false;
            }
            if (!myreg.test(name.value)) {


                alert("The account is the wrong format, required for the correct e-mail address. ");
                name.focus();
                return false;
            }

            if (Firstname.value.length == 0) {
                alert("Please enter a user Firstname. ");
                Firstname.focus();
                return false;
            }
            if (Lastname.value.length == 0) {
                alert("Please enter a user Lastname. ");
                Lastname.focus();
                return false;
            }
            if (Address.value.length == 0) {
                alert("Please enter a user Address. ");
                Address.focus();
                return false;
            }

            if (drCode.value.length == 0) {
                alert("Please enter a user Postal code. ");
                drCode.focus();
                return false;
            }

            if (tel.value.length == 0) {
                alert("Please enter a user tel. ");
                Address.focus();
                return false;
            }
            var pass = document.getElementById("<%=txtPassWord.ClientID%>");
            var rpass = document.getElementById("<%=txtWordRepeat.ClientID%>");
            if (pass.value == "") {
                alert("Passwords can not be empty.");
                pass.focus();
                return false;
            } else if (pass.value.length < 4 || pass.value.length > 16) {
                alert("The length of the password must be 4-16 characters.");
                pass.select();
                return false;
            } else if (rpass.value != pass.value) {
                alert("Confirm the password and enter inconsistent.");
                rpass.select();
                return false;
            } else { return true; }
        }

                
    </script>
    <div class="neiye">
        <div class="neiye_1">
            <div class="neir3_1">
                <URL:login ID="lo" runat="server" />
            </div>
            <URL:sort ID="sort" runat="server" />
            <URL:support ID="support" runat="server" />
        </div>
        <div class="neiye_2">
            <div class="neiye_23" style="margin: 0px;">
                <div class="neiye_231">
                    <img src="images/1.jpg" width="10" height="34" /></div>
                <div class="neiye_232">
                    <a href="#">Registratilon</a></div>
                <div class="neiye_233">
                    <img src="images/3.jpg" width="10" height="34" /></div>
                <div class="clear">
                </div>
            </div>
            <div class="neiye_24 neiye_25">
                <table width="100%" height="478" border="0" cellpadding="0" cellspacing="0" style="margin-top: 10px;">
                    <tr>
                        <td height="470" valign="top">
                            <table width="100%" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            E-mail account:</p>
                                    </td>
                                    <td width="300" align="left" class="kuan">
                                        <asp:TextBox ID="txtAccout" runat="server"></asp:TextBox>
                                    </td>
                                    <td width="300" align="left">
                                        <asp:ImageButton ID="imgBtn" runat="server" ImageUrl="~/images/zhuc1_03.jpg" class="zhuc12"
                                            OnClick="imgBtn_Click" Width="78px" />
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong> ID must be EMAIL address!
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3" align="center">
                                        <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            Password:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtPassWord" runat="server" Style="width: 260px;" TextMode="Password"></asp:TextBox>
                                        <strong style="color: Red">&nbsp; *</strong>&nbsp; Six characters or more; capitalization
                                        matters!
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        RE-type password:
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtWordRepeat" runat="server" Style="width: 260px;" TextMode="Password"></asp:TextBox>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            Company name:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtCompanyName" runat="server" Style="width: 300px;"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        First name:
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtFirstName" runat="server" Style="width: 300px;"></asp:TextBox>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="640" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="137" height="22" align="right">
                                        <p>
                                            Last name:
                                        </p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            Address:
                                        </p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtAddress" runat="server" Style="width: 300px;"></asp:TextBox>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="640" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="130" height="22" align="right">
                                        <p>
                                            Country:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:DropDownList ID="txtCountry" runat="server" AutoPostBack="true" Style="width: 300px;
                                            height: 24px; border: 1px solid #CCC;" OnSelectedIndexChanged="txtCountry_SelectedIndexChanged">
                                        </asp:DropDownList>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;"
                                id="CityT" runat="server">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            State:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtProvince" runat="server"></asp:TextBox>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;"
                                id="CityD" runat="server">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            State:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:DropDownList ID="DropDownListstate" runat="server" Style="width: 300px;">
                                        </asp:DropDownList>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="640" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="140" height="22" align="right">
                                        <p>
                                            City:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtCity" runat="server" Style="width: 300px;"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                            <table width="640" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="130" height="22" align="right">
                                        <p>
                                            ZIP / Postal code:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="drCode" runat="server" Style="width: 300px;"></asp:TextBox>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            Tel / Mobile:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtTel" runat="server" Style="width: 300px;"></asp:TextBox>
                                        <strong style="color: Red">&nbsp;&nbsp; *</strong>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            Tel1:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtMobile" runat="server" Style="width: 300px;"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            Fax:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtFax" runat="server" Style="width: 300px;"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            MSN:</p>
                                    </td>
                                    <td width="640" align="left" class="kuan">
                                        <asp:TextBox ID="txtMsn" runat="server" Style="width: 300px;"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                            <table width="729" height="22" border="0" cellpadding="0" cellspacing="0" style="margin-top: 8px;">
                                <tr>
                                    <td width="110" height="22" align="right">
                                        <p>
                                            Tax:</p>
                                    </td>
                                    <td width="640" height="22" align="left" class="kuan">
                                        <asp:TextBox ID="txtTax" runat="server" Style="width: 300px;"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                            <table width="140" height="25" border="0" cellpadding="0" cellspacing="0" style="margin-top: 15px;
                                margin-left: 170px;">
                                <tr>
                                    <td width="70" align="center">
                                        <asp:ImageButton ID="imgBtnSure" runat="server" ImageUrl="~/images/ann_03.jpg" class="anan"
                                            OnClick="imgBtnSure_Click" OnClientClick=" return checkUserName()" />
                                    </td>
                                    <td align="right">
                                        <asp:ImageButton ID="imgBtnReset" runat="server" class="anan1" ImageUrl="~/images/ann_05.jpg"
                                            OnClick="imgBtnReset_Click" OnClientClick="return confirm('Whether to clear the entered information?')" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</asp:Content>
