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

<%@ Register Src="../UserControls/TA_uc_OrgLevelFilter_Updated.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc4" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" 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 src="../plugins/datepicker/jquery-1.11.1.min.js"></script>

    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <link href="../css/ProgressBar.css" rel="stylesheet" type="text/css" />

    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>

    <script language="javascript" src="../js/DateTimeValidation.js" type="text/javascript"></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 }
            );
        });
    </script>

    <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 SelStatus = "Select Status";
        var EnterFrmDate = "Enter From Date";
        var EnterToDate = "Enter To Date";
        var GreaterThanFromdt = "To Date should be greater than From Date"

        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;
            //Added by MAnjula.P on 17-Feb-2014
            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;
        }



        function SetAlertMessages(Status, FrmDate, Todate, GreaterThan) {
            SelStatus = Status;
            EnterFrmDate = FrmDate;
            EnterToDate = Todate;
            GreaterThanFromdt = GreaterThan;
        }


        function ManualTimeEntryApprovalWindow() {
            var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value == '' && document.aspnetForm.ctl00_BodyContentPH_txtToDate.value != '') {
                alert(EnterFrmDate);
                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)) {
                }
                else {
                    return false;
                }
            }

            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value != '' && document.aspnetForm.ctl00_BodyContentPH_txtToDate.value == '') {
                alert(EnterToDate);
                return false;
            }

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


            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value != '' && document.aspnetForm.ctl00_BodyContentPH_txtToDate.value != '') {

                if (document.getElementById('ctl00_BodyContentPH_Hidden1').value == 'DD/MM/YYYY') {
                    var date1 = document.getElementById("<%= txtFromDate.ClientID%>").value;
                    var date1Date = date1.substring(0, 2);
                    var date1Month = date1.substring(3, 5);
                    var date1Year = date1.substring(6, date1.length);

                    var date2 = document.getElementById("<%= txtToDate.ClientID%>").value;
                   var date2Date = date2.substring(0, 2);
                   var date2Month = date2.substring(3, 5);
                   var date2Year = date2.substring(6, date2.length);
               }
               if (date1Year >= date2Year) {
                   if (date1Year > date2Year) {
                       alert(GreaterThanFromdt);
                       document.getElementById("<%= txtToDate.ClientID%>").focus();
                            return false;
                        }
                        if (date1Year == date2Year) {
                            if (date1Month >= date2Month) {
                                if (date1Month > date2Month) {
                                    alert(GreaterThanFromdt);
                                    document.getElementById("<%= txtToDate.ClientID%>").focus();
                                    return false;
                                }
                                if (date1Month == date2Month) {
                                    if (date1Date > date2Date) {
                                        alert(GreaterThanFromdt);
                                        document.getElementById("<%= txtToDate.ClientID%>").focus();
                                        return false;
                                    }
                                    else {
                                    }
                                }
                            }
                            else {
                            }
                        }
                    }
                    else {

                    }
                //dd-MMM-yyyy validation  //Added by Manjula.P on 05-Oct-2013
                    if (document.getElementById('ctl00_BodyContentPH_Hidden1').value == 'DD-MMM-YYYY') {
                        var date1 = document.getElementById("<%= txtFromDate.ClientID%>").value;
                      var date1Date = date1.substring(0, 2);
                      var date1Month = date1.substring(3, 6);
                      date1Month = Month(date1Month);
                      var date1Year = date1.substring(7, date1.length);

                      var date2 = document.getElementById("<%= txtToDate.ClientID%>").value;
                   var date2Date = date2.substring(0, 2);
                   var date2Month = date2.substring(3, 6);
                   date2Month = Month(date2Month);
                   var date2Year = date2.substring(7, date2.length);
               }
               if (date1Year >= date2Year) {
                   if (date1Year > date2Year) {
                       alert(GreaterThanFromdt);
                       document.getElementById("<%= txtToDate.ClientID%>").focus();
                            return false;
                        }
                        if (date1Year == date2Year) {
                            if (date1Month >= date2Month) {
                                if (date1Month > date2Month) {
                                    alert(GreaterThanFromdt);
                                    document.getElementById("<%= txtToDate.ClientID%>").focus();
                                    return false;
                                }
                                if (date1Month == date2Month) {
                                    if (date1Date > date2Date) {
                                        alert(GreaterThanFromdt);
                                        document.getElementById("<%= txtToDate.ClientID%>").focus();
                                        return false;
                                    }
                                    else {
                                    }
                                }
                            }
                            else {
                            }
                        }
                    }
                    else {

                    }

                //mm/dd/yyyy validation  //Added by Manjula.P on 05-Oct-2013
                    if (document.getElementById('ctl00_BodyContentPH_Hidden1').value == 'MM/DD/YYYY') {
                        var date1 = document.getElementById("<%= txtFromDate.ClientID%>").value;
                    var date1Month = date1.substring(0, 2);
                    var date1Date = date1.substring(3, 5);
                    var date1Year = date1.substring(6, date1.length);

                    var date2 = document.getElementById("<%= txtToDate.ClientID%>").value;
                   var date2Month = date2.substring(0, 2);
                   var date2Date = date2.substring(3, 5);
                   var date2Year = date2.substring(6, date2.length);
               }
               if (date1Year >= date2Year) {
                   if (date1Year > date2Year) {
                       alert(GreaterThanFromdt);
                       document.getElementById("<%= txtToDate.ClientID%>").focus();
                            return false;
                        }
                        if (date1Year == date2Year) {
                            if (date1Month >= date2Month) {
                                if (date1Month > date2Month) {
                                    alert(GreaterThanFromdt);
                                    document.getElementById("<%= txtToDate.ClientID%>").focus();
                                    return false;
                                }
                                if (date1Month == date2Month) {
                                    if (date1Date > date2Date) {
                                        alert(GreaterThanFromdt);
                                        document.getElementById("<%= txtToDate.ClientID%>").focus();
                                        return false;
                                    }
                                    else {
                                    }
                                }
                            }
                            else {
                            }
                        }
                    }
                    else {

                    }
                }
                var Employeeid = document.getElementById('<%=txtEmployeeId.ClientID %>').value;
            var EmployeeName = document.getElementById('<%=txtEmployeeName.ClientID %>').value;
            var EmpCategory = document.getElementById('<%=ddlEmpCatagory.ClientID %>').value;
            var EmpType = document.getElementById('<%=ddlEmpType.ClientID %>').value;
            var dtFromDate = document.getElementById('<%=txtFromDate.ClientID %>').value;
            var dtToDate = document.getElementById('<%=txtToDate.ClientID %>').value;
            var Status = document.getElementById('<%=ddlStatus.ClientID %>').value;
            var SwipeCard = document.getElementById('<%=txtSwipeCard.ClientID %>').value;
            // popupwindow('PopUpOnDutyEntryApproval.aspx?EmpId='+Employeeid+'&EmpName='+EmployeeName +'&EmpCategory='+EmpCategory +'&EmpType='+EmpType+'&FromDate='+dtFromDate+'&ToDate='+dtToDate+'&Status='+Status+'&SwipeCard=' + SwipeCard +     '','',900,650);
            //window.open('PopUpManualTimeEntryApproval.aspx?EmpId='+Employeeid+'&EmpName='+EmployeeName +'&EmpCategory='+EmpCategory +'&EmpType='+EmpType+'&FromDate='+dtFromDate+'&ToDate='+dtToDate+'&Status='+Status+'&SwipeCard=' + SwipeCard +     '','','left=80px, top=130px, width=900px, height=550px, scrollbars=yes, status=yes, resizable=no');
            return true;


        }
        //Added by Manjula.P on 05-Oct-2013
        function Month(Mon) {
            var Month;
            switch (Mon) {
                case "Jan":
                    Month = 1;
                    break;
                case "Feb":
                    Month = 2;
                    break;
                case "Mar":
                    Month = 3;
                    break;
                case "Apr": Month = 4;
                    break;
                case "May": Month = 5;
                    break;
                case "Jun": Month = 6;
                    break;
                case "Jul": Month = 7;
                    break;
                case "Aug": Month = 8;
                    break;
                case "Sep": Month = 9;
                    break;
                case "Oct": Month = 10;
                    break;
                case "Nov": Month = 11;
                    break;
                case "Dec": Month = 12;
                    break;
            }
            return (Month);
        }

        //On Center Screen
        function popupwindow(url, title, w, h) {
            var left = (screen.width / 2) - (w / 2);
            var top = (screen.height / 2) - (h / 2);
            return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
        }

        var objManualEntrySanction = null;
        function getApprovalStatus() {
            try {
                objManualEntrySanction = new XMLHttpRequest();
            }
            catch (ex) {
                try {
                    objManualEntrySanction = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e) {
                    try {
                        objManualEntrySanction = new ActiveXObject("Microsoft.XMLHTTP");
                    }
                    catch (e1) {
                        objManualEntrySanction = null;
                    }
                }
            }

            if (objManualEntrySanction != null) {

                var enK = Math.floor(Math.random() * 111);
                objManualEntrySanction.onreadystatechange = Process_Response_ManualEntrySanction;
                var Module = "ManualEntry";
                objManualEntrySanction.open("GET", "AjaxGetApprovalStatus.aspx?Module=" + Module + "&k=" + enK, true);
                objManualEntrySanction.send(null);
            }

            return false;
        }

        function Process_Response_ManualEntrySanction() {
            if (objManualEntrySanction.readyState == 4) {
                if (objManualEntrySanction.status == 200) {
                    document.getElementById('ctl00_BodyContentPH_hdnManualEntryApprovalStatus').value = objManualEntrySanction.responseText;
                    return false;
                }
                else {
                    document.getElementById('ctl00_BodyContentPH_hdnManualEntryApprovalStatus').value = 'Error';
                    return false;
                }
            }
        }
    </script>

    <div class="content-header">
        <h1 style="background-image: url('../dist/img/lve-san.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_Header" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-12">
                    <div class="inr-fil-text pull-left">
                        <asp:Label ID="lblFilter" runat="server" Text="Filter"></asp:Label>
                        <input id="Hidden2" type="hidden" value='<% Response.Write(Convert.ToString(Session["IDateFormat"])); %>' />
                        <asp:HiddenField ID="Hidden1" runat="server" />
                    </div>
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                                (1 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div id="collapseOne">
            <div class="emp-filter">
                <div class="form-horizontal">
                    <div class="row">
                        <div class="col-md-12">
                            <div id="divEmployeeDetails" style="width: 100%;">
                                <div class="row" style="display: none">
                                    <div class="col-md-2">
                                        <asp:Label ID="lblEmpSwipe" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txtSwipeCard" MaxLength="20" runat="server"
                                            CssClass="form-control" 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="GetCardNo"
                                            CompletionListCssClass="autocomplete_completionListElement" FirstRowSelected="true">
                                        </cc1:AutoCompleteExtender>
                                    </div>
                                </div>
                                <div class="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"
                                            MaxLength="50" onkeypress="return employeename_singlequotes_maxlength(event,this,50,MaxLength);"></asp:TextBox>
                                        <cc1:AutoCompleteExtender ID="acEmpName" runat="server" CompletionInterval="10" CompletionSetCount="10"
                                            CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                                            Enabled="true" FirstRowSelected="true" MinimumPrefixLength="1" ServicePath="../WebServices/AutoCompleteExtender.asmx"
                                            ServiceMethod="GetEmployeeName" CompletionListCssClass="autocomplete_completionListElement"
                                            TargetControlID="txtEmployeeName">
                                        </cc1:AutoCompleteExtender>
                                    </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"
                                            MaxLength="15" onkeypress="return acceptCharsNum_MaxLength(event,this,15,MaxLength);"></asp:TextBox>
                                        <cc1:AutoCompleteExtender ID="acEmployeeId" runat="server" CompletionSetCount="10"
                                            CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                                            CompletionInterval="10" Enabled="true" MinimumPrefixLength="1" TargetControlID="txtEmployeeId"
                                            ServicePath="../WebServices/AutoCompleteExtender.asmx" ServiceMethod="GetEmployeeId"
                                            CompletionListCssClass="autocomplete_completionListElement" FirstRowSelected="true">
                                        </cc1:AutoCompleteExtender>
                                    </div>
                                </div>
                                <div class="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="form-group">
                                    <div class="col-md-2">
                                        <asp:Label ID="lbl_From" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txtFromDate" runat="server" CssClass="form-control"
                                            EnableViewState="False" MaxLength="25" onCut="return false" onDrop="return false"></asp:TextBox>
                                        <%--<asp:CustomValidator ID="cus_FromDate" runat="server" EnableClientScript="False"
                                            OnServerValidate="ValidateFromDate" ErrorMessage="Select valid From Date" Display="Dynamic"></asp:CustomValidator>--%>
                                    </div>
                                    <div class="col-md-1">
                                    </div>
                                    <div class="col-md-2">
                                        <asp:Label ID="lbl_To" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txtToDate" runat="server" CssClass="form-control"
                                            EnableViewState="False" MaxLength="25" onCut="return false" onDrop="return false"></asp:TextBox>
                                        <%--<asp:CustomValidator ID="cus_ToDate" OnServerValidate="ValidateToDate" runat="server"
                                            EnableClientScript="False" ErrorMessage="Select valid To Date" Display="Dynamic"></asp:CustomValidator>--%>
                                        <asp:CustomValidator ID="cus_ComDate" runat="server" Display="Dynamic" EnableClientScript="False"
                                            ErrorMessage="Todate should be greater then from date" OnServerValidate="CompareDate"></asp:CustomValidator>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-12 pad-left-0px">
                                        <asp:Label ID="lbl_Status" runat="server" Style="display: none;"></asp:Label>
                                        <asp:DropDownList ID="ddlStatus" runat="server" CssClass="form-control" Style="display: none;">
                                            <asp:ListItem Text="All" Value="All"></asp:ListItem>
                                            <asp:ListItem Text="Approved" Value="Approved"></asp:ListItem>
                                            <asp:ListItem Text="Forwarded" Value="Forwarded"></asp:ListItem>
                                            <asp:ListItem Text="Pending" Value="Pending"></asp:ListItem>
                                            <asp:ListItem Text="Rejected" Value="Rejected"></asp:ListItem>
                                        </asp:DropDownList>
                                        <div class="col-md-2">
                                            <asp:CheckBox ID="cbAll" runat="server" Text="All" onclick="CheckSelectAll(this.checked);"
                                                CssClass="checkbox checkbox-primary" />
                                        </div>
                                        <div class="col-md-2">
                                            <asp:CheckBox ID="CbApproved" runat="server" Text="Approved" onclick="CheckSelect();"
                                                CssClass="checkbox checkbox-primary" />
                                        </div>
                                        <div class="col-md-2">
                                            <asp:CheckBox ID="CBForwarded" runat="server" Text="Forwarded" onclick="CheckSelect();"
                                                CssClass="checkbox checkbox-primary" />
                                        </div>
                                        <div class="col-md-2">
                                            <asp:CheckBox ID="CBPending" runat="server" Text="Pending" onclick="CheckSelect();"
                                                CssClass="checkbox checkbox-primary" />
                                        </div>
                                        <div class="col-md-2">
                                            <asp:CheckBox ID="CBRejected" runat="server" Text="Rejected" onclick="CheckSelect();"
                                                CssClass="checkbox checkbox-primary" />
                                        </div>
                                        <div class="col-md-1">
                                            <asp:CheckBox ID="CBResend" runat="server" Text="Rejected" onclick="CheckSelect();"
                                                CssClass="checkbox checkbox-primary" Style="display: none;" />
                                        </div>
                                        <div class="col-md-1">
                                            <asp:CheckBox ID="CBReply" runat="server" Text="Rejected" onclick="CheckSelect();"
                                                CssClass="checkbox checkbox-primary" Style="display: none;" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="row">
                            <div class="line16">
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="row">
                                <div class="col-md-12">
                                    <uc4:TA_uc_OrgLevel_Filter ID="TA_UC_Organisation" runat="server" />
                                </div>
                            </div>
                        </div>
                        <div class="col-md-5">
                        </div>
                        <div class="col-md-6">
                            <div class="pull-right-button">
                                <asp:LinkButton ID="btn_View" CssClass="btn view-btn fa-eye" runat="server" OnClick="btn_View_Click"
                                    OnClientClick="return ManualTimeEntryApprovalWindow();" />
                                <input id="hdnManualEntryApprovalStatus" type="hidden" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script language="javascript">
        function CheckSelectAll(para) {

            if (para) {
                document.getElementById("<%=CbApproved.ClientID%>").checked = true;
                document.getElementById("<%=CBForwarded.ClientID%>").checked = true;
                document.getElementById("<%=CBPending.ClientID%>").checked = true;

                document.getElementById("<%=CBRejected.ClientID%>").checked = true;
                document.getElementById("<%=CBResend.ClientID%>").checked = true;
                document.getElementById("<%=CBReply.ClientID%>").checked = true;
            }
            else {
                document.getElementById("<%=CbApproved.ClientID%>").checked = false;
                document.getElementById("<%=CBForwarded.ClientID%>").checked = false;
                document.getElementById("<%=CBPending.ClientID%>").checked = false;

                document.getElementById("<%=CBRejected.ClientID%>").checked = false;
                document.getElementById("<%=CBResend.ClientID%>").checked = false;
                document.getElementById("<%=CBReply.ClientID%>").checked = false;
            }
        }
        function CheckSelect() {
            if (document.getElementById("<%=CbApproved.ClientID%>").checked == false || document.getElementById("<%=CBForwarded.ClientID%>").checked == false ||
                    document.getElementById("<%=CBPending.ClientID%>").checked == false || document.getElementById("<%=CBRejected.ClientID%>").checked == false ||
                        document.getElementById("<%=CBResend.ClientID%>").checked == false || document.getElementById("<%=CBReply.ClientID%>").checked == false) {
                    document.getElementById("<%=cbAll.ClientID%>").checked = false;
                }
                else {
                    document.getElementById("<%=cbAll.ClientID%>").checked = true;
                }
            }
    </script>

</asp:Content>
