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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/PCC/DC/CC/ADirBulkUser.ascx" TagName="ADBulkUser" 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/O365/CC/UserDetail.ascx" TagName="O365User" TagPrefix="UC" %>
<%@ Register Src="~/RCC/Exchange/CC/AddEditMBTemplate.ascx" TagName="AddEditMBTemplate" TagPrefix="UC" %>
<%@ 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="Content4" ContentPlaceHolderID="CPH_Content" runat="Server">
    <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 CopyToUPNAD() {
            ApplyAdditionalSettings();
            //$get('<%= TxBx_UPN.ClientID%>').value = ($get('<%=TxBx_UsrDispName.ClientID%>').value).replace(/ /g, '');
            ApplyAdditionalSettings();
            CopyUPNToEmail();
            CopyToUPNFromAD();
        }

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

        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();
        }


        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 CopyToMobilePhoneAD() {
            $get('<%= TxBxMobile.ClientID%>').value = $get('<%=TxBx_CustomMobile.ClientID%>').value;
        }

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

        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;

        }

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

            //CopyToDisplayName();

        });

    </script>

    <div class="col-xs-12">
        <div class="card">
            <%--<div class="header">
                <h2>
                    <asp:Literal ID="Ltl_SubsInfo" runat="server" /></h2>
            </div>--%>
            <div class="body">
                <EM:TabContainer ID="TC_AddADUsers" runat="server" OnClientActiveTabChanged="loadTabPanel">
                    <EM:TabPanel ID="Tab_AddUser" runat="server" HeaderText="<%$Resources:Content, SM0105%>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab0" runat="server" Style="display: none" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server">
                                <asp:Panel ID="Pnl_add" 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">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal10" runat="server" Text='<%$Resources:Content, AD0000100%>' EnableViewState="False"></asp:Literal>:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <asp:DropDownList ID="DDL_OU" runat="server" AutoPostBack="true" CausesValidation="false" data-label="Organization">
                                                </asp:DropDownList>
                                                <asp:HiddenField ID="HF_AdditionalSettings" runat="server" />
                                            </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="Literal30" 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:DropDownList ID="DDl_AccountType" runat="server" AutoPostBack="true" CausesValidation="false" data-label="Account Type">
                                                </asp:DropDownList>
                                            </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, GN00001132%>' 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="TxBxGivenName" runat="server" MaxLength="28" onKeyup="CopyToDisplayName()" data-label="First Name"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_GivenName" runat="server" ControlToValidate="TxBxGivenName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="Adduser">
                                                    </asp:RequiredFieldValidator>
                                                </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, GN00001133%>' 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="TxBxLastName" runat="server" MaxLength="28" onKeyup="CopyToDisplayName()" data-label="Last Name"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_LastName" runat="server" ControlToValidate="TxBxLastName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="Adduser">
                                                    </asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Literal ID="Literal12" 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" onChange="CopyToUPNAD()" runat="server" MaxLength="64" ValidationGroup="Adduser" data-label="Display Name">
                                                    </asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_UsrDispName" runat="server" ControlToValidate="TxBx_UsrDispName"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="Adduser">
                                                    </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, 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" onChange="CopyUPNToEmail();" runat="server" ValidationGroup="Adduser" data-label="UPN Prefix" />
                                                    <%-- <asp:RegularExpressionValidator ID="REV_UPN" runat="server" ValidationExpression="<%$ Resources:MPRegex,Alias %>"
                                                        ErrorMessage='<%$Resources:Content, InvalidUPN%>' ControlToValidate="TxBx_UPN"
                                                        Display="None" SetFocusOnError="true" ValidationGroup="Adduser"></asp:RegularExpressionValidator>--%>
                                                    <asp:RequiredFieldValidator ControlToValidate="TxBx_UPN" ID="RFV_UPN" runat="server"
                                                        Display="None" ValidationGroup="Adduser"></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="Adduser">
                                                    </asp:RequiredFieldValidator>
                                                    <%-- <asp:RegularExpressionValidator ID="REV_UPN2" Display="None" runat="server" ErrorMessage='<%$ Resources:Content,InvalidUPN%>'
                                                        ControlToValidate="TxBx_UPN2" SetFocusOnError="True" ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>"
                                                        Enabled="false" ValidationGroup="Adduser"></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="Literal13" 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" onKeyup="CopySecEmailToSetupEmail()" data-label="Email" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_Email"
                                                        Display="None" SetFocusOnError="True" Enabled="true" ValidationGroup="Adduser">
                                                    </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="Adduser"></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="Literal27" 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="CopyToCompanyAD()" onChange="CopyToCompanyAD()" 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="Adduser" 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="Literal28" 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="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="CopyToMobilePhoneAD()"
                                                            onChange="CopyToMobilePhoneAD()" data-label="Mobile"></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="Adduser"></asp:RegularExpressionValidator>
                                                        <asp:RequiredFieldValidator ID="RFV_TxBx_CustomMobile" EnableClientScript="true"
                                                            runat="server" ControlToValidate="TxBx_CustomMobile" Display="None" SetFocusOnError="True"
                                                            ValidationGroup="Adduser" 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="Literal29" 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="Adduser" 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="Adduser" Enabled="false"></asp:RequiredFieldValidator>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Label ID="Lbl_Password" runat="server" Text="<%$ Resources:Content,GN0000569 %>" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_Password" runat="server" TextMode="Password" data-label="Password" data-secure="1"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_CP_Password" runat="server" ControlToValidate="TxBx_Password"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="Adduser"></asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                            <br />
                                            <asp:CheckBox ID="CB_Show" runat="server" Text="<%$ Resources:Content,FAM0049 %>" data-state="hidden" />
                                        </div>
                                        <div class="col-sm-5 col-xs-12">
                                            <div class="form-group">
                                                <asp:LinkButton ID="lb_Generate" runat="server" Text="<%$ Resources:Content,SMI0195%>" CausesValidation="false" class="btn btn-primary waves-effect" TabIndex="-1"></asp:LinkButton>
                                            </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:Label ID="Lbl_ConfirmPwd" runat="server" Text="<%$ Resources:Content,GN0001196 %>" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_CPass" runat="server" TextMode="Password" data-state="hidden"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_CP_CPassword" runat="server" ControlToValidate="TxBx_CPass"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="Adduser"></asp:RequiredFieldValidator>
                                                    <asp:CompareValidator ID="CompareValidator1" ControlToValidate="TxBx_CPass" ControlToCompare="TxBx_Password"
                                                        runat="server" Display="none" ErrorMessage='<%$ Resources:Content,DGN1110005 %>'
                                                        ValidationGroup="Adduser"></asp:CompareValidator>
                                                </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" />
                                                            </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="Adduser"></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="Literal3" 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="Literal14" 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="Adduser"></asp:RegularExpressionValidator>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Literal23" 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="Literal15" 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="Literal25" 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="Literal1" 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="Literal6" 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="Literal9" 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="Literal22" 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="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="Literal24" 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="Literal26" 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="Literal4" 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" Checked="true" 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 Expiry" />
                                                            &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 on"></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="Literal16" 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="Literal17" 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="Literal18" 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="Literal19" 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="Literal21" 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="Literal20" 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>

                                    <%-- Password Change Options --%>
                                    <asp:Panel ID="Pnl_PasswordSettings" runat="server">
                                        <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="Literal5" 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>
                                    </asp:Panel>

                                    <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>

                                    <%--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="Enable Mailbox" /><br />
                                                        <br />
                                                        <EM:AddMailbox ID="AddMailbox1" runat="server" IsADuserMode="true" 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_O365" role="tablist" aria-multiselectable="true">
                                            <div class="panel panel-primary">
                                                <div class="panel-heading" role="tab" id="heading_O365">
                                                    <h2 class="panel-title">
                                                        <a role="button" id="A_O365" data-toggle="collapse" data-parent="#AS_O365" href="#CSB_O365" aria-expanded="false" aria-controls="CSB_O365" class="collapsed">
                                                            <%= Resources.Content.EnableO365Service%>
                                                        </a>
                                                    </h2>
                                                </div>
                                                <div id="CSB_O365" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_O365" 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--%>

                                    <%--SfB 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 User" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--SfB 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_CRMOrgs" 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" data-label="Select CRM Organization" /><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" data-label="Access Mode">
                                                                                        </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" data-label="CAL Type">
                                                                                        </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" data-label="Business Unit">
                                                                                        </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" data-label="Roles"></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_SharePointOrgs" 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">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Label ID="Label1" runat="server" Text="<%$ Resources:Content,GN0000752 %>" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <asp:CheckBox ID="CB_AddUserSendEmail" Checked="true" runat="server" Text=" " data-label="Allow to Send Setup Email" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="Tr_AddUserSendEmail" runat="server">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <label>
                                                *<asp:Label ID="Label3" runat="server" Text="<%$ Resources:Content,String389 %>" />:</label>
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_AddUserSendSetupEmail" runat="server" data-label="Setup Email Address"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RFV_TxBx_AddUserSendEmail" runat="server" ControlToValidate="TxBx_AddUserSendSetupEmail"
                                                        Display="None" SetFocusOnError="True" ValidationGroup="Adduser"></asp:RequiredFieldValidator>
                                                    <%--<asp:RegularExpressionValidator ID="REV_TxBx_AddUserSendEmail" runat="server" ErrorMessage='<%$ Resources:Content,DEV1055%>'
                                                        ControlToValidate="TxBx_AddUserSendSetupEmail" Display="None" SetFocusOnError="True"
                                                        ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>" ValidationGroup="Adduser"></asp:RegularExpressionValidator>--%>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:ValidationSummary ID="ValidationSum_1" runat="server" HeaderText='<%$ Resources:Content,EM000001 %>'
                                                ShowMessageBox="True" ShowSummary="False" ValidationGroup="Adduser" />

                                            <asp:Button ID="Btn_Save" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000281%>'
                                                runat="server" CausesValidation="true" ValidationGroup="Adduser" />
                                            <asp:Button ID="Btn_Cancel" class="btn btn-primary waves-effect" CausesValidation="false" Text='<%$ Resources:Content,GN0000572%>'
                                                runat="server" />
                                        </div>
                                    </div>

                                </asp:Panel>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                    <EM:TabPanel ID="Tab_AddBulkUser" runat="server" HeaderText="<%$Resources:Content,USM0162 %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab1" runat="server" Style="display: none" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                <UC:ADBulkUser ID="ADBulkUser1" runat="server"></UC:ADBulkUser>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                </EM:TabContainer>
            </div>
        </div>
    </div>


    <asp:Panel ID="Pnl_Resources" runat="server" Style="display: none" CssClass="width-modal-popup-auto">
        <table class="col-xs-12">
            <tr class="row">
                <td class="col-xs-12">
                    <asp:Label ID="Lbl_ResourceError" runat="server" ForeColor="red" Font-Bold="true" Visible="false"></asp:Label>
                </td>
            </tr>
            <tr class="row">
                <td class="col-xs-12">
                    <asp:GridView ID="GV_Resources" runat="server" AllowPaging="true" CssClass="table table-bordered table-striped table-hover"
                        AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>"
                        PageSize="500">
                        <AlternatingRowStyle CssClass="altRow" />
                        <Columns>
                            <asp:TemplateField HeaderText="<%$Resources:Content,DEV1008%>" HeaderStyle-CssClass="col-xs-3">
                                <ItemTemplate>
                                    <asp:Label ID="Lbl_ResourceID" runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="<%$Resources:Content,DEV1002%>" HeaderStyle-CssClass="col-xs-2">
                                <ItemTemplate>
                                    <asp:Label ID="Lbl_TotalResources" runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="<%$Resources:Content,DEV1003%>" HeaderStyle-CssClass="col-xs-2">
                                <ItemTemplate>
                                    <asp:Label ID="Lbl_UsedResources" runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="<%$Resources:Content,DEV1004%>" HeaderStyle-CssClass="col-xs-2">
                                <ItemTemplate>
                                    <asp:Label ID="Lbl_AvailableResources" runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="<%$Resources:Content,DEV1005%>" HeaderStyle-CssClass="col-xs-3">
                                <ItemTemplate>
                                    <asp:Label ID="Lbl_RequestedResources" runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
            <tr class="row">
                <td class="col-xs-12">
                    <asp:Button ID="Btn_Done" runat="server" Text="<%$ Resources:Content,GN0000858%>"
                        SkinID="okbutton" CssClass="btn btn-primary waves-effect" />
                    <asp:Button ID="Btn_Display" runat="server" Style="display: none;" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    <EM:ModalPopupExtender runat="server" ID="MPE_Resource" BackgroundCssClass="modalBackground"
        DropShadow="false" PopupControlID="Pnl_Resources" TargetControlID="Btn_Display"
        OkControlID="Btn_Done">
    </EM:ModalPopupExtender>
    <asp:Panel ID="Pnl_ShowMBTemplate" runat="server" Style="display: none" CssClass="width-modal-popup-auto">
        <table width="100%">
            <tr>
                <td align="right">
                    <asp:LinkButton ID="Btn_Close" runat="server" Text="<%$ Resources:Content,GN000150%>"
                        Style="display: none;" />
                    <asp:ImageButton ID="Btn_IClose" runat="server" ImageUrl="~/App_Themes/Default/Images/icons/disabled-icon.png"
                        AlternateText="<%$ Resources:Content,GN000150%>" />
                </td>
            </tr>
            <tr>
                <td>
                    <UC:AddEditMBTemplate ID="AddEditMBTemplate1" runat="server" />
                </td>
            </tr>
        </table>
    </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>
