<%@ page language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" inherits="Reports_TA_UI_Report_Employee, App_Web_pfrm3yep" %>

<%@ Register Src="~/UserControls/TA_uc_OrganizationLevels.ascx" TagName="OrganizationLevel"
    TagPrefix="uc" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ContentPlaceHolderID="BodyContentPH" ID="Report" runat="server">
    <!--[if gt IE 5.5]>	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
	<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
 <![endif]-->
    <script type="text/javascript" src="../bootstrap/js/1.4.3/jquery.min.js"></script>
    <script src="../bootstrap/js/1.8.5/jquery-ui.min.js" type="text/javascript"></script>
    <style type="text/css">
        .checkbox label {
            padding-right: 0px !important;
        }
    </style>
    <script type="text/javascript">
        function DisplayReminderDaysField(chkPassport) {
            var txtPassportNumber = document.getElementById("ctl00_BodyContentPH_txtPassVisaRemindDays");
            txtPassportNumber.disabled = chkPassport.checked ? false : true;
            if (!txtPassportNumber.disabled) {
                txtPassportNumber.focus();
            }
            else {
                txtPassportNumber.value = "";
            }
            return true;
        }
        function Validate_reminderDays() {
            var chkPassport = document.getElementById("ctl00_BodyContentPH_chkboxRemind_PassVisa");
            var txtPassportNumber = document.getElementById("ctl00_BodyContentPH_txtPassVisaRemindDays");
            if (chkPassport.checked) {
                if (txtPassportNumber.value == "") {
                    alert("Enter number of days in expiry field");
                    txtPassportNumber.disabled = false;
                    txtPassportNumber.focus();
                    return false;
                }
                else {
                    return true;
                }
            }
            else {
                txtPassportNumber.disabled = true;
                return true;
            }
        }
        $(function () {
            $("#<%= txtEmployeeId.ClientID %>").autocomplete({
                source: function (request, response) {
                    $.getJSON("../AutoCompleteByEmployeeId.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                        term: extractLast(request.term)
                    }, response);
                },
                search: function () {
                    // custom minLength
                    var term = extractLast(this.value);
                    if (term.length < 1) {
                        return false;
                    }
                },
                focus: function () {
                    // prevent value inserted on focus
                    return false;
                },
                select: function (event, ui) {
                    var terms = split(this.value);
                    // remove the current input
                    terms.pop();
                    // add the selected item
                    terms.push(ui.item.value);
                    // add placeholder to get the comma-and-space at the end
                    terms.push("");
                    this.value = terms.join(",");
                    return false;
                }
            });
            function split(val) {
                return val.split(/,\s*/);
            }
            function extractLast(term) {
                return split(term).pop();
            }
        });
            $(function () {
                $("#<%= txtEmployeeName.ClientID %>").autocomplete({
                    source: function (request, response) {
                        $.getJSON("../AutoCompleteByName.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                            term: extractLast(request.term)
                        }, response);
                    },
                    search: function () {
                        // custom minLength
                        var term = extractLast(this.value);
                        if (term.length < 1) {
                            return false;
                        }
                    },
                    focus: function () {
                        // prevent value inserted on focus
                        return false;
                    },
                    select: function (event, ui) {
                        var terms = split(this.value);
                        // remove the current input
                        terms.pop();
                        // add the selected item
                        terms.push(ui.item.value);
                        // add placeholder to get the comma-and-space at the end
                        terms.push("");
                        this.value = terms.join(",");
                        return false;
                    }
                });
                function split(val) {
                    return val.split(/,\s*/);
                }
                function extractLast(term) {
                    return split(term).pop();
                }
            });
                window.onload = function () {
                    PageOnloadDate();
                };
    </script>
    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>
    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>
    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>
    <script>
        $(function () {
            $('#ctl00_BodyContentPH_txtFromDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txtToDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
        $(document).ready(function () {
            $("#<%=txtEmployeeId.ClientID%>").autocomplete('../AutoCompleteByEmployeeId.ashx?EmpAutoid=' + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                multiple: true,
                multipleSeparator: ",",
                width: 180,
                highlight: false,
                scroll: true,
                scrollHeight: 300,
                delay: 10
            });
        });
        $(document).ready(function () {
            $("#<%=txtEmployeeName.ClientID%>").autocomplete('../AutoCompleteByName.ashx?EmpAutoid=' + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                multiple: true,
                multipleSeparator: " ,",
                width: 200,
                highlight: false,
                scroll: true,
                scrollHeight: 300,
                delay: 10
            });
        });
    </script>
    <div class="content-header">
        <h1 style="background-image: url(../dist/img/swipe-icon.png); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lblEmployeeDetailsReport" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <asp:UpdatePanel ID="upLeave" runat="server">
            <ContentTemplate>
                <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                    <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                        <div class="InsideProgressBar">
                            <div class="row" style="margin-top: 10px">
                                <img src="../dist/img/logo-Progress.png" />
                            </div>
                            <div class="row" style="min-width: 280px">
                                <img src="../dist/img/default.gif" style="width: 100px" />
                            </div>
                            <div class="row" style="margin-bottom: 10px">
                                <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                    Text="Please Wait..." Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial"></asp:Label>
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <asp:HiddenField ID="hdnProgress" runat="server" />
                <cc1:ModalPopupExtender ID="popupProgress" runat="server" TargetControlID="hdnProgress"
                    BackgroundCssClass="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
                </cc1:ModalPopupExtender>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btn_View" />
                <asp:PostBackTrigger ControlID="btn_Export" />
            </Triggers>
        </asp:UpdatePanel>
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-2">
                    <div class="inr-fil-text">
                        <asp:Label ID="lblFilter" runat="server" Text="Filters"></asp:Label>
                        <asp:Label ID="Label1" runat="server" Visible="false"></asp:Label>
                        <input id="Hidden3" type="hidden" value='<% Response.Write(Convert.ToString(Session["IDateFormat"])); %>' />
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div id="collapseOne">
            <div class="emp-filter">
                <div class="form-horizontal">
                    <asp:HiddenField ID="Hidden1" runat="server" />
                    <asp:HiddenField ID="Hidden2" runat="server" />
                    <asp:HiddenField ID="hdnReportFilters" runat="server" />
                    <asp:HiddenField ID="hdnReportType1" runat="server" />
                    <asp:HiddenField ID="hdnCompanyId1" runat="server" />
                    <div class="row" style="display: none">
                        <div class="col-md-3">
                            <asp:Label ID="lblEmpSwipeCard" runat="server"></asp:Label>
                        </div>
                    </div>
                    <div id="divEmployeeDetails" runat="server">
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblEmployeeName" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtEmployeeName" runat="server" CssClass="form-control"
                                    Style="resize: none;" TextMode="multiLine"></asp:TextBox>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblEmployeeId" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtEmployeeId" runat="server" CssClass="form-control"
                                    Style="resize: none;" TextMode="multiLine"></asp:TextBox>
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblEmpCategory" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlEmpCatagory" runat="server" CssClass="form-control select2"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblEmpType" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlEmpType" runat="server" CssClass="form-control select2"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblDesignation" runat="server" Text="Designation"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlDesignation" runat="server" CssClass="form-control select2"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblGender" runat="server" Text="Gender"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-control select2">
                                    <asp:ListItem Value="Both" Text="Both"></asp:ListItem>
                                    <asp:ListItem Value="Male" Text="Male"></asp:ListItem>
                                    <asp:ListItem Value="Female" Text="Female"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="row  form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblStatus" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlStatus" runat="server" CssClass="form-control select2">
                                    <asp:ListItem Selected="True" Value="All" Text="All"></asp:ListItem>
                                    <asp:ListItem Value="Active" Text="Active"></asp:ListItem>
                                    <asp:ListItem Value="InActive" Text="InActive"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblAdvanced" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlAdvanced" runat="server" CssClass="form-control select2">
                                    <asp:ListItem Text="All" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="OT Eligible" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Compensation Off Eligible" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="OT And Compensation Off Eligible" Value="3"></asp:ListItem>
                                    <asp:ListItem Text="OT And Compensation Off Not Eligible" Value="9"></asp:ListItem>
                                    <asp:ListItem Text="Leave Policy Not Assigned" Value="4"></asp:ListItem>
                                    <asp:ListItem Text="Active Employee(s)" Value="10"></asp:ListItem>
                                    <asp:ListItem Text="In Active Employee(s)" Value="5"></asp:ListItem>
                                    <asp:ListItem Text="Hostel Employee(s)" Value="6"></asp:ListItem>
                                    <asp:ListItem Text="Exclude From Reports - Yes" Value="7"></asp:ListItem>
                                    <asp:ListItem Text="User Group Not Assigned Employee(s)" Value="8"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-2" style="display: none">
                                <asp:Label ID="lblEmpSwipe" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3" style="display: none">
                                <asp:DropDownList ID="ddlSwipeOpt" runat="server">
                                    <asp:ListItem Value="Select" Text="-Select-"></asp:ListItem>
                                    <asp:ListItem Value="All" Text="All"></asp:ListItem>
                                    <asp:ListItem Value="Exists" Text="Exists"></asp:ListItem>
                                    <asp:ListItem Value="Not Exists" Text="Not Exists"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:TextBox onpaste="return true" ID="txtSwipeCard" MaxLength="20" runat="server"
                                    CssClass="textbox_4" onkeypress="return acceptCharsNum_MaxLength(event,this,20,MaxLength);"></asp:TextBox>
                                <cc1:AutoCompleteExtender ID="acSwipeCardNo" runat="server" CompletionSetCount="10"
                                    CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                                    CompletionInterval="10" Enabled="true" MinimumPrefixLength="1" TargetControlID="txtSwipeCard"
                                    ServicePath="../WebServices/AutoCompleteExtender.asmx" ServiceMethod="GetCardNoForReports"
                                    CompletionListCssClass="autocomplete_completionListElement" FirstRowSelected="true">
                                </cc1:AutoCompleteExtender>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblUserGroup" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_UserGroup" runat="server" CssClass="form-control select2" AppendDataBoundItems="true">
                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblLeavepolicy" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_LeavePolicy" runat="server" CssClass="form-control select2" AppendDataBoundItems="true">
                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="form-group" id="trStatus" runat="server">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_ReportingTo" runat="server" class="control-label"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_ReportingTo" CssClass="form-control select2" runat="server"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lbl_LeaveSanctioninguthority" runat="server" class="control-label"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_LeaveSancAuthority" CssClass="form-control select2" runat="server"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-ks-8" style="padding-left: 8px !important; padding-right: 0px">
                                <div class="col-ks-13_5" style="padding-right: 0px;">
                                    <asp:CheckBox Text="List only employees whose passport or visa is getting expired in" ID="chkboxRemind_PassVisa" runat="server" CssClass="checkbox checkbox-primary" onclick="DisplayReminderDaysField(this)" />
                                </div>
                                <div class="col-ks-2">
                                    <asp:TextBox onpaste="return true" ID="txtPassVisaRemindDays" runat="server" CssClass="form-control"
                                        Enabled="false" onCut="return false" MaxLength="3" onDrop="return false" onkeypress="return number_dot(event,this)"></asp:TextBox>
                                </div>
                                <div class="col-ks-3_5"></div>
                            </div>
                            <div class="col-ks-6" style="padding-left: 0px !important;">
                                <asp:Label ID="lblDays" Text="Days" runat="server"></asp:Label>
                            </div>
                        </div>
                    </div>
                    <!-- This line add Karthick -->
                    <div id="divdateTime">
                        <div class="clearfix">
                        </div>
                        <div class="row">
                            <div class="row">
                                <div class="line16">
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblDateFilter" runat="server" Text="Date Filter"></asp:Label>
                            </div>
                            <div class="Pad-left-7px">
                                <div class="col-md-2 Session-padLeftrtp">
                                    <asp:RadioButton ID="rbCustom" runat="server" Text="Custom" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(3);" Checked="true" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbpreviousweek" runat="server" Text="Previous Week" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(1);" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbThisweek" runat="server" Text="This Week" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(0);" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbpreviousMonth" runat="server" Text="Previous Month" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(5);" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbThisMonth" runat="server" Text="This Month" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(4);" />
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblTimePeriod" runat="server"></asp:Label>
                                -
                                <asp:Label ID="lblFrom" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtFromDate" runat="server" CssClass="form-control"
                                    onCut="return false" onDrop="return false" MaxLength="11"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqFromDate" runat="server" ControlToValidate="txtFromDate"
                                    ValidationGroup="employeerpt" Display="None" EnableClientScript="False" ErrorMessage="Please select FromDate"></asp:RequiredFieldValidator>
                                <asp:CustomValidator ID="cus_FromDate" runat="server" EnableClientScript="False"
                                    OnServerValidate="ValidateFromDate" ErrorMessage="Select valid From Date" Display="None"></asp:CustomValidator>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblTo" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtToDate" runat="server" CssClass="form-control"
                                    onCut="return false" onDrop="return false" MaxLength="11"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqToDate" runat="server" ControlToValidate="txtToDate"
                                    ValidationGroup="employeerpt" Display="None" EnableClientScript="False" ErrorMessage="Please select ToDate"></asp:RequiredFieldValidator>
                                <asp:CustomValidator ID="cus_ToDate" OnServerValidate="ValidateToDate" runat="server"
                                    EnableClientScript="False" ErrorMessage="Select valid To Date" Display="None"></asp:CustomValidator>
                                <asp:CustomValidator ID="cus_ComToDate" runat="server" EnableClientScript="False"
                                    OnServerValidate="CompareDate" ErrorMessage="Select valid date compare with Fromdate"
                                    Display="None"></asp:CustomValidator>
                            </div>
                        </div>
                    </div>
                    <!-- End -->
                    <div class="clearfix">
                    </div>
                    <div class="row">
                        <div class="row">
                            <div class="line16">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <asp:UpdatePanel ID="upOrgLevel" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:PlaceHolder ID="PlaceHolderEmployees" runat="server">
                                        <uc:OrganizationLevel ID="ucOrganizationLevel" runat="server" />
                                    </asp:PlaceHolder>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                    <div class="row" style="display: none">
                        <div class="col-md-5">
                        </div>
                        <div class="col-md-6">
                            <asp:RadioButton ID="rbtNormalReport" runat="server" Checked="True" GroupName="ReportType"
                                Text="Normal Report" />
                            <asp:RadioButton ID="rbtGraphReport" runat="server" Text="Graph Report" GroupName="ReportType" />
                        </div>
                    </div>
                    <div class="row" id="trView">
                        <div class="col-md-5">
                        </div>
                        <div class="col-md-6">
                            <div class="pull-right-button">
                                <asp:LinkButton ID="btn_View" CommandName="View" CssClass="btn save-btn fa-eye" runat="server" OnClick="btn_View_Click"
                                    OnClientClick="if (DateEntryValidation()) $find('popupProgress').show(); else return false;" />
                                <asp:LinkButton CommandName="Excel" ID="btn_Export" CssClass="btn save-btn fa-file-excel-o" runat="server"
                                    OnClick="btn_View_Click" OnClientClick="if (DateEntryValidation()) {}else {return false;}" />
                                <asp:ValidationSummary ID="ValidationSummary1" ShowMessageBox="false" ShowSummary="false"
                                    runat="server" />
                                <asp:Button ID="IDTest1" runat="server" Visible="false" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script language="javascript" type="text/javascript">
        //values for check date
        var Monthfourdigit = 'Please enter valid date as month, day, and four digit year : Format MM/dd/yyyy.';
        //Adding this line var Datefourdigit='Please enter valid date with correct format dd/MM/yyyy'; as newly
        var Datefourdigit = 'Please enter valid date with correct format dd/MM/yyyy';
        var Invalidyearentry = 'Invalid year entry';
        var Invalidmonthentry = 'Invalid month entry';
        var Invaliddateentry = 'Invalid date entry';
        var DateformatDDMONYYYY = 'Incorrect date format. Enter as DD-MON-YYYY';
        var Entertime = 'Enter time';
        var Valueforhours = 'Invalid value for hours:';
        var Invalidvalueforminutes = 'Invalid value for minutes:';
        var Invalidtimeformat = 'Invalid time format:';
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var ValiddatemonthMMDDYYHHMM = 'Please enter valid Date and Time MM/dd/yyyy HH:mm';
        var ValiddatemonthMMDDYYHHMMTT = 'Please enter valid Date and Time MM/dd/yyyy hh:mm tt';
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var Invalidvalueforhours = 'Invalid value for hours:';
        var Invalidvalueforminites = 'Invalid value for minutes:';
        var MaxLength = "Maximum length is ";
        function MaxLengthh(maxLength) {
            MaxLength = maxLength;
        }
        function SetAlertCheckDate(monthfourdigit, datefourdigit, invalidyearentry, invalidmonthentry, invaliddateentry, dateformatDDMONYYYY, entertime, valueforhours, invalidvalueforminutes, invalidtimeformat, entervalidDateandTime, validdatemonthMMDDYYHHMM, validdatemonthMMDDYYHHMMTT, entervalidDateandTime, invalidvalueforhours, invalidvalueforminites) {
            Monthfourdigit = monthfourdigit;
            Datefourdigit = datefourdigit;
            Invalidyearentry = invalidyearentry;
            Invalidmonthentry = invalidmonthentry;
            Invaliddateentry = invaliddateentry;
            DateformatDDMONYYYY = dateformatDDMONYYYY;
            Entertime = Entertime;
            Valueforhours = valueforhours;
            Invalidvalueforminutes = invalidvalueforminutes;
            Invalidtimeformat = invalidtimeformat;
            EntervalidDateandTime = entervalidDateandTime;
            ValiddatemonthMMDDYYHHMM = validdatemonthMMDDYYHHMM;
            ValiddatemonthMMDDYYHHMMTT = validdatemonthMMDDYYHHMMTT;
            EntervalidDateandTime = entervalidDateandTime;
            Invalidvalueforhours = invalidvalueforhours;
            Invalidvalueforminites = invalidvalueforminites;
        }
        var SelectToDate = "Select To Date";
        function SetAlertMessages(selectToDate) {
            SelectToDate = selectToDate;
        }
        function DateEntryValidation() {
            var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            if (document.aspnetForm.ctl00_BodyContentPH_txtToDate.value == '') {
                alert(SelectToDate);
                return false;
            }
            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value != '') {
                var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtFromDate;
                var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
                if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                    if (document.aspnetForm.ctl00_BodyContentPH_txtToDate.value != '') {
                        var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtToDate;
                        var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
                        if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                        }
                        else {
                            return false;
                        }
                    }
                    else {
                        alert(SelectToDate);
                        return false;
                    }
                }
                else {
                    return false;
                }
            }
            else {
                var chkboxPassport = document.getElementById('ctl00_BodyContentPH_chkboxRemind_PassVisa');
                if (DisplayReminderDaysField(chkboxPassport)) {
                    if (Validate_reminderDays()) {
                        return true;
                    }
                    else {
                        return false;
                    }
                }
                else {
                    return true;
                }
            }
        }
    </script>
</asp:Content>
