<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ManageEmailAccounts.ascx.vb"
    Inherits="Controls_ManageEmailAccounts" %>
<%@ Register Src="../Controls/ManageEmailAccount.ascx" TagName="ManageEmailAccount"
    TagPrefix="uc" %>
<asp:Panel ID="panel" runat="server" Visible="false">
    <script type="text/JavaScript">

  window.onload = function()
  {
        var myBoxObject = new curvyCorners(settings, "ValidationSummary");
        myBoxObject.applyCornersToAll();
  }

 function hideRoundBox()
  {
        if (document.getElementById ("summaryBox"))
            document.getElementById ("summaryBox").className = "HideValidationSummaryBox"; 
  }

 function hideRoundBox2()
  {
        if (document.getElementById ("summaryBox2"))
            document.getElementById ("summaryBox2").className = "HideValidationSummaryBox"; 
  }
    </script>
    
    <asp:Panel ID="ListExisting" runat="server">
        <div class="innerbox" style="width: 648px!important;">
            <p class="innerHeader2">
                <%= strSectionTitle %>
            </p>
            <p style="line-height: 2em;">
                Get the most out of your Charter service with up to 10 free charter.net email addresses.           
                <br />Tons of storage! Accessible from any Internet connection.</p>
            <div style="padding-left: 13px;">
                <asp:Panel ID="pnlPackageList" runat="server" Visible="true">
                    <b>Use the dropdown to select a package to manage.</b><br />
                    <br />
                    <asp:DropDownList ID="ddlMSPackage" runat="server" Width="208px" AutoPostBack="true">
                    </asp:DropDownList><br />
                    <br />
                </asp:Panel>
            </div>
            <div style="padding-left: 13px;">
                <asp:PlaceHolder ID="plhAccounts" runat="server"></asp:PlaceHolder>
            </div>
            <div style="padding-left: 13px;">
                <asp:Label ID="lblResultMessage" runat="server" ForeColor="red"></asp:Label></div>
            <asp:Panel ID="pnlCreateNewEmailAccount" runat="server" Visible="false">
                <div style="padding: 12px;">
                    <div style="float: left;">                      
                        <asp:ImageButton AlternateText="Create New Email" ID="btnCreateNewEmailAddress" runat="server"
                             ImageAlign="TextTop" ImageUrl="newEmail.ccom" /></div> <br />
                    <asp:Label ID="lblNewEmailDescription1" runat="server" ForeColor="black"></asp:Label>
                </div>
            </asp:Panel>
            <div style="padding-left: 13px;">
                <asp:Panel ID="pnlNewEmailAddress" runat="server" Visible="false" DefaultButton="btnAddNew">
                 <!-- there should be no space between summarBox div and the asp:label -->
                <div id="summaryBox2" style="padding:10px;"><asp:Label ID="lblCreateEmailMessage" runat="server" ForeColor="red"></asp:Label></div>
                    <div style="margin-left: 10px;">
                        <strong>Please fill in all the fields below to create a new email address.</strong><br />
                        <font color="red">*Required Fields</font></div>
                    <!---  ********************************************* -->

                    <table width="95%" border="0" cellpadding="0" cellspacing="0" style="margin-top: 10px;
                        line-height: 22px; margin-left: 10px;">
                        <tr>
                            <td width="20%">&nbsp;
                            </td>
                            <td valign="top">
                                <asp:TextBox ID="txtProvID" runat="server" Visible="false" TabIndex="10000" Style="padding-left: 1px"></asp:TextBox>
                                <asp:TextBox ID="txtAccountID" runat="server" Visible="false" TabIndex="10001" Style="padding-left: 1px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" style="text-align:right">
                                <font color="red">*</font>Username&nbsp;</td>
                            <td valign="top" style="background-color: #FFFFFF;">
                                <asp:TextBox ID="txtAddress" runat="server" TabIndex="10002" Style="padding-left: 1px"></asp:TextBox><%= strEmailDomainName %>&nbsp;<a href="../customers/support.aspx?SupportArticleID=1777" target="_blank">Username/Password Suggestions</a>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">&nbsp;
                                
                            </td>
                            <td valign="top">
                                <asp:RegularExpressionValidator ID="vldUserNameSpecialChar" runat="server" ControlToValidate="txtAddress"
                                    ErrorMessage="The only special characters allowed for <b>Username</b> are .(dot), -(dash) or _(underscore)."
                                    Text="" Display="Dynamic" ValidationExpression="^[a-zA-Z0-9._-]+$"></asp:RegularExpressionValidator>
                                <asp:RequiredFieldValidator ID="vldAddressRequired" runat="server" ControlToValidate="txtAddress"
                                    Display="Dynamic" ErrorMessage="<b>Username</b> is a required field."></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                         <tr>
                            <td width="20%" style="text-align:right">
                                <font color="red">*</font>Password&nbsp;</td>
                            <td valign="top" nowrap>
                                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" TabIndex="10003" MaxLength="20"
                                    Style="padding-left: 1px"></asp:TextBox>
                                &nbsp;(Minimum of 8 characters, passwords are case sensitive.)
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">&nbsp;
                                
                            </td>
                            <td valign="top" nowrap>
                                <asp:RegularExpressionValidator ID="vldPasswordSpecialChar" runat="server" ControlToValidate="txtPassword"
                                    ErrorMessage='<b>Password</b> does not allow \(back slash) or "(quotes).' Text=""
                                    Display="Dynamic" ValidationExpression='^[^\\^"]*$'></asp:RegularExpressionValidator>
                                <asp:RequiredFieldValidator ID="vldPasswordRequired" runat="server" ControlToValidate="txtPassword"
                                    Display="Dynamic" ErrorMessage="<b>Password</b> is a required field."></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td width="20%" style="text-align:right">
                                <font color="red">*</font>Confirm Password&nbsp;</td>
                            <td valign="top" nowrap>
                                <asp:TextBox ID="txtPassword2" runat="server" TextMode="Password" TabIndex="10004" MaxLength="20"
                                    Style="padding-left: 1px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="vldPassword2SpecialChar" runat="server" ControlToValidate="txtPassword2"
                                    ErrorMessage='<b>Confirm Password</b> does not allow \(back slash) or "(quotes).'
                                    Text="" Display="Dynamic" ValidationExpression='^[^\\^"]*$'></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">&nbsp;
                                
                            </td>
                            <td valign="top" nowrap>
                                <asp:RequiredFieldValidator ID="vldPassword2Required" runat="server" ControlToValidate="txtPassword2"
                                    Display="Dynamic" ErrorMessage="<b>Confirm Password</b> is a required field."></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="vldPassword2Compare" runat="server" ControlToValidate="txtPassword2"
                                    ControlToCompare="txtPassword" Display="Dynamic" ErrorMessage="<b>Confirm Password</b> does not match <b>Password</b>."></asp:CompareValidator></td>
                        </tr>
                        <tr>
                            <td width="20%">&nbsp;
                                
                            </td>
                            <td nowrap>
                                <asp:ImageButton ID="btnAddNew" TabIndex="10005" runat="server" ImageUrl="../Images/newEmail.ccom"
                                    CausesValidation="True" OnClientClick="hideRoundBox2();"/>
                                <asp:ImageButton ID="btnCancelCreateEmail" TabIndex ="10006" runat="server" ImageUrl="../Images/reset.ccom"
                                    CausesValidation="false" /></td>
                        </tr>
                    </table>
                    <!-- ******************************************************* -->
                </asp:Panel>
            </div>                                                  
            <div style="padding-left: 13px;">
                <asp:Panel ID="pnlCannotShowEmail" runat="server" Visible="false">
                    <p>
                        <b>Email is not provisioned on this package.</b></p>
                </asp:Panel>
            </div>
         
          <div style="padding-left: 13px;">   
            <asp:Panel ID="pnlEditPassword" runat="server" Visible="false" DefaultButton="btnChangePassword">
               <%-- <!-- there should be no space between summarBox div and the asp:label -->--%>
                <div id="summaryBox" style="padding:10px;"><asp:Label ID="lblChangePasswordMessage" runat="server" ForeColor="red"></asp:Label></div>            
                <div style="padding-left:15px;"
                    <b>Please change the Password below; then click Save Changes.</b><br />
                    <font color="red">*Required Fields</font>
                </div>

                <table width="95%" border="0" cellpadding="0" cellspacing="0" style="margin-top: 10px;
                    line-height: 22px; margin-left: 10px;">
                    <tr>
                        <td width="20%" style="text-align:right">
                            <font color="red">*</font>Username&nbsp;</td>
                        <td valign="top">
                            <asp:TextBox ID="txtEmailAddress_EditPW" runat="server" Enabled="false" Width="150"
                                Style="padding-left: 1px"></asp:TextBox>
                            &nbsp;<a href="../customers/support.aspx?SupportArticleID=1777" target="_blank">Username/Password
                                Suggestions</a>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%">
                        </td>
                        <td style="vertical-align: middle">
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" nowrap style="">
                        </td>
                        <td valign="top" nowrap style="text-align: left;">&nbsp;
                            
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" style="text-align:right">
                            <font color="red">*</font>Password&nbsp;</td>
                        <td valign="top" nowrap>
                            <asp:TextBox ID="txtPassword_EditPW" runat="server" TextMode="Password" Width="150"
                                Style="padding-left: 1px" MaxLength="20"></asp:TextBox>
                            &nbsp;(Minimum of 8 characters, passwords are case sensitive.)
                        </td>
                    </tr>
                    <tr>
                        <td width="20%">&nbsp;
                            
                        </td>
                        <td valign="top" nowrap>
                            <asp:RegularExpressionValidator ID="vldPasswordSpecialChar_EditPW" runat="server"
                                ControlToValidate="txtPassword_EditPW" ErrorMessage="<b>Password</b> does not allow \(back slash) or &quot;(quotes)."
                                Text="" Display="Dynamic" ValidationExpression="^[^\\^&quot;]*$"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="vldPasswordRequired_EditPW" runat="server" ControlToValidate="txtPassword_EditPW"
                                Display="Dynamic" ErrorMessage="<b>Password</b> is a required field."></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td width="20%" style="text-align:right">
                            <font color="red">*</font>Confirm Password&nbsp;</td>
                        <td valign="top" nowrap>
                            <asp:TextBox ID="txtPassword_EditPW2" runat="server" TextMode="Password" Width="150" MaxLength="20"
                                Style="padding-left: 1px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%">&nbsp;
                            
                        </td>
                        <td valign="top" nowrap>
                            <asp:RegularExpressionValidator ID="vldPasswordSpecialChar_EditPW2" runat="server"
                                ControlToValidate="txtPassword_EditPW2" ErrorMessage="<b>Confirm Password</b> does not allow \(back slash) or &quot;(quotes)."
                                Text="" Display="Dynamic" ValidationExpression="^[^\\^&quot;]*$"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="vldPassword2Required_EditPW" runat="server" ControlToValidate="txtPassword_EditPW2"
                                Display="Dynamic" ErrorMessage="<b>Confirm Password</b> is a required field."></asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="vldPassword2Compare_EditPW" runat="server" ControlToCompare="txtPassword_EditPW"
                                ControlToValidate="txtPassword_EditPW2" Display="Dynamic" ErrorMessage="<b>Confirm Password</b> does not match <b>Password</b>."></asp:CompareValidator></td>
                    </tr>
                    <tr>
                        <td width="20%">&nbsp;
                            
                        </td>
                        <td nowrap>
                            <asp:ImageButton ID="btnChangePassword" runat="server" ImageUrl="../Images/savechanges.ccom"
                               CausesValidation="true" OnClientClick="hideRoundBox()" />
                            &nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="btnCancelEditPassword" runat="server" ImageUrl="../Images/reset.ccom"
                                CausesValidation="false" /></td>
                    </tr>
                </table>

            </asp:Panel>
            </div>
            <div class="space">
                &nbsp;</div>
            <asp:Label ID="lblMaximum" runat="server" ForeColor="Red" />
            <!-- **** -->
        </div>
    </asp:Panel>
</asp:Panel>
