<%@ control language="VB" autoeventwireup="false" inherits="RCC_Voice_CC, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>

<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>
<%@ Register Src="ForwardingRule.ascx" TagName="Forwarding" TagPrefix="UC" %>
<asp:Panel ID="Pnl_Listing" runat="server" DefaultButton="Btn_ApplyFilter">
    <div class="row Div_OpsRow" id="Div_OpsRow" runat="server">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h3>
                        <%= Resources.Content.SMI0423%>                                                                                                                                 
                    </h3>
                </div>
                <div class="body">
                    <div class="clearfix">
                        <asp:Button ID="Btn_AddSubscriber" class="btn btn-primary waves-effect btnAction" runat="server"
                            Text='<%$ Resources:Content,AddSubscriber %>' />
                    </div>
                </div>
            </div>
        </div>
    </div>

    <asp:Panel ID="Pnl_Btn_ApplyFilter" runat="server" CssClass="row" DefaultButton="Btn_ApplyFilter">
        <div class="panel-group search-panel" id="AS_Subscribers" role="tablist" aria-multiselectable="true">
            <div class="col-xs-12" role="tab" id="SH_Subscribers">
                <div class="card">
                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_Subscribers" href="#<%= CSB_Subscribers.ClientID%>" aria-expanded="true" aria-controls="SH_Subscribers">
                        <h3>
                            <%= Resources.Content.GN0000395%>
                        </h3>
                    </div>
                    <div id="CSB_Subscribers" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_Subscribers" aria-expanded="false">
                        <div class="row">

                            <div class="col-md-3 col-sm-6 col-xs-12">
                                <div class="form-group form-float">
                                    <div class="form-line">
                                        <asp:TextBox ID="TxBx_SrchUser" runat="server"></asp:TextBox>
                                        <asp:Label ID="Label2" runat="server" class="form-label" EnableViewState="false" Text="<%$ Resources:Content,GN0001288%>"></asp:Label>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3 col-sm-6 col-xs-12">
                                <div class="form-group form-float">
                                    <div class="form-line">
                                        <asp:TextBox ID="TxBx_SrchPhoneNumber" runat="server" CssClass="allowonlyintegervalues" MaxLength="19"></asp:TextBox>
                                        <asp:Label ID="Label1" runat="server" class="form-label" EnableViewState="false" Text="<%$ Resources:Content,PhoneNumber%>"></asp:Label>
                                    </div>

                                </div>
                                <asp:RangeValidator ID="RV_TxBx_SrchPhoneNumber" runat="server" ControlToValidate="TxBx_SrchPhoneNumber"
                                    Display="None" SetFocusOnError="true" ValidationGroup="SearchSubscribers"
                                    ErrorMessage="<%$ Resources:Content,DGN1110070 %>" Type="Double"
                                    MinimumValue="0" MaximumValue="9223372036854775807"></asp:RangeValidator>
                            </div>
                            <div class="col-md-3 col-sm-6 col-xs-12">
                                <div class="form-group form-float">
                                    <asp:ValidationSummary ID="VS_SearchSubscribers" runat="server" ShowMessageBox="true"
                                        ShowSummary="false" ValidationGroup="SearchSubscribers" />
                                    <asp:Button ID="Btn_ApplyFilter" ValidationGroup="SearchSubscribers" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,GN0000391%>" />
                                    <asp:Button ID="Btn_ClearFilter" Visible="false" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,String289 %>" />

                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>

    <div class="row">
        <div class="col-xs-12">
            <EM:MPGridView ID="GV_SubscribersListing" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="true"
                EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">
                <Columns>
                    <asp:TemplateField SortExpression="Name" HeaderStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content, GN000170 %>'>
                        <ItemTemplate>
                            <asp:Label ID="LB_Name" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="<%$ Resources:Content,USM0061%>" HeaderStyle-CssClass="col-xs-3">
                        <ItemTemplate>
                            <asp:Label ID="LB_UserName" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content,strCreditLimit%>" HeaderStyle-CssClass="col-xs-3">
                        <ItemTemplate>

                            <table class="table small">
                                <tbody>
                                    <tr>
                                        <td class="col-xs-8 row-label">
                                            <asp:Label ID="LB_MonthlylimitH" runat="server"
                                                EnableViewState="false" Text='<%$ Resources:Content,strMonthlyLimit%>'></asp:Label>:
                                        </td>
                                        <td class="col-xs-4">
                                            <asp:Label ID="LB_Monthlylimit" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="col-xs-8 row-label">
                                            <asp:Label ID="LB_DailylimitH" runat="server"
                                                EnableViewState="false" Text='<%$ Resources:Content,strDailyLimit%>'></asp:Label>:
                                        </td>
                                        <td class="col-xs-4">
                                            <asp:Label ID="LB_Dailylimit" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="col-xs-8 row-label">
                                            <asp:Label ID="LB_MonthlylimitusedH" runat="server"
                                                EnableViewState="false" Text='<%$ Resources:Content,strMonthlyLimitUsed%>'></asp:Label>:
                                        </td>
                                        <td class="col-xs-4">
                                            <asp:Label ID="LB_Monthlylimitused" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="col-xs-8 row-label">
                                            <asp:Label ID="LB_DailylimitusedH" runat="server"
                                                EnableViewState="false" Text='<%$ Resources:Content,strDailyLimitUsed%>'></asp:Label>:
                                        </td>
                                        <td class="col-xs-4">

                                            <div id="Div_Service" runat="server">
                                            </div>
                                            <asp:Label ID="LB_Dailylimitused" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="col-xs-8 row-label">
                                            <asp:Label ID="LB_BundleNameH" runat="server"
                                                EnableViewState="false" Text='<%$ Resources:Content,strBundle%>'></asp:Label>:
                                        </td>
                                        <td class="col-xs-4">
                                            <asp:Label ID="LB_BundleName" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <%--  <asp:Label ID="LB_MonthlylimitH" runat="server" />:<asp:Label ID="LB_Monthlylimit" runat="server" /><br />
                            <asp:Label ID="LB_DailylimitH" runat="server" />:<asp:Label ID="LB_Dailylimit" runat="server" /><br />
                            <asp:Label ID="LB_MonthlylimitusedH" runat="server" />:<asp:Label ID="LB_Monthlylimitused" runat="server" /><br />
                            <asp:Label ID="LB_DailylimitusedH" runat="server" />:<asp:Label ID="LB_Dailylimitused" runat="server" /><br />--%>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="<%$ Resources:Content,PhoneNumbersCount%>" HeaderStyle-CssClass="col-xs-1">
                        <ItemTemplate>
                            <asp:Label ID="LB_PhoneNumbersCount" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content,strCloudPBXEnabled%>" HeaderStyle-CssClass="col-xs-1">
                        <ItemTemplate>
                            <asp:Label ID="LB_CloudPBX" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-2">
                        <ItemTemplate>
                            <asp:Button ID="Btn_Edit" runat="server" Text="<%$ Resources:Content,Edit %>"
                                CssClass="btn btn-primary waves-effect" CommandName="Edit" />
                            <asp:Button ID="Btn_Remove" runat="server" Text="<%$ Resources:Content, Remove %>"
                                CssClass="btn btn-primary waves-effect btnAction" CommandName="Remove" />
                            <EM:ConfirmButtonExtender ID="CBE_RemoveSubscriber" runat="server" ConfirmText="<%$Resources:Content,RemoveSubscriberConfirmation%>"
                                TargetControlID="Btn_Remove">
                            </EM:ConfirmButtonExtender>
                        </ItemTemplate>

                    </asp:TemplateField>
                </Columns>
                <PagerTemplate>
                    <EM:Pager ID="Pager" runat="server" />
                </PagerTemplate>
            </EM:MPGridView>
        </div>
    </div>
</asp:Panel>

<asp:Panel ID="Pnl_Add" runat="server" Visible="false">


    <div class="card">
        <div class="header">
            <div class="row">
                <div class="col-sm-3 col-xs-12">
                    <h3>
                        <asp:Label ID="Lbl_AddEditTitle" runat="server" Text="<%$ Resources:Content,AddSubscriber%>"></asp:Label>
                    </h3>
                </div>
                <div class="col-sm-4 col-xs-12" runat="server" id="divUserNameEdit">
                    <asp:Literal ID="ltrSubUser" runat="server" />
                </div>
            </div>
        </div>
        <div class="body">
            <%-- <div class="row" runat="server" id="divUserNameEdit">
                <div class="col-sm-2 col-xs-12 row-label">
                     
                      <asp:Literal ID="Literal6" runat="server" Text='<%$ Resources:Content,GN0001288 %>' />:
                </div>
                <div class="col-sm-4 col-xs-12">
                    <asp:Literal ID="ltrSubUser" runat="server" />
                </div>
            </div>--%>
            <div class="row">
                <EM:TabContainer ID="TC_Subscriber" runat="server" OnClientActiveTabChanged="loadTabPanel">

                    <EM:TabPanel ID="Tab_GeneralSettings" runat="server" HeaderText='<%$ Resources:Content,GN00001466%>'>
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab0" runat="server" Style="display: none" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server">
                                <div class="col-xs-12">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <div class="card">
                                                <%-- <div class="header">
                                                    <h3>
                                                       <asp:Label ID="Lbl_AddEditTitle" runat="server" Text="<%$ Resources:Content,AddSubscriber%>"></asp:Label>
                                                    </h3>
                                                </div>--%>
                                                <div class="body">
                                                    <div class="row" runat="server" id="divUserNameAdd">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            *
                                       <asp:Literal ID="Literal22" runat="server" Text='<%$ Resources:Content,GN0001288 %>' />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_UserName" runat="server" MaxLength="63" MinLength="4"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator42" runat="server" ControlToValidate="TxBx_UserName"
                                                                Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                            <asp:RegularExpressionValidator ID="REV_TxBx_UserName" runat="server"
                                                                ControlToValidate="TxBx_UserName"
                                                                ErrorMessage="<%$ Resources:Content,MinimumUserLengthIs4 %>"
                                                                ValidationExpression="^[A-Za-z0-9]{4,63}$"
                                                                ValidationGroup="AddSubscriber"
                                                                SetFocusOnError="true"
                                                                Display="None" />
                                                        </div>
                                                        <div class="col-sm-1 col-xs-12">
                                                            <div class="form-group">
                                                                <label>@</label>
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <asp:DropDownList ID="Ddl_Domains" runat="server"></asp:DropDownList>
                                                            </div>
                                                        </div>
                                                    </div>


                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <asp:Label ID="Lbl_StericPassword" runat="server" Text="*"></asp:Label>
                                                            <asp:Literal ID="Literal45" runat="server" Text='<%$ Resources:Content,GN0000569 %>' />:
                                                        </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" MaxLength="24"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                            <div id="Div_PasswordTextForEditCase" runat="server" visible="false">
                                                                <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Content,GN00001530 %>" CssClass="xs"></asp:Label>
                                                            </div>
                                                            <asp:CheckBox ID="CB_Show" runat="server" Text="<%$ Resources:Content,FAM0049 %>" />
                                                            <asp:RequiredFieldValidator ID="RFV_Password" runat="server" ControlToValidate="TxBx_Password"
                                                                Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                            <asp:CompareValidator ID="CompareValidator1" ErrorMessage='<%$ Resources:Content,DGN1110005 %>'
                                                                runat="server" ControlToCompare="TxBx_ConfirmPassword" ControlToValidate="TxBx_Password"
                                                                ValidationGroup="AddSubscriber" Display="None"></asp:CompareValidator>
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
                                                                ControlToValidate="TxBx_Password"
                                                                ErrorMessage="<%$ Resources:Content,MinimumPasswordLengthIs12 %>"
                                                                ValidationExpression=".{12}.*"
                                                                ValidationGroup="AddSubscriber"
                                                                SetFocusOnError="true"
                                                                Display="None" />
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <asp:LinkButton CssClass="btn btn-primary waves-effect" ID="lb_Generate" runat="server" Text="<%$ Resources:Content,SMI0195%>" CausesValidation="false"
                                                                TabIndex="-1"></asp:LinkButton>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <asp:Label ID="Lbl_StericConfirmPassword" runat="server" Text="*"></asp:Label>
                                                            <asp:Literal ID="Literal1" runat="server" Text='<%$ Resources:Content,ConfirmPassword %>' />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_ConfirmPassword" runat="server" TextMode="Password" MaxLength="24"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <asp:RequiredFieldValidator ID="RFV_ConfirmPassword" runat="server" ControlToValidate="TxBx_ConfirmPassword"
                                                            Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                    </div>
                                                    <div class="row" runat="server" id="Div_IsActive">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            *
                                       <asp:Literal ID="Literal7" runat="server" Text='<%$ Resources:Content,GN0000001 %>' />:
                                                        </div>
                                                        <div class="col-sm-9 col-xs-12">
                                                            <asp:CheckBox ID="CB_IsActive" ForeColor="Red" Text="<%$ Resources:Content,strNoteToInactiveSubscriber %>" runat="server" />
                                                        </div>
                                                        <%-- <div class="col-sm-8 col-xs-12">
                                            <asp:Label ID="Label5" runat="server"  ForeColor="red" Text="<%$ Resources:Content,strNoteToInactiveSubscriber %>"></asp:Label>
                                        </div>--%>
                                                    </div>
                                                    <div class="row" id="Div_ExternalRef" runat="server">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Literal17" runat="server" Text='<%$ Resources:Content,strExternalRef %>' />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_ExternalRef" runat="server" MaxLength="255"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Literal16" runat="server" Text='<%$ Resources:Content,Lync338 %>' EnableViewState="false" />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <asp:DropDownList ID="Ddl_SIPBundle" runat="server"></asp:DropDownList>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <%--   <div class="row"  runat="server" id="Div_IsActiveNote">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                             <asp:Literal ID="Literal8" runat="server" Text='<%$ Resources:Content,strNote %>' />
                                        </div>
                                        <div class="col-sm-9 col-xs-12">
                                            <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Content,strNoteToInactiveSubscriber %>"></asp:Label>
                                        </div>
                                    </div>--%>
                                                </div>
                                            </div>
                                        </div>

                                        <asp:UpdatePanel ID="UP_OptionFields" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <div class="col-xs-12">
                                                    <div class="card">
                                                        <div class="header">
                                                            <h3>
                                                                <asp:Label ID="lblOption" runat="server" Text="<%$ Resources:Content,SMI0230 %>"></asp:Label>: &nbsp;&nbsp;
                                                <asp:CheckBox ID="ChBx_UseCompanyData" runat="server" Text="<%$ Resources:Content,strUseCompanyProfileData %>" AutoPostBack="true" />
                                                            </h3>
                                                        </div>
                                                        <div class="panel-body" id="Div_Body" runat="server">
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12">
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <asp:Button ID="Btn_ClearOptionalFields" runat="server" CssClass="btn btn-primary"
                                                                        Text='<%$ Resources:Content,ClearOptionalFields %>' OnClientClick="ClearOptionalFields();return false;" />
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal34" runat="server" Text='<%$ Resources:Content,GN0000280 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_Title" runat="server" MaxLength="16"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *
                                                                      <asp:Literal ID="Literal25" runat="server" Text='<%$ Resources:Content,GN00001132 %>' />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_FirstName" runat="server" MaxLength="64"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" ControlToValidate="TxBx_FirstName"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal32" runat="server" Text='<%$ Resources:Content,DGN1110529 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_MiddleName" runat="server" MaxLength="24"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *
                                                        <asp:Literal ID="Literal33" runat="server" Text='<%$ Resources:Content,GN00001133 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_LastName" runat="server" MaxLength="112"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ControlToValidate="TxBx_LastName"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal35" runat="server" Text='<%$ Resources:Content,Gender %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <asp:RadioButtonList ID="Rbl_Gender" runat="server" RepeatDirection="Horizontal">
                                                                            <asp:ListItem Text='<%$ Resources: Content,Male %>' Value="M"></asp:ListItem>
                                                                            <asp:ListItem Text='<%$ Resources: Content,Female %>' Value="F"></asp:ListItem>
                                                                            <asp:ListItem Text='<%$ Resources: Content,Undeclared %>' Value="U" Selected="True"></asp:ListItem>
                                                                        </asp:RadioButtonList>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *
                                                    <asp:Literal ID="Literal36" runat="server" Text='<%$ Resources:Content,GN0000652 %>' EnableViewState="false" />:
                                                                </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="255"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_Email"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                  <%--  <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ValidationGroup="AddSubscriber"
                                                                        ControlToValidate="TxBx_Email" runat="server" ValidationExpression="<%$ Resources:MPRegex,EmailAddress%>"
                                                                        Display="None" SetFocusOnError="True" ErrorMessage='<%$ Resources:Content,GN0000592 %>'></asp:RegularExpressionValidator>--%>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal37" runat="server" Text='<%$ Resources:Content,OCS003 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_PhoneNumber" runat="server" MaxLength="16"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server"
                                                                        ControlToValidate="TxBx_PhoneNumber" ErrorMessage='<%$ Resources:Content,OnlyIntegerValuesValidForPhoneNumber %>'
                                                                        ValidationExpression="^[0-9]*$" ValidationGroup="AddSubscriber"
                                                                        Display="none">
                                                                    </asp:RegularExpressionValidator>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *<asp:Literal ID="Literal46" runat="server" Text='<%$ Resources:Content,GN0000882 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <asp:DropDownList ID="Ddl_Country" runat="server"></asp:DropDownList>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *<asp:Literal ID="Literal38" runat="server" Text='<%$ Resources:Content,PostalCodeOrZip %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_PostalCode" runat="server" MaxLength="16"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TxBx_PostalCode"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *<asp:Literal ID="Literal39" runat="server" Text='<%$ Resources:Content,DGN1110530 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_Street" runat="server" MaxLength="128"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TxBx_Street"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *<asp:Literal ID="Literal40" runat="server" Text='<%$ Resources:Content,HouseNumber %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_HouseNumber" runat="server" MaxLength="7" CssClass="allowonlyintegervalues"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server"
                                                                        ControlToValidate="TxBx_HouseNumber" ErrorMessage='<%$ Resources:Content,OnlyIntegerValuesValidForHouseNumber %>'
                                                                        ValidationExpression="^[0-9]*$" ValidationGroup="AddSubscriber" SetFocusOnError="true"
                                                                        Display="none">
                                                                    </asp:RegularExpressionValidator>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxBx_HouseNumber"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal41" runat="server" Text='<%$ Resources:Content,HouseNumberAddition %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_HouseNumberAddition" runat="server" MaxLength="4"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *<asp:Literal ID="Literal42" runat="server" Text='<%$ Resources:Content,GN0000880 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_City" runat="server" MaxLength="128"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="TxBx_City"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *<asp:Literal ID="Literal43" runat="server" Text='<%$ Resources:Content,GN00001313 %>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_Province" runat="server" MaxLength="128"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="TxBx_Province"
                                                                        Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>

                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">

                                                    <h3>
                                                        <%= Resources.Content.strCreditLimit%>                                       
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            *
                            <asp:Literal ID="Literal3" runat="server" Text='<%$ Resources:Content,strMonthlycreditlimit %>' />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <%--     <asp:Label ID="LB_MonthlylimitPG" runat="server" />: --%>
                                                                    <asp:TextBox ID="txtMonthlycreditlimit" runat="server" MaxLength="100" CssClass="js-input-price"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_Account_UserName"
                            Display="None" ValidationGroup="AddCompany" SetFocusOnError="True"></asp:RequiredFieldValidator>--%>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            *
                            <asp:Literal ID="Literal4" runat="server" Text='<%$ Resources:Content,strDailyCreditlimit %>' />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <%--    <asp:Label ID="LB_DailylimitPG" runat="server" />: --%>
                                                                    <asp:TextBox ID="txtDailyCreditLimit" runat="server" MaxLength="100" CssClass="js-input-price"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_Account_UserName"
                            Display="None" ValidationGroup="AddCompany" SetFocusOnError="True"></asp:RequiredFieldValidator>--%>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.DEV1089%>                                                                                                                                 
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Literal2" runat="server" Text='<%$ Resources:Content,DEV1089 %>' />:
                                                        </div>
                                                        <div class="col-xs-12">
                                                            <div class="form-group">
                                                                <EM:AddSelectableSelected ID="UCPhoneNumbers" runat="server" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row" id="DivPhoneNumberCantAssign" runat="server" visible="false">
                                                        <div class="col-xs-12">
                                                            <asp:Literal ID="Literal6" runat="server" Text='<%$ Resources:Content,strPhoneNumberCantAssign %>' />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.strAnonymityCLIR%>                                                                                                                                 
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Literal5" runat="server" Text='<%$ Resources:Content,strForceAnonymity %>' EnableViewState="false" />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <div class="form-group">
                                                                <asp:CheckBox ID="ChBx_ForceAnonymityOnAllOutboundCalls" runat="server" Text=" " />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-12" id="Div_PBX" runat="server">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Content,strCloudPBX%>"></asp:Label>
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <div class="row">
                                                        <div class="col-sm-3 col-xs-12 row-label">
                                                            *
                                       <asp:Literal ID="Literal9" runat="server" Text='<%$ Resources:Content,strEnableCloudPBX %>' />:
                                                        </div>
                                                        <div class="col-sm-4 col-xs-12">
                                                            <asp:CheckBox ID="chbx_EnablePBX" runat="server" Text=" " AutoPostBack="true" />
                                                        </div>
                                                    </div>


                                                    <div id="PBXHideControl" runat="server" visible="false">

                                                        <div class="row">
                                                            <div class="col-xs-12 row-label">
                                                                <asp:Literal ID="Literal14" runat="server" Text='<%$ Resources:Content,strPreferredCredentials %>' />
                                                                <asp:HyperLink ID="LB_PBX" runat="server" Target="_blank" Text=" https://www.pbx.machcloud.com" NavigateUrl="https://www.pbx.machcloud.com"></asp:HyperLink>
                                                                :
                                                            </div>
                                                        </div>

                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                *
                                                <asp:Literal ID="Literal12" runat="server" Text='<%$ Resources:Content,GN00001492 %>' EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_FullName" runat="server" MaxLength="255"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxBx_FullName"
                                                                    Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                *
                                                <asp:Literal ID="Literal11" runat="server" Text='<%$ Resources:Content,GN0000652 %>' EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_PBXEmail" runat="server" MaxLength="255"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="TxBx_PBXEmail"
                                                                    Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator7" ValidationGroup="AddSubscriber"
                                                                    ControlToValidate="TxBx_PBXEmail" runat="server" ValidationExpression="<%$ Resources:MPRegex,EmailAddress%>"
                                                                    Display="None" SetFocusOnError="True" ErrorMessage='<%$ Resources:Content,GN0000592 %>'></asp:RegularExpressionValidator>--%>
                                                            </div>
                                                        </div>

                                                        <div class="row" runat="server" id="DivPBXUser">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                *
                                       <asp:Literal ID="Literal8" runat="server" Text='<%$ Resources:Content,GN0001288 %>' />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_PBXUserName" runat="server" MaxLength="32" MinLength="5"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <asp:RequiredFieldValidator ID="RFVUserName" runat="server" ControlToValidate="TxBx_PBXUserName"
                                                                    Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
                                                                    ControlToValidate="TxBx_PBXUserName"
                                                                    ErrorMessage="<%$ Resources:Content,StrMinimumUserNamePBX %>"
                                                                    ValidationExpression=".{6}.*"
                                                                    ValidationGroup="AddSubscriber"
                                                                    SetFocusOnError="true"
                                                                    Display="None" />
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Label ID="Label5" runat="server" Text="*"></asp:Label>
                                                                <asp:Literal ID="Literal10" runat="server" Text='<%$ Resources:Content,GN0000569 %>' />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_PBXPassword" runat="server" TextMode="Password" MaxLength="24"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <div id="Div1" runat="server" visible="false">
                                                                    <asp:Label ID="Label6" runat="server" Text="<%$ Resources:Content,GN00001530 %>" CssClass="xs"></asp:Label>
                                                                </div>
                                                                <asp:CheckBox ID="CB_PBXShowPass" runat="server" Text="<%$ Resources:Content,FAM0049 %>" />
                                                                <asp:RequiredFieldValidator ID="RFVPBXPass" runat="server" ControlToValidate="TxBx_PBXPassword"
                                                                    Display="None" ValidationGroup="AddSubscriber" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="REVPBXPass" runat="server"
                                                                    ControlToValidate="TxBx_PBXPassword"
                                                                    ErrorMessage="<%$ Resources:Content,MinimumPasswordLengthIs12 %>"
                                                                    ValidationExpression=".{12}.*"
                                                                    ValidationGroup="AddSubscriber"
                                                                    SetFocusOnError="true"
                                                                    Display="None" />
                                                            </div>
                                                            <%--<div class="col-sm-4 col-xs-12">
                                            <asp:LinkButton CssClass="btn btn-primary waves-effect" ID="lnkPBXGenPass" runat="server" Text="<%$ Resources:Content,SMI0195%>" CausesValidation="false"
                                                TabIndex="-1"></asp:LinkButton>
                                        </div>--%>
                                                        </div>

                                                        <div class="row">
                                                            <div class="col-sm-4 col-xs-12 row-label">
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12 row-label">
                                                            </div>
                                                        </div>

                                                        <div class="row">
                                                            <div class="col-xs-12 row-label">
                                                                <asp:Literal ID="Literal15" runat="server" Text='<%$ Resources:Content,strInitialPhoneNumber %>' />:
                                                            </div>
                                                        </div>

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


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

                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.strFilters%>                                                                                                                                 
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <div class="row">
                                                        <%--<div class="col-sm-3 col-xs-12 row-label">
                                            <asp:Literal ID="Literal6" runat="server" Text='<%$ Resources:Content,strFilters %>' />:
                                        </div>--%>
                                                        <div class="col-xs-12">
                                                            <div class="form-group">
                                                                <EM:AddSelectableSelected ID="UCFilters" runat="server" SortByValue="true" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-12">

                                            <asp:HiddenField ID="HFId" Value="0" runat="server" />
                                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="true" ShowSummary="false"
                                                ValidationGroup="AddSubscriber" HeaderText="<%$ Resources:Content,EM000001%>" />
                                            <asp:Button ID="Btn_Save" class="btn btn-primary waves-effect btnAction" ValidationGroup="AddSubscriber" CausesValidation="true" runat="server" Text='<%$ Resources:Content,GN0000281 %>' />
                                            <asp:Button ID="Btn_Cancel" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>' class="btn btn-primary waves-effect" />
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                    <EM:TabPanel ID="Tab_Forwarding" runat="server" HeaderText="<%$ Resources:Content,Forwarding%>">
                        <ContentTemplate>
                            <asp:Button CssClass="btn btn-primary waves-effect" ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                <div class="col-xs-12">
                                    <UC:Forwarding ID="UC_Forwarding" runat="server"></UC:Forwarding>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                    <EM:TabPanel ID="Tab_Destination" runat="server" HeaderText="<%$ Resources:Content,strDestination%>">
                        <ContentTemplate>
                            <asp:Button CssClass="btn btn-primary waves-effect" ID="Btn_Tab2" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent2" runat="server" Visible="false">
                                <div class="col-xs-12">
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            *<asp:Literal ID="Literal18" runat="server" Text='<%$ Resources:Content,strDestination %>' />:
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:DropDownList ID="DDL_Destination" runat="server">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button ID="Btn_SaveDest" class="btn btn-primary waves-effect btnAction" ValidationGroup="AddDestination" CausesValidation="true" runat="server" Text='<%$ Resources:Content,GN0000281 %>' />
                                            <%-- <asp:Button ID="btn_CancelDest" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>' class="btn btn-primary waves-effect" />--%>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>


                </EM:TabContainer>
            </div>
        </div>
    </div>



</asp:Panel>

<asp:HiddenField ID="H_CurrencySymbol" Value="" runat="server" />
<asp:HiddenField ID="HF_PipeSeperatdIds" runat="server" Value="0" />
<script type="text/javascript">

<%--    $(document).ready(function () {
        var params = "{'pipeSeperatedIds': '" + $get('<%=HF_PipeSeperatdIds.ClientID%>').value + "'}";
        $.ajax({
            type: "POST",
            url: "Manage.aspx/GetAsyncUsageData",
            async: true,
            data: params,
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (msg) {
                if (msg.d.indexOf('Error') < 0) {

                    var usageData = msg.d.split(',');
                    var currencySymbol = $get('<%= H_CurrencySymbol.ClientID %>').value

                    if (currencySymbol != '')
                        currencySymbol = currencySymbol + " ";
                    // Iterate through each value
                    for (var i = 0; i < usageData.length; i++) {
                        // Update respective labels.
                        var nodeId = usageData[i].split('|')[0];
                        var monthlyUsage = usageData[i].split('|')[1];
                        var dailyUsage = usageData[i].split('|')[2];
                        $("[name='D" + nodeId + "']").text(currencySymbol + dailyUsage);
                        $("[name='M" + nodeId + "']").text(currencySymbol + monthlyUsage);
                    }
                }
                else {
                    alert(msg.d);
                }
            },
            error: function () {
                //alert("fail");
            }
        });
    });--%>

    function ClearOptionalFields() {
        $("#<%=TxBx_Title.ClientID%>").val("");
        $("#<%=TxBx_FirstName.ClientID%>").val("");
        $("#<%=TxBx_MiddleName.ClientID%>").val("");
        $("#<%=TxBx_LastName.ClientID%>").val("");
        $("#<%=Rbl_Gender.ClientID%>").find("input[value='U']")
            .prop("checked", true); //.val("U").click();
        $("#<%=TxBx_Email.ClientID%>").val("");
        $("#<%=TxBx_PhoneNumber.ClientID%>").val("");
        $("#<%=TxBx_PostalCode.ClientID%>").val("");
        $("#<%=TxBx_Street.ClientID%>").val("");
        $("#<%=TxBx_HouseNumber.ClientID%>").val("");
        $("#<%=TxBx_HouseNumberAddition.ClientID%>").val("");
        $("#<%=TxBx_City.ClientID%>").val("");
        $("#<%=TxBx_Province.ClientID%>").val("");
    }

    function ValidateUserName(ErrorMsg) {
        var UN = $("#<%=TxBx_UserName.ClientID%>").val();

        if (!isNaN(UN)) {
            if (UN < 2000 || UN > 8999) {
                $("#<%=TxBx_UserName.ClientID%>").val("");
                alert(ErrorMsg);
                //document.write(num1 + " is a number <br/>");
            }
        }
    }
</script>
