<%@ control language="VB" autoeventwireup="false" inherits="RCC_O365_CC_TenantGroups, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="UC" %>
<%@ Register Src="~/RCC/O365/CC/GroupGroupOperations.ascx" TagName="GroupGroupOperations" TagPrefix="UC" %>
<%@ Register Src="~/RCC/O365/CC/BulkDistributionList.ascx" TagName="BulkDistributionList" TagPrefix="UC" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="Selectable_Selected_LBX" TagPrefix="EM" %>
<%@ Register Assembly="obout_Editor" Namespace="OboutInc.Editor" TagPrefix="obout" %>

<script type="text/javascript" lang="javascript">
    $('document').ready(function () {
        //CopyToName();
        //CopyEmailToAlias();
        ModerationChanged();
        AddressTypeChanged();
        RecipientTypeChanged();
    }, 200);
    function CopyToName() {
        try {
            if ($get('<%= TxBx_GroupName.ClientID%>'))
                $get('<%= TxBx_GroupName.ClientID%>').value = $get('<%=TxBx_DisplayName.ClientID%>').value;

            if ($get('<%= TxBx_EmailAddress.ClientID%>'))
                $get('<%=TxBx_EmailAddress.ClientID%>').value = $get('<%=TxBx_DisplayName.ClientID%>').value.replace(/ /g, '');

            if ($get('<%= TxBx_GroupAlias.ClientID%>'))
                $get('<%=TxBx_GroupAlias.ClientID%>').value = $get('<%=TxBx_DisplayName.ClientID%>').value.replace(/ /g, '');

        } catch (e) { }
    }
    function CopyEmailToAlias() {
        try {
            if ($get('<%= TxBx_GroupAlias.ClientID%>')) {
                $get('<%=TxBx_EmailAddress.ClientID%>').value = $get('<%=TxBx_EmailAddress.ClientID%>').value.replace(/ /g, '');
                $get('<%= TxBx_GroupAlias.ClientID%>').value = $get('<%=TxBx_EmailAddress.ClientID%>').value;
            }
        } catch (e) { }
    }
    function ModerationChanged() {
        try {
            var CB_Moderation = $get('<%= CB_ModerationEnabled.ClientID %>');
            if (CB_Moderation)
                if (CB_Moderation.checked) {
                    $('#' + '<%= TR_ModeratedBy.ClientID %>').find("input,button,textarea,select").removeAttr("disabled");
                    $('#' + '<%= TR_ModerationNotifications.ClientID %>').find("input,button,textarea,select").removeAttr("disabled");
                    $('#' + '<%= TR_BypassModeration.ClientID %>').find("input,button,textarea,select").removeAttr("disabled");
                }
                else {
                    $('#' + '<%= TR_ModeratedBy.ClientID %>').find("input,button,textarea,select").attr("disabled", "disabled");
                    $('#' + '<%= TR_ModerationNotifications.ClientID %>').find("input,button,textarea,select").attr("disabled", "disabled");
                    $('#' + '<%= TR_BypassModeration.ClientID %>').find("input,button,textarea,select").attr("disabled", "disabled");
                }
        } catch (e) { }
    }
    function AddressTypeChanged() {
        try {
            var SMTPType = $get('<%= Rbtn_SMTP.ClientID %>');
            if (SMTPType)
                if (SMTPType.checked) {
                    $('.CustomAddressType').attr('readonly', 'readonly').attr('disabled', true).val('');
                    $('#' + '<%= CB_IsReplyToAddress.ClientID%>').hide();
                    $('#' + '<%= CB_IsReplyToAddress.ClientID%>').next('label').hide();

                    $('#' + '<%= DDL_proxyAddressDomains.ClientID%>').parent('.bootstrap-select').show();
                    <%--ValidatorEnable($get('<%= REV_proxyAddress.ClientID %>'), true);--%>
                    $('#' + '<%= Lbl_emailSeperator.ClientID %>').show();

                    $('#' + '<%= div_UP_ProxyAddressType.ClientID%>').hide();
                    $('#' + '<%= div_DDL_proxyAddressDomains.ClientID%>').show();
                }
                else {
                    $('.CustomAddressType').removeAttr('readonly').removeAttr('disabled').val('');
                    $('#' + '<%= div_UP_ProxyAddressType.ClientID%>').show();
                    $('#' + '<%= CB_IsReplyToAddress.ClientID%>').show();
                    $('#' + '<%= CB_IsReplyToAddress.ClientID%>').next('label').show();

                    $('#' + '<%= DDL_proxyAddressDomains.ClientID%>').parent('.bootstrap-select').hide();
                    <%--ValidatorEnable($get('<%= REV_proxyAddress.ClientID %>'), false);--%>
                    $('#' + '<%= Lbl_emailSeperator.ClientID %>').hide();

                    $('#' + '<%= div_UP_ProxyAddressType.ClientID%>').show();
                    $('#' + '<%= div_DDL_proxyAddressDomains.ClientID%>').hide();
                }
        } catch (e) { }
    }
    function RecipientTypeChanged() {
        try {
            var allRecipientType = $get('<%= RB_AllRecipientTypes.ClientID %>');
            var availableRecipients = $get('<%= CBL_AvailableRecipientTypes.ClientID %>');
            if (allRecipientType && availableRecipients)
                if (allRecipientType.checked)
                    $('#' + availableRecipients.id).find('input').attr('disabled', 'disabled').attr('checked', false);
                else
                    $('#' + availableRecipients.id).find('input').removeAttr('disabled');
        } catch (e) { }
    }

    function removeWhiteSpaces(source) {
        if (source.value)
            source.value = source.value.replace(/ /g, '');
    }
</script>

<asp:Panel ID="Pnl_GroupListing" runat="server">

    <div class="row">
        <div class="col-xs-12 Div_OpsRow" id="Tbl_Operations" runat="server">
            <div class="card">
                <div class="header">
                    <h3>
                        <%= Resources.Content.GN00001320%>      <%--Operations--%>                                                                                                                             
                    </h3>
                </div>
                <div class="body">
                    <asp:Button ID="Btn_AddNewGroup" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,SMI0415%>" />
                    <asp:Button ID="Btn_SyncGroupsWithO365" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,SyncAllGroupsWithMicrosoftCSP %>" />
                    <asp:Button ID="Btn_GroupGroupOperations" runat="server" CssClass="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GroupOperations%>' />
                    <asp:Button ID="Btn_AddBulkDL" runat="server" Text="<%$ Resources:Content,E0091%>" CssClass="btn btn-primary waves-effect btnAction" />
                    <asp:Button ID="Btn_ExportToExcel" runat="server" Text="<%$ Resources:Content,Ex001%>" CssClass="btn btn-primary waves-effect" />
                    <asp:Button ID="Btn_DeleteSelectedGroups" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,DeleteSelected %>' Custom1="Custom" Style="display: none" />
                    <Ajax:ConfirmButtonExtender ID="CBE_DeleteSelected" runat="server" TargetControlID="Btn_DeleteSelectedGroups" ConfirmText='<%$ Resources:Content,DGN1119974%>' />

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

    <asp:Panel ID="Pnl_Search" runat="server" DefaultButton="Btn_SearchGroup">
        <div class="row">
            <div class="panel-group search-panel" id="AS_CRMAccounts" role="tablist" aria-multiselectable="true">
                <div class="col-xs-12" role="tab" id="SH_CRMAccounts">
                    <div class="card">
                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_CRMAccounts" href="#<%= CSB_CRMAccounts.ClientID%>" aria-expanded="true" aria-controls="SH_CRMAccounts">
                            <h3>
                                <%= Resources.Content.GN0000395%>
                            </h3>
                        </div>
                        <div id="CSB_CRMAccounts" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_CRMAccounts" aria-expanded="false">
                            <div class="row">
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SearchGroupName" runat="server" MaxLength="99" Width="90%"></asp:TextBox>
                                            <asp:Label ID="Ltrl_SearchHeader" class="form-label" runat="server" Text="<%$ Resources:Content,GN0000395%>"></asp:Label>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SearchEmail" runat="server" MaxLength="99" Width="90%"></asp:TextBox>
                                            <asp:Label ID="Ltrl_SearchEmail" class="form-label" runat="server" Text="<%$ Resources:Content,GN0000652%>"></asp:Label>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SearchDisplayName" runat="server" MaxLength="99"></asp:TextBox>
                                            <asp:Label ID="Ltrl_SearchDisplayName" class="form-label" runat="server" Text="<%$ Resources:Content,GN00001113%>"></asp:Label>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SearchGroupAlias" runat="server" MaxLength="99"></asp:TextBox>
                                            <asp:Label ID="Ltrl_SearchGroupAlias" class="form-label" runat="server" Text="<%$ Resources:Content,GroupAlias%>"></asp:Label>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="Ddl_SearchGroupType" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <asp:Button ID="Btn_SearchGroup" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,GN0000391%>" />
                                    <asp:Button ID="Btn_ClearGroup" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </asp:Panel>

    <EM:MPGridView CssClass="table table-bordered table-striped table-hover" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
        ID="GV_Groups" AllowPaging="true" runat="server" AutoGenerateColumns="false"
        AllowSorting='true'
        DataKeyNames="CustomerId,CompanyId,Group">

        <Columns>
            <asp:TemplateField HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                <HeaderTemplate>
                    <%--<input runat="server" id="ChkBx_All" onchange="SetCheckedHeader(this.checked, this, 'All');"
                        type="checkbox" name="ChkBx_All" />--%>
                    <span class="option-menu">
                        <asp:CheckBox runat="server" ID="ChkBx_All" Text=" " onclick="SetCheckedHeader(this.checked, this, 'All');" />
                    </span>
                </HeaderTemplate>
                <ItemTemplate>
                    <span class="option-menu">
                        <asp:CheckBox ID="ChkBx_All" runat="server" Text=" " onchange="SetCheckedHeader(this.checked, this,'1');" />
                    </span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001113%>" SortExpression='DisplayName' HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                <ItemTemplate>
                    <asp:LinkButton ID="Lbtn_GroupDetail" runat="server" Text='<%# Eval("Group.DisplayName")%>'
                        CommandArgument='<%# Eval("Group.GroupRecordId")%>' CommandName="EditGroup"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000491%>" SortExpression='Alias'>
                <ItemTemplate>
                    <%# Eval("Group.EmailAddress")%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ Resources:Content,GroupType%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2"
                SortExpression='GroupType'>
                <ItemTemplate>
                    <asp:Label ID="LB_GroupType" runat="server" Text='<%# Eval("Group.GroupType").ToString().Replace("_"," ")%>'></asp:Label>                
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ Resources:Content,TeamStatus%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                <ItemTemplate>
                    <asp:Label ID="LB_TeamStatus" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Status" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                <ItemTemplate>
                    <asp:HyperLink ID="LB_Status" 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="LB_Clone" runat="server" CssClass="btn btn-primary btnAction" Text='<%$ Resources:Content, DGN1110198 %>'
                        CommandArgument='<%#Eval("Group.GroupRecordId")%>' CommandName="Clone"></asp:LinkButton>
                    <%--CssClass="LinkButtonClone1"--%>
                    <asp:LinkButton ID="LB_Edit" CommandArgument='<%#Eval("Group.GroupRecordId")%>'
                        runat="server" Text="<%$ Resources:Content,GN0000276%>" CssClass="btn btn-primary"
                        CommandName="EditGroup" />
                    <asp:LinkButton ID="LB_Delete" runat="server" Text="<%$ Resources:Content,GN0000377%>"
                        CssClass="btn btn-primary btnAction" CommandName="DeleteGroup" CommandArgument='<%# Eval("Group.GroupRecordId") %>' />
                            <ajax:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,DGN1119974%>"
                                TargetControlID="LB_Delete" runat="server">
                            </ajax:ConfirmButtonExtender>
                    <asp:LinkButton ID="LB_CreateTeam" Visible="false" runat="server" CssClass="btn btn-primary btnAction" Text='Create Team'
                        CommandArgument='<%#Eval("Group.GroupRecordId")%>' CommandName="CreateTeam"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <%--PagerTemplate Start--%>
        <PagerTemplate>
            <UC:Pager ID="Pager" runat="server" />
        </PagerTemplate>
    </EM:MPGridView>
</asp:Panel>

<asp:Panel ID="Pnl_GroupDetail" runat="server" Visible="false">
    <div class="row">

        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <div class="displayInlineBlock">
                        <h3>
                            <asp:Literal ID="ltl_addGroup" runat="server" Text="<%$ Resources:Content,SMI0415%>" />
                        </h3>
                    </div>

                    <asp:LinkButton ID="Lbtn_GoBackToListing" runat="server" Text="<%$ Resources:Content,String1018 %>" CausesValidation="false"
                        class="btn btn-primary waves-effect pull-right m-t--4px" />
                </div>
                <div class="body">


                    <div class="row">
                        <div class="col-xs-12">
                            <div class="panel-group" id="accordion_1" role="tablist" aria-multiselectable="true">

                                <div class="panel panel-primary" id="TR_GeneralSettings" runat="server">
                                    <div class="panel-heading" role="tab" id="headingOne_1">
                                        <h2 class="panel-title">
                                            <a role="button" id="A_AccordionPane1" data-toggle="collapse" data-parent="#accordion_1" href="#collapseOne_1" aria-expanded="false" aria-controls="collapseOne_1" class="collapsed">
                                                <%= Resources.Content.SM400028%>
                                            </a>
                                        </h2>
                                    </div>
                                    <div id="collapseOne_1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne_1" aria-expanded="false" style="height: 0px;">
                                        <div class="panel-body">
                                            <%-- <div class="card">
                                                <div class="body">--%>

                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    *<asp:Literal ID="Ltrl_GroupType" runat="server" Text="<%$ Resources:Content,GroupType %>"></asp:Literal>:
                            
                    
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <asp:DropDownList ID="Ddl_GroupType" runat="server" AutoPostBack="true">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <div class="row" id="TR_DisplayName" runat="server" visible="false">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    *<asp:Literal ID="Ltrl_DisplayName" runat="server" Text='<%$Resources:Content, GN00001113%>'></asp:Literal>: 
                                         
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <div class="form-line">
                                                            <asp:TextBox ID="TxBx_DisplayName" runat="server" MaxLength="64" ValidationGroup="SaveGroup" onKeyup="CopyToName()"> </asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <asp:RequiredFieldValidator ID="RFV_GrpDispName" runat="server" ControlToValidate="TxBx_DisplayName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="SaveGroup">
                                                    </asp:RequiredFieldValidator>
                                                </div>
                                            </div>

                                            <div class="row" id="TR_EmailAddress" runat="server" visible="false">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    *<asp:Literal ID="Ltrl_EmailAddress" runat="server" Text='<%$Resources:Content, GN0000491%>'></asp:Literal>:
                            
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <div class="form-line">
                                                            <asp:TextBox ID="TxBx_EmailAddress" runat="server" ValidationGroup="SaveGroup"
                                                                onKeyup="CopyEmailToAlias()" onBlur="removeWhiteSpaces(this)" MaxLength="64" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <%-- <div class="col-sm-1 col-xs-12">
                                                            @
                                                        </div>--%>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group at-the-rate">
                                                        @<asp:DropDownList ID="DDL_DomainName" runat="server">
                                                        </asp:DropDownList>
                                                    </div>
                                                   <%-- <asp:RegularExpressionValidator ID="REV_EmailAddress" runat="server" ValidationExpression="<%$ Resources:MPRegex,Alias %>"
                                                        ErrorMessage='<%$Resources:Content, DGN1110038%>' ControlToValidate="TxBx_EmailAddress"
                                                        Display="None" SetFocusOnError="true" ValidationGroup="SaveGroup"></asp:RegularExpressionValidator>--%>
                                                    <asp:RequiredFieldValidator ControlToValidate="TxBx_EmailAddress" ID="RFV_EmailAddress"
                                                        runat="server"
                                                        Display="None" ValidationGroup="SaveGroup"></asp:RequiredFieldValidator>
                                                </div>
                                            </div>

                                            <div class="row" id="TR_GroupName" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    *
                                                <asp:Literal ID="Ltrl_GroupName" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GroupName%>" />:
                    
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <div class="form-line">
                                                            <asp:TextBox ID="TxBx_GroupName" runat="server" MaxLength="28"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <asp:RequiredFieldValidator ID="RFV_GroupName" runat="server" ControlToValidate="TxBx_GroupName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="SaveGroup">
                                                    </asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                            <div class="row" id="TR_Alias" runat="server" visible="false">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    *<asp:Literal ID="Ltrl_Alias" runat="server" Text="<%$ Resources:Content,GroupAlias %>"></asp:Literal>:
                            
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <div class="form-line">
                                                            <asp:TextBox ID="TxBx_GroupAlias" runat="server" MaxLength="64" ValidationGroup="SaveGroup" onBlur="removeWhiteSpaces(this)"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <asp:RequiredFieldValidator ID="RFV_GroupAlias" runat="server" ControlToValidate="TxBX_GroupAlias"
                                                        Display="None"
                                                        SetFocusOnError="true" ValidationGroup="SaveGroup"></asp:RequiredFieldValidator>
                                                    <%--<asp:RegularExpressionValidator ID="REV_GroupAlias" runat="server" ValidationExpression="<%$ Resources:MPRegex,Alias %>"
                                                        ControlToValidate="TxBx_GroupAlias"
                                                        Display="None" ErrorMessage="Invalid alias name" SetFocusOnError="true" ValidationGroup="SaveGroup"></asp:RegularExpressionValidator>--%>
                                                </div>
                                            </div>
                                            <div class="row" id="TR_GroupPrivacy" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    *<asp:Literal ID="Ltrl_GroupPrivacy" runat="server" Text="<%$ Resources:Content,Privacy %>"></asp:Literal>

                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <asp:DropDownList ID="Ddl_GroupPrivacy" runat="server">
                                                        <asp:ListItem Text="<%$ Resources:Content,VPS991 %>" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="<%$ Resources:Content,VPS990 %>" Value="0"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="row" id="TR_GroupLanguage" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    *<asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,FAM0024 %>"></asp:Literal>

                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <asp:DropDownList ID="Ddl_GroupLanguages" runat="server"></asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="row" id="TR_Notes" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_Notes" runat="server" Text="<%$Resources:Content,GN00001336 %>"></asp:Literal>:
                                                </div>
                                                <div class="col-sm-9 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TxBx_Notes" runat="server" TextMode="MultiLine" Rows="4"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row" id="TR_Description" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_Description" runat="server" Text="<%$Resources:Content,GN0000597 %>"></asp:Literal>:
                                                </div>
                                                <div class="col-sm-9 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TxBx_Description" runat="server" TextMode="MultiLine" Rows="4"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row" id="TR_AutoSubscribeNewMembers" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_AutoSubscribeNewMembers" runat="server" Text="<%$Resources:Content,AutoSubscribeNewMembers %>"></asp:Literal>:
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <asp:CheckBox ID="CB_AutoSubscribeNewMembers" Text=" " runat="server" />
                                                </div>
                                            </div>
                                            <div class="row" id="TR_HideFromAddressList" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_HidefromAddressList" runat="server" Text="<%$ Resources:Content,HideFromAddressList %>"></asp:Literal>:
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <asp:CheckBox ID="CB_HideFromAddressList" Text=" " runat="server" />
                                                </div>
                                            </div>
                                            <div class="row" id="TR_GroupOwnerSection" runat="server">
                                                <div id="tbl_singleOwner" runat="server">

                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                         <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Content,SMI0416 %>"></asp:Literal>:
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <asp:DropDownList ID="Ddl_SelectSingleOwner" runat="server"></asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div id="tbl_multipleOwners" runat="server">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *
                                                            <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content,SMI0416 %>"></asp:Literal>:                                                                   
                                                    </div>
                                                    <div class="col-xs-12">
                                                        <EM:Selectable_Selected_LBX ID="UC_GroupOwners" runat="server" IsSelectedRequired="true" ValidationGroup="SaveGroup" />
                                                    </div>
                                                    <div id="TR_CopyOwnerToMember" runat="server">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Ltrl_CopyOwnerTomember" runat="server" Text='<%$ Resources:Content,CopyOwnerToMember %>'></asp:Literal>:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <asp:CheckBox ID="CB_CopyOwnerToMember" Text=" " runat="server" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <%-- </div>
                                            </div>--%>
                                        </div>
                                    </div>
                                </div>

                                <div class="panel panel-primary" id="TR_GroupMembersSection" runat="server">
                                    <div class="panel-heading" role="tab" id="headingTwo_1">
                                        <h4 class="panel-title">
                                            <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion_1" href="#collapseTwo_1" aria-expanded="false" aria-controls="collapseTwo_1">
                                                <%= Resources.Content.DGN1110100%>
                                            </a>
                                        </h4>
                                    </div>
                                    <div id="collapseTwo_1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo_1" aria-expanded="false" style="height: 0px;">
                                        <div class="panel-body">

                                            <%--<div id="dv_GroupMember" runat="server" class='collapsiblecontainer2' style='display: none; clear: both;'>
                                                     <input id="txtGroupMember" runat="server" type="text" style='display: none;' class='hfclass2' />--%>
                                            <div id="tbl_membershipRules" runat="server">
                                                <div class="row">
                                                    <div class="col-sm-4 col-xs-12 row-label">
                                                        <asp:Literal ID="Ltrl_RecipientType" runat="server" Text="<%$ Resources:Content,DGN1110420 %>"></asp:Literal>:
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <asp:RadioButton ID="RB_AllRecipientTypes" runat="server" Text="<%$ Resources:Content,Exch00152 %>"
                                                            GroupName="RecipientTypes" Checked="true" onChange="RecipientTypeChanged()" />
                                                        <asp:RadioButton ID="RB_SelectedRecipientTypes" runat="server" Text="<%$ Resources:Content,Exch00153 %>"
                                                            GroupName="RecipientTypes" onChange="RecipientTypeChanged()" />
                                                        <asp:CheckBoxList ID="CBL_AvailableRecipientTypes" runat="server" CellPadding="10">
                                                            <asp:ListItem Text="<%$ Resources:Content,Exch00154 %>" Value="2"></asp:ListItem>
                                                            <asp:ListItem Text="<%$ Resources:Content,Exch00155 %>" Value="3"></asp:ListItem>
                                                            <asp:ListItem Text="<%$ Resources:Content,Exch00156 %>" Value="4"></asp:ListItem>
                                                            <asp:ListItem Text="<%$ Resources:Content,Exch00157 %>" Value="5"></asp:ListItem>
                                                            <asp:ListItem Text="<%$ Resources:Content,Exch00158 %>" Value="6"></asp:ListItem>
                                                        </asp:CheckBoxList>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <asp:Literal ID="Ltrl_MembershipRules" runat="server" Text="Membership rules"></asp:Literal>:
                                                    </div>
                                                    <div class="col-sm-9 col-xs-12">

                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Ltrl_SelectRule" runat="server" Text="Select Rule Attribute"></asp:Literal>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <asp:Literal ID="Ltrl_RuleDefinition" runat="server" Text="Rule"></asp:Literal>
                                                            </div>

                                                        </div>
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <ajax:UpdatePanel ID="UP_SelectRuleAttribute" runat="server" UpdateMode="Conditional">
                                                                    <Triggers>
                                                                        <ajax:AsyncPostBackTrigger ControlID="Btn_AddRule" EventName="Click" />
                                                                        <ajax:AsyncPostBackTrigger ControlID="Rep_DDGMembershipRules" EventName="ItemCommand" />
                                                                    </Triggers>
                                                                    <ContentTemplate>
                                                                        <asp:DropDownList ID="Ddl_SelectRuleAttribute" runat="server"></asp:DropDownList>
                                                                    </ContentTemplate>
                                                                </ajax:UpdatePanel>
                                                            </div>
                                                            <div class="col-xs-12">
                                                                <ajax:UpdatePanel ID="UP_RuleAttributeText" runat="server" UpdateMode="Conditional">
                                                                    <Triggers>
                                                                        <ajax:AsyncPostBackTrigger ControlID="Btn_AddRule" EventName="Click" />
                                                                    </Triggers>
                                                                    <ContentTemplate>
                                                                        <div class="form-group">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_RuleDefinition" runat="server"></asp:TextBox>
                                                                            </div>
                                                                        </div>
                                                                    </ContentTemplate>
                                                                </ajax:UpdatePanel>
                                                            </div>
                                                            <div>
                                                                <asp:Button ID="Btn_AddRule" runat="server" Text="<%$ Resources:Content,GN00001234 %>"
                                                                    class="btn btn-primary waves-effect" />
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <ajax:UpdatePanel ID="UP_DDGMemberShipRules" runat="server" UpdateMode="Conditional"
                                                                    ChildrenAsTriggers="true">
                                                                    <Triggers>
                                                                        <ajax:AsyncPostBackTrigger ControlID="Btn_AddRule" EventName="Click" />
                                                                    </Triggers>
                                                                    <ContentTemplate>
                                                                        <asp:Repeater ID="Rep_DDGMembershipRules" runat="server">
                                                                            <ItemTemplate>
                                                                                <div class="row">
                                                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                                                        <asp:Label ID="Ltrl_RuleAttribute" runat="server" Text='<%# Eval("Attribute") %>'></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-3 col-xs-12">
                                                                                        <div class="form-group">
                                                                                            <div class="form-line">
                                                                                                <asp:TextBox ID="Txbx_RuleDefinition" runat="server" Text='<%# Eval("Rule") %>'></asp:TextBox>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-sm-3 col-xs-12">
                                                                                        <asp:LinkButton ID="Lbtn_RemoveRule" runat="server" Text="<%$ Resources:Content,GN0000278 %>"
                                                                                            CssClass="btn btn-primary waves-effect btnAction" CommandArgument='<%# Eval("Attribute") %>' CommandName="RemoveRule"></asp:LinkButton>
                                                                                    </div>
                                                                                </div>
                                                                            </ItemTemplate>
                                                                        </asp:Repeater>
                                                                    </ContentTemplate>
                                                                </ajax:UpdatePanel>
                                                            </div>
                                                        </div>

                                                    </div>
                                                </div>
                                            </div>
                                            <div id="tbl_groupMembersSelection" runat="server">
                                                <div class="row">
                                                    <div class="col-xs-12 row-label">
                                                        <asp:Literal ID="Ltrl_SelectGroupMembers" runat="server" Text="<%$ Resources:Content,DGN1110100 %>"></asp:Literal>:
                                                    </div>
                                                    <div class="col-xs-12">
                                                        <EM:Selectable_Selected_LBX ID="UC_GroupMembers" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="row" id="tr_memberjoinrestriction" runat="server">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <asp:Literal ID="Ltrl_MemberJoinRestriction" runat="server" Text="<%$ Resources:Content,MemberJoinRestriction %>"></asp:Literal>:
                                                    </div>
                                                    <div class="col-sm-9 col-xs-12">
                                                        <asp:RadioButtonList ID="RBL_MJR" runat="server">
                                                            <asp:ListItem Text="<%$Resources:Content,JoinOpenRestriction %>" Value="1"></asp:ListItem>
                                                            <asp:ListItem Text="<%$Resources:Content,JoinClosedRestriction %>" Value="0" Selected="true"></asp:ListItem>
                                                            <asp:ListItem Text="<%$Resources:Content,JoinApprovalRequired %>" Value="2"></asp:ListItem>
                                                        </asp:RadioButtonList>
                                                    </div>
                                                </div>
                                                <div class="row" id="tr_memberleaverestriction" runat="server">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <asp:Literal ID="Ltrl_MemberLeaveRestriction" runat="server" Text="<%$ Resources:Content,MemberLeaveRestriction %>"></asp:Literal>:
                                                    </div>
                                                    <div class="col-sm-9 col-xs-12">
                                                        <asp:RadioButtonList ID="RBL_MLR" runat="server">
                                                            <asp:ListItem Text="<%$Resources:Content,LeaveOpenRestriction %>" Value="1"></asp:ListItem>
                                                            <asp:ListItem Text="<%$Resources:Content,LeaveClosedRestriction %>" Value="0" Selected="true"></asp:ListItem>
                                                        </asp:RadioButtonList>
                                                    </div>
                                                </div>
                                            </div>
                                            <%--</div>--%>
                                        </div>
                                    </div>
                                </div>

                                <div class="panel panel-primary" id="TR_DeliveryManagementSection" runat="server" visible="false">
                                    <div class="panel-heading" role="tab" id="headingThree_1">
                                        <h4 class="panel-title">
                                            <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion_1" href="#collapseThree_1" aria-expanded="false" aria-controls="collapseThree_1">
                                                <%= Resources.Content.DeliveryManagement%>
                                            </a>
                                        </h4>
                                    </div>
                                    <div id="collapseThree_1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree_1" aria-expanded="false" style="height: 0px;">
                                        <div class="panel-body">
                                            <div class="row">
                                                <div class="col-sm-4 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_WhoCanSendMessagesToThisGroup" runat="server" Text="<%$Resources:Content,ChoseWhoCanSendMessagesToThisGroup %>"></asp:Literal>:
                                                </div>
                                                <div class="col-sm-8 col-xs-12">
                                                    <asp:RadioButtonList ID="Rbl_SenderAuthentication" runat="server">
                                                        <asp:ListItem Text="<%$Resources:Content,OnlySendersInsideMyOrganization %>" Value="1"
                                                            Selected="True"></asp:ListItem>
                                                        <asp:ListItem Text="<%$Resources:Content,SendersInsideAndOutsideOfMyOrganization %>"
                                                            Value="0"></asp:ListItem>
                                                    </asp:RadioButtonList>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_AcceptMessagesFrom" runat="server" Text="<%$ Resources:Content,DGN1110341 %>"></asp:Literal>:
                                                </div>
                                                <div class="col-xs-12">
                                                    <EM:Selectable_Selected_LBX ID="UC_AcceptMessagesFrom" runat="server" />

                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_RejectMessagesFrom" runat="server" Text="<%$ Resources:Content,DGN1110344 %>"></asp:Literal>:
                                                </div>
                                                <div class="col-xs-12">
                                                    <EM:Selectable_Selected_LBX ID="UC_RejectMessagesFrom" runat="server" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="panel panel-primary" id="TR_MessageApprovalSection" runat="server" visible="false">
                                    <div class="panel-heading" role="tab" id="headingFour_1">
                                        <h4 class="panel-title">
                                            <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion_1" href="#collapseFour_1" aria-expanded="false" aria-controls="collapseFour_1">
                                                <%= Resources.Content.MessageApproval%>
                                            </a>
                                        </h4>
                                    </div>
                                    <div id="collapseFour_1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour_1" aria-expanded="false" style="height: 0px;">
                                        <div class="panel-body">


                                            <%--<div id="dv_MessageApproval" runat="server" class='collapsiblecontainer2' style='display: none; clear: both;'>
                                        <input id="txtMessageApproval" runat="server" type="text" style='display: none;'
                                            class='hfclass2' />--%>


                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_ModerationEnabled" runat="server" Text="<%$ Resources:Content,ModerationEnabled %>" />:
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <asp:CheckBox ID="CB_ModerationEnabled" Text=" " runat="server" onChange="ModerationChanged()" />
                                                </div>
                                            </div>
                                            <div class="row" id="TR_ModeratedBy" runat="server">
                                                <div class="col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_ModeratedBy" runat="server" Text="<%$ Resources:Content,ModeratedBy %>"></asp:Literal>:
                                                </div>
                                                <div class="col-xs-12">
                                                    <EM:Selectable_Selected_LBX ID="UC_ModeratedBy" runat="server" />

                                                </div>
                                            </div>
                                            <div class="row" id="TR_ModerationNotifications" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_ModerationNotifications" runat="server" Text="<%$ Resources:Content,SendModerationNotifications %>"></asp:Literal>
                                                </div>
                                                <div class="col-sm-9 col-xs-12">
                                                    <asp:RadioButtonList ID="Rbl_ModerationNotifications" runat="server">
                                                        <asp:ListItem Text="<%$ Resources:Content,NotifyAlways %>" Value="2" Selected="true"></asp:ListItem>
                                                        <asp:ListItem Text="<%$ Resources:Content,NotifyInternalOnly %>" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="<%$ Resources:Content,NotifyNever %>" Value="0"></asp:ListItem>
                                                    </asp:RadioButtonList>
                                                </div>
                                            </div>
                                            <div class="row" id="TR_BypassModeration" runat="server">
                                                <div class="col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_BypassModerationFromSender" runat="server" Text="<%$ Resources:Content,BypassModerationFromSender %>"></asp:Literal>:
                                                </div>
                                                <div class="col-xs-12">
                                                    <EM:Selectable_Selected_LBX ID="UC_BypassModerationFromSender" runat="server" />

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

                                <div class="panel panel-primary" id="TR_GroupDelegation" runat="server">
                                    <div class="panel-heading" role="tab" id="headingFive_1">
                                        <h4 class="panel-title">
                                            <a role="button" data-toggle="collapse" data-parent="#accordion_1" href="#collapseFive_1" aria-expanded="false" aria-controls="collapseFive_5" class="collapsed">
                                                <%= Resources.Content.GroupDelegation%>
                                            </a>
                                        </h4>
                                    </div>
                                    <div id="collapseFive_1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive_1" aria-expanded="false" style="height: 0px;">
                                        <div class="panel-body">
                                            <div class="row">
                                                <div class="col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_SendAs" runat="server" Text="<%$ Resources:Content,L00147 %>"></asp:Literal>:
                                                </div>
                                                <div class="col-xs-12">
                                                    <EM:Selectable_Selected_LBX ID="UC_SendAsGroup" runat="server" />
                                                </div>
                                            </div>
                                            <div class="row" id="tr_delegation_sendonbehalf" runat="server">
                                                <div class="col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_SendOnBehalf" runat="server" Text="<%$ Resources:Content,L00146 %>"></asp:Literal>:
                                                </div>
                                                <div class="col-xs-12">
                                                    <EM:Selectable_Selected_LBX ID="UC_SendOnBehalfGroup" runat="server" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="panel panel-primary" id="TR_EmailOptions" runat="server">
                                    <div class="panel-heading" role="tab" id="headingSix_1">
                                        <h4 class="panel-title">
                                            <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion_1" href="#collapseSix_1" aria-expanded="false" aria-controls="collapseSix_1">
                                                <%= Resources.Content.EmailOptions%>
                                            </a>
                                        </h4>
                                    </div>
                                    <div id="collapseSix_1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix_1" aria-expanded="false">
                                        <div class="panel-body">
                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_MailTip" runat="server" Text="<%$ Resources:Content,Mailtip %>"></asp:Literal>:
                                                </div>
                                                <div class="col-sm-8 col-xs-12">
                                                    <asp:TextBox ID="TxBx_Mailtip" runat="server" TextMode="MultiLine" Width="100%" Rows="5" MaxLength="173"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <asp:Literal ID="Ltrl_proxyAddresses" runat="server" Text="<%$ Resources:Content,FAM0074 %>"></asp:Literal>:
                                                </div>
                                                <div class="col-sm-8 col-xs-12">

                                                    <div class="row">
                                                        <div class="col-sm-5 col-xs-12 row-label">
                                                            <asp:Literal ID="Ltrl_AddressType" runat="server" Text="<%$ Resources:Content,FAM00112 %>"></asp:Literal>
                                                        </div>
                                                        <div class="col-sm-7 col-xs-12">
                                                            <asp:RadioButton ID="Rbtn_SMTP" runat="server" Text="SMTP" GroupName="addresstype"
                                                                Checked="true" onchange="AddressTypeChanged()" /><br />
                                                            <asp:RadioButton ID="Rbtn_Custom" runat="server" Text="<%$ Resources:Content,CustomAddressType %>"
                                                                GroupName="addresstype" onchange="AddressTypeChanged()" />
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-xs-12">
                                                            <asp:Literal ID="Ltrl_proxyAddress" runat="server" Text="<%$ Resources:Content,GN0000491 %>"></asp:Literal>
                                                        </div>

                                                        <ajax:UpdatePanel ID="UP_ProxyAddressType" runat="server" UpdateMode="Conditional"
                                                            ChildrenAsTriggers="true">
                                                            <Triggers>
                                                                <ajax:AsyncPostBackTrigger ControlID="Btn_AddProxyAddress" EventName="Click" />
                                                            </Triggers>
                                                            <ContentTemplate>
                                                                <div class="col-sm-5" id="div_UP_ProxyAddressType" runat="server" style="display: None">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_CustomAddressType" runat="server" CssClass="CustomAddressType"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:Literal ID="Ltrl_CustomAddressTypeNote" runat="server" Text="<%$ Resources:Content, CustomAddressTypeNote%>"></asp:Literal>
                                                                </div>
                                                            </ContentTemplate>
                                                        </ajax:UpdatePanel>

                                                        <ajax:UpdatePanel ID="UP_ProxyAddressText" runat="server" UpdateMode="Conditional"
                                                            ChildrenAsTriggers="true">
                                                            <Triggers>
                                                                <ajax:AsyncPostBackTrigger ControlID="Btn_AddProxyAddress" EventName="Click" />
                                                            </Triggers>
                                                            <ContentTemplate>
                                                                <div class="col-sm-5">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_proxyAddress" runat="server"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:CheckBox ID="CB_IsReplyToAddress" runat="server" Text="<%$ Resources:Content,IsReplyToAddress %>" />
                                                                </div>
                                                                <div class="col-sm-5" id="div_DDL_proxyAddressDomains" runat="server">
                                                                    <div class="form-group at-the-rate">
                                                                        <asp:Label ID="Lbl_emailSeperator" runat="server" Text="@"></asp:Label>
                                                                        <asp:DropDownList ID="DDL_proxyAddressDomains" runat="server">
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                    <%--<asp:RegularExpressionValidator ID="REV_proxyAddress" runat="server"
                                                                        ValidationExpression="<%$ Resources:MPRegex,Alias %>" ErrorMessage='<%$Resources:Content, DGN1110038%>'
                                                                        ControlToValidate="TxBx_proxyAddress" Display="None" SetFocusOnError="true" ValidationGroup="AddProxyAddress">
                                                                    </asp:RegularExpressionValidator>--%>
                                                                </div>
                                                                <div class="col-sm-2 col-xs-12">
                                                                    <asp:Button ID="Btn_AddProxyAddress" CausesValidation="true" ValidationGroup="AddProxyAddress"
                                                                        class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,DGN1110333 %>" />
                                                                    <asp:ValidationSummary ID="VS_AddProxyAddres" runat="server" ShowMessageBox="true"
                                                                        ShowSummary="false" ValidationGroup="AddProxyAddress" />

                                                                </div>
                                                            </ContentTemplate>
                                                        </ajax:UpdatePanel>


                                                    </div>


                                                    <ajax:UpdatePanel ID="UP_ProxyAddresses" runat="server" UpdateMode="Conditional"
                                                        ChildrenAsTriggers="true">
                                                        <Triggers>
                                                            <ajax:AsyncPostBackTrigger ControlID="Btn_AddProxyAddress" EventName="Click" />
                                                        </Triggers>
                                                        <ContentTemplate>
                                                            <asp:Repeater ID="Rep_ProxyAddresses" runat="server">
                                                                <ItemTemplate>
                                                                    <div>
                                                                        <asp:HiddenField ID="HF_Index" runat="server" Value='<%# Container.ItemIndex +  1 %>' />
                                                                        <div class="row">
                                                                            <div class="col-sm-5 col-xs-12">
                                                                                <div class="form-group">
                                                                                    <div class="form-line">
                                                                                        <asp:TextBox ID="Txbx_AddressType" runat="server" Text='<%# Eval("AddressType") %>'></asp:TextBox>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-sm-5 col-xs-12">
                                                                                <div class="form-group">
                                                                                    <div class="form-line">
                                                                                        <asp:TextBox ID="TxBx_proxyAddress" runat="server" Text='<%# Eval("Address") %>'></asp:TextBox>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-sm-2 col-xs-12">
                                                                                <div class="form-group">
                                                                                    <asp:LinkButton ID="Lb_Delete" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$Resources:Content,GN0000278%>"
                                                                                        CommandArgument='<%# Container.ItemIndex %>' CommandName="DeleteAddress"></asp:LinkButton>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </ItemTemplate>
                                                            </asp:Repeater>
                                                        </ContentTemplate>
                                                    </ajax:UpdatePanel>

                                                </div>

                                            </div>

                                        </div>

                                    </div>
                                </div>

                            </div>
                        </div>
                        <div class="col-xs-12">
                            <asp:Button ID="Btn_SaveGroup" runat="server" Text="<%$ Resources:Content,GN0000281 %>"
                                class="btn btn-primary waves-effect btnAction" CausesValidation="true" ValidationGroup="SaveGroup" />

                            <asp:Button ID="Btn_Cancel" runat="server" Text="<%$ Resources:Content,GN0000572 %>"
                                class="btn btn-primary waves-effect" CausesValidation="false" />

                            <asp:ValidationSummary ID="VS_SaveGroup" runat="server" ShowMessageBox="true" ShowSummary="false"
                                ValidationGroup="SaveGroup" HeaderText="<%$ Resources:Content, EM000001%>" />
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
</asp:Panel>

<asp:Panel ID="Pnl_GroupGroupOperations" runat="server" Visible="false">
    <UC:GroupGroupOperations ID="GroupGroupOperations1" runat="server" />
</asp:Panel>

<asp:Panel ID="Pnl_BulkDistributionList" runat="server" Visible="false">
    <UC:BulkDistributionList ID="BulkDistributionList1" runat="server" />
</asp:Panel>
