<%@ control language="VB" autoeventwireup="false" inherits="Admin_Hostmatic_CC_EmailAccounts, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/ResourcesQuota.ascx" TagName='ResourceQuota' TagPrefix='EM' %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>

<div class="col-xs-12">
    <div class="card">
        <div class="header">
            <div class="displayInlineBlock">
                <h2>
                    <asp:Literal ID="Ltl_SubsInfo" runat="server" /></h2>
            </div>
            <asp:LinkButton ID="Btn_GoBack" runat="server" Text="<%$ Resources:Content,String1045 %>" CausesValidation="false"
                CssClass="btn btn-primary waves-effect pull-right m-t--4px" />
        </div>
        <div class="body">
            <div class="row">
                <div class="col-xs-12">
                    <asp:Panel ID="Pnl_MailboxManagementTabs" runat="server">

                        <div class="row">
                            <div class="col-xs-12">
                                <asp:Literal ID="Literal43" runat="server" Text="<%$ Resources:Content,DGN1110539%>"
                                    EnableViewState="false" />
                                <asp:Label ID="lbl_MailboxName" runat="server" />
                                <asp:LinkButton ID="lb_GoBack" runat="server" Text="<%$ Resources:Content,DGN1110542%>" Visible="false" />
                            </div>
                        </div>

                        <%--//Tabs for mailbox management--%>
                        <div class="row" id="Div_Container" runat="server">
                            <div class="col-xs-12">
                                <div class="products-step">
                                    <span id="div_s1" runat="server" nowrap="true" class="label label-success">
                                        <asp:LinkButton ID="LBtn_General" runat="server" Text='<%$ Resources:Content, GN00001466 %>'
                                            CausesValidation="false" />
                                    </span>
                                    <span id="div_s2" runat="server" nowrap="true" class="label label-default">
                                        <asp:LinkButton ID="LBtn_EmailAliases" runat="server" Text="<%$ Resources:Content,SMI0483%>" CausesValidation="false" />
                                    </span>
                                    <span id="div_s3" runat="server" nowrap="true" class="label label-default">
                                        <asp:LinkButton ID="LBtn_Redirect" runat="server" Text="<%$ Resources:Content,SMI0484%>" CausesValidation="false" />
                                    </span>
                                    <span id="div_s4" runat="server" nowrap="true" class="label label-default">
                                        <asp:LinkButton ID="LBtn_Autoresponder" runat="server" Text="<%$ Resources:Content,SMI0485%>" CausesValidation="false" />
                                    </span>
                                    <span id="div_s5" runat="server" nowrap="true" class="label label-default" visible="false">
                                        <asp:LinkButton ID="LBtn_AntiVirus" runat="server" Text='<%$ Resources:Content, SPT002838 %>'
                                            CausesValidation="false" Enabled="false" />
                                    </span>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                    <%--//Mailboxes listing--%>
                    <div class="row" id="Pnl_Grid" runat="server">
                        <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow" runat="server">
                            <div class="card">
                                <div class="header">
                                    <h3><%= Resources.Content.GN00001320%></h3>
                                </div>
                                <div class="body">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button ID="Btn_AddEmailAccounts" runat="server" Text="<%$ Resources:Content,SMI0486%>" class="btn btn-primary waves-effect btnAction" CausesValidation="false" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <asp:GridView ID="GV_EmailAccounts" runat="server" AllowPaging="true" CssClass="table table-bordered table-striped table-hover"
                                AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">

                                <Columns>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,String385 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <ItemTemplate>
                                            <asp:Label ID="Img_Status" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001113%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LBtn_DisplayName" runat="server" CommandName="Name" CausesValidation="false" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000652%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LBtn_Email" runat="server" CommandName="Email" CausesValidation="false" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,String159%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_Size" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,IsRedirected%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <ItemTemplate>
                                            <asp:Label ID="Img_Redirect" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,SMI0485 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <ItemTemplate>
                                            <asp:Label ID="Img_AutoResponder" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,SMI0487%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <ItemTemplate>
                                            <asp:Label ID="Img_ActiveSync" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000360%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LBtn_Enable" runat="server" class="btn btn-primary waves-effect btnAction" CommandName="Enable"
                                                Text="<%$ Resources:Content,GN00001024%>" CausesValidation="false" Visible="false"></asp:LinkButton>
                                            <asp:LinkButton ID="LBtn_WebMail" runat="server" class="btn btn-primary waves-effect btnAction" CommandName="WebMail"
                                                Text="<%$ Resources:Content,GN0000111%>" CausesValidation="false" Visible="false"></asp:LinkButton>
                                            <asp:LinkButton ID="LBtn_Remove" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="Remove"
                                                Text="<%$ Resources:Content,GN0000278%>" CausesValidation="false"></asp:LinkButton>
                                            <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>"
                                                TargetControlID="LBtn_Remove">
                                            </EM:ConfirmButtonExtender>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <%--PagerTemplate Start--%>
                                <PagerTemplate>
                                    <EM:Pager ID="Pager1" runat="server" />
                                </PagerTemplate>
                                <%--PagerTemplate End--%>
                            </asp:GridView>
                        </div>
                    </div>
                    <%--//Mailbox management interfaces--%>
                    <div class="row" id="Pnl_Details" runat="server">
                        <div class="col-xs-12">
                            <%--//General settings--%>
                            <div class="card" id="Pnl_General" runat="server">
                                <div class="header">
                                    <h3><%= Resources.Content.GN00001466%></h3>
                                </div>
                                <div class="body">
                                    <div class="row" id="Tr_DisplayNameGen" runat="server">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>*<asp:Literal ID="Ltl_DisplayName" runat="server" Text="<%$ Resources:Content,GN00001113%>" EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="Txt_DisplayNameGen" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="Txt_DisplayNameGen"
                                                        Display="None" ValidationGroup="PasswordGen" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" TargetControlID="Txt_DisplayNameGen"
                                                        FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars="- ">
                                                    </EM:FilteredTextBoxExtender>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_NewPassword" runat="server" Text="<%$ Resources:Content,GN0000569%>"
                                                    EnableViewState="false" />:
                                            </label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="Txt_PasswordGen" TextMode="Password" runat="server"></asp:TextBox>
                                                    <%--<asp:RequiredFieldValidator ID="RFV_TxBx_Pass" runat="server" ControlToValidate="Txt_PasswordGen"
                                                        Display="None" ValidationGroup="PasswordGen" SetFocusOnError="True"></asp:RequiredFieldValidator>--%>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-5 col-xs-12 row-label">
                                            <div class="form-group">
                                                <asp:LinkButton ID="lb_Generate" runat="server" Text="<%$ Resources:Content,SMI0195%>"
                                                    CausesValidation="false" TabIndex="-1" class="btn btn-primary waves-effect"></asp:LinkButton>
                                            </div>
                                            <br /><asp:Literal ID="Literal46" runat="server" Text="<%$ Resources:Content,GN00001530%>"
                                                        EnableViewState="false"></asp:Literal>
                                                
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_ConPassword" runat="server" Text="<%$ Resources:Content,GN0001196%>"
                                                    EnableViewState="false" />:
                                            </label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="Txt_ConPasswordGen" TextMode="Password" runat="server"></asp:TextBox>
                                                    <%--<asp:RequiredFieldValidator ID="RFV_TxBx_ConPass" runat="server" ControlToValidate="Txt_ConPasswordGen"
                                                        Display="None" ValidationGroup="PasswordGen" SetFocusOnError="True"></asp:RequiredFieldValidator>--%>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-5 col-xs-12 row-label">
                                            <div class="form-group">
                                                <asp:CheckBox ID="CB_Show" runat="server" Text="<%$ Resources:Content,FAM0049 %>" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Ltl_MailboxSize" runat="server" Text="<%$ Resources:Content,SMI0488%>"
                                                    EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <asp:DropDownList ID="DDL_MailboxSizeGen" runat="server"></asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_Disabled" runat="server" Text="<%$ Resources:Content,GN0000860%>" EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:CheckBox ID="CB_Disabled" runat="server" Text=" " />
                                        </div>
                                    </div>
                                    <div class="row" id="TR_ActiveSynGen" runat="server" style="display: none;">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:Content,String523 %>" EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:CheckBox ID="CB_ActiveSyncGen" runat="server" Text=" " />
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:Content,SMI0489%>" EnableViewState="false" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:CheckBox ID="CB_SendEmail" AutoPostBack="true" runat="server" Text=" " />
                                        </div>
                                    </div>
                                    <div class="row" id="Tr_SendEmail" runat="server" style="display: none;">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Literal12" runat="server" Text="<%$ Resources:Content,GN0000491%>" EnableViewState="false" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="Txt_EmailPassord" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="RFV_Txt_EmailPassord"
                                                        ControlToValidate="Txt_EmailPassord" ValidationGroup="PasswordGen" Display="None"></asp:RequiredFieldValidator>
                                                    <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"  ControlToValidate="Txt_EmailAccount" ErrorMessage="Enter a valid name." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="PasswordGen"> </asp:RegularExpressionValidator>--%>
                                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="Txt_EmailPassord"
                                                        FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars=".-_@">
                                                    </EM:FilteredTextBoxExtender>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:ValidationSummary ID="VS_Password" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                                                ShowMessageBox="True" ShowSummary="False" ValidationGroup="PasswordGen" />
                                            <asp:Button ID="Btn_SaveGeneral" runat="server" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction" ValidationGroup="PasswordGen" />
                                            <asp:Button ID="Btn_CancelGeneral" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect"
                                                CausesValidation="false" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <%--//Email aliases--%>
                            <div class="card" id="Pnl_EmailAliases" runat="server">
                                <div class="header">
                                    <h3><%= Resources.Content.String317%></h3>
                                </div>
                                <div class="body">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:GridView ID="GV_MailAlias" runat="server" AllowPaging="true" DataSourceID=""
                                                CssClass="table table-bordered table-striped table-hover" AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">

                                                <Columns>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,SMI0491%>" HeaderStyle-CssClass="col-xs-11" ItemStyle-CssClass="col-xs-11">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Lbl_MailAliasName" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000360%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LBtn_Remove" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="Remove"
                                                                Text="<%$ Resources:Content,GN0000278%>" CausesValidation="false"></asp:LinkButton>
                                                            <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>"
                                                                TargetControlID="LBtn_Remove">
                                                            </EM:ConfirmButtonExtender>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerTemplate>
                                                    <EM:Pager ID="Pager1" runat="server" />
                                                </PagerTemplate>
                                            </asp:GridView>
                                        </div>
                                    </div>
                                    <div class="row clearix">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_NewAliasName" runat="server" Text="<%$ Resources:Content,SMI0492%>" EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="Txt_NewMailAlias" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_AliasName" runat="server" ControlToValidate="Txt_NewMailAlias"
                                                        Display="None" ValidationGroup="Validator" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                    <%--<asp:RegularExpressionValidator ID="REV_MemberEmailAddress" runat="server"  ControlToValidate="Txt_NewMailAlias" ErrorMessage="Enter a valid name." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="Validator"> </asp:RegularExpressionValidator>--%>
                                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="Txt_NewMailAlias"
                                                        FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars="-">
                                                    </EM:FilteredTextBoxExtender>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-5 col-xs-12">
                                            <div class="form-group at-the-rate">
                                                @<asp:DropDownList ID="DDL_MailAliasDomains" runat="server">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button ID="Btn_SaveEmailAlias" runat="server" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction"
                                                ValidationGroup="Validator" />
                                            <asp:Button ID="Btn_CancelEmailAlias" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect" CausesValidation="false" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <%--//Redirect--%>
                            <div class="card" id="Pnl_Redirect" runat="server">
                                <div class="header">
                                    <h3><%= Resources.Content.SMI0493%></h3>
                                </div>
                                <div class="body">
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_RedirectMailBox" runat="server" Text="<%$ Resources:Content,SMI0494%>"
                                                    EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:CheckBox ID="CB_RedirectMailbox" runat="server" onClick='RollIt()' Text=" " />
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Ltl_ForwardToMailAdd" runat="server" Text="<%$ Resources:Content,SMI0495%>"
                                                    EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="Txt_ForwardToMaillAdd" runat="server" ValidationGroup="Forwards" />
                                                    <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="RequiredFieldValidator5"
                                                        EnableClientScript="true" ControlToValidate="Txt_ForwardToMaillAdd" ValidationGroup="Forwards"
                                                        Display="None"></asp:RequiredFieldValidator>
                                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" TargetControlID="Txt_ForwardToMaillAdd"
                                                        FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars=".-@">
                                                    </EM:FilteredTextBoxExtender>
                                                    <%--<asp:RegularExpressionValidator ID="REV_Txt_ForwardToMaillAdd" runat="server" ErrorMessage='<%$ Resources:Content,DGN1110038%>'
                                                        ControlToValidate="Txt_ForwardToMaillAdd" Display="None" SetFocusOnError="True"
                                                        ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>" ValidationGroup="Forwards"></asp:RegularExpressionValidator>--%>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_CopyForwardMsg" runat="server" Text="<%$ Resources:Content,SMI0496%>"
                                                    EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:CheckBox ID="CB_CopyForwardMsg" runat="server" Text=" " />
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button ID="Btn_SaveRedirect" runat="server" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction"
                                                ValidationGroup="Forwards" />
                                            <asp:Button ID="Btn_CancelRedirect" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect"
                                                CausesValidation="false" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row" id="Pnl_AutoResponders" runat="server" visible="false">
                                <div class="header">
                                    <h3><%= Resources.Content.SMI0497%></h3>
                                </div>
                                <div class="body">
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_EnableAutoResponder" runat="server" Text="<%$ Resources:Content,SMI0498%>"
                                                    EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:CheckBox ID="CB_EnableAutoResponder" runat="server" onClick='RollIt2()' Text=" " />
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>*<asp:Literal ID="Ltl_Subject" runat="server" Text="<%$ Resources:Content,GN0000371%>" EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="Txt_Subject" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="RFV_Txt_Subject"
                                                        EnableClientScript="true" ControlToValidate="Txt_Subject" ValidationGroup="Responders"
                                                        Display="None" Enabled="false"></asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Ltl_Message" runat="server" Text="<%$ Resources:Content,GN0000774%>" EnableViewState="false"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-9 col-xs-12">
                                            <asp:TextBox ID="Txt_Message" runat="server" TextMode="MultiLine" Width="100%" Height="150px"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="row" id="TR_StartDate" runat="server" style="display: none;">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                *
                            <asp:Literal ID="Literal10" Text="<%$ Resources:Content,GN00001547%>" runat="server" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group display-date-input">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_StartDate" Enabled="false" runat="server"></asp:TextBox>
                                                    <asp:CompareValidator ID="CV_TxBx_StartDate" runat="server" ErrorMessage="<%$ Resources:Content,String493 %>"
                                                        ValidationGroup="Responders" Display="None" ForeColor="Red" ControlToValidate="TxBx_StartDate"
                                                        Operator="GreaterThanEqual" Type="Date"></asp:CompareValidator>
                                                </div>
                                            </div>
                                            <i runat="server" id="img_StartDate" class="material-icons icon-calendar col-calendar"></i>
                                            <EM:CalendarExtender ID="CE_StartDate" runat="server" TargetControlID="TxBx_StartDate"
                                                Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>"
                                                PopupButtonID="img_StartDate" CssClass="date__calendar">
                                            </EM:CalendarExtender>
                                        </div>
                                    </div>
                                    <div class="row" id="TR_EndDate" runat="server" style="display: none;">
                                        <div class="col-sm-2 col-xs-12 row-label">
                                            <label>
                                                *
                            <asp:Literal ID="Literal13" Text="<%$ Resources:Content,DGN1119986%>" runat="server" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group display-date-input">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_EndDate" Enabled="false" runat="server"></asp:TextBox>
                                                    <asp:CompareValidator ID="CV_Date" runat="server" Display="None" ErrorMessage="<%$ Resources:Content,String494%>"
                                                        Operator="GreaterThanEqual" Type="Date" ValidationGroup="Responders" ControlToValidate="TxBx_EndDate"
                                                        ControlToCompare="TxBx_StartDate"></asp:CompareValidator>
                                                </div>
                                            </div>
                                            <i runat="server" id="img_EndDate" class="material-icons icon-calendar col-calendar"></i>
                                            <EM:CalendarExtender ID="CE_EndDate" runat="server" TargetControlID="TxBx_EndDate"
                                                Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>"
                                                PopupButtonID="img_EndDate" CssClass="date__calendar">
                                            </EM:CalendarExtender>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button ID="Btn_SaveAutoResponder" runat="server" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction"
                                                ValidationGroup="Responders" />
                                            <asp:Button ID="Btn_CancelAutoResponder" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect"
                                                CausesValidation="false" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row" id="Pnl_AntiVirus" runat="server" visible="false">
                            </div>
                        </div>
                    </div>
                    <%--//Add email account--%>
                    <div class="card" id="Pnl_AddEmails" runat="server">
                        <div class="header">
                            <h3><%= Resources.Content.SMI0499%></h3>
                        </div>
                        <div class="body">
                            <div class="row" id="Tr_DisplayName" runat="server">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,GN00001113%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="Txt_DisplayName" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="RequiredFieldValidator6"
                                                ControlToValidate="Txt_DisplayName" ValidationGroup="Validator" Display="None">
                                            </asp:RequiredFieldValidator>
                                            <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="Txt_DisplayName"
                                                FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars=".-_ ">
                                            </EM:FilteredTextBoxExtender>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,SMI0500%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="Txt_EmailAccount" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="RequiredFieldValidator4"
                                                ControlToValidate="Txt_EmailAccount" ValidationGroup="Validator" Display="None"></asp:RequiredFieldValidator>
                                            <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"  ControlToValidate="Txt_EmailAccount" ErrorMessage="Enter a valid name." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="PasswordGen"> </asp:RegularExpressionValidator>--%>
                                            <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="Txt_EmailAccount"
                                                FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars=".-_">
                                            </EM:FilteredTextBoxExtender>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-5 col-xs-12">
                                    <div class="form-group at-the-rate">
                                        @<asp:DropDownList ID="DDL_Domains" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Content,GN0000569%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="Txt_Password" runat="server" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="RequiredFieldValidator1"
                                                ControlToValidate="Txt_Password" ValidationGroup="Validator" Display="None"> 
                                            </asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,GN0001196%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="Txt_ConPassword" runat="server" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="RequiredFieldValidator2"
                                                ControlToValidate="Txt_ConPassword" ValidationGroup="Validator" Display="None">
                                            </asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Literal16" runat="server" Text="<%$ Resources:Content,SMI0488%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="DDL_MailboxSize" runat="server" />
                                    </div>
                                </div>
                            </div>
                            <div class="row hide">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Literal17" runat="server" Text="<%$ Resources:Content,GN000195%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <asp:CheckBox ID="CB_Enabled" runat="server" Checked="true" Text=" " />
                                    </div>
                                </div>
                            </div>
                            <div class="row" id="TR_ActiveSync" runat="server" style="display: none;">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Literal18" runat="server" Text="<%$ Resources:Content,String523%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <asp:CheckBox ID="CB_ActiveSync" runat="server" Text=" " />
                                    </div>
                                </div>
                            </div>
                            <div class="row" id="Tr_MerakMail" runat="server" visible="false">
                                <div class="col-sm-2 col-xs-12 row-label">
                                    <label>*<asp:Literal ID="Ltl_Comments" runat="server" Text="<%$ Resources:Content,GN000148%>" EnableViewState="false"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <asp:TextBox ID="Txt_Comments" runat="server" TextMode="MultiLine" Width="100%" Height="150px"></asp:TextBox>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button ID="Btn_SaveAdd" runat="server" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction" ValidationGroup="Validator" />
                                    <asp:Button ID="Btn_Cancel" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect" CausesValidation="false" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                        ShowMessageBox="True" ShowSummary="False" ValidationGroup="Validator" />
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                        ShowMessageBox="True" ShowSummary="False" ValidationGroup="Forwards" />
                    <asp:ValidationSummary ID="ValidationSummary3" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                        ShowMessageBox="True" ShowSummary="False" ValidationGroup="Responders" />

                </div>
            </div>
        </div>
    </div>
</div>

<asp:Button ID="Btn_Display" runat="server" Style="display: none;" />
<asp:Panel ID="Panel_Res" runat="server" BorderColor="ActiveBorder" BorderStyle="Groove"
    ScrollBars="Auto" CssClass="width-modal-popup-auto" Style="display: none">
    <EM:ResourceQuota runat="server" ID="ResourceQuotaView" />
</asp:Panel>
<EM:ModalPopupExtender runat="server" ID="MPE_Resource" BackgroundCssClass="modalBackground"
    PopupControlID="Panel_Res" TargetControlID="Btn_Display">
</EM:ModalPopupExtender>

<script type="text/javascript">
    function RollIt() {
        var CB = document.getElementById('<%=CB_RedirectMailbox.ClientID%>');
        var TB = document.getElementById('<%=Txt_ForwardToMaillAdd.ClientID%>');
        var RFV = document.getElementById('<%=RequiredFieldValidator5.ClientID %>');

        if (CB != null && TB != null && RFV != null) {
            if (CB.checked) {
                TB.disabled = false;
                ValidatorEnable(RFV, true);
            }
            else {
                TB.disabled = true;
                TB.value = '';
                ValidatorEnable(RFV, false);
            }
        }
    }

    function RollIt2() {
        var CB = document.getElementById('<%=CB_EnableAutoResponder.ClientID%>');
        var TB = document.getElementById('<%=Txt_Subject.ClientID%>');
        var TB2 = document.getElementById('<%=Txt_Message.ClientID %>');
        var RFV = document.getElementById('<%=RFV_Txt_Subject.ClientID %>');

        if (CB != null && TB != null && TB2 != null && RFV != null) {
            if (CB.checked) {
                TB.disabled = false;
                TB2.disabled = false;
                ValidatorEnable(RFV, true);
            }
            else {
                TB.disabled = true;
                TB.value = '';
                TB2.disabled = true;
                TB2.value = '';
                ValidatorEnable(RFV, false);
            }
        }
    }
    AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender2.ClientID%>');
    AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender3.ClientID%>');
    AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender4.ClientID%>');
    AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender5.ClientID%>');
    AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender6.ClientID%>');
    AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender7.ClientID%>');
</script>
