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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="obout_Editor" Namespace="OboutInc.Editor" TagPrefix="obout" %>

<asp:Content ID="Content5" ContentPlaceHolderID="CPH_Content" runat="Server">
    <div class="col-xs-12" id="Div_Listing" runat="server">
        <div class="card">
            <div class="header">
                <h3><%= Resources.Content.EmailCampaigns%>  </h3>
            </div>
            <div class="body">
                <!-- Operations -->
                <div class="row Div_OpsRow" id="Div_OpsRow" runat="server">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <h3><%= Resources.Content.GN00001320%>  </h3>
                            </div>
                            <div class="body">
                                <asp:Button CssClass="btn btn-primary waves-effect btnAction" ID="Btn_AddCampaign" runat="server" Text="<%$ Resources:Content,AddCampaign%>" SkinID="defaultButton" />
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Filter -->
                <asp:Panel ID="Pnl_Filter" runat="server" DefaultButton="Btn_Search">
                    <div class="row">
                        <div class="panel-group search-panel" id="AS_CampaignList" role="tablist" aria-multiselectable="true">
                            <div class="col-xs-12" role="tab" id="SH_CampaignList">
                                <div class="card">
                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_CampaignList" href="#<%= CSB_CampaignList.ClientID %>" aria-expanded="true" aria-controls="SH_CampaignList">
                                        <h3>
                                            <%= Resources.Content.GN0000395%>
                                        </h3>
                                    </div>
                                    <div id="CSB_CampaignList" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_CampaignList" 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_STitle" runat="server"></asp:TextBox>
                                                        <asp:Label ID="Ltrl_SelectView" runat="server" Text="<%$ Resources:Content,CampaignTitle%>"
                                                            EnableViewState="false" CssClass="form-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_SFromName" runat="server"></asp:TextBox>
                                                        <asp:Label ID="Literal44" runat="server" Text="<%$ Resources:Content,GN0000601%>"
                                                            EnableViewState="false" CssClass="form-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_SFromEmail" runat="server"></asp:TextBox>
                                                        <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Content,FromEmail%>"
                                                            EnableViewState="false" CssClass="form-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_SSubject" runat="server"></asp:TextBox>
                                                        <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Content,GN0000371%>"
                                                            EnableViewState="false" CssClass="form-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_SBody" runat="server"></asp:TextBox>
                                                        <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Content,GN0000541%>"
                                                            EnableViewState="false" CssClass="form-label" />
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-xs-12">
                                                <asp:Button CssClass="btn btn-primary waves-effect" ID="Btn_Search" SkinID="searchButton" runat="server" Text="<%$ Resources:Content,GN0000391%>" />
                                                <asp:Button CssClass="btn btn-primary waves-effect" ID="Btn_Clear" Visible="false" SkinID="searchButton" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:Panel>

                <!-- Listing -->
                <asp:GridView CssClass="table table-bordered table-hover table-responsive table-striped" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                    ID="GV_List" AllowPaging="true" AllowSorting="true" runat="server" AutoGenerateColumns="False" DataKeyNames="Title">
                    <Columns>

                        <asp:TemplateField HeaderText="<%$ Resources:Content,CampaignTitle%>" SortExpression="Title">
                            <ItemTemplate>
                                <asp:LinkButton ID="LB_Title" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.Title")%>'
                                    CommandArgument='<%# Eval("CampaignId")%>' CommandName="ShowDetail"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="<%$ Resources:Content,strLeads%>" HeaderStyle-CssClass="col-xs-2">
                            <ItemTemplate>
                                <asp:HyperLink ID="LBL_Leads" runat="server"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <%--<asp:TemplateField HeaderText="<%$ Resources:Content,strScheduledAt%>" HeaderStyle-CssClass="col-xs-2" SortExpression="ProcessedOn">
                            <ItemTemplate>
                                <asp:Label ID="LBL_ScheduledAt" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>--%>

                        <asp:TemplateField HeaderText="<%$ Resources:Content,Status%>" HeaderStyle-CssClass="col-xs-2" SortExpression="StatusId">
                            <ItemTemplate>
                                <asp:Label ID="LBL_Status" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>" HeaderStyle-CssClass="col-xs-2">
                            <ItemTemplate>
                                <asp:LinkButton CssClass="btn btn-primary waves-effect" ID="LBtn_Edit" runat="server" Text="<%$Resources:Content,Edit %>"
                                    CommandArgument='<%# Eval("CampaignId")%>' CommandName="EditCampaign"></asp:LinkButton>

                                <asp:LinkButton CssClass="btn btn-primary waves-effect btnAction" ID="LBtn_Remove" runat="server" Text="<%$Resources:Content,GN0000278 %>"
                                    CommandArgument='<%# Eval("CampaignId")%>' CommandName="DeleteCampaign"></asp:LinkButton>
                                <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" TargetControlID="LBtn_Remove"></EM:ConfirmButtonExtender>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerTemplate>
                        <EM:Pager ID="Pager1" runat="server" />
                    </PagerTemplate>
                </asp:GridView>

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

                <div class="row">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <h3>
                                    <asp:Literal ID="Lbl_OperationHeader" Text="<%$ Resources:Content,ComposeEmail%>" runat="server" /></h3>
                            </div>
                            <div class="body">
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *<asp:Literal ID="Literal2" Text="<%$ Resources:Content,CampaignTitle%>" runat="server" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_Title" runat="server" />
                                            </div>
                                        </div>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxBx_Title"
                                            Display="None" SetFocusOnError="True" ValidationGroup="composeemail"></asp:RequiredFieldValidator>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *<asp:Literal ID="Literal18" Text="<%$ Resources:Content,GN0000371%>" runat="server" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_Subject" runat="server" />
                                            </div>
                                        </div>
                                        <asp:RequiredFieldValidator ID="RFV_TxBx_Subject" runat="server" ControlToValidate="TxBx_Subject"
                                            Display="None" SetFocusOnError="True" ValidationGroup="composeemail"></asp:RequiredFieldValidator>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *<asp:Literal ID="Literal14" Text="<%$ Resources:Content,GN0000601%>" runat="server" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_FromName" runat="server" />
                                            </div>
                                        </div>
                                        <asp:RequiredFieldValidator ID="RFV_TxBx_FromName" runat="server" ControlToValidate="TxBx_FromName"
                                            Display="None" SetFocusOnError="True" ValidationGroup="composeemail"></asp:RequiredFieldValidator>
                                    </div>
                                </div>
                                <div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            *<asp:Literal ID="Literal15" Text="<%$ Resources:Content,FromEmail%>" runat="server" />:
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_FromEmail" runat="server" />
                                                </div>
                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_FromEmail" runat="server" ControlToValidate="TxBx_FromEmail"
                                                Display="None" SetFocusOnError="True" ValidationGroup="composeemail"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            *<asp:Literal ID="Literal1" Text="<%$ Resources:Content,SendToLeads%>" runat="server" />:
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:DropDownList ID="DDL_LeadViews" runat="server"></asp:DropDownList>
                                                </div>
                                            </div>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_FromEmail"
                                                Display="None" SetFocusOnError="True" ValidationGroup="composeemail" Enabled="false"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>


                                <!-- Editor -->
                                <div class="row">
                                    <div class="col-xs-12 row-label">
                                        *<asp:Literal ID="Literal19" Text="<%$ Resources:Content,GN0000541%>" runat="server" />:
                                    </div>
                                    <div class="col-xs-12">
                                        <obout:Editor ID="Editor1" Submit="false" ShowWaitMessage="false" AjaxWait="false" runat="server" Appearance="custom" ShowQuickFormat="false">
                                            <Buttons>
                                                <obout:Select Name="FontName" />
                                                <obout:Select Name="FontSize" />
                                                <obout:HorizontalSeparator />
                                                <obout:Toggle Name="Bold" />
                                                <obout:Toggle Name="Italic" />
                                                <obout:Toggle Name="Underline" />
                                                <obout:Toggle Name="StrikeThrough" />
                                                <obout:Toggle Name="SuperScript" />
                                                <obout:Toggle Name="SubScript" />
                                                <obout:HorizontalSeparator />
                                                <obout:Method Name="ForeColor" />
                                                <obout:Method Name="ForeColorClear" />
                                                <obout:Method Name="BackColor" />
                                                <obout:Method Name="BackColorClear" />
                                                <obout:VerticalSeparator />
                                                <obout:Method Name="Redo" />
                                                <obout:Method Name="Undo" />
                                                <obout:HorizontalSeparator />
                                                <obout:Method Name="Cut" />
                                                <obout:Method Name="Copy" />
                                                <obout:Method Name="Paste" />
                                                <obout:Method Name="PasteText" />
                                                <obout:HorizontalSeparator />
                                                <obout:Method Name="Paragraph" />
                                                <obout:Method Name="GetFormat" />
                                                <obout:Method Name="ApplyFormat" />
                                                <obout:HorizontalSeparator />
                                                <obout:Method Name="JustifyLeft" />
                                                <obout:Method Name="JustifyCenter" />
                                                <obout:Method Name="JustifyRight" />
                                                <obout:Method Name="JustifyFull" />
                                                <obout:HorizontalSeparator />
                                                <obout:Method Name="OrderedList" />
                                                <obout:Method Name="BulletedList" />
                                                <obout:HorizontalSeparator />
                                                <obout:Method Name="InsertHR" />
                                                <obout:Method Name="CreateLink" />
                                                <obout:Method Name="InsertAnchor" />
                                                <obout:Method Name="InsertIMG" />
                                                <obout:HorizontalSeparator />
                                                <obout:Method Name="ClearStyles" />
                                            </Buttons>

                                        </obout:Editor>
                                        <asp:RequiredFieldValidator ID="RFV_Body" ControlToValidate="Editor1" Display='none'
                                            runat="server" SetFocusOnError="True" ValidationGroup="composeemail"></asp:RequiredFieldValidator>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-xs-12 align-right pull-right">
                                        <asp:Button CssClass="btn btn-primary" ID="Btn_Preview" runat="server" Text="<%$ Resources:Content,Preview%>" CausesValidation="false" />
                                        <asp:Button CssClass="btn btn-primary" ID="Btn_SendTestEmail" ValidationGroup="composeemail" runat="server" Text="<%$ Resources:Content,String319%>" />&nbsp;&nbsp;
                                    </div>
                                </div>

                                <!-- Send/Draft options -->
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="form-group">
                                            <asp:RadioButton ID="RB_SaveDraft" runat="server" GroupName="SendOption" Text="<%$ Resources:Content,SaveDraft%>" />
                                        </div>
                                    </div>

                                </div>

                                <div class="row">
                                    <div class="col-sm-2 col-xs-12">
                                        <div class="form-group">
                                            <asp:RadioButton ID="RB_Schedule" runat="server" GroupName="SendOption" Text="<%$ Resources:Content,strSchedule%>" />
                                        </div>
                                    </div>
                                    <div class="col-sm-3 col-xs-12" id="TR_Schedule" runat="server" style="display: none;">
                                        <div class="form-group display-date-input">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_ScheduleOn" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                        <i runat="server" id="A_TxBx_ScheduleOn" class="material-icons icon-calendar col-calendar"></i>
                                        <EM:CalendarExtender ID="CE_TxBx_ScheduleOn" runat="server" TargetControlID="TxBx_ScheduleOn"
                                            Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>"
                                            PopupButtonID="A_TxBx_ScheduleOn" CssClass="date__calendar">
                                        </EM:CalendarExtender>
                                    </div>
                                </div>
                                
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="form-group">
                                            <asp:RadioButton ID="RB_SendNow" runat="server" Checked="true" GroupName="SendOption" Text="<%$ Resources:Content,SendNow%>" />
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12">
                                        <asp:ValidationSummary ID="ValidationSummary3" runat="server" ShowMessageBox="true"
                                            ShowSummary="false" ValidationGroup="composeemail" HeaderText="<%$ Resources:Content,EM000001%>" />
                                        <asp:Button CssClass="btn btn-primary btnAction" ID="Btn_SaveCampaign" runat="server" ValidationGroup="composeemail" Text="<%$ Resources:Content,GN0000710%>" />
                                        <asp:Button CssClass="btn btn-primary" ID="Btn_CancelCampaign" runat="server" Text="<%$ Resources:Content,GN0000572%>" CausesValidation="false" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <div class="col-xs-12" id="Div_CampaignDetail" runat="server" visible="false">
        <div class="card">
            <div class="header">
                <h3><%= Resources.Content.EmailCampaigns%>  </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <div class="displayInlineBlock">
                                    <h2>
                                        <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,strDetails%>" EnableViewState="false" /></h2>
                                </div>
                                <asp:LinkButton ID="Lb_GoBack" runat="server" Text="<%$ Resources:Content,DGN1110542%>" CausesValidation="false"
                                    CssClass="btn btn-primary waves-effect pull-right m-t--4px" />
                            </div>

                            <div class="body">
                                <!-- Campaign Logs -->
                                <asp:GridView CssClass="table table-bordered table-hover table-responsive table-striped" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                                    ID="GV_Logs" AllowPaging="true" AllowSorting="true" runat="server" AutoGenerateColumns="False">
                                    <Columns>

                                        <asp:TemplateField HeaderText="<%$ Resources:Content,Lead%>">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="HL_Lead" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="<%$ Resources:Content,Status%>">
                                            <ItemTemplate>
                                                <asp:Label ID="LBL_Status" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN000148%>">
                                            <ItemTemplate>
                                                <asp:Label ID="LBL_Comments" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <%--                                        <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>" HeaderStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:LinkButton CssClass="btn btn-primary waves-effect" ID="LBtn_Edit" runat="server" Text="<%$Resources:Content,Edit %>"
                                                    CommandArgument='<%# Eval("CampaignId")%>' CommandName="EditCampaign"></asp:LinkButton>

                                                <asp:LinkButton CssClass="btn btn-primary waves-effect" ID="LBtn_Remove" runat="server" Text="<%$Resources:Content,GN0000278 %>"
                                                    CommandArgument='<%# Eval("CampaignId")%>' CommandName="DeleteCampaign"></asp:LinkButton>
                                                <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" TargetControlID="LBtn_Remove"></EM:ConfirmButtonExtender>
                                            </ItemTemplate>
                                        </asp:TemplateField>--%>
                                    </Columns>
                                    <PagerTemplate>
                                        <EM:Pager ID="Pager1" runat="server" />
                                    </PagerTemplate>
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <ajax:UpdatePanel ID="UP_Preview" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Pnl_Preview" runat="server" Style="display: none" CssClass="width-modal-popup-auto">

                <div class="col-xs-12">
                    <div class="card">
                        <div class="header">
                            <h3><%= Resources.Content.Preview %></h3>
                        </div>
                        <div class="body">
                            <div class="row">
                                <div class="col-xs-12">
                                    <div id="Div_EmailBody" runat="server"></div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button class="btn btn-primary waves-effect" ID="Btn_PreviewClose" runat="server"
                                        Text='<%$ Resources:Content,GN000150%>' ValidationGroup="TestMail" CausesValidation="false" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </asp:Panel>
            <asp:Button ID="Btn_Dummy2" runat="server" Style="display: none" Text='<%$ Resources:Content,GN0000575%>' />
            <EM:ModalPopupExtender runat="server" ID="MPE_Preview" BackgroundCssClass="modalBackground"
                DropShadow="false" CancelControlID="Btn_PreviewClose" PopupControlID="Pnl_Preview"
                TargetControlID="Btn_Dummy2" />
        </ContentTemplate>
    </ajax:UpdatePanel>
    <ajax:UpdatePanel ID="UP_TestEmail" runat="server" UpdateMode="CONDITIONAL">
        <ContentTemplate>
            <asp:Panel ID="Pnl_TestEmail" runat="server" Style="display: none" CssClass="width-modal-popup-auto">

                <div class="col-xs-12">
                    <div class="card">
                        <div class="header">
                            <h3><%= Resources.Content.String319 %></h3>
                        </div>
                        <div class="body">
                            <div class="row">
                                <div class="col-sm-3 col-xs-12 row-label">
                                    <label>*<asp:Label ID="Lb_SendTo" runat="server" Text="<%$ Resources:Content,String597 %>" EnableViewState="false"></asp:Label>:</label>
                                </div>
                                <div class="col-sm-7 col-xs-12">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SendTo" runat="server" ValidationGroup="TestMail"></asp:TextBox>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button class="btn btn-primary waves-effect" ID="Btn_EmailSend" runat="server"
                                        Text='<%$ Resources:Content,DGN1110199%>' ValidationGroup="TestMail" CausesValidation="true" />
                                    <asp:Button class="btn btn-primary waves-effect btnAction" ID="Btn_EmailCancel" runat="server"
                                        Text='<%$ Resources:Content,GN0000572%>' ValidationGroup="TestMail" CausesValidation="false" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </asp:Panel>
            <asp:Button ID="Btn_Dummy" runat="server" Style="display: none" Text='<%$ Resources:Content,GN0000575%>' />
            <EM:ModalPopupExtender runat="server" ID="MPE_TestEmail" BackgroundCssClass="modalBackground"
                DropShadow="false" CancelControlID="Btn_EmailCancel" PopupControlID="Pnl_TestEmail"
                TargetControlID="Btn_Dummy" />
        </ContentTemplate>
    </ajax:UpdatePanel>
    <script type="text/javascript">
        function ValidatePopup(IdSendTo) {
            var Txt_SendTo = document.getElementById(IdSendTo);

            if (Txt_SendTo != null) {



                if (Txt_SendTo.value == '') { alert(<% Response.Write("'" + Resources.Content.GN00008027 + "'")%>); Txt_SendTo.focus(); return false; }

                const myArr = Txt_SendTo.value.split(",");

                for (let i = 0; i < myArr.length; i++) {
                    //alert(myArr[i].trim());
                    if (myArr[i] != '')
                        if (!(convertToASCIIAndValidate(myArr[i].trim(),EmailValidationExpression.toString())))
                        {
                            alert(<% Response.Write("'" + Resources.Content.Dev487 + "'")%>); Txt_SendTo.focus();
                            return false;
                        }
                }

                return true;
            }
        }
    </script>
</asp:Content>
