<%@ page language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="Admin_Exchange_ExchangeServerGroups, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>
<%@ Register Src="~/PCC/Exchange/CC/PSTSettings.ascx" TagName="PSTSettings" TagPrefix="UC" %>
<%@ Register Src="~/PCC/Exchange/CC/AddEditOWAPolicy.ascx" TagName="AddEditOWAPolicy" TagPrefix="UC" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TagPrefix="cc1" %>

<asp:Content ID="Content4" ContentPlaceHolderID="CPH_Content" runat="Server">

    <script type="text/javascript">
        //Server Heath Check Graph
        function GetCpuAndMemoryHistory(event, ServerIdAndIP) {
            var params = "{'ServerIdAndIP': '" + ServerIdAndIP + "'}";
            $.ajax({
                type: "POST",
                url: "ExHome.aspx/GetAsyncServerCpuAndMemoryStats",
                async: true,
                data: params,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (msg) {
                    if (msg.d.indexOf('Error') < 0) {
                        var receivedArray = msg.d.split("↝");
                        var legendXLabelText = receivedArray[0];
                        var headerLabelText = receivedArray[1];
                        var graphData = receivedArray[3];

                        $find('<%= MPE_ServerCpuAndMemoryStatsHostory.ClientID %>').show();
                        SetLabelText(legendXLabelText + "↝" + headerLabelText);
                        LoadCpuUsageGraph(graphData);
                        LoadMemoryUsageGraph(graphData);
                    }
                    else {
                        alert(msg.d);
                    }
                },
                error: function (errorMessage) {
                    alert(errorMessage);
                }
            });
        }
        function SetLabelText(response) {
            var receivedArray = response.split("↝");
            var legendXLabelText = receivedArray[0];
            var headerLabelText = receivedArray[1];
            $("#Lbl_GraphXaxis").text(legendXLabelText);
            $("#Lbl_GraphXaxis2").text(legendXLabelText);
            $("#Lbl_UsagePopupHeader").text(headerLabelText);

        }

        function LoadCpuUsageGraph(dataParam) {
            $("#graph_CPU").empty();
            var body_color = getCookie('body_color');
            var lblColor = 'black'
            if (body_color == 'night-mode') {
                lblColor = 'white';
            }
            var line = Morris.Area({
                element: 'graph_CPU',
                data: $.parseJSON(dataParam),
                xkey: 'x',
                ykeys: ['y'],
                labels: ['<%=Resources.Content.CPUUsage%>'],
                fillOpacity: 0.6,
                hideHover: 'auto',
                behaveLikeLine: true,
                resize: true,
                pointFillColors: ['#ffffff'],
                pointStrokeColors: ['black'],
                lineColors: ['gray', 'red'],
                parseTime: false,
                backgroundColor: '#FFFFFF',
                labelColor: lblColor,

                hoverCallback: function (index, options, content, row) {
                    //console.log("index" + index + "- options" + options + " - content: " + content + " row: " + row);
                    //console.log(options);
                    //console.log(row);
                    return "<div class='morris-hover-row-label'>" + row.w + "</div><div class='morris-hover-point' style='color: b'>" +
                "<%=Resources.Content.CPUUsage%>: " + row.y + "</div>";
                }
            });
            var parentDivWidth = $("#graph").parent("div").width();
            $("#graph").css("min-width", parentDivWidth);
            $("#graph > svg:nth-child(1)").css("min-width", parentDivWidth);
            line.redraw();
        }

        function LoadMemoryUsageGraph(dataParam) {
            $("#graph_Memory").empty();
            var body_color = getCookie('body_color');
            var lblColor = 'black'
            if (body_color == 'night-mode') {
                lblColor = 'white';
            }
            var line = Morris.Area({
                element: 'graph_Memory',
                data: $.parseJSON(dataParam),
                xkey: 'x',
                ykeys: ['z'],
                labels: ['<%=Resources.Content.MemoryUsage%>'],
                fillOpacity: 0.6,
                hideHover: 'auto',
                behaveLikeLine: true,
                resize: true,
                pointFillColors: ['#ffffff'],
                pointStrokeColors: ['black'],
                lineColors: ['gray', 'red'],
                parseTime: false,
                backgroundColor: '#FFFFFF',
                labelColor: lblColor,

                hoverCallback: function (index, options, content, row) {
                    //console.log("index" + index + "- options" + options + " - content: " + content + " row: " + row);
                    //console.log(options);
                    //console.log(row);
                    return "<div class='morris-hover-row-label'>" + row.w + "</div><div class='morris-hover-point' style='color: b'>" +
                    "<%=Resources.Content.MemoryUsage%>: " + row.z + "</div>";
                }
            });
            var parentDivWidth = $("#graph").parent("div").width();
            $("#graph").css("min-width", parentDivWidth);
            $("#graph > svg:nth-child(1)").css("min-width", parentDivWidth);
            line.redraw();
        }
    </script>
    <ajax:UpdatePanel ID="UP_Filter" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div class="col-xs-12">
                <div class="card">
                    <%--<div class="header">
                        <h2>
                            <asp:Literal ID="Ltl_SubsInfo" runat="server" /></h2>
                    </div>--%>
                    <div class="body">
                        <EM:TabContainer ID="TbCntr_ServerGroups" runat="server" OnClientActiveTabChanged="loadTabPanel">
                            <EM:TabPanel ID="Tab_ServerGroups" runat="server" HeaderText="<%$ Resources:Content,M0095%>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent0" runat="server">
                                        <asp:Panel ID="Pnl_Listing" runat="server">
                                            <%--Start Search box--%>
                                            <asp:Panel ID="Pnl_Filter" runat="server" DefaultButton="Btn_Filter">
                                                <div class="row">
                                                    <div class="panel-group search-panel" id="AS_ServerGroup" role="tablist" aria-multiselectable="true">
                                                        <div class="col-xs-12" role="tab" id="SH_ServerGroup">
                                                            <div class="card">
                                                                <div class="header" role="button" data-toggle="collapse" data-parent="#AS_ServerGroup" href="#<%= CSB_ServerGroup.ClientID%>" aria-expanded="true" aria-controls="SH_ServerGroup">
                                                                    <h3>
                                                                        <%= Resources.Content.GN0000395%>
                                                                    </h3>
                                                                </div>
                                                                <div id="CSB_ServerGroup" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_ServerGroup" aria-expanded="false">
                                                                    <div class="row">
                                                                        <div class="col-md-3 col-sm-6 col-xs-12">
                                                                            <div class="form-group form-float">
                                                                                <asp:DropDownList ID="DDL_AIacticePAckages" runat="server">
                                                                                    <asp:ListItem Selected="True" Text='<%$ Resources:Content,SelectStatus %>' Value="-1"></asp:ListItem>
                                                                                    <asp:ListItem Text='<%$ Resources:Content,GN00001309 %>' Value="1"></asp:ListItem>
                                                                                    <asp:ListItem Text='<%$ Resources:Content,GN00001310 %>' Value="0"></asp:ListItem>
                                                                                </asp:DropDownList>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-xs-12">
                                                                            <div class="form-group form-float">
                                                                                <asp:Button ID="Btn_Filter" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000395%>" />
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <%--End search box--%>
                                            <%--Start button--%>
                                            <div class="row">
                                                <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">
                                                            <asp:Button ID="BTN_AddServer" class="btn btn-primary waves-effect btnAction" runat="server" Text='<%$ Resources:Content,GN0000970 %>' />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-xs-12">
                                                    <asp:GridView ID="GV_ServerGroups" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="true"
                                                        EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">

                                                        <Columns>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, String385 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Img_SGStatus" runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000971 %>' SortExpression="ServerGrouPName" HeaderStyle-CssClass="col-xs-5" ItemStyle-CssClass="col-xs-5">
                                                                <ItemTemplate>
                                                                    <asp:HiddenField ID="HF_SGId" runat="server" />
                                                                    <asp:LinkButton ID="LB_SGName" runat="server" CommandName="ListServers" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ServerGroupID") %>'
                                                                        Text='<%# DataBinder.Eval(Container, "DataItem.ServerGrouPName") %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, DGN1110096 %>' HeaderStyle-CssClass="col-xs-5" ItemStyle-CssClass="col-xs-5">
                                                                <ItemTemplate>
                                                                    <asp:Literal ID="Ltl_Provider" runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                                <ItemTemplate>
                                                                    <ul class="option-menu">
                                                                        <li class="dropdown">
                                                                            <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                                                                <i class="material-icons">menu</i>
                                                                            </a>
                                                                            <ul class="dropdown-menu pull-right" id="UL_OptionMenu" runat="server">

                                                                                <li>
                                                                                    <asp:HyperLink ID="LB_AddServer" CssClass="btnAction" runat="server" Text="<%$ Resources:Content,DGN1110093%>" />
                                                                                </li>
                                                                                <li>
                                                                                    <asp:LinkButton ID="LBSG_EnableDisable" CssClass="btnAction" CommandName="EnableDisable"
                                                                                        runat="server" Text="<%$ Resources:Content,GN00001025%>" />
                                                                                </li>
                                                                                <li>
                                                                                    <asp:HyperLink ID="LB_Edit" runat="server" Text="<%$ Resources:Content,GN0000276%>" />
                                                                                </li>
                                                                                <li>
                                                                                    <asp:LinkButton ID="LB_AssignUMPolicy" CssClass="btnAction" CommandName="AssignUMPolicy"
                                                                                        CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ServerGroupID") %>'
                                                                                        runat="server" Text="<%$ Resources:Content,UMP001%>" />
                                                                                </li>
                                                                                <li>
                                                                                    <asp:LinkButton ID="LB_PSTSetting" CssClass="btnAction" CommandName="PSTSetting"
                                                                                        CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ServerGroupID") %>'
                                                                                        runat="server" Text="<%$ Resources:Content,PSTExportSettings%>" />
                                                                                </li>
                                                                                <li>
                                                                                    <asp:LinkButton ID="LB_SignatureSettings" CssClass="btnAction" CommandName="SignatureSettings"
                                                                                        CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ServerGroupID") %>'
                                                                                        runat="server" Text="<%$ Resources:Content,SignatureSettings%>" />
                                                                                </li>
                                                                                <li>
                                                                                    <asp:LinkButton ID="LB_Remove" CssClass="btnAction" CommandName="RemoveServerGroup"
                                                                                        runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                                                                                    <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,DGN1110094%>"
                                                                                        TargetControlID="LB_Remove" runat="server">
                                                                                    </EM:ConfirmButtonExtender>
                                                                                </li>

                                                                            </ul>
                                                                        </li>
                                                                    </ul>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <%--PagerTemplate Start--%>
                                                        <PagerTemplate>
                                                            <EM:Pager ID="Pager1" runat="server" />
                                                        </PagerTemplate>
                                                        <%--PagerTemplate End--%>
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                            <%--end button--%>
                                        </asp:Panel>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_Servers" runat="server" Enabled="false" HeaderText="<%$ Resources:Content,GN00103 %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent1" Visible="false" runat="server">
                                        <div class="row">
                                            <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow2" runat="server">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.GN00001320%></h3>
                                                    </div>
                                                    <div class="body">
                                                        <asp:Button ID="btn_AddSGMember" class="btn btn-primary waves-effect btnAction" runat="server" Text='<%$ Resources:Content,DGN1110098 %>' />
                                                        <asp:Button ID="btnEnable" runat="server" Text="<%$ Resources:Content,strEnable%>" class="btn btn-primary waves-effect btnAction" Custom1="Custom" Style="display: none" />
                                                        <asp:Button ID="btnDisable" runat="server" Text="<%$ Resources:Content,strDisable%>" class="btn btn-primary waves-effect btnAction" Custom1="Custom" Style="display: none" />


                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <div class="col-sm-2 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:Content,GN0000102%>"
                                                                        EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <asp:Label ID="Lbl_SGName" runat="server" Text="<%$ Resources:Content,DGN1110254 %>"
                                                                        EnableViewState="false" />
                                                                </div>
                                                                <div class="col-sm-2 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:Content,DGN1110096%>"
                                                                        EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Content,DGN1110254 %>"
                                                                        EnableViewState="false" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xs-12">
                                                <asp:GridView ID="GV_Servers" CssClass="table table-bordered table-striped table-hover" AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>'
                                                    runat="server" AutoGenerateColumns="False">

                                                    <Columns>
                                                        <asp:TemplateField HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" HeaderText='<%$ Resources:Content,GN0000370 %>'>
                                                            <HeaderTemplate>
                                                                <asp:CheckBox class="option-menu" ID="ChkBx_All" runat="server" Text=" " onclick="SetCheckedHeader(this.checked, this,'All');" />
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:CheckBox class="option-menu" ID="ChkBx_Item" runat="server" Text=" " onclick="SetCheckedHeader(this.checked, this,'1');" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText='<%$ Resources:Content, String385 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                            <ItemTemplate>
                                                                <asp:Label ID="Img_SGMStatus" runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000980 %>' HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-5">
                                                            <ItemTemplate>
                                                                <asp:Label ID="Lbl_SNName" runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText='<%$ Resources:Content, GN000174 %>' HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                            <ItemTemplate>
                                                                <asp:Label ID="Lbl_IP" runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-6">
                                                            <ItemTemplate>
                                                                <asp:LinkButton class="btn btn-primary waves-effect" ID="LB_TestService" CommandName="TestService" runat="server" Text="<%$ Resources:Content,String318%>" />
                                                                <%--<asp:LinkButton class="btn btn-primary waves-effect" ID="LB_Clone" CommandName="CloneServer" runat="server" Text="<%$ Resources:Content,DGN1110198%>" />--%>
                                                                <asp:LinkButton class="btn btn-primary waves-effect btnAction" ID="LB_EnableDisable" CommandName="EnableDisable" runat="server" Text="<%$ Resources:Content,GN00001025%>" />
                                                                <asp:HyperLink class="btn btn-primary waves-effect" ID="LB_Edit" CommandName="EditServer" runat="server" Text="<%$ Resources:Content,GN0000276%>" />
                                                                <asp:LinkButton class="btn btn-primary waves-effect btnAction" ID="LB_Remove" CommandName="RemoveServer" runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                                                                <button id="Btn_HealthCheck"
                                                                    class="btn btn-primary"
                                                                    onclick="GetCpuAndMemoryHistory($(this),'<%# DataBinder.Eval(Container.DataItem, "SGMemberID") & "↝" & DataBinder.Eval(Container.DataItem, "IP")%>' );return false;">
                                                                    <%= Resources.Content.strHealthCheck%></button>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <%--PagerTemplate Start--%>
                                                    <PagerTemplate>
                                                        <EM:Pager ID="Pager2" runat="server" />
                                                    </PagerTemplate>
                                                    <%--PagerTemplate End--%>
                                                </asp:GridView>
                                                <asp:HiddenField ID="HF_SGMember" runat="server" />
                                                <asp:Button ID="Btn_Dummy" runat="server" Text="" Style="display: none" />
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_UMPolicies" runat="server" Enabled="false" HeaderText="<%$ Resources:Content,String541 %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab2" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent2" Visible="false" runat="server">
                                        <div class="row" id="Pnl_UMPolicy" runat="server">
                                            <div class="col-xs-12" id="Pnl_UMPolicyListing" runat="server">
                                                <asp:GridView ID="GV_UMPolicies" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">

                                                    <Columns>
                                                        <asp:TemplateField HeaderText='<%$ Resources:Content, L00189 %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                            <ItemTemplate>
                                                                <asp:Literal ID="Ltl_PolciyName" runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content, String499 %>" HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                                                            <ItemTemplate>
                                                                <asp:Literal ID="Ltl_AssignedRes" runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content, String500 %>" HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                                                            <ItemTemplate>
                                                                <asp:Literal ID="Ltl_AssignedCust" 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="LB_EditAssaignment" class="btn btn-primary waves-effect" CommandName="EditAssaignment" runat="server" Text="<%$ Resources:Content,SMI0231%>" />
                                                                <%--<asp:LinkButton ID="LB_Remove" class="btn btn-primary waves-effect" CommandName="RemoveServerGroup" runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                                            <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,DGN1110094%>" TargetControlID="LB_Remove" runat="server">
                                            </EM:ConfirmButtonExtender>--%>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <%--PagerTemplate Start--%>
                                                    <PagerTemplate>
                                                        <EM:Pager ID="Pager3" runat="server" />
                                                    </PagerTemplate>

                                                    <%--PagerTemplate End--%>
                                                </asp:GridView>
                                            </div>
                                            <div class="col-xs-12" id="Pnl_AssignUMPolicy" runat="server" style="display: none;">
                                                <div class="card">
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal19" runat="server" Text="<%$Resources:Content,L00189%>" EnableViewState="false"></asp:Literal>:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:Literal ID="Ltl_PolicyName" runat="server" />
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Content,String499%>" EnableViewState="false"></asp:Literal>:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:CheckBox ID="CB_AllResellers" runat="server" Text=" " data-label="Resellers Allowed" />
                                                            </div>
                                                        </div>
                                                        <div class="row" id="TR_AllResellers" runat="server" style="display: none;">

                                                            <div class="col-sm-offset-3 col-sm-9 col-xs-12">
                                                                <asp:RadioButton ID="RB_AllRes" runat="server" Checked="true" GroupName="AllRes" Text="<%$ Resources:Content,String501%>" data-label="All Resellers" />
                                                                <br />
                                                                <asp:RadioButton ID="RB_SelectedRes" runat="server" GroupName="AllRes" Text="<%$ Resources:Content,String502%>" data-label="Selected Resellers" />
                                                            </div>

                                                            <div class="col-xs-12" id="Tbl_AllResellers" runat="server" style="display: none;">
                                                                <ajax:UpdatePanel ID="UP_Resellers" runat="server">
                                                                    <ContentTemplate>
                                                                        <EM:AddSelectableSelected ID="UCResellers" runat="server" ClientSideOptimized="true" data-label="Resellers" />
                                                                    </ContentTemplate>
                                                                </ajax:UpdatePanel>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal2" runat="server" Text="<%$Resources:Content,String500%>" EnableViewState="false"></asp:Literal>:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:CheckBox ID="CB_AllCustomers" runat="server" Text=" " data-label="Customers Allowed" />
                                                            </div>
                                                        </div>
                                                        <div class="row" id="TR_AllCustomers" runat="server" style="display: none;">
                                                            <div class="col-sm-offset-3 col-sm-9 col-xs-12">
                                                                <asp:RadioButton ID="RB_AllCust" runat="server" Checked="true" GroupName="AllCust" Text="<%$ Resources:Content,String503%>" data-label="All Customers" />
                                                                <br />
                                                                <asp:RadioButton ID="RB_SelectedCust" runat="server" GroupName="AllCust" Text="<%$ Resources:Content,String504%>" data-label="Selected Customers" />
                                                            </div>

                                                            <div class="col-xs-12" id="Tbl_AllCustomers" runat="server" style="display: none;">
                                                                <ajax:UpdatePanel ID="UP_Customers" runat="server">
                                                                    <ContentTemplate>
                                                                        <EM:AddSelectableSelected ID="UCCustomers" runat="server" ClientSideOptimized="true" data-label="Customers" />
                                                                    </ContentTemplate>
                                                                </ajax:UpdatePanel>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <asp:Button ID="Btn_SavePolicy" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,GN0000281 %>" />
                                                                <asp:Button ID="Btn_Cancel" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000572 %>" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_Setup" runat="server" Enabled="true" HeaderText="<%$ Resources:Content,strEmailClients %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab3" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent3" Visible="False" runat="server">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <asp:MultiView ID="mvAddEmailClient" runat="server" ActiveViewIndex="0">
                                                    <asp:View ID="vAddEmailClient" runat="server">
                                                        <%-- #Sealed Images --%>
                                                        <div class="card Div_OpsRow" id="Div_OpsRow3" runat="server">
                                                            <div class="header">
                                                                <h3><%= Resources.Content.GN00001320%></h3>
                                                            </div>
                                                            <div class="body">
                                                                <asp:Button ID="Btn_AddEmailClient" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,strAddEmailClients%>' />
                                                            </div>
                                                        </div>
                                                        <br />
                                                        <asp:GridView ID="GV_EmailClients" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="false"
                                                            EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False" DataKeyNames="DisplayName,URL,ClientType">

                                                            <Columns>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, GN00001113 %>' HeaderStyle-CssClass="col-xs-2">
                                                                    <ItemTemplate>
                                                                        <asp:HiddenField ID="HF_GroupId" runat="server" />
                                                                        <asp:LinkButton ID="LB_ImageName" CommandName="EditRecord" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ID")%>'
                                                                            runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DisplayName")%>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, SMI1900 %>' HeaderStyle-CssClass="col-xs-6 break-word-all" ItemStyle-CssClass="col-xs-6 break-word-all">
                                                                    <ItemTemplate>
                                                                        <asp:Literal ID="Ltl_ImagePath" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.URL") %>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, strEmailClientType %>' HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                                    <ItemTemplate>
                                                                        <asp:Literal ID="Ltl_ClientType" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ClientType") %>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="LB_Edit" class="btn btn-primary waves-effect" CommandName="EditRecord" runat="server"
                                                                            Text="<%$ Resources:Content,GN0000276%>" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ID")%>' />
                                                                        <asp:LinkButton ID="LB_Remove" class="btn btn-primary waves-effect btnAction" CommandName="RemoveRecord"
                                                                            runat="server" Text="<%$ Resources:Content,GN0000278%>" OnClientClick="return confirm('Are you sure you want to delete this Email Client?')"
                                                                            CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ID") %>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <%--PagerTemplate Start--%>
                                                            <%--   <PagerTemplate>
                                                                <EM:Pager ID="Pager4" runat="server" />
                                                            </PagerTemplate>--%>
                                                            <%--PagerTemplate End--%>
                                                        </asp:GridView>
                                                    </asp:View>
                                                    <asp:View ID="vEditEmailClient" runat="server">
                                                        <div class="card">
                                                            <div class="header">
                                                                <h3>
                                                                    <asp:Literal ID="LI_AddEmailClient" runat="server" Text='<%$ Resources:Content,strAddEmailClients%>'></asp:Literal></h3>
                                                            </div>
                                                            <div class="body" id="Div_EmailClient" runat="server">
                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            <asp:Literal ID="Literal4" runat="server" Text='<%$ Resources:Content,strEmailClientType%>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <div class="form-group">
                                                                            <asp:DropDownList ID="DDL_ClientType" runat="server" data-label="Email Client Type">
                                                                                <asp:ListItem Text="OutLook" Value="outlook"></asp:ListItem>
                                                                                <asp:ListItem Text="Entourage" Value="entourage"></asp:ListItem>
                                                                            </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,GN00001113%>'></asp:Literal>:</label>
                                                                    </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="250" data-label="Display Name"></asp:TextBox>
                                                                                <asp:RequiredFieldValidator ID="RFV_ImageName" runat="server" Display="None" SetFocusOnError="true"
                                                                                    ValidationGroup="EmailClient" ControlToValidate="TxBx_DisplayName"></asp:RequiredFieldValidator>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-sm-5 col-xs-12">
                                                                        <asp:Literal ID="LTL_strExampleEmailClients" runat="server" Text='<%$ Resources:Content,strExampleEmailClients%>'></asp:Literal>
                                                                    </div>
                                                                </div>
                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            *<asp:Literal ID="Literal3" runat="server" Text='<%$ Resources:Content,SMI1900%>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <div class="form-group">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Path" runat="server" MaxLength="1000" data-label="Url"></asp:TextBox>
                                                                                <asp:RequiredFieldValidator ID="RFV_Path" runat="server" Display="None" SetFocusOnError="true"
                                                                                    ValidationGroup="EmailClient" ControlToValidate="TxBx_Path"></asp:RequiredFieldValidator>
                                                                                <asp:RegularExpressionValidator ID="regexURL" runat="server" Display="None" ControlToValidate="TxBx_Path"
                                                                                    ValidationGroup="EmailClient" ErrorMessage="URL is not Valid."
                                                                                    ValidationExpression="(http|https)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?" SetFocusOnError="true" />
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="row">
                                                                    <div class="col-xs-12">
                                                                        <asp:ValidationSummary ID="ValidationSum_1" runat="server" HeaderText='<%$ Resources:Content,EM000001 %>'
                                                                            ShowMessageBox="True" ShowSummary="False" ValidationGroup="EmailClient" />
                                                                        <asp:Button ID="Btn_Save" runat="server" ValidationGroup="EmailClient" class="btn btn-primary waves-effect btnAction"
                                                                            Text='<%$ Resources:Content,GN0000281%>' />
                                                                        <asp:Button ID="Btn_EmailClientCancel" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>'
                                                                            class="btn btn-primary waves-effect" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </asp:View>
                                                </asp:MultiView>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_PSTExSetting" runat="server" Enabled="false" HeaderText="<%$ Resources:Content,PSTExportSettings %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab4" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent4" Visible="true" runat="server">
                                        <UC:PSTSettings ID="PSTSettings1" runat="server"></UC:PSTSettings>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_GeneralSettings" runat="server" Enabled="true" HeaderText="<%$ Resources:Content,SM400028 %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab5" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent5" Visible="False" runat="server">
                                        <div class="card">
                                            <div class="body">
                                                <div class="row">
                                                    <div class="col-sm-5 col-xs-10 row-label">
                                                        <asp:Literal ID="Literal17" runat="server" Text="<%$ Resources:Content,HideCustomMailbox %>" EnableViewState="false"></asp:Literal>:
                                                    </div>
                                                    <div class="col-xs-2">
                                                        <asp:CheckBox ID="Chbx_HideCustomMailbox" runat="server" Text=" " Checked="false" data-label="Hide Custom Mailbox Size option from Add/Edit and Group Actions" />
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-sm-5 col-xs-10 row-label">
                                                        <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,ShowSetPrimary %>" EnableViewState="false"></asp:Literal>:
                                                    </div>
                                                    <div class="col-xs-2">
                                                        <asp:CheckBox ID="CB_ShowSetPrimary" runat="server" Text=" " Checked="false" data-label="Show Set as Primary Email" />
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-sm-5 col-xs-10 row-label">
                                                        <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:Content,strBookingRequests%>" EnableViewState="false"></asp:Literal>:
                                                    </div>
                                                    <div class="col-sm-7 col-xs-12">
                                                        <div class="form-group">
                                                            <asp:RadioButton ID="RB_Customize" runat="server" Text="<%$ Resources:Content,FAM0099 %>" GroupName="BookingOptions" data-label="Customized setting to accept/decline booking request"></asp:RadioButton>
                                                            <br />
                                                            <asp:RadioButton ID="RB_Automatic" runat="server" Text="<%$ Resources:Content,FAM00100 %>" GroupName="BookingOptions" data-label="Accept or decline booking requests automatically"></asp:RadioButton>
                                                            <br />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-sm-5 col-xs-10 row-label">
                                                        <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Content,DaystoKeepMF %>" EnableViewState="false"></asp:Literal>:
                                                    </div>
                                                    <div class="col-xs-2">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox runat="server" ID="TxBx_DaysToKeepMailFlowLogs" Text="0" data-label="Days to keep Mailflow Logs" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-sm-5 col-xs-10 row-label">
                                                        <asp:Literal ID="Literal21" runat="server" Text="<%$ Resources:Content,strSetQuotaToZero %>" EnableViewState="false"></asp:Literal>:
                                                    </div>
                                                    <div class="col-xs-2">
                                                        <asp:CheckBox ID="ChBx_RestrictQuotaOnUserDisable" runat="server" Text=" " Checked="false" data-label="Restrict Quota on User Disable" />
                                                    </div>
                                                </div>
                                                <%--<div class="row">
                                                    <div class="col-sm-5 col-xs-10 row-label">
                                                        <asp:Literal ID="Literal22" runat="server" Text="<%$ Resources:Content,DisableEnableMailboxwithADUser %>" EnableViewState="false"></asp:Literal>:
                                                    </div>
                                                    <div class="col-xs-2">
                                                        <asp:CheckBox ID="ChBx_AutoDisableMailbox" runat="server" Text=" " Checked="false" />
                                                    </div>
                                                </div>--%>

                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <asp:Button ID="Btn_UpdateHideCustomSize" runat="server" Text="<%$Resources:Content,Save%>" class="btn btn-primary waves-effect btnAction" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_SendConnector" runat="server" Enabled="true" HeaderText="<%$ Resources:Content,strSendConnectorforRelay %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab6" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent6" Visible="False" runat="server">
                                        <div class="card">
                                            <div class="body">
                                                <div class="row" id="DivConnectorListing" runat="server">
                                                    <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow4" runat="server">
                                                        <div class="card">
                                                            <div class="header">
                                                                <h3><%= Resources.Content.GN00001320%></h3>
                                                            </div>
                                                            <div class="body">
                                                                <asp:Button ID="btn_AddSendConnector" class="btn btn-primary waves-effect btnAction" runat="server" Text='<%$ Resources:Content,strAddSendConnector %>' />
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-xs-12">
                                                        <asp:GridView ID="GV_SendConnector" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="false"
                                                            EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">

                                                            <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" Text='<%# IIf(DataBinder.Eval(Container, "DataItem.Status"), "Enabled", "Disabled") %>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, strName %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                    <ItemTemplate>
                                                                        <asp:Literal ID="Ltl_Name" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, strSmartHost %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                    <ItemTemplate>
                                                                        <asp:Literal ID="Ltl_SmartHost" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.SmartHost") %>' />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, AppliesTo %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="LB_Details" runat="server" />
                                                                        <div id="Div_Details" runat="server" style="display: none" />
                                                                        <%--                                                                        <asp:Literal ID="Ltl_AppliesTo" runat="server" Text='<%# MachSol.MachPanel.DBCore.Exchange2007.Common.GetCustomersNameAndCompanyByIds(DataBinder.Eval(Container, "DataItem.CustomerIds").ToString().TrimStart(",").TrimEnd(",")) %>' />--%>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                                    <ItemTemplate>
                                                                        <ul class="option-menu">
                                                                            <li class="dropdown">
                                                                                <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                                                                    <i class="material-icons">menu</i>
                                                                                </a>
                                                                                <ul class="dropdown-menu pull-right" id="UL_OptionMenu" runat="server">
                                                                                    <%-- <li>
                                                                                        <asp:LinkButton ID="LB_Apply" CommandName="ApplySendConnector"
                                                                                            runat="server" Text="<%$ Resources:Content,GN0001189%>" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ConnectorId") %>' />
                                                                                    </li>--%>
                                                                                    <li>
                                                                                        <asp:LinkButton ID="LB_Edit" runat="server" CommandName="EditSendConnector"
                                                                                            CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ConnectorId") %>' Text="<%$ Resources:Content,GN0000276%>" />
                                                                                    </li>

                                                                                    <li>
                                                                                        <asp:LinkButton ID="LB_Remove" CssClass="btnAction" CommandName="RemoveSendConnector"
                                                                                            runat="server" Text="<%$ Resources:Content,GN0000278%>" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ConnectorId").ToString() + "↝" + DataBinder.Eval(Container, "DataItem.Name") %>' />
                                                                                        <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,strRemoveConnectorConfirmation%>"
                                                                                            TargetControlID="LB_Remove" runat="server">
                                                                                        </EM:ConfirmButtonExtender>
                                                                                    </li>

                                                                                </ul>
                                                                            </li>
                                                                        </ul>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <%--PagerTemplate Start--%>
                                                            <PagerTemplate>
                                                                <EM:Pager ID="Pager1" runat="server" />
                                                            </PagerTemplate>
                                                            <%--PagerTemplate End--%>
                                                        </asp:GridView>
                                                    </div>
                                                </div>

                                                <asp:Button ID="Dummy" runat="server" Style="display: none" />

                                                <asp:Panel ID="Panel1" runat="server" CssClass="width-modal-popup-auto" Style="display: none;">
                                                    <div class="col-xs-12">
                                                        <div class="card">
                                                            <div class="header">
                                                                <h3>
                                                                    <%= Resources.Content.SM200001%>
                                                                    <span>
                                                                        <button type="button" class="close" onclick="$find('<%=MP1.ClientID%>').hide();">&times;</button>
                                                                    </span>
                                                                </h3>
                                                            </div>
                                                            <div class="body">
                                                                <div class="row">
                                                                    <div class="col-xs-12">
                                                                        <div id="Div_ShowDetails" runat="server" />

                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-xs-12 row-label">
                                                                    <asp:Button ID="Btn_Close" CssClass="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,GN000150%>" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </asp:Panel>

                                                <EM:ModalPopupExtender runat="server" ID="MP1" BackgroundCssClass="modalBackground"
                                                    DropShadow="false" PopupControlID="Panel1" TargetControlID="Dummy" CancelControlID="Btn_Close">
                                                </EM:ModalPopupExtender>

                                                <div class="row" id="DivConnectorAddEdit" runat="server" visible="false">
                                                    <div class="col-xs-12">
                                                        <div class="card">
                                                            <div class="header">
                                                                <h3><%= Resources.Content.strSendConnectorfor%></h3>
                                                            </div>
                                                            <div class="body">

                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            *<asp:Literal ID="Literal9" runat="server" Text='<%$ Resources:Content,strName%>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <div class="form-group">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_ConnectName" runat="server" MaxLength="250" data-label="Connector Name"></asp:TextBox>
                                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="None" SetFocusOnError="true"
                                                                                    ValidationGroup="Connect" ControlToValidate="TxBx_ConnectName"></asp:RequiredFieldValidator>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            *<asp:Literal ID="Literal12" runat="server" Text='<%$ Resources:Content,strSmartHost%>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <div class="form-group">
                                                                            <asp:TextBox ID="TxBx_SmartHost" runat="server" TextMode="MultiLine" data-label="Smart Host"></asp:TextBox>
                                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="None" SetFocusOnError="true"
                                                                                ValidationGroup="Connect" ControlToValidate="TxBx_SmartHost"></asp:RequiredFieldValidator>

                                                                        </div>
                                                                    </div>
                                                                    <div class="col-sm-5 col-xs-12">
                                                                        <asp:Literal ID="Literal20" runat="server" Text='<%$ Resources:Content,strCommaSepratedValues%>'></asp:Literal>
                                                                    </div>
                                                                </div>

                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            *<asp:Literal ID="Literal13" runat="server" Text='<%$ Resources:Content,strRequireTLS%>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <asp:CheckBox ID="ChBx_TLS" runat="server" Text=" " data-label="Require TLS" />
                                                                    </div>
                                                                </div>
                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            *<asp:Literal ID="Literal14" runat="server" Text='<%$ Resources:Content,strEnabled%>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <asp:CheckBox ID="ChBx_Enabled" runat="server" Text=" " data-label="Enabled" />
                                                                    </div>
                                                                </div>


                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            *<asp:Literal ID="Literal18" runat="server" Text='<%$ Resources:Content,strPort %>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <div class="form-group">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Port" runat="server" Text="25" data-label="Port"></asp:TextBox>
                                                                            </div>
                                                                        </div>
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Display="None" SetFocusOnError="true"
                                                                            ValidationGroup="Connect" ControlToValidate="TxBx_Port"></asp:RequiredFieldValidator>
                                                                        <asp:RegularExpressionValidator ID='vldNumber' ControlToValidate='TxBx_Port' Display='Dynamic' ValidationGroup="Connect" ErrorMessage='Not a number' ValidationExpression='(^([0-9]*|\d*\d{1}?\d*)$)' runat='server'>
                                                                        </asp:RegularExpressionValidator>
                                                                    </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,strMaxMessageSize %>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <div class="form-group">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_MaxMessageSize" runat="server" data-label="Max Message Size (MB)"></asp:TextBox>
                                                                            </div>
                                                                        </div>
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="None" SetFocusOnError="true"
                                                                            ValidationGroup="Connect" ControlToValidate="TxBx_MaxMessageSize"></asp:RequiredFieldValidator>
                                                                        <asp:RegularExpressionValidator ID='RegularExpressionValidator1' ControlToValidate='TxBx_MaxMessageSize' Display='Dynamic' ValidationGroup="Connect" ErrorMessage='Not a number' ValidationExpression='(^([0-9]*|\d*\d{1}?\d*)$)' runat='server'>
                                                                        </asp:RegularExpressionValidator>
                                                                    </div>
                                                                    <div class="col-sm-1 col-xs-12">
                                                                        MB
                                                                    </div>

                                                                </div>

                                                                <div class="row">
                                                                    <div class="col-sm-2 col-xs-12 row-label">
                                                                        <label>
                                                                            *<asp:Literal ID="Literal15" runat="server" Text='<%$ Resources:Content,strUseExternalDNSServersEnabled%>'></asp:Literal>:</label>
                                                                    </div>
                                                                    <div class="col-sm-4 col-xs-12">
                                                                        <asp:CheckBox ID="ChBx_UseExternalDNSServersEnabled" runat="server" Text=" " data-label="Use of External DNS Server Enabled" />
                                                                    </div>
                                                                </div>



                                                                <div class="row">
                                                                    <div class="col-xs-12 row-label">
                                                                        <asp:Literal ID="Literal32" runat="server" Text='<%$ Resources:Content,SMI0369%>'></asp:Literal>
                                                                    </div>
                                                                    <div class="col-xs-12">
                                                                        <EM:AddSelectableSelected ID="UCConnectCustomers" runat="server" ClientSideOptimized="true" data-label="Allowed to Customers" />
                                                                    </div>
                                                                </div>
                                                                <div class="row">
                                                                    <div class="col-xs-12">
                                                                        <asp:ValidationSummary ID="ValidationSummary5" runat="server" HeaderText='<%$ Resources:Content,EM000001 %>'
                                                                            ShowMessageBox="True" ShowSummary="False" ValidationGroup="Connect" />
                                                                        <asp:Button ID="Btn_SaveConnect" runat="server" ValidationGroup="Connect" CssClass="btn btn-primary waves-effect btnAction"
                                                                            Text='<%$ Resources:Content,GN0000281%>' />
                                                                        <asp:Button ID="Btn_CancelConnect" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>'
                                                                            CssClass="btn btn-primary waves-effect" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_OWAPolicies" runat="server" Enabled="true" HeaderText="<%$ Resources:Content,OWAMailboxPolicies %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab7" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent7" Visible="False" runat="server">

                                        <div id="Div_OWAPoliciesListing" runat="server">
                                            <%--Start Search box--%>
                                            <asp:Panel ID="Pnl_OWAPoliciesFilter" runat="server" DefaultButton="Btn_FilterOWAPolicies">
                                                <div class="row">
                                                    <div class="panel-group search-panel" id="AS_OWAPolicies" role="tablist" aria-multiselectable="true">
                                                        <div class="col-xs-12" role="tab" id="SH_OWAPolicies">
                                                            <div class="card">
                                                                <div class="header" role="button" data-toggle="collapse" data-parent="#AS_OWAPolicies" href="#<%= CSB_OWAPolicies.ClientID%>" aria-expanded="true" aria-controls="SH_OWAPolicies">
                                                                    <h3>
                                                                        <%= Resources.Content.GN0000395%>
                                                                    </h3>
                                                                </div>
                                                                <div id="CSB_OWAPolicies" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_OWAPolicies" aria-expanded="false">
                                                                    <div class="row">
                                                                        <div class="col-md-3 col-sm-6 col-xs-12">
                                                                            <div class="form-group form-float">
                                                                                <asp:DropDownList ID="DDL_ServerGroupFilter" runat="server">
                                                                                </asp:DropDownList>
                                                                            </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_PolicyNameFilter" runat="server"></asp:TextBox>
                                                                                    <asp:Label ID="Label7" runat="server" EnableViewState="false" Text="<%$ Resources:Content,L00189%>" class="form-label"></asp:Label>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-xs-12">
                                                                            <div class="form-group form-float">
                                                                                <asp:Button ID="Btn_FilterOWAPolicies" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000395%>" />
                                                                                <asp:Button ID="Btn_ClearOWAPolicies" Visible="false" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <%--End search box--%>
                                            <div class="row">
                                                <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow5" runat="server">
                                                    <div class="card">
                                                        <div class="header">
                                                            <h3><%= Resources.Content.GN00001320%></h3>
                                                        </div>
                                                        <div class="body">
                                                            <asp:Button ID="Btn_AddOWAPolicies" class="btn btn-primary waves-effect btnAction" runat="server"
                                                                Text='<%$ Resources:Content,AddNewPolicy %>' />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-xs-12">
                                                    <asp:GridView ID="GV_OWAPolicies" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="false"
                                                        EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">

                                                        <Columns>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000971 %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Lbl_ServerGroupName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ServerGroupName") %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, L00189 %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                <ItemTemplate>
                                                                    <asp:Literal ID="Ltl_Name" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.PolicyName") %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, IsDefault %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Lbl_Default" runat="server" Text='<%# IIf(DataBinder.Eval(Container, "DataItem.IsDefault"), Resources.Content.strYes, Resources.Content.strNo) %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, AppliesTo %>' HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                                                                <ItemTemplate>
                                                                    <asp:Literal ID="Ltl_AppliesTo" runat="server" Text='<%# MachSol.MachPanel.DBCore.Exchange2007.Common.GetCustomersNameAndCompanyByIds(DataBinder.Eval(Container, "DataItem.AssignedToCustomerIds").ToString().TrimStart(",").TrimEnd(",")) %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                                                <ItemTemplate>
                                                                    <ul class="option-menu">
                                                                        <li class="dropdown">
                                                                            <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                                                                <i class="material-icons">menu</i>
                                                                            </a>
                                                                            <ul class="dropdown-menu pull-right" id="UL_OptionMenu" runat="server">
                                                                                <li>
                                                                                    <asp:LinkButton ID="LB_Edit" runat="server" CommandName="EditPolicy"
                                                                                        CommandArgument='<%# DataBinder.Eval(Container, "DataItem.SGOWAPolicyId") %>' Text="<%$ Resources:Content,GN0000276%>" />
                                                                                </li>

                                                                                <li>
                                                                                    <asp:LinkButton ID="LB_Remove" CssClass="btnAction" CommandName="RemovePolicy"
                                                                                        runat="server" Text="<%$ Resources:Content,GN0000278%>" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.SGOWAPolicyId") & "↝" & DataBinder.Eval(Container, "DataItem.PolicyName")  %>' />
                                                                                    <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,GN000200%>"
                                                                                        TargetControlID="LB_Remove" runat="server">
                                                                                    </EM:ConfirmButtonExtender>
                                                                                </li>

                                                                            </ul>
                                                                        </li>
                                                                    </ul>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <%--PagerTemplate Start--%>
                                                        <PagerTemplate>
                                                            <EM:Pager ID="Pager1" runat="server" />
                                                        </PagerTemplate>
                                                        <%--PagerTemplate End--%>
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="row" id="Div_OWAPoliciesAddEdit" runat="server" visible="false">
                                            <UC:AddEditOWAPolicy ID="AddEditOWAPolicy1" runat="server" />
                                        </div>

                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_SignatureSettings" runat="server" Enabled="false" HeaderText="<%$ Resources:Content,SignatureSettings %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab8" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent8" Visible="False" runat="server">
                                        <div id="Div_SignatureSettings" runat="server">

                                            <div class="card">

                                                <div class="body">

                                                    <div class="row">
                                                        <div class="col-sm-5 col-xs-12 row-label">
                                                            <label>
                                                                *
                                                                <asp:Literal ID="Literal23" runat="server" Text='<%$ Resources:Content,SignatureEnabled%>'></asp:Literal>:</labe>
                                                        </div>
                                                        <div class="col-sm-7 col-xs-12">
                                                            <div class="form-group">
                                                                <asp:CheckBox ID="CB_SignaturesEnabled" runat="server" Text=" " data-label="Signatures Enabled" />
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-sm-5 col-xs-12 row-label">
                                                            <label>
                                                                *
                                                                <asp:Literal ID="Literal24" runat="server" Text='<%$ Resources:Content,ExchangeServerIPs%>'></asp:Literal>:</label>
                                                        </div>
                                                        <div class="col-sm-7 col-xs-12">
                                                            <div class="form-group">

                                                                <asp:TextBox ID="TxBx_SignatureIPs" runat="server" Rows="4" TextMode="MultiLine" data-label="Signatures IPs"></asp:TextBox>

                                                            </div>
                                                        </div>

                                                    </div>

                                                    <div class="row">
                                                        <div class="col-sm-5 col-xs-12 row-label">
                                                            <label>
                                                                *
                                                                <asp:Literal ID="Literal26" runat="server" Text='<%$ Resources:Content,SecureKey%>'></asp:Literal>:</label>
                                                        </div>
                                                        <div class="col-sm-7 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_SecureKey" runat="server" data-label="Secure Key" data-secure="1"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-xs-12">
                                                            <asp:Button ID="Btn_SaveSignatureSettings" runat="server" CssClass="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000281%>' />
                                                            <asp:Button ID="Btn_CancelSaveSinatureSettings" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>'
                                                                CssClass="btn btn-primary waves-effect" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>

                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                        </EM:TabContainer>
                    </div>
                </div>
            </div>

            <asp:Panel ID="Pnl_ServiceTest" CssClass="width-modal-popup-auto row" runat="server" Style="display: none">
                <div class="col-xs-12">
                    <div class="card">
                        <div class="header">
                            <h3><%= Resources.Content.L0096%></h3>
                        </div>
                        <div class="body">
                            <div id="Td_Message" class="row" runat="server">
                                <div class="col-xs-12">
                                    <asp:Label ID="Lbl_ServicesStaus" runat="server" ForeColor="Green" Font-Bold="true"
                                        EnableViewState="false"></asp:Label>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button ID="Btn_OK" runat="server" Text="<%$Resources:Content,GN0000858%>" class="btn btn-primary waves-effect" />
                                    <asp:Button ID="Btn_Display" runat="server" Style="display: none;" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <EM:ModalPopupExtender runat="server" ID="MPE_ServicesTest" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="Pnl_ServiceTest" TargetControlID="Btn_Display"
                OkControlID="Btn_OK">
            </EM:ModalPopupExtender>

            <asp:Button ID="Button2" runat="server" CssClass="btn-dummy" />
            <asp:Button ID="Button1" runat="server" CssClass="btn-dummy" />
            <EM:ModalPopupExtender runat="server" ID="MPE_ServerCpuAndMemoryStatsHostory" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="Pnl_ServerCpuAndMemoryStats" TargetControlID="Button1"
                OkControlID="Button2">
            </EM:ModalPopupExtender>

            <asp:Panel ID="Pnl_ServerCpuAndMemoryStats" runat="server" CssClass="width-modal-popup-auto" Style="display: none; position: fixed;">
                <div class="col-xs-12">
                    <div class="card">
                        <div class="header container-fluid">
                            <h3 class="pull-left">
                                <label id="Lbl_UsagePopupHeader"></label>
                            </h3>
                            <span>
                                <button type="button" class="close" onclick="$find('<%=MPE_ServerCpuAndMemoryStatsHostory.ClientID%>').hide();">&times;</button>
                            </span>
                        </div>
                        <div class="body">
                            <h4><%= Resources.Content.CPUUsage %></h4>
                            <hr />
                            <div class="row">

                                <div class="col-xs-12">
                                    <div id="graph_CPU"></div>
                                </div>
                            </div>
                            <br />
                            <h4><%= Resources.Content.MemoryUsage %></h4>
                            <hr />
                            <div class="row">
                                <div class="col-xs-12">
                                    <div id="graph_Memory"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </ajax:UpdatePanel>
</asp:Content>

