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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/PCC/DC/CC/ADirBulkUser.ascx" TagName="ADBulkUser" TagPrefix="UC" %>
<%@ Register Src="~/RCC/Exchange/CC/MBDetail.ascx" TagName="MailBoxDetail" TagPrefix="UC" %>
<%@ Register Src="~/RCC/Exchange/CC/AddMailbox.ascx" TagName="AddMailbox" TagPrefix="EM" %>
<%@ Register Src="~/RCC/OCS/CC/UCLyncUser.ascx" TagName="LyncUser" TagPrefix="EM" %>
<%@ Register Src="~/RCC/Exchange/CC/AddEditMBTemplate.ascx" TagName="AddEditMBTemplate" TagPrefix="UC" %>
<%@ Register Src="~/RCC/CRM/CC/EditCRMUser.ascx" TagName="EditCRMUser" TagPrefix="UC" %>
<%@ Register Src="~/RCC/SharePoint/CC/EditSPUser.ascx" TagName="EditSPUser" TagPrefix="UC" %>
<%@ Register Src="~/RCC/O365/CC/UserDetail.ascx" TagName="O365User" TagPrefix="UC" %>
<%@ Register Src="~/Template/ResourcesQuota.ascx" TagName='ResourceQuota' TagPrefix='EM' %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/VirtualDropDownList.ascx" TagName="VirtualDropDownList" TagPrefix="EM" %>

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


    <script type="text/javascript" src="/JS/google/charts/loader.min.js"></script>

    <script type="text/javascript" language="javascript">

        function clearSavedProfilePic() {
            var clearProfilePicBtnId = '<%= Lbtn_ClearProfilePic.ClientID %>';
            if ($get('#' + clearProfilePicBtnId).length > 0) {
                //WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(clearProfilePicBtnId, "", true, "", "", false, true))
                __doPostBack(clearProfilePicBtnId, '');
            }
        }

        function CopyToDisplayName() {
            $get('<%= TxBx_UsrDispName.ClientID%>').value = $get('<%=TxBxGivenName.ClientID%>').value + ' ' + $get('<%=TxBxLastName.ClientID%>').value;
            ApplyAdditionalSettings();
            //CopyToUPNAD();
        }

        function CopySecEmailToSetupEmail() {
            try { $get('<%=TxBx_EditUserSendSetupEmail.ClientID%>').value = $get('<%= TxBx_Email.ClientID%>').value; } catch (e) { }
        }

        function CopyToUPNAD() {
            ApplyAdditionalSettings();
            $get('<%= TxBx_UPN.ClientID%>').value = ($get('<%=TxBx_UsrDispName.ClientID%>').value).replace(/ /g, '');
            ApplyAdditionalSettings();
            //CopyUPNToEmail();
            CopyToUPNFromAD();
        }

        function CopyUPNToEmail() {
            $get('<%= TxBx_UPN.ClientID%>').value = ($get('<%=TxBx_UPN.ClientID%>').value).replace(/ /g, '');
            ApplyAdditionalSettings();
            $get('<%=TxBx_Email.ClientID%>').value = $get('<%= TxBx_UPN.ClientID%>').value + "@" + $('#<%= DDL_DomainName.ClientID%> option:selected').text();
            CopySecEmailToSetupEmail();
            CopyToUPNFromAD();
        }

        function CopyToUPNFromAD() {
            try {
                $get('<%= O365User1.AliasTxBxClientID %>').value = $get('<%=TxBx_UPN.ClientID%>').value
            }
            catch (e) {
            }

            try {
                $get('<%= AddMailbox1.UPNTxBxClientID %>').value = $get('<%=TxBx_UPN.ClientID%>').value
            }
            catch (e) {
            }

            try {
                $get('<%= LyncUser1.TxBx_SIPAddressClientID %>').value = $get('<%=TxBx_UPN.ClientID%>').value
            }
            catch (e) {
            }

            $($get('<%= TxBx_UPN.ClientID%>')).trigger('change');
        }

        function CopyToMobilePhone() {
            $get('<%= TxBxMobile.ClientID%>').value = $get('<%=TxBx_CustomMobile.ClientID%>').value;
        }

        function CopyToCompany() {
            $get('<%= TxBxCompany.ClientID%>').value = $get('<%=TxBx_ReqCompany.ClientID%>').value;
        }

        $(document).ready(function () {
            $('#<%= DDL_DomainName.ClientID%>').change(function () {
                //CopyUPNToEmail();
            });
        });

        function ApplyAdditionalSettings() {

            //DisplayName,UPN,SAM

            var Settings = $get('<%=HF_AdditionalSettings.ClientID%>').value;

            var myArray = Settings.split("↝");
            var Prefix = "";
            var Suffix = "";
            var PrefixTo = "";
            var SuffixTo = "";

            if (myArray.length > 1) {
                Prefix = myArray[0];
                Suffix = myArray[1];
                PrefixTo = myArray[2];
                SuffixTo = myArray[3];
            }

            var displayName = $get('<%= TxBx_UsrDispName.ClientID%>').value;
            var UPN = $get('<%= TxBx_UPN.ClientID%>').value; // + "@" + $('#<%= DDL_DomainName.ClientID%> option:selected').text();

            if (Prefix != '') {
                if (PrefixTo.indexOf('DisplayName') !== -1)
                    if (!displayName.startsWith(Prefix))
                        displayName = Prefix + displayName;

                if (PrefixTo.indexOf('UPN') !== -1)
                    if (!UPN.startsWith(Prefix))
                        UPN = Prefix + UPN;

            }

            if (Suffix != '') {

                if (SuffixTo.indexOf('DisplayName') !== -1)
                    if (!displayName.endsWith(Suffix))
                        displayName = displayName + Suffix;

                if (SuffixTo.indexOf('UPN') !== -1)
                    if (!UPN.endsWith(Suffix))
                        UPN = UPN + Suffix;

            }

            if (displayName != $get('<%= TxBx_UsrDispName.ClientID%>').value)
                $get('<%= TxBx_UsrDispName.ClientID%>').value = displayName;


            if (UPN != $get('<%= TxBx_UPN.ClientID%>').value)
                $get('<%= TxBx_UPN.ClientID%>').value = UPN;

        }

    </script>

    <style type="text/css">
        .fileupload-preview {
            max-height: 120px;
            min-height: 75px;
        }
    </style>
    <div class="col-xs-12">
        <div class="card">
            <div class="header">
                <h2>
                    <asp:Literal ID="Ltrl_UserHeading" runat="server" Text="<%$ Resources:Content,ExchProp%>" /></h2>
            </div>
            <div class="body">
                <EM:TabContainer ID="TC_EditADUser" runat="server" OnClientActiveTabChanged="loadTabPanel">
                    <EM:TabPanel ID="Tab_EditUserAD" runat="server" HeaderText="<%$Resources:Content,DEV1209 %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server" Visible="true">
                                <asp:Panel ID="Pnl_edit" runat="server" DefaultButton="Btn_Save">
                                    <div class="row" id="Div_DDl_Customer" runat="server">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal8" runat="server" Text='<%$Resources:Content, GN0000850%>'
                                                    EnableViewState="False">
                                                </asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <asp:DropDownList ID="DDl_Customer" runat="server" AutoPostBack="true" CausesValidation="false" data-label="Customer">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="Div_AccountType" runat="server">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal39" runat="server" Text='<%$Resources:Content, String408%>' EnableViewState="False"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <asp:Label ID="Lbl_AccountType" runat="server" data-label="Account Type"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>*<asp:Literal ID="Literal23" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001132%>" />:</label>
                                            <asp:HiddenField ID="HF_AdditionalSettings" runat="server" />
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBxGivenName" runat="server" MaxLength="28" onChange="CopyToDisplayName()" data-label="First Name"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_GivenName" runat="server" ControlToValidate="TxBxGivenName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="editaduser">
                                                    </asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>*<asp:Literal ID="Literal25" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001133%>" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBxLastName" runat="server" MaxLength="28" onChange="CopyToDisplayName()" data-label="Last Name"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_LastName" runat="server" ControlToValidate="TxBxLastName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="editaduser">
                                                    </asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal7" runat="server" Text='<%$Resources:Content, AD0000101%>'
                                                    EnableViewState="False">
                                                </asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_UsrDispName" runat="server" MaxLength="64" data-label="Display Name"> <%--onChange="CopyToUPNAD()"--%>
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_UsrDispName" runat="server" ControlToValidate="TxBx_UsrDispName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="editaduser">
                                                    </asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="Tr_SAMAccountName" runat="server">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal12" runat="server" Text='<%$Resources:Content, String344%>'
                                                    EnableViewState="False">
                                                </asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_SAMAccountName" runat="server" MaxLength="20" data-label="SAM Account Name">
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_SAMAccountName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="editaduser">
                                                    </asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal1" runat="server" Text='<%$Resources:Content, DEV1042%>'
                                                    EnableViewState="False">
                                                </asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_UPN" runat="server" data-label="UPN Prefix" />
                                                    <%--onChange="CopyUPNToEmail();"--%>
                                                    <%--<asp:RegularExpressionValidator ID="REV_UPN" runat="server" ValidationExpression="<%$ Resources:MPRegex,Alias %>"
                                                        ErrorMessage='<%$Resources:Content, DGN1110036%>' ControlToValidate="TxBx_UPN"
                                                        Display="None" SetFocusOnError="true" ValidationGroup="editaduser"></asp:RegularExpressionValidator>--%>
                                                    <asp:RequiredFieldValidator ControlToValidate="TxBx_UPN" ID="RFV_UPN" runat="server"
                                                        Display="None" ValidationGroup="editaduser"></asp:RequiredFieldValidator>

                                                    <asp:TextBox ID="TxBx_UPN2" Text="" runat="server" MaxLength="255" Visible="false" data-label="UPN2">
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_UPN2" runat="server" ControlToValidate="TxBx_UPN2"
                                                        Display="None" SetFocusOnError="True" Enabled="false" ValidationGroup="editaduser">
                                                    </asp:RequiredFieldValidator>
                                                    <%--<asp:RegularExpressionValidator ID="REV_UPN2" Display="None" runat="server" ErrorMessage='<%$ Resources:Content,GN0000562%>'
                                                        ControlToValidate="TxBx_UPN2" SetFocusOnError="True" ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>"
                                                        Enabled="false" ValidationGroup="editaduser"></asp:RegularExpressionValidator>--%>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group at-the-rate">
                                                <asp:Literal ID="Ltl_AtRate" runat="server" Text="@"></asp:Literal>
                                                <asp:DropDownList ID="DDL_DomainName" runat="server" data-label="UPN Domain">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal3" runat="server" Text='<%$Resources:Content, GN0000652%>'
                                                    EnableViewState="False">
                                                </asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_Email" runat="server" MaxLength="256" data-label="Email" />
                                                    <asp:RequiredFieldValidator ID="RFV_Email" runat="server" ControlToValidate="TxBx_Email"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="editaduser"></asp:RequiredFieldValidator>
                                                    <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator2" Display="None" runat="server"
                                                        ErrorMessage='<%$ Resources:Content,DGN1110038%>' ControlToValidate="TxBx_Email"
                                                        SetFocusOnError="True" ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>"
                                                        Enabled="true" ValidationGroup="editaduser"></asp:RegularExpressionValidator>--%>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div id="Div_CustomMailboxInputs" runat="server" visible="false">
                                        <div class="row" id="Div_ReqCompany" runat="server">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    *
                                                    <asp:Literal ID="Literal35" runat="server" Text='<%$ Resources:Content,GN00001134 %>'
                                                        EnableViewState="false" />:</label>
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_ReqCompany" onKeyup="CopyToCompany()" onChange="CopyToCompany()" runat="server" MaxLength="64" data-label="Company"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RFV_ReqCompany" EnableClientScript="true"
                                                            runat="server" ControlToValidate="TxBx_ReqCompany" Display="None" SetFocusOnError="True"
                                                            ValidationGroup="editaduser" Enabled="false"></asp:RequiredFieldValidator>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    *
                                                    <asp:Literal ID="Literal36" runat="server" Text='<%$ Resources:Content,GN00001524 %>'
                                                        EnableViewState="false" />:</label>
                                            </div>
                                            <div class="col-lg-2 col-md-2 col-sm-4 col-xs-5" id="Div_MobilePhoneCountryCode" runat="server" visible="false">
                                                <asp:DropDownList ID="Ddl_MobilePhoneCountryCode" runat="server" data-label="Mobile Country Code">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="col-sm-4 col-xs-12" id="Div_CustomMobile" runat="server">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_CustomMobile" runat="server" MaxLength="64" onKeyup="CopyToMobilePhone()"
                                                            onChange="CopyToMobilePhone()" data-label="Mobile Phone"></asp:TextBox>
                                                        <asp:RegularExpressionValidator ErrorMessage="<%$ Resources:Content,DGN1110070%>"
                                                            ID="REV_ReqMobile" Enabled="false" runat="server" ControlToValidate="TxBx_CustomMobile"
                                                            Display="None" SetFocusOnError="True" ValidationExpression="^([+]?[\s0-9()-]{5,20})$"
                                                            ValidationGroup="editaduser"></asp:RegularExpressionValidator>
                                                        <asp:RequiredFieldValidator ID="RFV_TxBx_CustomMobile" EnableClientScript="true"
                                                            runat="server" ControlToValidate="TxBx_CustomMobile" Display="None" SetFocusOnError="True"
                                                            ValidationGroup="editaduser" Enabled="false"></asp:RequiredFieldValidator>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row" id="Div_NationalId" runat="server">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    <%--*--%>
                                                    <asp:Literal ID="Literal37" runat="server" Text='<%$ Resources:Content,NatIdOrIqama%>' EnableViewState="false" />:</label>
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_NationalId" runat="server" MaxLength="250" data-label="National ID"></asp:TextBox>
                                                        <%-- <asp:RequiredFieldValidator ID="RFV_NationalId" EnableClientScript="true"
                                                            runat="server" ControlToValidate="TxBx_NationalId" Display="None" SetFocusOnError="True"
                                                            ValidationGroup="editaduser" Enabled="false"></asp:RequiredFieldValidator>--%>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    <asp:Literal ID="Ltl_EmployeeId" runat="server" Text='<%$ Resources:Content,EmployeeId%>' EnableViewState="false" />:</label>
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_EmployeeID" runat="server" MaxLength="250" data-label="Employee ID"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RFV_TxBx_EmployeeID" EnableClientScript="true"
                                                            runat="server" ControlToValidate="TxBx_EmployeeID" Display="None" SetFocusOnError="True"
                                                            ValidationGroup="editaduser" Enabled="false"></asp:RequiredFieldValidator>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="row" id="Div_Enable2FA" runat="server" visible="false">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <asp:Literal ID="Literal28" runat="server" Text="<%$ Resources:Content,TwoFAEnabled %>"
                                                EnableViewState="false" />:
                                        </div>
                                        <div class="col-sm-9 col-xs-12">
                                            <asp:CheckBox ID="Chbx_Enable2FA" runat="server" Text=" " data-label="2FA Enabled" />
                                        </div>
                                    </div>
                                    <div id="Tr_Password" runat="server">
                                        <div class="panel-group" id="AS_PasswordChange" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_PasswordChange">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_PasswordChange" data-toggle="collapse" data-parent="#AS_PasswordChange" href="#CSB_PasswordChange" aria-expanded="false" aria-controls="CSB_PasswordChange" class="collapsed">
                                                            <%= Resources.Content.M0087%>
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_PasswordChange" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_PasswordChange" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    *<asp:Literal ID="Literal6" runat="server" Text='<%$Resources:Content, GN0000569 %>'
                                                                        EnableViewState="false">
                                                                    </asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_Password" TextMode="Password" runat="server" MaxLength="100" data-label="Password" data-secure="1">
                                                                        </asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <label class="small">
                                                                    <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:Content,GN00001530%>"
                                                                        EnableViewState="false"></asp:Literal></label>
                                                                <br />
                                                                <asp:CheckBox ID="CB_Show" runat="server" Text="<%$ Resources:Content,FAM0049 %>" />
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:Button ID="lb_Generate" runat="server" Text="<%$ Resources:Content,SMI0195%>" class="btn btn-primary waves-effect"
                                                                        CausesValidation="false" TabIndex="-1"></asp:Button>
                                                                </div>
                                                                <div id="Div_PasswordPolicy" runat="server" class="help-text sm"></div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    *<asp:Literal ID="Literal2" runat="server" Text='<%$Resources:Content, GN0001196 %>'
                                                                        EnableViewState="false">
                                                                    </asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_CPass" TextMode="Password" runat="server" MaxLength="100" data-state="hidden" />
                                                                    </div>
                                                                </div>
                                                                <asp:CompareValidator ID="CV_Password" runat="server" ControlToCompare="TxBx_Password"
                                                                    ErrorMessage='<%$Resources:Content, SPT002699 %>' ControlToValidate="TxBx_CPass"
                                                                    Display="None" Type="String" Operator="Equal" ValidationGroup="editaduser">
                                                                </asp:CompareValidator>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal5" runat="server" Text='<%$Resources:Content, GN0000752 %>'
                                                                        EnableViewState="false">
                                                                    </asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:CheckBox ID="ChBx_SendEmail" runat="server" Text=" " data-label="Send Setup Email" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row" runat="server" id="Tr_SendEmail" style="display: none">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    *<asp:Literal ID="Literal14" runat="server" Text='<%$Resources:Content, GN0000491 %>'
                                                                        EnableViewState="false">
                                                                    </asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_SendEmail" runat="server" data-label="Setup Email Address"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="RFV_SendEmail" runat="server" ControlToValidate="TxBx_SendEmail"
                                                                            Display="none" SetFocusOnError="true" Enabled="false" ValidationGroup="editaduser"
                                                                            ErrorMessage="Send email address is required when Send email option is selected">
                                                                        </asp:RequiredFieldValidator>
                                                                        <%-- <asp:RegularExpressionValidator ID="REV_SendEmail" Display="None" runat="server"
                                                                            ErrorMessage='<%$ Resources:Content,DGN1110038%>' ControlToValidate="TxBx_SendEmail"
                                                                            SetFocusOnError="True" ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>"
                                                                            Enabled="false" ValidationGroup="editaduser"></asp:RegularExpressionValidator>--%>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="panel-group" id="AS_OptionalFields" role="tablist" aria-multiselectable="true">
                                        <div class="panel panel-primary">
                                            <div class="panel-heading" role="tab" id="heading_OptionalFields">
                                                <h2 class="panel-title">
                                                    <a role="button" id="A_OptionalFields" data-toggle="collapse" data-parent="#AS_OptionalFields" href="#CSB_OptionalFields" aria-expanded="false" aria-controls="CSB_OptionalFields" class="collapsed">
                                                        <%= Resources.Content.DGN1110535%>
                                                    </a>
                                                </h2>
                                            </div>
                                            <div id="CSB_OptionalFields" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_OptionalFields" aria-expanded="false" style="height: 0px;">
                                                <div class="panel-body">
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal53" runat="server" Text='<%$ Resources:Content,DGN1110336 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxInitials" runat="server" MaxLength="6" data-label="Initials"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal54" runat="server" Text='<%$ Resources:Content,DGN1110529 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxMiddleName" runat="server" MaxLength="64" data-label="Middle Name"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal57" runat="server" Text='<%$ Resources:Content,DGN1110530 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox runat="server" ID="TxBxAddress" MaxLength="2048" data-label="Address"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal58" runat="server" Text='<%$ Resources:Content,GN0000880 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox runat="server" ID="TxBxCity" MaxLength="128" data-label="City"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal59" runat="server" Text='<%$ Resources:Content,GN00001313 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxState" runat="server" MaxLength="128" data-label="State"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal60" runat="server" Text='<%$ Resources:Content,GN00001522 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxZip" runat="server" MaxLength="40" data-label="Zip"></asp:TextBox>
                                                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxBxZip"
                                                                        FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars="-_ ">
                                                                    </EM:FilteredTextBoxExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal61" runat="server" Text='<%$ Resources:Content,GN0000882 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <asp:DropDownList ID="DDLCountries" runat="server" data-label="Country">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row" id="Div_OptionalMobile" runat="server">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal62" runat="server" Text='<%$ Resources:Content,GN00001524 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxMobile" runat="server" MaxLength="64" data-label="Mobile"></asp:TextBox>
                                                                    <asp:RegularExpressionValidator ErrorMessage="<%$ Resources:Content,DGN1110070%>"
                                                                        ID="RegularExpressionValidator3" runat="server" ControlToValidate="TxBxMobile"
                                                                        Display="None" SetFocusOnError="True" ValidationExpression="^([+]?[\s0-9()-]{5,20})$"
                                                                        ValidationGroup="editaduser"></asp:RegularExpressionValidator>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal63" runat="server" Text='<%$ Resources:Content,GN0000886 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxFax" runat="server" MaxLength="64" data-label="Fax"></asp:TextBox>
                                                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxBxFax"
                                                                        FilterType="Numbers,Custom" ValidChars="+-() ">
                                                                    </EM:FilteredTextBoxExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal11" runat="server" Text='<%$ Resources:Content,DGN1110537 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxBusinessPhone" runat="server" MaxLength="64" data-label="Business Phone"></asp:TextBox>
                                                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Numbers,Custom"
                                                                        TargetControlID="TxBxBusinessPhone" ValidChars="+ - ( ) \s">
                                                                    </EM:FilteredTextBoxExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal15" runat="server" Text='<%$ Resources:Content,DGN1110538 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxHomePhone" runat="server" MaxLength="64" data-label="Home Phone"></asp:TextBox>
                                                                    <asp:RegularExpressionValidator ErrorMessage="<%$ Resources:Content,DGN1110070%>"
                                                                        ID="RegularExpressionValidator5" runat="server" ControlToValidate="TxBxHomePhone"
                                                                        Display="None" SetFocusOnError="True" ValidationExpression="^([+]?[\s0-9()-]{5,20})$"
                                                                        ValidationGroup="editaduser"></asp:RegularExpressionValidator>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal16" runat="server" Text='<%$ Resources:Content,DGN1110383 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxPager" runat="server" MaxLength="64" data-label="Pager"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal17" runat="server" Text='<%$ Resources:Content,GN0001120 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxWebPage" runat="server" MaxLength="2048" data-label="Web Page"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal18" runat="server" Text='<%$ Resources:Content,GN0000597 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <asp:TextBox ID="TxBxDescription" runat="server" TextMode="MultiLine" MaxLength="1024" data-label="Description"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <asp:Panel ID="Pnl_MailboxMigrationFields" runat="server" Visible="false">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal29" runat="server" Text='<%$ Resources:Content,MailboxGuidForMigration %>'
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_MailboxGuid" runat="server" MaxLength="40" data-label="Mailbox GUID"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal30" runat="server" Text='<%$ Resources:Content,MailboxArchiveGuid %>'
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_MbxArchiveGuid" runat="server" MaxLength="40" data-label="Mailbox Archive GUID"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal31" runat="server" Text='<%$ Resources:Content,MailboxArchiveName %>'
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_MbxArchiveName" runat="server" MaxLength="40" data-label="Mailbox Archive Name"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal32" runat="server" Text='<%$ Resources:Content,MailboxRecipientTypeDetails %>'
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <%--http://www.mistercloudtech.com/2016/05/18/reference-to-msexchrecipientdisplaytype-msexchrecipienttypedetails-and-msexchremoterecipienttype-values/--%>
                                                                    <asp:DropDownList ID="Ddl_MbxRecipentTypeDetails" runat="server" data-label="Mailbox Recipient Type">
                                                                        <asp:ListItem Text="<%$ Resources:Content,DGN1110618 %>" Value="1↝UserMailbox" />
                                                                        <asp:ListItem Text="<%$ Resources:Content,FAM00110 %>" Value="4↝SharedMailbox" />
                                                                        <asp:ListItem Text="<%$ Resources:Content,DGN1110619 %>" Value="16↝RoomMailbox" />
                                                                        <asp:ListItem Text="<%$ Resources:Content,DGN1110620 %>" Value="32↝EquipmentMailbox" />
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal33" runat="server" Text='<%$ Resources:Content,MailboxCulture %>'
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="Ddl_MbxCulture" runat="server" data-label="Mailbox Culture">
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal34" runat="server" Text='<%$ Resources:Content,strProxyAddresses %>'
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:TextBox ID="TxBx_ProxyAddresses" runat="server" TextMode="MultiLine" Columns="8" Rows="4" data-label="Proxy Addresses"></asp:TextBox>
                                                                    <br />
                                                                    <b>
                                                                        <asp:Literal ID="Ltrl_ProxyAddressesNote" runat="server" Text="<%$ Resources:Content,strADUserProxyAddressesNote %>"></asp:Literal></b>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </asp:Panel>


                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal13" runat="server" Text='<%$ Resources:Content,strLogonHours %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <asp:DropDownList ID="DDL_LogonHours" runat="server" data-label="Logon Hours"></asp:DropDownList>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal38" runat="server" Text='<%$ Resources:Content,AccountExpiry %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-9 col-xs-12">
                                                            <asp:RadioButton ID="RB_Never" runat="server" GroupName="AccountExpiry" Text="<%$ Resources:Content,Never%>" data-label="Account Never Expires" />
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                        </div>
                                                        <div class="col-sm-9 col-xs-12">
                                                            <asp:RadioButton ID="RB_EndOf" runat="server" GroupName="AccountExpiry" Text="<%$ Resources:Content,EndOf%>" data-label="Account Expires" />
                                                            &nbsp;
                                                            <span id="Div_EndOf" runat="server" style="display: none;">

                                                                <div class="form-group display-date-input">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_EndOf" runat="server" Enabled="true" data-label="Expiry Date"></asp:TextBox>
                                                                    </div>
                                                                </div>

                                                                <i runat="server" id="A_EndOf" class="material-icons icon-calendar col-calendar"></i>
                                                                <EM:CalendarExtender ID="CE_EndOf" runat="server" TargetControlID="TxBx_EndOf"
                                                                    Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>"
                                                                    PopupButtonID="A_EndOf" CssClass="date__calendar">
                                                                </EM:CalendarExtender>

                                                                <EM:CalendarExtender ID="CE_StartDate" runat="server" TargetControlID="TxBx_EndOf"
                                                                    Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>"
                                                                    PopupButtonID="img_StartDate" CssClass="date__calendar">
                                                                </EM:CalendarExtender>
                                                            </span>
                                                        </div>
                                                    </div>

                                                    <br />
                                                    <div class="header">
                                                        <h3>
                                                            <asp:Literal ID="Literal19" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DGN1110357%>" />
                                                        </h3>
                                                    </div>
                                                    <br />
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Ltrl_SelectProfilePic" runat="server" Text="<%$Resources:Content,USM0144 %>"></asp:Literal>:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">

                                                                <div class="fileupload fileupload-new" data-provides="fileupload">
                                                                    <span class="btn btn-primary btn-file">
                                                                        <span class="fileupload-new"><%= Resources.Content.USM0144%></span>
                                                                        <span class="fileupload-exists"><%= Resources.Content.GN0000385%></span>
                                                                        <asp:FileUpload ID="Img_Upload" runat="server" onchange='clearSavedProfilePic()' />
                                                                    </span>
                                                                    <span class="thumbnail hide"></span><%--for preview of image type files hide class to not show on view--%>
                                                                    <span class="fileupload-preview pull-right"></span>
                                                                    <a href="#" class="close fileupload-exists pull-right font-40 col-deep-purple" data-dismiss="fileupload" style="float: none">×</a>
                                                                </div>
                                                                <asp:Image ID="Image_profilepic" runat="server" Width="96" Height="96" src="../../ImageDisplayHandler.ashx"
                                                                    Visible="false" />
                                                                &nbsp;&nbsp;<asp:LinkButton ID="Lbtn_ClearProfilePic" runat="server" Text="<%$Resources:Content,String289 %>"
                                                                    Visible="false"></asp:LinkButton>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal20" runat="server" Text='<%$ Resources:Content,DGN1110358 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxJobTitle" runat="server" MaxLength="128" data-label="Job Title"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row" id="Div_OptionalCompany" runat="server">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal21" runat="server" Text='<%$ Resources:Content,GN00001134 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxCompany" runat="server" MaxLength="64" data-label="Company"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal22" runat="server" Text='<%$ Resources:Content,GN0000374 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxDepartment" runat="server" MaxLength="64" data-label="Department"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal24" runat="server" Text='<%$ Resources:Content,DGN1110359 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBxOffice" runat="server" MaxLength="128" data-label="Office"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal26" runat="server" Text='<%$ Resources:Content,DGN1110360 %>'
                                                                    EnableViewState="false" />:</label>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <EM:VirtualDropDownList ID="DDL_Manager" runat="server" data-label="Manager" />
                                                                <%--<asp:DropDownList ID="DDL_Manager" runat="server" />--%>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="panel-group" id="AS_GroupMemberShip" role="tablist" aria-multiselectable="true" runat="server">
                                        <div class="panel panel-primary">
                                            <div class="panel-heading" role="tab" id="heading_GroupMemberShip">
                                                <h2 class="panel-title">
                                                    <a role="button" id="A_GroupMemberShip" data-toggle="collapse" data-parent="#AS_GroupMemberShip" href="#CSB_GroupMemberShip" aria-expanded="false" aria-controls="CSB_GroupMemberShip" class="collapsed">
                                                        <%= Resources.Content.GroupMembership%>
                                                    </a>
                                                </h2>
                                            </div>
                                            <div id="CSB_GroupMemberShip" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_GroupMemberShip" aria-expanded="false" style="height: 0px;">
                                                <div class="panel-body">
                                                    <div class="row">
                                                        <div class="col-xs-12 row-label">
                                                            <label>
                                                                <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Content,strSelectGroupMembership %>" />:</label>
                                                        </div>
                                                        <div class="col-xs-12">
                                                            <ajax:UpdatePanel ID="UP_GroupMemberShip" runat="server">
                                                                <ContentTemplate>
                                                                    <EM:AddSelectableSelected ID="UCGroupMemberShip" runat="server" ClientSideOptimized="true" data-label="Group Membership" />
                                                                </ContentTemplate>
                                                            </ajax:UpdatePanel>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="Div_PasswordSettings" runat="server">
                                        <%-- Password Change Options --%>
                                        <div class="panel-group" id="AS_PasswordOptions" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="HS_PasswordOptions">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_PasswordOptions" data-toggle="collapse" data-parent="#AS_PasswordOptions" href="#CSB_PasswordOptions" aria-expanded="false" aria-controls="CSB_PasswordOptions" class="collapsed">
                                                            <%= Resources.Content.PasswordSettings%>
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_PasswordOptions" class="panel-collapse collapse" role="tabpanel" aria-labelledby="HS_PasswordOptions" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal27" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000360%>"></asp:Literal>:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <div class="col-xs-12">
                                                                    <div class="form-group">
                                                                        <asp:CheckBox ID="CB_MustChange" Text="<%$ Resources:Content,UserMustChangePassword%>" runat="server" data-label="User Must Change Password" />
                                                                    </div>
                                                                </div>
                                                                <div class="col-xs-12">
                                                                    <div class="form-group">
                                                                        <asp:CheckBox ID="CB_CantChange" Text="<%$ Resources:Content,UserCantChangePassword%>" runat="server" data-label="User Can't Change Password" />
                                                                    </div>
                                                                </div>
                                                                <div class="col-xs-12">
                                                                    <div class="form-group">
                                                                        <asp:CheckBox ID="CB_NeverExpires" Text="<%$ Resources:Content,PasswordNeverExpires%>" Checked="true" runat="server" data-label="Password Never Expires" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--Exchange Markup start--%>
                                    <div id="Tr_ExchangeService" runat="server" visible="false">
                                        <div class="panel-group" id="AS_Exchange" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_Exchange">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_Exchange" data-toggle="collapse" data-parent="#AS_Exchange" href="#CSB_Exchange" aria-expanded="false" aria-controls="CSB_Exchange" class="collapsed">
                                                            <asp:Literal ID="Ltrl_ExchangeServiceTitle" runat="server" EnableViewState="false" Text='<%$ Resources:Content, SMI062%>' />
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_Exchange" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_Exchange" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <asp:CheckBox ID="CB_EnableMailbox" runat="server" Text="<%$ Resources:Content,DGN1110533%>" data-label="Mailbox Enabled" /><br />
                                                        <br />
                                                        <EM:AddMailbox ID="AddMailbox1" runat="server" data-label="Add Mailbox" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--Exchange Markup end--%>

                                    <%--O365 Markup start--%>
                                    <div id="TR_O365UserDetail" runat="server" visible="false">
                                        <div class="panel-group" id="AS_O365Fields" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_O365Fields">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_O365Fields" data-toggle="collapse" data-parent="#AS_O365Fields" href="#CSB_O365Fields" aria-expanded="false" aria-controls="CSB_O365Fields" class="collapsed">
                                                            <%= Resources.Content.EnableO365Service%>
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_O365Fields" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_O365Fields" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <asp:CheckBox ID="CB_AddO365User" runat="server" Text="<%$ Resources:Content,AddO365User%>" data-label="Enable O365 User" /><br />
                                                        <br />
                                                        <UC:O365User ID="O365User1" runat="server" IsADUserMode="true" data-label="Add O365 User" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--O365 Markup end--%>

                                    <%--Lync Markup start--%>
                                    <div id="Tr_LyncService" runat="server" visible="false">
                                        <div class="panel-group" id="AS_SfBFields" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_SfBFields">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_SfBFields" data-toggle="collapse" data-parent="#AS_SfBFields" href="#CSB_SfBFields" aria-expanded="false" aria-controls="CSB_SfBFields" class="collapsed">
                                                            <asp:Literal ID="Ltrl_LyncServiceTitle" runat="server" EnableViewState="false" Text='<%$ Resources:Content, SMI063%>' />
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_SfBFields" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_SfBFields" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <asp:CheckBox ID="CB_EnableLync" runat="server" Text="<%$ Resources:Content,DEV1101%>" data-label="Enable Skype for Business" /><br />
                                                        <br />
                                                        <EM:LyncUser ID="LyncUser1" runat="server" data-label="Add Skype for Business" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--Lync Markup end--%>

                                    <%--CRM Markup start--%>
                                    <div id="Tr_CRMService" runat="server" visible="false">
                                        <div class="panel-group" id="AS_CRMFields" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_CRMFields">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_CRMFields" data-toggle="collapse" data-parent="#AS_CRMFields" href="#CSB_CRMFields" aria-expanded="false" aria-controls="CSB_CRMFields" class="collapsed">
                                                            <asp:Literal ID="Ltrl_CRMServiceTitle" runat="server" EnableViewState="false" Text='<%$ Resources:Content, SMI064%>' />
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_CRMFields" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_CRMFields" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <asp:Repeater ID="Rep_EnableCRMOrgs" runat="server">
                                                            <ItemTemplate>
                                                                <div class="row">
                                                                    <div class="col-xs-12 row-label">
                                                                        <asp:CheckBox ID="CB_SelectCRMOrg" runat="server" AutoPostBack="true" OnCheckedChanged="CB_SelectCRMOrg_CheckedChanged" /><br />
                                                                        <br />
                                                                        <asp:HiddenField ID="HF_CRMOrgId" runat="server" />
                                                                    </div>
                                                                </div>

                                                                <asp:UpdatePanel ID="UP_CrmDetails" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                                                                    <Triggers>
                                                                        <asp:AsyncPostBackTrigger ControlID="CB_SelectCRMOrg" EventName="CheckedChanged" />
                                                                    </Triggers>
                                                                    <ContentTemplate>
                                                                        <div id="tbl_CrmDetails" runat="server" visible="false">
                                                                            <div class="row">
                                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                                    <label>
                                                                                        <asp:Literal ID="Ltrl_CRMAccessModes" runat="server" Text="<%$ Resources:Content, USM0029 %>" />:</label>
                                                                                </div>
                                                                                <div class="col-sm-4 col-xs-12">
                                                                                    <div class="form-group">
                                                                                        <asp:DropDownList ID="Ddl_AccessMode" runat="server" AutoPostBack="true" OnSelectedIndexChanged="AccessModeChanged">
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="row">
                                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                                    <label>
                                                                                        <asp:Literal ID="Ltrl_CRMCalType" runat="server" Text="<%$ Resources:Content, USM0030 %>" />:</label>
                                                                                </div>
                                                                                <div class="col-sm-4 col-xs-12">
                                                                                    <div class="form-group">
                                                                                        <asp:DropDownList ID="Ddl_CALType" runat="server">
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="row">
                                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                                    <label>
                                                                                        <asp:Literal ID="Ltrl_CRMBusinessUnit" runat="server" Text='<%$Resources:Content,USM0078 %>' />:</label>
                                                                                </div>
                                                                                <div class="col-sm-4 col-xs-12">
                                                                                    <div class="form-group">
                                                                                        <asp:DropDownList ID="Ddl_BusinessUnit" runat="server" AutoPostBack="true" OnSelectedIndexChanged="BusinessUnitChanged">
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="row">
                                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                                    <label>
                                                                                        <asp:Literal ID="Ltrl_CRMRoles" runat='server' Text='<%$ Resources:Content,USM0079 %>' />:</label>
                                                                                </div>
                                                                                <div class="col-sm-4 col-xs-12">
                                                                                    <div class="form-group">
                                                                                        <asp:ListBox ID="Lbx_Roles" runat="server" SelectionMode="Multiple" CssClass="ms"></asp:ListBox>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </ContentTemplate>
                                                                </asp:UpdatePanel>
                                                                <br />
                                                            </ItemTemplate>
                                                        </asp:Repeater>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--CRM Markup end--%>

                                    <%--SP Markup start--%>
                                    <div id="Tr_SharePointService" runat="server" visible="false">
                                        <div class="panel-group" id="AS_SPFields" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_SPFields">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_SPFields" data-toggle="collapse" data-parent="#AS_SPFields" href="#CSB_SPFields" aria-expanded="false" aria-controls="CSB_SPFields" class="collapsed">
                                                            <asp:Literal ID="Ltrl_SharePointServiceTitle" runat="server" EnableViewState="false" Text='<%$ Resources:Content, SMI065%>' />
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_SPFields" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_SPFields" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <asp:Repeater ID="Rep_EnableSharePointOrgs" runat="server">
                                                            <ItemTemplate>
                                                                <div class="row">
                                                                    <div class="col-xs-12 row-label">
                                                                        <asp:CheckBox ID="CB_SelectSharePointOrg" runat="server" AutoPostBack="true" OnCheckedChanged="CB_SelectSharePointOrg_CheckedChanged" /><br />
                                                                        <br />
                                                                        <asp:HiddenField ID="HF_SharePointOrgId" runat="server" />
                                                                    </div>
                                                                </div>
                                                                <asp:UpdatePanel ID="UP_SharePointDetails" runat="server" UpdateMode="Conditional"
                                                                    ChildrenAsTriggers="true">
                                                                    <Triggers>
                                                                        <asp:AsyncPostBackTrigger ControlID="CB_SelectSharePointOrg" EventName="CheckedChanged" />
                                                                    </Triggers>
                                                                    <ContentTemplate>
                                                                        <div id="tbl_SharePointDetails" runat="server" visible="false">
                                                                            <div class="row">
                                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                                    <label>
                                                                                        <asp:Literal Text='<%$ Resources:Content,USM0080 %>' ID="Ltrl_SPIsSiteAdmin" runat="server" />:</label>
                                                                                </div>
                                                                                <div class="col-sm-4 col-xs-12">
                                                                                    <div class="form-group">
                                                                                        <asp:CheckBox ID="CB_IsSiteAdmin" runat="server" Text=" " />
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="row">
                                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                                    <label>
                                                                                        <asp:Literal ID="Ltrl_SharePointRoles" runat='server' Text='<%$ Resources:Content,USM0079 %>' />:</label>
                                                                                </div>
                                                                                <div class="col-sm-4 col-xs-12">
                                                                                    <div class="form-group">
                                                                                        <asp:DropDownList ID="Ddl_SPRoles" runat="server"></asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </ContentTemplate>
                                                                </asp:UpdatePanel>
                                                                <br />
                                                            </ItemTemplate>
                                                        </asp:Repeater>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--SP Markup end--%>

                                    <div class="row" id="Tr_EditUserSendEmailCB" runat="server" visible="false">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content,GN0000752%>"
                                                    EnableViewState="false">
                                                </asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:CheckBox ID="CB_EditUserSendEmail" Checked="true" runat="server" Text=" " data-label="Send Setup Email" />
                                        </div>
                                    </div>
                                    <div class="row" id="Tr_EditUserSendEmail" runat="server" visible="false">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,String389%>"
                                                    EnableViewState="false">
                                                </asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_EditUserSendSetupEmail" runat="server" data-label="Setup Email Address"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_TxBx_EditUserSendEmail" runat="server" ControlToValidate="TxBx_EditUserSendSetupEmail"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="editaduser"></asp:RequiredFieldValidator>
                                                    <%-- <asp:RegularExpressionValidator ID="REV_TxBx_EditUserSendEmail" runat="server" ErrorMessage='<%$ Resources:Content,DEV1055%>'
                                                        ControlToValidate="TxBx_EditUserSendSetupEmail" Display="None" SetFocusOnError="True"
                                                        ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>" ValidationGroup="editaduser"></asp:RegularExpressionValidator>--%>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button ID="Btn_Save" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000281%>' runat="server" ValidationGroup="editaduser" CausesValidation="true" />
                                            <asp:Button ID="Btn_Cancel" class="btn btn-primary waves-effect" CausesValidation="false" Text='<%$ Resources:Content,GN0000572%>' runat="server" />
                                        </div>
                                    </div>
                                </asp:Panel>
                                <asp:ValidationSummary ID="ValidationSum_1" runat="server" HeaderText='<%$ Resources:Content,EM000001 %>'
                                    ShowMessageBox="True" ShowSummary="False" ValidationGroup="editaduser" />
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                    <EM:TabPanel ID="Tab_EditUserExchange" runat="server" HeaderText="<%$Resources:Content,USM0169 %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                <UC:MailBoxDetail ID="MailBoxDetail1" runat="server" />
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                    <EM:TabPanel ID="Tab_EditO365User" runat="server" HeaderText="<%$Resources:Content,O365Accnt %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab2" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent2" runat="server" Visible="false">
                                <UC:O365User ID="O365UserEdit" runat="server" />
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                    <EM:TabPanel ID="Tab_EditUserLync" runat="server" HeaderText="<%$Resources:Content,USM0170 %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab3" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent3" runat="server" Visible="false">
                                <EM:LyncUser ID="LyncUserEdit" runat="server" />
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                    <EM:TabPanel ID="Tab_EditUserSharePoint" runat="server" HeaderText="<%$Resources:Content,USM0171 %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab4" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent4" runat="server" Visible="false">
                                <div class="panel-group" id="AS_SPUserEdit" role="tablist" aria-multiselectable="true">
                                    <asp:Repeater ID="Rep_SPOrgs" runat="server">
                                        <ItemTemplate>
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_<%#Eval("PortalName").ToString().Replace(" ", "_").Replace(".", "_")%>">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_<%#Eval("PortalName").ToString().Replace(" ", "_").Replace(".", "_")%>" data-toggle="collapse" data-parent="#AS_SPUserEdit" href="#CSB_<%#Eval("PortalName").ToString().Replace(" ", "_").Replace(".", "_")%>" aria-expanded="false" aria-controls="CSB_<%#Eval("PortalName")%>" class="collapsed">
                                                            <asp:Label ID="Lbl_OrgTitle" runat="server" Text='<%#Eval("PortalName")%>'></asp:Label>
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_<%#Eval("PortalName").ToString().Replace(" ", "_").Replace(".", "_")%>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_<%#Eval("PortalName").ToString().Replace(" ", "_").Replace(".", "_")%>" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <div id="div_orgmessage" runat="server" class="col-xs-12 row-label" visible="false"></div>
                                                        <UC:EditSPUser ID="EditSPUser1" runat="server" OnEditCompleted="SPEditCompleted" />
                                                    </div>
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                    <EM:TabPanel ID="Tab_EditUserCRM" runat="server" HeaderText="<%$Resources:Content,USM0172 %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab5" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent5" runat="server" Visible="false">
                                <div class="panel-group" id="AS_CRMUserEdit" role="tablist" aria-multiselectable="true">
                                    <asp:Repeater ID="Rep_CRMOrgs" runat="server">
                                        <ItemTemplate>
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_<%#Eval("OrgUniqueName")%>">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_<%#Eval("OrgUniqueName")%>" data-toggle="collapse" data-parent="#AS_CRMUserEdit" href="#CSB_<%#Eval("OrgUniqueName")%>" aria-expanded="false" aria-controls="CSB_<%#Eval("OrgUniqueName")%>" class="collapsed">
                                                            <asp:Label ID="Lbl_OrgTitle" runat="server" Text='<%#Eval("OrgUniqueName")%>'></asp:Label>
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_<%#Eval("OrgUniqueName")%>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_<%#Eval("OrgUniqueName")%>" aria-expanded="false" style="height: 0px;">
                                                    <div class="panel-body">
                                                        <div id="div_orgmessage" runat="server" class="col-xs-12 row-label" visible="false"></div>
                                                        <UC:EditCRMUser ID="EditCRMUser1" runat="server" OnEditCompleted="CRMEditCompleted" />
                                                    </div>
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                </EM:TabContainer>
            </div>
        </div>
    </div>

    <asp:Button ID="Btn_Display" runat="server" Style="display: none;" />
    <asp:Panel ID="Pnl_Resources" runat="server" Style="display: none" CssClass="width-modal-popup-auto">
        <div class="col-xs-12 row-label col-red">
            <asp:Label ID="Lbl_ResourceError" runat="server" ForeColor="red" Font-Bold="true"
                Visible="false"></asp:Label>
        </div>
        <div class="col-xs-12">
            <EM:ResourceQuota runat="server" ID="ResourceQuotaView" />
        </div>
    </asp:Panel>
    <EM:ModalPopupExtender runat="server" ID="MPE_Resource" BackgroundCssClass="modalBackground"
        DropShadow="false" PopupControlID="Pnl_Resources" TargetControlID="Btn_Display">
    </EM:ModalPopupExtender>
    <asp:Panel ID="Pnl_ShowMBTemplate" runat="server" CssClass="width-modal-popup-auto" Style="display: none">
        <div class="col-xs-12">
            <div class="card">
                <div class="header container-fluid">
                    <h3 class="pull-left"></h3>
                    <span>
                        <button type="button" class="close" onclick="$find('<%=MP_ShowMBTemplate.ClientID%>').hide();">&times;</button>
                    </span>
                </div>
                <div class="body">
                    <UC:AddEditMBTemplate ID="AddEditMBTemplate1" runat="server" />
                </div>
            </div>
        </div>
    </asp:Panel>
    <asp:Button ID="Btn_DummyMBTemp" runat="server" Text="<%$ Resources:Content,SMI0006%>"
        Style="display: none;" />
    <asp:Button ID="Btn_DummyMBTemp2" runat="server" Text="<%$ Resources:Content,SMI0007%>"
        Style="display: none;" />
    <EM:ModalPopupExtender runat="server" ID="MP_ShowMBTemplate" BackgroundCssClass="modalBackground"
        DropShadow="false" PopupControlID="Pnl_ShowMBTemplate" TargetControlID="Btn_DummyMBTemp"
        OkControlID="Btn_DummyMBTemp2">
    </EM:ModalPopupExtender>
    <script lang="javascript">
        AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender1.ClientID%>');
        AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender2.ClientID%>');
    </script>
</asp:Content>

