<%@ page language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" enableeventvalidation="false" inherits="Transactions_TA_UI_Transactions_OnDutyEntryModify, App_Web_csksx3nn" %>

<%@ 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/ProgressforIE.css" />
	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
    <![endif]-->
    <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.';
        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 NoRecords = "No Records";
        var Errorinretrivingdetails = "Error in retriving details";
        var SelectEntranceID = "Select Entrance ID";
        var EntertheEmployeeID = "Enter the Employee ID";
        var SelectShiftDate = "Select Shift Date";
        var SelectStartTime = "Select Start Time";
        var SelectEndTime = "Select End Time";
        var EntertheReason = "Enter the Reason";
        var SelectFromDate = "Select From Date";
        var SelectFromsession = "Select From session";
        var SelectToDate = "Select To Date";
        var SelectTosession = "Select To session";
        function SetAlertCheckDate(monthfourdigit, invalidyearentry, invalidmonthentry, invaliddateentry, dateformatDDMONYYYY, entertime, valueforhours, invalidvalueforminutes, invalidtimeformat, entervalidDateandTime, validdatemonthMMDDYYHHMM, validdatemonthMMDDYYHHMMTT, entervalidDateandTime, invalidvalueforhours, invalidvalueforminites, noRecords, errorinretrivingdetails, selectEntranceID) {
            Monthfourdigit = monthfourdigit;
            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;
            NoRecords = noRecords;
            Errorinretrivingdetails = errorinretrivingdetails;
            SelectEntranceID = selectEntranceID;
        }
        var SelTerminal = "Select In Terminal";
        var SelPunchTypes = "Select In PunchTypes";
        var FillIndate = "Fill In Date";
        var FillInTime = "Fill In Time";
        var SelOutTerminal = "Select Out Terminal";
        var SelOutPunchTypes = "Select Out PunchTypes";
        var InTimeCorrectFormat = "Enter InTime in correct Format";
        var OutTimeFormat = "Enter OutTime in correct Format";
        var ConfirmSave = "Are you sure to, Save?";
        var FillOutDate = "Fill Out Date";
        var FillOutTime = "Fill Out Time";
        var Select = "-Select-";
        function MaxLengthh(maxLength, select) {
            MaxLength = maxLength;
            Select = select;
        }
        function SetAlertMessages(invalidTime, TimeFormat, HourInvalid, timeInvalid, Terminal, PunchTypes, InDate, InTime, OutTerminal, Route, CorrectFormat, TimeFormat, SaveConfirm, OutDate, OutTime, selectInDate, selecttheRouteName, noRecords, errorinretrivingdetails, selectEntranceID, selectOutPunchType, entertheEmployeeID, selectShiftDate, selectStartTime, selectEndTime, entertheReason, selectFromDate, selectFromsession, selectToDate, selectTosession) {
            InvalidTime = invalidTime;
            InvalidTimeFormat = TimeFormat;
            InValidHour = HourInvalid;
            Invalidtime = timeInvalid;
            SelTerminal = Terminal;
            SelPunchTypes = PunchTypes;
            FillIndate = InDate;
            FillInTime = InTime;
            SelOutTerminal = OutTerminal;
            RouteName = Route;
            InTimeCorrectFormat = CorrectFormat;
            FormatTime = TimeFormat;
            ConfirmSave = SaveConfirm;
            FillOutDate = OutDate;
            FillOutTime = OutTime;
            SelectInDate = selectInDate;
            SelecttheRouteName = selecttheRouteName;
            NoRecords = noRecords;
            Errorinretrivingdetails = errorinretrivingdetails;
            SelectEntranceID = selectEntranceID;
            SelectOutPunchType = selectOutPunchType;
            EntertheEmployeeID = entertheEmployeeID;
            SelectShiftDate = selectShiftDate;
            SelectStartTime = selectStartTime;
            SelectEndTime = selectEndTime;
            EntertheReason = entertheReason;
            SelectFromDate = selectFromDate;
            SelectFromsession = selectFromsession;
            SelectToDate = selectToDate;
            SelectTosession = selectTosession;
        }
        function FillInPunchTypeHidden() {
            var InPunchType;
            var InPunchTypeSelectedIndex = document.aspnetForm.ctl00_BodyContentPH_ddlInPunchTypes.selectedIndex;
            InPunchType = document.aspnetForm.ctl00_BodyContentPH_ddlInPunchTypes.options[InPunchTypeSelectedIndex].text;
            document.aspnetForm.ctl00_BodyContentPH_hdn_InPunchType.value = InPunchType;
        }
        function FillOutPunchTypeHidden() {
            var OutPunchType;
            var OutPunchTypeSelectedIndex = document.aspnetForm.ctl00_BodyContentPH_ddlOutPunchTypes.selectedIndex;
            OutPunchType = document.aspnetForm.ctl00_BodyContentPH_ddlOutPunchTypes.options[OutPunchTypeSelectedIndex].text;
            document.aspnetForm.ctl00_BodyContentPH_hdn_OutPunchType.value = OutPunchType;
        }
        function ClearInDate() {
            document.aspnetForm.ctl00_BodyContentPH_txt_InDate.value = "";
            return false;
        }
        function ClearInTime() {
            document.aspnetForm.ctl00_BodyContentPH_txt_ShiftIn.value = "";
            return false;
        }
        function ClearOutDate() {
            document.aspnetForm.ctl00_BodyContentPH_txt_OutDate.value = "";
            return false;
        }
        function ClearOutTime() {
            document.aspnetForm.ctl00_BodyContentPH_txt_ShiftOut.value = "";
            return false;
        }
        function show() {
            if (document.aspnetForm.ctl00_BodyContentPH_rbtSingle.checked == true) {
                document.getElementById("div_Employee").style.display = "block";
                document.getElementById("div_Route").style.display = "none";
                document.getElementById("divGroupEntryType").style.display = "none";
                document.getElementById("divEmployees").style.display = "none";
                document.aspnetForm.ctl00_BodyContentPH_txt_EmployeeId.focus();
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_rbtGroup.checked == true) {
                document.getElementById("divGroupEntryType").style.display = "block";
                document.getElementById("div_Employee").style.display = "none";
                if (document.aspnetForm.ctl00_BodyContentPH_rbtBusLate.checked == true) {
                    document.getElementById("div_Route").style.display = "block";
                    document.getElementById("divEmployees").style.display = "none";
                }
                else if (document.aspnetForm.ctl00_BodyContentPH_rbtOnDuty.checked == true) {
                    document.getElementById("div_Route").style.display = "none";
                    document.getElementById("div_Employee").style.display = "block";
                }
            }
        }
        function show1() {
            if (document.aspnetForm.ctl00_BodyContentPH_rbtGroup.checked == true) {
                document.getElementById("divGroupEntryType").style.display = "block";
                document.aspnetForm.ctl00_BodyContentPH_rbtBusLate.checked = true;
                document.getElementById("div_Route").style.display = "block";
                document.getElementById("divEmployees").style.display = "none";
                document.getElementById("div_Employee").style.display = "none";
            }
        }
        function ManualEntryValidation() {
            var InTerminals = document.getElementById('ctl00_BodyContentPH_ddlInTerminals').selectedIndex;
            var InPunchTypes = document.getElementById('ctl00_BodyContentPH_ddlInPunchTypes').selectedIndex;
            var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var txt_EmployeeId = document.getElementById('ctl00_BodyContentPH_txt_EmployeeId');
            var ddlEntranceName = document.getElementById('ctl00_BodyContentPH_ddlEntranceName');
            var ddlFromSeesion = document.getElementById('ctl00_BodyContentPH_ddl_SessionFrom');
            if (document.getElementById('ctl00_BodyContentPH_rbSingleDayYes').checked == true) {
                var Shiftdate = document.getElementById('ctl00_BodyContentPH_txt_ShiftDate').value;
                var ShiftDay = document.aspnetForm.ctl00_BodyContentPH_txt_ShiftDate;
                var txt_Reason = document.getElementById('ctl00_BodyContentPH_txt_Reason');
                var ShiftIn = document.getElementById('ctl00_BodyContentPH_txt_ShiftIn').value;
                var ShiftOut = document.getElementById('ctl00_BodyContentPH_txt_ShiftOut').value;
                var weekDay = document.aspnetForm.ctl00_BodyContentPH_txt_ShiftIn;
                var weekDay2 = document.aspnetForm.ctl00_BodyContentPH_txt_ShiftOut;
                if (txt_EmployeeId != null) {
                    if (txt_EmployeeId.value.length == 0) {
                        alert(EntertheEmployeeID);
                        return false;
                    }
                }
                if (Shiftdate == "") {
                    alert(SelectShiftDate);
                    return false;
                }
                if (ShiftIn == "") {
                    alert(SelectStartTime);
                    return false;
                }
                if (ShiftOut == "") {
                    alert(SelectEndTime);
                    return false;
                }
                if (txt_Reason.value.trim() == '') {
                    alert(EntertheReason);
                    return false;
                }
                var regExp = "^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$";
                var TimeFormat = document.getElementById('ctl00_BodyContentPH_Hidden2').value;
                var length = 0;
                if (TimeFormat != "LT") {
                    length = 8;
                    regExp = "^(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?)$";
                }
                else {
                    length = 8;
                    regExp = "^(([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))$";
                }
                if (Shiftdate != "") {
                    if (checkDate(ShiftDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                    }
                    else {
                        document.getElementById("<%=txt_ShiftDate.ClientID%>").focus();
                        return false;
                    }
                }
            }
            if (document.getElementById('ctl00_BodyContentPH_rbSingleDayNo').checked == true) {
                var Session1 = document.getElementById('ctl00_BodyContentPH_ddl_SessionFrom').selectedIndex;
                var Session2 = document.getElementById('ctl00_BodyContentPH_ddl_SessionTo').selectedIndex;
                var FromDate = document.getElementById('ctl00_BodyContentPH_txt_InDate').value;
                var ToDate = document.getElementById('ctl00_BodyContentPH_txt_OutDate').value;
                var InDay = document.aspnetForm.ctl00_BodyContentPH_txt_InDate;
                var OutDay = document.aspnetForm.ctl00_BodyContentPH_txt_OutDate;
                var txt_Reason = document.getElementById('ctl00_BodyContentPH_txt_Reason');
                if (txt_EmployeeId != null) {
                    if (txt_EmployeeId.value.length == 0) {
                        alert(EntertheEmployeeID);
                        return false;
                    }
                }
                if (FromDate == "") {
                    alert(SelectFromDate);
                    return false;
                }
                if (Session1 == 0) {
                    alert(SelectFromsession);
                    return false;
                }
                if (ToDate == "") {
                    alert(SelectToDate);
                    return false;
                }
                if (Session2 == 0) {
                    alert(SelectTosession);
                    return false;
                }
                if (txt_Reason.value.length == 0) {
                    alert(EntertheReason);
                    return false;
                }
                var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
                var rangeDemoFormats = document.getElementById('ctl00_BodyContentPH_hiddenTime').value;
                if (document.getElementById('ctl00_BodyContentPH_rbtSingle').checked == true) {
                    if (txt_EmployeeId.value.length == 0) {
                        alert(EntertheEmployeeID);
                        return false;
                    }
                }
                else {
                    if (document.getElementById('ctl00_BodyContentPH_rbtOnDuty').checked == true) {
                        if (txt_EmployeeId.value.length == 0) {
                            alert(EntertheEmployeeID);
                            return false;
                        }
                        //Aded by Manjula.P on 17-Feb-2014
                        if (FromDate != "") {
                            if (checkDate(InDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                            }
                            else {
                                document.getElementById("<%=txt_InDate.ClientID%>").focus();
                                return false;
                            }
                        }
                        if (ToDate != "") {
                            if (checkDate(OutDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                            }
                            else {
                                document.getElementById("<%=txt_OutDate.ClientID%>").focus();
                                return false;
                            }
                        }
                    }
                }
                if (txt_Reason.value.length == 0) {
                    alert(EntertheReason);
                    return false;
                }
            }
            if (confirm(ConfirmSave) == true) {
                return true;
            }
            else {
                return false;
            }
        }
    </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 language="javascript" src="../js/ShiftExchange.js" type="text/javascript"></script>
    <script language="javascript" src="../js/DateTimeValidation.js" type="text/javascript"></script>
    <script language="javascript" src="../js/EmployeeNameAjax.js" type="text/javascript"></script>
    <script>
        $(function () {
            $('#ctl00_BodyContentPH_txt_ShiftDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value });
            $('#ctl00_BodyContentPH_txt_OutDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value });
            $('#ctl00_BodyContentPH_txt_InDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value });
            $('#ctl00_BodyContentPH_txt_ShiftIn').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden2').value });
            $('#ctl00_BodyContentPH_txt_ShiftOut').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden2').value });
        });
    </script>
     <script type="text/javascript">
        function datePicker() {
	


            debugger;
	 var rbOnduty = document.getElementById('<%= rbNone.ClientID %>');
         var rbPML = document.getElementById('<%= rbPML.ClientID %>');
         var rbPPL = document.getElementById('<%= rbPPL.ClientID %>');
if(rbPML.checked || rbPPL.checked)
{

            // Get the value from the txt_InDate TextBox
            var fromDate = document.getElementById('<%= txt_InDate.ClientID %>').value;

            // Check if the date value is valid
            if (!fromDate) {
                alert("Please enter a valid InDate.");
                return;
            }

            // Parse InDate to standard format (yyyy/MM/dd)
            var fromDateStandard = convertToStandardFormat(fromDate);
            if (!fromDateStandard) {
                alert("Invalid InDate format. Please enter a valid date.");
                return;
            }

            // Get the YearToDate hidden field value
            var yearToDate = document.getElementById('<%= hdnYearToDate.ClientID %>').value;
            var fromPPValidate = document.getElementById('<%= hdnPPValidateDate.ClientID %>').value;
            if (!yearToDate) {
                alert("YearToDate is not provided.");
                return;
            }

            // Parse YearToDate to standard format
            var yearToDateStandard = convertToStandardFormat(extractDatePart(yearToDate));
            var fromPPValidateStandard = convertToStandardFormat(extractDatePart(fromPPValidate));
            if (!yearToDateStandard) {
                alert("Invalid YearToDate format. Please verify the input.");
                return;
            }

            // Convert fromDateStandard to a Date object
            var toDate = new Date(fromDateStandard);
         
           

            if (rbPML.checked) {
                if (fromPPValidateStandard > fromDateStandard && yearToDateStandard > fromDateStandard) {
                    alert('Your Eligible Post Maternity–Work from Home Start date will be:\n' + formatDate(new Date(fromPPValidateStandard), getDateFormat(fromDate)));
                    return false;
                }
                else if (fromPPValidateStandard < fromDateStandard && yearToDateStandard < fromDateStandard) {
                    alert('Year was Not Create in YearSettings');
                    return false;
                }
                else {
                    // Calculate ToDate by adding 60 days
                    var NumofDays = document.getElementById('<%= hdnNumofWFHDays.ClientID %>').value;
                        if (NumofDays == 0 && NumofDays < 120) {
                            toDate.setDate(toDate.getDate() + 59);
                        } else {
                            NumofDays = 59 - NumofDays;
                            toDate.setDate(toDate.getDate() + NumofDays);
                        }
                    }

            }
            else if (rbPPL.checked) {
                // Calculate ToDate by adding 14 days
                debugger;
                //   toDate.setDate(toDate.getDate() + 13);
                if (fromPPValidateStandard < fromDateStandard) {
                    alert('Post Paternity – Work from Home - Exceeded Time Limit\n' + formatDate(new Date(fromPPValidateStandard), getDateFormat(fromDate)));
                    return false;
                }
            }
            else {


            }

            // Format toDate as "yyyy/MM/dd" explicitly
            var toDateStandard = toDate.getFullYear() + '/' + (toDate.getMonth() + 1).toString().padStart(2, '0') + '/' + toDate.getDate().toString().padStart(2, '0');

            // Now call convertToStandardFormat with the formatted date string
            toDateStandard = convertToStandardFormat(toDateStandard);

            // Ensure toDate does not exceed yearToDateStandard
            if (toDateStandard > yearToDateStandard) {
                toDateStandard = yearToDateStandard;
            }

            // Convert toDate back to the desired format
            var formattedToDate = formatDate(new Date(toDateStandard), getDateFormat(fromDate));

            // Bind ToDate value to the txt_OutDate TextBox
            document.getElementById('<%= txt_OutDate.ClientID %>').value = formattedToDate;
        document.getElementById('<%= hdnOutDate.ClientID %>').value = formattedToDate;
}
        }

        function ToDateValidateForPP() {
            debugger;
 var rbPML = document.getElementById('<%= rbPML.ClientID %>');
         var rbPPL = document.getElementById('<%= rbPPL.ClientID %>');
if(rbPPL.checked || rbPML.checked)
{

            var FroMDate = document.getElementById('<%= txt_InDate.ClientID %>').value;
            var ToDate = document.getElementById('<%= txt_OutDate.ClientID %>').value;

            var fromDateStandard = convertToStandardFormat(FroMDate);
            var toDateStandard = convertToStandardFormat(ToDate);


            var validateToDate = new Date(fromDateStandard);

            var NumofDays = document.getElementById('<%= hdnNumofWFHDays.ClientID %>').value;

            if (validateToDate != '') {
                validateToDate.setDate(validateToDate.getDate() + 27);
            }
            var validateToDateStandard = validateToDate.getFullYear() + '/' + (validateToDate.getMonth() + 1).toString().padStart(2, '0') + '/' + validateToDate.getDate().toString().padStart(2, '0');

            // Now call convertToStandardFormat with the formatted date string
            validateToDateStandard = convertToStandardFormat(validateToDateStandard);
            if (validateToDateStandard < toDateStandard) {
                alert('As Per Policy only Applicable for Maximum 28 Days');
                return false;
            }
        }
}



        function extractDatePart(dateTimeString) {
            // Extract the date part from "MM/DD/YYYY HH:MM:SS AM/PM"
            var parts = dateTimeString.split(" ");
            return parts[0]; // Return "MM/DD/YYYY"
        }

        function convertToStandardFormat(dateString) {
            var date = parseDate(dateString);
            if (!date) return null;

            return formatDate(date, "yyyy/MM/dd");
        }

        function parseDate(dateString) {
            // Handle "dd-MMM-yyyy" format
            var regexDDMMMYYYY = /^\d{2}-[A-Za-z]{3}-\d{4}$/; // dd-MMM-yyyy
            var regexMMDDYYYY = /^\d{2}\/\d{2}\/\d{4}$/; // MM/dd/yyyy
            var regexYYYYMMDD = /^\d{4}\/\d{2}\/\d{2}$/; // yyyy/MM/dd
            var regexDDMMYYYY = /^\d{2}\/\d{2}\/\d{4}$/; // dd/MM/yyyy

            var dateObject;

            // Check if the format matches dd-MMM-yyyy
            if (regexDDMMMYYYY.test(dateString)) {
                var parts = dateString.split('-');
                var day = parts[0];
                var monthName = parts[1];
                var year = parts[2];

                var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
                var monthIndex = months.indexOf(monthName);
                dateObject = new Date(year, monthIndex, day);
            }
                // Check if the format matches MM/dd/yyyy
            else if (regexMMDDYYYY.test(dateString)) {
                var parts = dateString.split('/');
                dateObject = new Date(parts[2], parts[0] - 1, parts[1]);
            }
                // Check if the format matches dd/MM/yyyy
            else if (regexDDMMYYYY.test(dateString)) {
                var parts = dateString.split('/');
                dateObject = new Date(parts[2], parts[1] - 1, parts[0]);
            }
                // Check if the format matches yyyy/MM/dd
            else if (regexYYYYMMDD.test(dateString)) {
                var parts = dateString.split('/');
                dateObject = new Date(parts[0], parts[1] - 1, parts[2]);
            } else {
                console.error("Invalid date format: " + dateString);
                return null;
            }

            // Ensure the date is valid
            if (isNaN(dateObject)) {
                console.error("Invalid date value: " + dateString);
                return null;
            }
            return dateObject;
        }

        function formatDate(date, format) {
            var day = date.getDate().toString().padStart(2, '0');
            var month = (date.getMonth() + 1).toString().padStart(2, '0');
            var year = date.getFullYear();
            var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
            var monthName = monthNames[date.getMonth()];

            if (format === "yyyy/MM/dd") {
                return year + "/" + month + "/" + day;
            } else if (format === "MM/dd/yyyy") {
                return month + "/" + day + "/" + year;
            } else if (format === "dd-MM-yyyy") {
                return day + "-" + monthName + "-" + year;
            } else if (format === "dd/MM/yyyy") {
                return day + "/" + month + "/" + year;
            } else {
                return date.toLocaleDateString(); // Default fallback
            }
        }

        function getDateFormat(referenceDate) {
            if (/\d{2}\/\d{2}\/\d{4}/.test(referenceDate)) {
                return "MM/dd/yyyy";
            } else if (/\d{2}-[A-Za-z]{3}-\d{4}/.test(referenceDate)) {
                return "dd-MM-yyyy";
            } else if (/\d{2}\/\d{2}\/\d{4}/.test(referenceDate)) {
                return "dd/MM/yyyy";
            }
            return "yyyy/MM/dd"; // Default format
        }



    </script>

    <div class="content-header">
        <asp:HiddenField ID="hdfStartTime" runat="server" />
        <asp:HiddenField ID="hdfStartEnd" runat="server" />
        <h1 style="background-image: url('../dist/img/onduty-icons.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">
        <asp:HiddenField ID="Hidden1" runat="server" />
        <asp:HiddenField ID="Hidden2" runat="server" />
        <asp:HiddenField ID="hiddenTime" runat="server" />
        <asp:HiddenField ID="hdnYearStartDate" runat="server" />
        <asp:HiddenField ID="hdnYearToDate" runat="server" />
        <asp:HiddenField ID="hdnNumofWFHDays" runat="server" />
         <asp:HiddenField ID="hdnPPValidateDate" runat="server" />
        <asp:HiddenField ID="limtCount" runat="server" />
        <input id="hdnEmployeeId" type="hidden" runat="server" />
        <asp:HiddenField ID="hdnOutDate" runat="server" />
        <div class="col-md-12" style="color: Red; display: none">
            <asp:Label ID="lbl_Error" runat="server" ForeColor="Red"></asp:Label>
        </div>
        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 50px">
                    <div class="modal-header">
                        <button type="button" id="closemodal" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title">
                            <asp:Label ID="lblSelectEmployee" runat="server" Text="Select Employee"></asp:Label>
                        </h4>
                    </div>
                    <div class="modal-body">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" height="700px"
                            style="border-style: none"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-2">
                </div>
                <div class="col-sm-2 col-sm-offset-8">
                    <div class="pull-right">
                        <h6>
                            <span><span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                                (<asp:Label ID="lblManCount" runat="server" Text="5"></asp:Label>
                                No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="row">
                <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"
                                            Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial" Text="Please Wait..."></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>
                </asp:UpdatePanel>
                <div class="form-horizontal">
                    <div class="col-md-12 form-group">
                        <div id="div_Employee" style="display: none">
                            <div class="col-md-12">
                                <div class="form-group" id="trEmployeeID" runat="server">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_EmployeeId" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txt_EmployeeId" runat="server" CssClass="form-control man-dat"
                                            MaxLength="15" onblur="EmpName('Onduty');" onkeypress="return acceptCharsNum_MaxLength(event,this,15,MaxLength);"
                                            ReadOnly="true"></asp:TextBox>
                                    </div>
                                    <div class="col-md-5">
                                        <div class="input-group input-group-sm" style="display: none;">
                                            <span class="input-group-btn">
                                                <asp:LinkButton ID="btn_Search" data-toggle="modal" data-target="#myModal" CssClass="btn save-btn fa-search"
                                                    runat="server" OnClientClick="return OpenWindowShiftExchange('txt_EmployeeId','Onduty');" />
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_EmployeeName" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txt_Name" runat="server" CssClass="form-control"
                                            ReadOnly="True"></asp:TextBox>
                                    </div>
                                    <div class="col-md-6">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12 form-group">
                        <div class="col-md-12">
                            <div class="form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_SingleDay" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-4 Pad-left-7px">
                                    <div class="col-md-6">
                                        <asp:RadioButton ID="rbSingleDayYes" Checked="true" runat="server" AutoPostBack="true"
                                            GroupName="Single Day" OnCheckedChanged="rbSingleDayYes_CheckedChanged" CssClass="radioLeave radioLeave-primary" />
                                    </div>
                                    <div class="col-md-6">
                                        <asp:RadioButton ID="rbSingleDayNo" runat="server" GroupName="Single Day" AutoPostBack="true"
                                            OnCheckedChanged="rbSingleDayNo_CheckedChanged" CssClass="radioLeave radioLeave-primary" />
                                    </div>
                                </div>
                                <div class="col-md-5">
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_OttHoliday" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-4 Pad-left-7px">
                                    <div class="col-md-6">
                                        <asp:RadioButton ID="rbIncludingWeeklyOff" runat="server" GroupName="Weekly Off"
                                            CssClass="radioLeave radioLeave-primary" />
                                    </div>
                                    <div class="col-md-6">
                                        <asp:RadioButton ID="rbExcludingWeeklyOff" Checked="true" runat="server" GroupName="Weekly Off"
                                            CssClass="radioLeave radioLeave-primary" />
                                    </div>
                                </div>
                                <div class="col-md-5">
                                </div>
                            </div>
                            <%--  <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblPMLandPPL" runat="server" Text="Select the type of Work Mode"></asp:Label>
                                </div>
                                <div class="col-md-4 Pad-left-7px">

                                    <div class="col-md-6">
                                        <asp:RadioButton ID="rbPML" runat="server" GroupName="PML" Text="PM" AutoPostBack="true"
                                            CssClass="radioLeave radioLeave-primary" OnCheckedChanged="rbPML_CheckedChanged" ToolTip="Post Maternity – Work from Home" />
                                    </div>
                                    <div class="col-md-3">
                                        <asp:RadioButton ID="rbPPL" runat="server" GroupName="PML" Text="PP" AutoPostBack="true"
                                            CssClass="radioLeave radioLeave-primary" OnCheckedChanged="rbPML_CheckedChanged" ToolTip="Post Paternity – Work from Home" />
                                    </div>
                                    <div class="col-md-3">
                                        <asp:RadioButton ID="rbNone" Checked="true" runat="server" GroupName="PML" Text="OD"
                                            CssClass="radioLeave radioLeave-primary" />
                                    </div>
                                </div>
                                <div class="col-md-5">
                                </div>
                            </div>--%>
                            <div class="row form-group" runat="server" id="WFHType" style="display: none;">
                                <div class="col-md-3">
                                    <asp:Label ID="lblPMLandPPL" runat="server" Text="Select the type of Work Mode"></asp:Label>
                                </div>
                                <div class="col-md-4 Pad-left-7px">

                                    <div class="col-md-6" runat="server" id="PMWFH" style="display: none;">
                                        <asp:RadioButton ID="rbPML" runat="server" GroupName="PML" Text="PM" AutoPostBack="true"
                                            CssClass="radioLeave radioLeave-primary" OnCheckedChanged="rbPML_CheckedChanged" ToolTip="Post Maternity – Work from Home" />
                                    </div>
                                    <div class="col-md-6" runat="server" id="PPWFH" style="display: none;">
                                        <asp:RadioButton ID="rbPPL" runat="server" GroupName="PML" Text="PP" AutoPostBack="true"
                                            CssClass="radioLeave radioLeave-primary" OnCheckedChanged="rbPML_CheckedChanged" ToolTip="Post Paternity – Work from Home" />
                                    </div>
                                    <div class="col-md-6" runat="server" id="ODWFH">
                                        <asp:RadioButton ID="rbNone" Checked="true" runat="server" GroupName="PML" Text="OD"
                                            CssClass="radioLeave radioLeave-primary" />
                                    </div>
                                </div>
                                <div class="col-md-5">
                                </div>
                            </div>
                            <div class="row" style="display: none">
                                <div class="col-md-6">
                                    <asp:Label ID="lbl_TypeOfManualEntry" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <asp:RadioButton ID="rbtSingle" runat="server" GroupName="EntryType" onclick="show();"
                                        TabIndex="1" />
                                    <asp:RadioButton ID="rbtGroup" runat="server" GroupName="EntryType" onclick="show1();" />
                                </div>
                            </div>
                            <div id="divGroupEntryType" style="display: none">
                                <div class="row" style="display: none">
                                    <div class="col-md-12">
                                        <asp:Label ID="lbl_GroupEntryType" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-12">
                                        <asp:RadioButton ID="rbtBusLate" runat="server" GroupName="GroupEntryType" onclick="show();"
                                            Checked="True" CssClass="radio radio-primary" />
                                        <asp:RadioButton ID="rbtOnDuty" runat="server" GroupName="GroupEntryType" onclick="show();"
                                            CssClass="radio radio-primary" />
                                    </div>
                                </div>
                            </div>
                            <div id="divEmployees" style="display: none">
                                <div class="row form-group">
                                    <div class="col-md-2">
                                        <asp:Label ID="lbl_Employees" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:Button ID="btn_ViewEmployees" CssClass="but" runat="server" Width="87px" OnClientClick="return OpenWindow();" />
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_ManualTimeEntryDate" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_EntryDate" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                                <div id="tr_ShiftDate" runat="server">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_ShiftDate" Text="Shift Date" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3" id="tr_ShiftDate1" runat="server">
                                        <asp:TextBox onpaste="return true" ID="txt_ShiftDate" runat="server" CssClass="form-control man-dat"
                                            onCut="return false" onDrop="return false"></asp:TextBox>
                                        <asp:Button ID="Button1" runat="server" CssClass="but" CausesValidation="False" OnClientClick="return ClearInDate()"
                                            Style="display: none;" />
                                        <asp:CustomValidator ID="CustomValidator2" runat="server" EnableClientScript="False"
                                            OnServerValidate="CheckInDate" SetFocusOnError="True" ControlToValidate="txt_ShiftDate"
                                            Display="None"></asp:CustomValidator>
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="display: none;">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_EntranceName" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEntranceName" runat="server" AppendDataBoundItems="True"
                                        CssClass="form-control select2 Man-dat" onchange="return ManualTimeEntryTerminals(SelectEntranceID,NoRecords,Errorinretrivingdetails,Select);">
                                        <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="row" style="color: #5D5D5D">
                                <div id="tr_InTime" runat="server">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_InTime" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txt_ShiftIn" runat="server" CssClass="form-control man-dat"
                                            MaxLength="12" onCut="return false" onDrop="return false"></asp:TextBox>
                                        <asp:Button ID="btn_InTimeClear" runat="server" CssClass="but" CausesValidation="False"
                                            Style="display: none;" />
                                    </div>
                                </div>
                                <div id="tr_OutTime" runat="server">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_OutTime" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txt_ShiftOut" runat="server" CssClass="form-control man-dat"
                                            MaxLength="12" onCut="return false" onDrop="return false"></asp:TextBox>
                                        <asp:Button ID="btn_OutTimeClear" runat="server" CssClass="but" Width="71px" CausesValidation="False"
                                            OnClientClick="return ClearOutTime()" Style="display: none;" />
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="display: none">
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_InTerminal" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlInTerminals" runat="server" CssClass="form-control select2"
                                        onchange="return ManualTimeEntry_InPunchTypes(SelTerminal,NoRecords,Errorinretrivingdetails,Select);">
                                    </asp:DropDownList><input id="hdn_InTerminal" type="hidden" runat="server" />
                                </div>
                            </div>
                            <div style="display: none">
                                <div class="row">
                                    <div class="col-md-12">
                                        <asp:Label ID="lbl_InPunchType" runat="server"></asp:Label>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12">
                                        <asp:DropDownList ID="ddlInPunchTypes" runat="server" CssClass="form-control select2">
                                        </asp:DropDownList>
                                        <input id="hdn_InPunchType" type="hidden" runat="server" />
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="color: #5D5D5D">
                                <div id="tr_InDate" runat="server">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_InDate" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txt_InDate" runat="server" CssClass="form-control man-dat"
                                            onCut="return false" onDrop="return false" onblur="datePicker();" AutoPostBack="true"></asp:TextBox>
                                        <asp:Button ID="btn_InDateClear" runat="server" CssClass="but" CausesValidation="False"
                                            OnClientClick="return ClearInDate()" Style="display: none;" />
                                        <asp:CustomValidator ID="CustomValidator1" runat="server" EnableClientScript="False"
                                            OnServerValidate="CheckInDate" SetFocusOnError="True" ControlToValidate="txt_InDate"
                                            Display="None"></asp:CustomValidator>
                                    </div>
                                </div>
                                <div id="tr_Start_Session" runat="server">
                                    <div class="col-md-3">
                                        <asp:Label ID="lblSessionstart" Text="From Session" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:DropDownList ID="ddl_SessionFrom" runat="server" CssClass="form-control select2 Man-dat">
                                            <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                            <asp:ListItem Text="First half" Value="First half"></asp:ListItem>
                                            <asp:ListItem Text="Second half" Value="Second half"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="color: #5D5D5D">
                                <div id="tr_OutDate" runat="server" style="padding-top: 15px;">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_OutDate" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox onpaste="return true" ID="txt_OutDate" runat="server" CssClass="form-control man-dat"
                                            onCut="return false" onDrop="return false" onblur="ToDateValidateForPP();"></asp:TextBox>
                                        <asp:Button ID="btn_OutDateClear" runat="server" CssClass="but" Width="70px" CausesValidation="False"
                                            OnClientClick="return ClearOutDate()" Style="display: none;" />
                                        <asp:CustomValidator ID="CustomValidator3" runat="server" Display="None" EnableClientScript="False"
                                            OnServerValidate="CheckOutDate" SetFocusOnError="True" ControlToValidate="txt_OutDate"></asp:CustomValidator>
                                    </div>
                                </div>
                                <div id="tr_End_Session" runat="server">
                                    <div class="col-md-3">
                                        <asp:Label ID="lblSessionEnd" Text="To Session" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:DropDownList ID="ddl_SessionTo" runat="server" CssClass="form-control select2 Man-dat">
                                            <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                            <asp:ListItem Text="First half" Value="First half"></asp:ListItem>
                                            <asp:ListItem Text="Second half" Value="Second half"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <div style="display: none">
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_OutTerminal" runat="server"></asp:Label>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:DropDownList ID="ddlOutTerminals" runat="server" CssClass="form-control select2"
                                            onchange="return ManualTimeEntry_OutPunchTypes(SelOutTerminal,NoRecords,Errorinretrivingdetails,Select);">
                                        </asp:DropDownList><input id="hdn_OutTerminal" type="hidden" runat="server" />
                                    </div>
                                </div>
                            </div>
                            <div style="display: none">
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_OutPunchType" runat="server"></asp:Label>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:DropDownList ID="ddlOutPunchTypes" runat="server" CssClass="form-control select2">
                                        </asp:DropDownList>
                                        <input id="hdn_OutPunchType" type="hidden" runat="server" />
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group" style="margin-top: 15px">
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_Reason" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txt_Reason" runat="server" CssClass="form-control man-dat"
                                        MaxLength="250" onCut="return false" onDrop="return false" onkeypress="return chkMaxLen(event,this,250,MaxLength);"
                                        TextMode="MultiLine" Style="resize: none"></asp:TextBox>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_Status1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_Status" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                            <div id="div_Route" style="display: none">
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_RouteName" runat="server"></asp:Label>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:DropDownList ID="ddlRouteName" runat="server" AppendDataBoundItems="True" CssClass="form-control select2 Man-dat">
                                            <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:Button ID="btn_View" runat="server" CausesValidation="False" OnClientClick="return Manual_OpenWindow(SelectInDate,SelecttheRouteName);"
                                            CssClass="but" />
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-5">
                                </div>
                                <div class="col-md-7">
                                    <div class="pull-right-button">
                                        <asp:LinkButton ID="btn_Add" CssClass="btn save-btn fa-floppy-o" runat="server" CausesValidation="true"
                                            OnClick="btn_Add_Click" OnClientClick="if(ManualEntryValidation()){ $find('popupProgress').show();return true;}else return false;" />
                                        <asp:LinkButton ID="btn_Cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                            CausesValidation="False" OnClick="btn_Cancel_Click" />
                                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                                            ShowSummary="False" />
                                        <asp:Label ID="lblname" runat="server">
                                        </asp:Label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="clearfix">
        </div>
    </div>
</asp:Content>
