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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="server">

    <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>
    <link href="../dist/css/bootstrap-responsive-tabs.css" rel="stylesheet" type="text/css">
    <link href="../dist/css/login.css" rel="stylesheet" type="text/css">
    <script src="../dist/js/jquery.bootstrap-responsive-tabs.min.js"></script>
    <script src="../js/DateTimeValidation.js" type="text/javascript"></script>
    <script>    
        function showPassword(value) {
            var x;
            if (value == 2) {
                x = document.getElementById("ctl00_BodyContentPH_txt_AdminPassword");
            }
            else if (value == 1) {
                x = document.getElementById("ctl00_BodyContentPH_txtPassword");
            }
            if (x.type === "password") {
                x.type = "text";
            } else {
                x.type = "password";
            }
        }
        $(function () {                
            $('#ctl00_BodyContentPH_txtMonthClosureDate').datetimepicker({format: document.getElementById('ctl00_BodyContentPH_Hidden1').value});
            $('#ctl00_BodyContentPH_txtToDate').datetimepicker({format: document.getElementById('ctl00_BodyContentPH_Hidden1').value});
        });
        $(function () {                
            $('#ctl00_BodyContentPH_txtExceptionHours').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtDefaultLunch').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtLunchHrs').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtBeforeShiftMax').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtBeforeShiftMax_24HrsShift').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtTimeInterval').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtWeekOffStartHours').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtDeductionHours').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtHalfDayComoff').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtFullDayComoff').datetimepicker({format: 'HH:mm'});
            $('#ctl00_BodyContentPH_txtMonthlyExceptionBufferHrs').datetimepicker({format:'HH:mm'});

        });
        function GetMonthCount()
        {
            var From=document.getElementById("ctl00_BodyContentPH_ddlMonthStrDate").value;
            var To=document.getElementById("ctl00_BodyContentPH_ddlMonthEndDate").value;
            var valOf=To-From;
            if(valOf > 0)
            {
                $('#ctl00_BodyContentPH_lblSelectDayCountMonth').text(valOf + 1);
            }
            else
            {
                $('#ctl00_BodyContentPH_lblSelectDayCountMonth').text(32 + valOf);
            }
        }        
        function GetWeekCount()
        {
            var From=document.getElementById("ctl00_BodyContentPH_ddlWeekStartDay").value;
            var To=document.getElementById("ctl00_BodyContentPH_ddlWeekEndDay").value;
            var valOf=To-From;
            if(valOf > 0)
            {
                $('#ctl00_BodyContentPH_lblSelectDayCountWeek').text(valOf + 1);
            }
            else
            {
                $('#ctl00_BodyContentPH_lblSelectDayCountWeek').text(8 + valOf);
            }
        }
      
        function getFilter1() {
            $('#collapseThree').collapse('show');
            if (document.getElementById('ctl00_BodyContentPH_trFiller1').style.display == "none") {
                document.getElementById('ctl00_BodyContentPH_trFiller1').style.display = "";
            }
            else {
                document.getElementById('ctl00_BodyContentPH_trFiller1').style.display = "none";
            }
            return false;
        }
        function getFilter2() {
            $('#collapseThree').collapse('show');
            if (document.getElementById('ctl00_BodyContentPH_trFiller2').style.display == "none") {
                document.getElementById('ctl00_BodyContentPH_trFiller2').style.display = "";
            }
            else {
                document.getElementById('ctl00_BodyContentPH_trFiller2').style.display = "none";
            }
            return false;
        }

        function getFilter3() {
            $('#collapseThree').collapse('show');
            if (document.getElementById('ctl00_BodyContentPH_trFiller3').style.display == "none") {
                document.getElementById('ctl00_BodyContentPH_trFiller3').style.display = "";
            }
            else {
                document.getElementById('ctl00_BodyContentPH_trFiller3').style.display = "none";
            }
            return false;
        }
        function getFilter4() {
            $('#collapseThree').collapse('show');
            if (document.getElementById('ctl00_BodyContentPH_trFiller4').style.display == "none") {
                document.getElementById('ctl00_BodyContentPH_trFiller4').style.display = "";
            }
            else {
                document.getElementById('ctl00_BodyContentPH_trFiller4').style.display = "none";
            }
            return false;
        }
        function getFilter5() {
            $('#collapseThree').collapse('show');
            if (document.getElementById('ctl00_BodyContentPH_trFiller5').style.display == "none") {
                document.getElementById('ctl00_BodyContentPH_trFiller5').style.display = "";
            }
            else {
                document.getElementById('ctl00_BodyContentPH_trFiller5').style.display = "none";
            }
            return false;
        }
        // Monthly Exception Buffer hours Example 
        function getFilter6()
        {
            $('#collapseThree').collapse('show');
            if (document.getElementById('ctl00_BodyContentPH_trFiller6').style.display == "none") {
                document.getElementById('ctl00_BodyContentPH_trFiller6').style.display = "";
            }
            else {
                document.getElementById('ctl00_BodyContentPH_trFiller6').style.display = "none";
            }
            return false;
        }


        function disableendday(val,type)
        {
            if(type==1)
            {
                var options = document.getElementById('ctl00_BodyContentPH_ddlWeekEndDay');
                if(val==1)
                {
                    options[0].disabled = true;
                }
                else
                {
                    options[val-1].disabled = true;
                }
            }
            else
            {
                var options = document.getElementById('ctl00_BodyContentPH_ddlMonthEndDate');
                if(val==1)
                {
                    options[0].disabled = true;
                }
                else
                {
                    options[val-1].disabled = true;
                }
            }
            $(".select2").select2();
        }
    </script>
    <style type="text/css">
        .greyed {
            color: #999999;
        }
    </style>
    <script type="text/javascript" language="javascript" src="../js/OTRoundoff.js"></script>
    <script type="text/javascript" language="javascript" src="../js/OTRoundoffModify.js"></script>
    <script type="text/javascript">
        function number_dot(e,ctrl)
        {
            dec_limit = arguments[1];
            var keycode;
            if (window.event) keycode = window.event.keyCode;
            else if (e) keycode = e.which;
            else return true;				
            if((keycode==8) || (keycode==0)){
                return true;
            } 
            val = ctrl.value;
            dot_index = val.indexOf('.');
            if(dot_index != -1)
            {
                dec_pts = (val.length - dot_index);
                if(!dec_limit) dec_limit = 3; else dec_limit = dec_limit + 1;
            }
            if(document.selection)
            {
                var selection=document.selection.createRange();
                var selected_text = selection.text;
            }
            else if(document.getSelection)
            { 
                var start = ctrl.selectionStart;
                var end = ctrl.selectionEnd;
                var selected_text = ctrl.value.substring(start, end);
            }
            if(	(val.length==0 || selected_text != "") && (keycode == 46) )	// || keycode==48
            {
                return false;
            }
            else if(dot_index != -1 && keycode == 46 )
            {
                return false;
            }
            else if(!(keycode>=48 && keycode <=58) && (keycode!=13) && (keycode!=46) && (keycode=36) && (keycode!=8) && (keycode!=0)&&(keycode=45)&&(keycode=47))
            {
                return false;
            }
            else return true;
        }
        function numbers_dot(e,ctrl)
        {           
            dec_limit = arguments[1];
            var keycode;
            if (window.event) keycode = window.event.keyCode;
            else if (e) keycode = e.which;
            else return true;		
            if((keycode==8) || (keycode==0)){
                return true;
            } 		
            val = ctrl.value;
            dot_index = val.indexOf('.');
            if(dot_index != -1)
            {
                dec_pts = (val.length - dot_index);
                if(!dec_limit) dec_limit = 3; else dec_limit = dec_limit + 1;
            }
            if(document.selection)
            {
                var selection=document.selection.createRange();
                var selected_text = selection.text;
            }
            else if(document.getSelection)
            { 
                var start = ctrl.selectionStart;
                var end = ctrl.selectionEnd;
                var selected_text = ctrl.value.substring(start, end);
            }		
            if(	(val.length==0 || selected_text != "") && (keycode == 46) )	// || keycode==48
            {
                return false;
            }
            else if(dot_index != -1 && keycode == 46 )
            {
                return false;
            }
            else if(!(keycode>=48 && keycode <=57) && (keycode!=13) && (keycode!=46) && (keycode=36) && (keycode!=8) && (keycode!=0))
            {
                return false;
            }
            else return true;
        }
    </script>
    <script type="text/javascript">       
        var SelectCompany =" Select Company ";
        var EnterBeforeShiftMaximumHours = "Enter Before Shift Maximum Hours";
        var EntervalidBeforeShiftMaximumHours = "Enter valid Before Shift Maximum Hours";
        var EnterWeeklyOffShiftStartHours = "Enter Weekly Off Shift Start Hours";
        var EntervalidWeeklyOffShiftStartHours = "Enter valid Weekly Off Shift Start Hours";
        var EnterAfterShiftMaximumHours = "Enter After Shift Maximum Hours";
        var EntervalidAfterShiftMaximumHours = "Enter valid After Shift Maximum Hours";   
        var EntervalidTimeInterval = "Enter valid Time Interval";
        var EnterTimeInterval = "Enter Time Interval";
        var EnterDefaultMonthclosureDate = "Enter Default Monthclosure Date";
        var EnterallthethreeOTRoundoffvalues = "Enter all the three OT Roundoff values";
        var AddtheOTRoundoffvaluesbyclickingADDbutton = "Add the OT Roundoff values by clicking ADD button";
        var AreyousuretoSave = "Are you sure to Save";
        var EnterBeforeShiftMaxHours = "- Enter Before Shift Max Hours";
        var EnterAfterShiftMaxHours = "- Enter After Shift Max Hours";
        var EnterShiftBreak = "- Enter Shift Break";
        var EnterShiftMaxBreakHours = "- Enter Shift Max. Break Hours";
        var EnterNoofWorkinghoursWeekly= "- Enter No. of Working hours Weekly";
        var EnterNoofWorkinghoursMonthly= "- Enter No. of Working hours";
        var EnterAllthethree="Enter all the three OT Roundoff values";    
        var EnterHalfDayComoff= "Enter Min Extra Hrs for Half Day Comp Off";
        var EnterFullDayComoff= "Enter Min Extra Hrs for Full Day Comp Off";
        var EnterValidsDays = "Enter Comp Off Validity Days";
        var NoDetails="No Details found!";  
        var EnterLunchDeductionHours = "Enter Lunch Deduction Hours";
        var EnterValidLunchDeductionHours = "Enter Valid Lunch Deduction Hours";
        var EnterValidRangeLunchDeductionHours = "Enter Lunch Deduction Hours between 00:01 and 00:60";
        var FullDayCompOffLessThenHalfDay = 'Full Day Comp Off Not Less Then Half Day Comp Off';
        var SelectWeekStartDay = "Select Week Start Day";
        var SelectWeekEndDay = "Select Week End Day";
        var SelectMonthStartDay = "Select Month Start Day";
        var SelectMonthEndDay = "Select Month End Day";
        var EnterBeforeShiftMax24Hrs="Enter Before Shift Max. Hrs for 24Hrs Shift (hh:mm)";
        var SelectaCompanytoSaveApproval="Select a Company to Save Approval";
        var PleaseEnterNumberofSuccessiveDays="Please Enter Number of Successive Days";
        var NumberofSuccessiveDaysisnotmorethan365="Number of Successive Days is not more than 365";
        var PleaseselectGifJPEGJPGBMPFiles="Please select Gif,JPEG,JPG,BMP Files";
        var EnterValidEmailId="Enter Valid Email Id";
        var EnterUserName ="Enter UserName";
        var EnterPassword="Enter Password";
        //
        //Todo:add license for vaigai
        //
        var EnterLateMintsPerDay="Please Enter Marking First Session as Absent due to lateIn - Minutes / Day";
        var EnterLateDaysPerMonth="Please Enter Marking Every second Day's First Session as LOP due to lateIn - Days / Month";
        var EnterEarlyExitMintsPerDay = "Please Enter Marking Second Session as Absent due to Early Out - Minutes / Day";
        var EnterEarlyExitDaysPerMonth = "Please Enter Marking Every Second Day's Second Session as LOP due to Early Out - Days / Month";
        var EnterMonthlyExceptionBufferHours = "Enter Monthly Exception Buffer Hours";
        var InvalidLateMinsPerDay = "Invalid value in (Marking First Session as Absent due to lateIn - Minutes / Day). Maximum allowed is 90 minutes";
        var InvalidLatInDaysMonth = "Invalid value in (Allowed Late Instance Count / Month (In Days)), It should be within 30 days";
        var InvalidEarlyOutPerDay = "Invalid value in (Marking Second Session as Absent due to Early Out - Minutes / Day). Maximum allowed is 90 minutes";
        var InvalidEarlyOutDaysMonth = "Invalid value in  (Allowed Early Exit Instance Count / Month (In Days)), It should be within 30 days";

        function SetAlertMessages(selectCompany,enterBeforeShiftMaximumHours,entervalidBeforeShiftMaximumHours,enterWeeklyOffShiftStartHours,entervalidWeeklyOffShiftStartHours,enterAfterShiftMaximumHours,entervalidAfterShiftMaximumHours,entervalidTimeInterval,enterTimeInterval,enterDefaultMonthclosureDate,enterallthethreeOTRoundoffvalues,addtheOTRoundoffvaluesbyclickingADDbutton,areyousuretoSave,enterBeforeShiftMaxHours,enterAfterShiftMaxHours,enterShiftBreak,enterShiftMaxBreakHours,enterNoofWorkinghoursWeekly,enterNoofWorkinghoursMonthly,enterAllthethree,noDetails, strHalfDayComoff, strFullDayComoff, strValidsDays
        ,enterLunchDeductionHours,enterValidLunchDeductionHours, VaildHalfDayCompOff,enterValidRangeLunchDeductionHours,enterBeforeShiftMax24Hrs,selectaCompanytoSaveApproval,pleaseEnterNumberofSuccessiveDays,numberofSuccessiveDaysisnotmorethan365,pleaseselectGifJPEGJPGBMPFiles,enterValidEmailId,enterUserName,enterPassword,entermonthlyExceptionBufferHours)
        {
            SelectCompany = selectCompany;
            EnterBeforeShiftMaximumHours = enterBeforeShiftMaximumHours;
            EntervalidBeforeShiftMaximumHours = entervalidBeforeShiftMaximumHours;
            EnterWeeklyOffShiftStartHours = enterWeeklyOffShiftStartHours;
            EntervalidWeeklyOffShiftStartHours = entervalidWeeklyOffShiftStartHours;
            EnterAfterShiftMaximumHours = enterAfterShiftMaximumHours;
            EntervalidAfterShiftMaximumHours = entervalidAfterShiftMaximumHours;   
            EntervalidTimeInterval = entervalidTimeInterval;
            EnterTimeInterval = enterTimeInterval;
            EnterDefaultMonthclosureDate = enterDefaultMonthclosureDate;
            EnterallthethreeOTRoundoffvalues = enterallthethreeOTRoundoffvalues;
            AddtheOTRoundoffvaluesbyclickingADDbutton = addtheOTRoundoffvaluesbyclickingADDbutton;
            AreyousuretoSave = areyousuretoSave;
            EnterBeforeShiftMaxHours = enterBeforeShiftMaxHours;
            EnterAfterShiftMaxHours = enterAfterShiftMaxHours;
            EnterShiftBreak = enterShiftBreak;
            EnterShiftMaxBreakHours = enterShiftMaxBreakHours;
            EnterNoofWorkinghoursWeekly= enterNoofWorkinghoursWeekly;
            EnterNoofWorkinghoursMonthly= enterNoofWorkinghoursMonthly;
            EnterAllthethree = enterAllthethree;
            NoDetails = noDetails; 
            EnterHalfDayComoff= strHalfDayComoff;
            EnterFullDayComoff= strFullDayComoff;
            EnterValidsDays= strValidsDays;
            //Added for lunch deduction parametrs
            EnterLunchDeductionHours=enterLunchDeductionHours;
            EnterValidLunchDeductionHours=enterValidLunchDeductionHours;
            FullDayCompOffLessThenHalfDay = VaildHalfDayCompOff;
            EnterValidRangeLunchDeductionHours=enterValidRangeLunchDeductionHours;
            EnterBeforeShiftMax24Hrs=enterBeforeShiftMax24Hrs;
            SelectaCompanytoSaveApproval=selectaCompanytoSaveApproval;
            PleaseEnterNumberofSuccessiveDays=pleaseEnterNumberofSuccessiveDays;
            NumberofSuccessiveDaysisnotmorethan365=numberofSuccessiveDaysisnotmorethan365;
            PleaseselectGifJPEGJPGBMPFiles=pleaseselectGifJPEGJPGBMPFiles;
            EnterValidEmailId=enterValidEmailId;
            EnterUserName=enterUserName;
            EnterPassword=enterPassword;
            EnterMonthlyExceptionBufferHours=enterMonthlyExceptionBufferHours;
            //        SelectWeekStartDay=selectWeekStartDay;
            //        SelectWeekEndDay=selectWeekEndDay;
            //        SelectMonthStartDay=selectMonthStartDay;
            //        SelectMonthEndDay=selectMonthEndDay;
        }   
        var Monthfourdigit='Please enter valid date as month, day, and four digit year : Format MM/dd/yyyy.';
        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:';
        function ValidateApprovalSettings()
        {            
            var index=document.aspnetForm.ctl00_BodyContentPH_ddlApprovalCompany.selectedIndex;
            var company=document.aspnetForm.ctl00_BodyContentPH_ddlApprovalCompany.options[index].value;
            if(company==0)
            {
                alert(SelectaCompanytoSaveApproval);
                return false;
            }
            return confirm(AreyousuretoSave);
        } 
        function SetAlertCheckDate(monthfourdigit,datefourdigit,invalidyearentry,invalidmonthentry,invaliddateentry,dateformatDDMONYYYY,entertime,valueforhours,invalidvalueforminutes,invalidtimeformat,entervalidDateandTime,validdatemonthMMDDYYHHMM,validdatemonthMMDDYYHHMMTT,entervalidDateandTime,invalidvalueforhours,invalidvalueforminites)
        {
            Monthfourdigit = monthfourdigit;
            Datefourdigit=datefourdigit;
            Invalidyearentry = invalidyearentry;
            Invalidmonthentry = invalidmonthentry;
            Invaliddateentry = invaliddateentry;
            DateformatDDMONYYYY = dateformatDDMONYYYY;
            Entertime = Entertime;
            Valueforhours = valueforhours;
            Invalidvalueforminutes = invalidvalueforminutes;
            Invalidtimeformat = invalidtimeformat;
            EntervalidDateandTime = entervalidDateandTime;
            ValiddatemonthMMDDYYHHMM = validdatemonthMMDDYYHHMM;
            ValiddatemonthMMDDYYHHMMTT = validdatemonthMMDDYYHHMMTT;
            EntervalidDateandTime = entervalidDateandTime;
            Invalidvalueforhours = invalidvalueforhours;
            Invalidvalueforminites = invalidvalueforminites;
        }
        function ShowOTParameter()
        {   
            if(document.getElementById('ctl00_BodyContentPH_rbtnOTEnable').checked==true)
            {            
                document.getElementById('ctl00_BodyContentPH_divOTParameter').style.display="block";  
                document.getElementById('ctl00_BodyContentPH_divOTRoundoff').style.display="block";                   
            }    
            if(document.getElementById('ctl00_BodyContentPH_rbtnOTDisable').checked==true)
            {
                document.getElementById('ctl00_BodyContentPH_divOTParameter').style.display="none";  
                document.getElementById('ctl00_BodyContentPH_divOTRoundoff').style.display="none";  
            }    
            return true;
        }
        function ShowFlexibleParameter()
        {   
            if(document.aspnetForm.ctl00_BodyContentPH_rbtnYes.checked==true)
            {          
                document.getElementById('ctl00_BodyContentPH_divFlexibleParameter').style.display="block";
                document.getElementById('ctl00_BodyContentPH_trFlexiOverTime').style.display="block";                    
            }
            if(document.aspnetForm.ctl00_BodyContentPH_rbtnNo.checked==true)
            {
                document.getElementById('ctl00_BodyContentPH_divFlexibleParameter').style.display="none";          
                document.getElementById('ctl00_BodyContentPH_trFlexiOverTime').style.display="none";          
            }    
            return true;
        }
        function ShowLuchDeductionParameter()
        {   
            if(document.aspnetForm.ctl00_BodyContentPH_rbtnYesLunch.checked==true)
            {         
                document.getElementById('ctl00_BodyContentPH_txtDeductionHours').disabled=false;                   
            }
            if(document.aspnetForm.ctl00_BodyContentPH_rbtnNoLunch.checked==true)
            {
                document.getElementById('ctl00_BodyContentPH_txtDeductionHours').disabled=true;
                document.getElementById('ctl00_BodyContentPH_txtDeductionHours').value=""          
            }
            return true;
        }
        function AddOTParameter()
        { 
            ajaxOTRoundoff(EnterAllthethree,NoDetails);
            return false;
        }    
        function AssignCompanyId()
        { 
            var index=document.aspnetForm.ctl00_BodyContentPH_ddlCompany.selectedIndex;
            var company=document.aspnetForm.ctl00_BodyContentPH_ddlCompany.options[index].value;
            if(company==0)
            {
                document.aspnetForm.ctl00_BodyContentPH_chkboxAfterShiftTime.checked = false;
                document.aspnetForm.ctl00_BodyContentPH_chkboxBeforeShiftTime.checked = false;
                //alert(SelectCompany);
                clearContentsGeneral();
                document.aspnetForm.ctl00_BodyContentPH_ddlCompany.focus();            
                document.aspnetForm.ctl00_BodyContentPH_ddlCompany.focus();
                return false;
            }
            document.getElementById('ctl00_BodyContentPH_hdfCompanyId').value = company;
            ajaxOTRoundoffModify(); 
            return false;
        }
        function AssignCompanyIdForOT()
        { 
            var index=document.aspnetForm.ctl00_BodyContentPH_ddlCompanyOT.selectedIndex;
            var company=document.aspnetForm.ctl00_BodyContentPH_ddlCompanyOT.options[index].value;
            if(company==0)
            {
                document.aspnetForm.ctl00_BodyContentPH_chkboxAfterShiftTime.checked = false;
                document.aspnetForm.ctl00_BodyContentPH_chkboxBeforeShiftTime.checked = false;
                //alert(SelectCompany);
                ClearContentsOT();
                document.aspnetForm.ctl00_BodyContentPH_ddlCompany.focus();            
                document.aspnetForm.ctl00_BodyContentPH_ddlCompany.focus();
                return false;
            }
            document.getElementById('ctl00_BodyContentPH_hdfCompanyId').value = company;
            ajaxOTCompOff(); 
            return false;
        }
        function GettingApprovalSettingDetails()
        {
            var index=document.aspnetForm.ctl00_BodyContentPH_ddlApprovalCompany.selectedIndex;
            var company=document.aspnetForm.ctl00_BodyContentPH_ddlApprovalCompany.options[index].value;
            if(company==0)
            {
                clearApprovalsettings();
                document.aspnetForm.ctl00_BodyContentPH_ddlApprovalCompany.focus();            
                return false;
            }
            ajaxApprovalSettings(company); 
            return false;
        }
        function DomainTest()
        {
            var DomainName = document.getElementById("ctl00_BodyContentPH_txt_DomainName").value;
            var DomainUserName = document.getElementById("ctl00_BodyContentPH_txt_AdminUserName").value;
            var DomainPassword = document.getElementById("ctl00_BodyContentPH_txt_AdminPassword").value;
            ajaxDomainSettings(DomainName,DomainUserName,DomainPassword);
            return false;
        }
        function clearApprovalsettings()
        {     
            document.getElementById('ctl00_BodyContentPH_rbtnYesPattern').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoPattern').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnYesRoster').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoRoster').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnYesManualEntry').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoManualEntry').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnYesApproval').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoApproval').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnYesLeaveSanction').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoLeaveSanction').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnYesOnDutyEntry').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoOnDutyEntry').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnYesPermissionSanction').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoPermissionSanction').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnYesOTApproval').checked=false;
            document.getElementById('ctl00_BodyContentPH_rbtnNoOTApproval').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnCompressedWorkYes').checked = false;
            document.getElementById('ctl00_BodyContentPH_rbtnCompressedWorkNo').checked = true;
            document.getElementById('ctl00_BodyContentPH_txtMinWeeklyHours').value = '';
            document.getElementById('divMinWeeklyHoursContainer').style.display = 'none';
        }
        function ShowHideMinWeeklyHours() {
            var yesRb = document.getElementById('ctl00_BodyContentPH_rbtnCompressedWorkYes');
            var div = document.getElementById('divMinWeeklyHoursContainer');
            var rfv = document.getElementById('ctl00_BodyContentPH_rfvMinWeeklyHours');
            var rev = document.getElementById('ctl00_BodyContentPH_revMinWeeklyHours');
            if (yesRb.checked) {
                div.style.display = 'inline-block';
                ValidatorEnable(rfv, true);
                ValidatorEnable(rev, true);
            } else {
                div.style.display = 'none';
                ValidatorEnable(rfv, false);
                ValidatorEnable(rev, false);
            }
        }
        function clearContentsGeneral()
        {     
            document.getElementById('ctl00_BodyContentPH_txtBeforeShiftMax').value='';
            document.getElementById('ctl00_BodyContentPH_txtAfterShiftMax').value='02:00';
            document.getElementById('ctl00_BodyContentPH_txtBeforeShiftMax_24HrsShift').value='';
            document.getElementById('ctl00_BodyContentPH_txtMonthClosureDate').value='';	   
            document.getElementById('ctl00_BodyContentPH_divFlexibleParameter').style.display="none";
            document.getElementById('ctl00_BodyContentPH_trFlexiOverTime').style.display="none";          
            document.getElementById('ctl00_BodyContentPH_rbtnNo').checked=true;
            document.getElementById('ctl00_BodyContentPH_rbtnIndividualEmployee').checked=true;
            document.getElementById('ctl00_BodyContentPH_hdf_controlID').value='';
            document.getElementById('ctl00_BodyContentPH_divOTRoundoff').innerHTML=''
            document.getElementById("ctl00_BodyContentPH_txtWeekOffStartHours").value='';
            document.getElementById("ctl00_BodyContentPH_txtWeekOffStartHours_24HrsShift").value='';
            document.getElementById("ctl00_BodyContentPH_rbtIgnoreDuplicatesYes").checked=false;
            document.getElementById("ctl00_BodyContentPH_rbtIgnoreDuplicatesNo").checked=true;
            document.getElementById("ctl00_BodyContentPH_txtTimeInterval").value='';
            document.getElementById("ctl00_BodyContentPH_txtNoOfSuccessiveDays").value='';
            document.getElementById("ctl00_BodyContentPH_txtCompensationDays").value='';        
            document.getElementById("ctl00_BodyContentPH_rbtnYesLunch").checked=false;
            document.getElementById("ctl00_BodyContentPH_rbtnNoLunch").checked=true;
            document.getElementById("ctl00_BodyContentPH_txtDeductionHours").value='';
            document.getElementById('ctl00_BodyContentPH_txtDeductionHours').disabled=true;
            document.getElementById('ctl00_BodyContentPH_txtExceptionHours').value="";
            document.getElementById('ctl00_BodyContentPH_txtDefaultLunch').value="";
            document.getElementById('ctl00_BodyContentPH_txtLunchHrs').value="";  
            document.getElementById('ctl00_BodyContentPH_txtMonthlyExceptionBufferHrs').value="";  
        }    
        function ClearContentsOT()
        {
            document.getElementById('ctl00_BodyContentPH_trFlexiOverTime').style.display="none";   
            document.getElementById('ctl00_BodyContentPH_chkboxAfterShiftTime').checked=false;
            document.getElementById('ctl00_BodyContentPH_chkboxBeforeShiftTime').checked=false;
            document.getElementById("ctl00_BodyContentPH_txt_OvertmeOnholidays").value='';
            document.getElementById('ctl00_BodyContentPH_txt_OvertimeOnWeeklyOff').value='';
            document.getElementById('ctl00_BodyContentPH_rbtnWeekoff').checked=true;
            document.getElementById('ctl00_BodyContentPH_divOTParameter').style.display="none";        
            document.getElementById('ctl00_BodyContentPH_divOTRoundoff').style.display="none";  
            document.getElementById('ctl00_BodyContentPH_rbtnOTDisable').checked=true;      
            document.getElementById("ctl00_BodyContentPH_txtHalfDayComoff").value='';
            document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").value='';
            document.getElementById("ctl00_BodyContentPH_txtValidsDays").value='';

            document.getElementById("ctl00_BodyContentPH_txtspecialOvertim1").value='';
            document.getElementById("ctl00_BodyContentPH_txtspecialOvertim2").value='';

            document.getElementById('ctl00_BodyContentPH_rbtnDefinedWorkHoursNo').checked=true;
        }
        function validationShiftSetting()
        {   
            var DemoType="<%=Session["Demo"] %>";
            var rangeDemoFormat ="HH:mm" ;
            var rangeDemoFormats = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var reExHoursMinitues=/^([0-1][0-9]|[2][0-3]):([0-5][0-9])$/;     
            var reExHoursWeeklyMonthly=/^((\d+):([0-5][0-9]))$/;   
            var index=document.aspnetForm.ctl00_BodyContentPH_ddlCompany.selectedIndex;
            var company=document.aspnetForm.ctl00_BodyContentPH_ddlCompany.options[index].value;
            if(company==0)
            {
                alert(SelectCompany);
                document.aspnetForm.ctl00_BodyContentPH_ddlCompany.focus();
                return false;
            }   
            

            if (document.getElementById("ctl00_BodyContentPH_txtMonthClosureDate").value=='')
            {
                alert(EnterDefaultMonthclosureDate);
                document.getElementById("ctl00_BodyContentPH_txtMonthClosureDate").focus();
                return false;
            }
            else 
            {
                var weekDay=document.getElementById("ctl00_BodyContentPH_txtMonthClosureDate");
                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.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").value.length==0)
            {
                alert(EnterBeforeShiftMaximumHours);
                document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").focus();
                return false;
            }
            else if(document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").value.length!=0)
            {    
                if (document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").value.search(reExHoursMinitues)==-1)   
                {            
                    alert(EnterBeforeShiftMaximumHours);
                    document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").focus();
                    return false;
                }
            }
            if(document.getElementById("ctl00_BodyContentPH_txtMonthlyExceptionBufferHrs").value.length==0)
            {
                alert(EnterMonthlyExceptionBufferHours);
                // document.getElementById("ctl00_BodyContentPH_txtMonthlyExceptionBufferHrs").focus();
                return false;
            }
            else if(document.getElementById("ctl00_BodyContentPH_txtMonthlyExceptionBufferHrs").value.length!=0)
            {    
                if (document.getElementById("ctl00_BodyContentPH_txtMonthlyExceptionBufferHrs").value.search(reExHoursMinitues)==-1)   
                {            
                    alert(EnterMonthlyExceptionBufferHours);
                    document.getElementById("ctl00_BodyContentPH_txtMonthlyExceptionBufferHrs").focus();
                    return false;
                }
            }
            if(document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax_24HrsShift").value.length==0)
            {
                alert(EnterBeforeShiftMax24Hrs);
                document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax_24HrsShift").focus();
                return false;
            }
            else if(document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax_24HrsShift").value.length!=0)
            {    
                if (document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax_24HrsShift").value.search(reExHoursMinitues)==-1)   
                {            
                    alert(EnterBeforeShiftMax24Hrs);
                    document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax_24HrsShift").focus();
                    return false;
                }
            }
            if (document.getElementById("ctl00_BodyContentPH_rbtIgnoreDuplicatesYes").checked) 
            {
                if (document.getElementById("ctl00_BodyContentPH_txtTimeInterval").value == '00:00')
                {
                    alert(EntervalidTimeInterval);
                    document.getElementById("ctl00_BodyContentPH_txtTimeInterval").focus();
                    return false; 
                }
                else if (document.getElementById("ctl00_BodyContentPH_txtTimeInterval").value == '')
                {
                    alert(EnterTimeInterval);
                    document.getElementById("ctl00_BodyContentPH_txtTimeInterval").focus();
                    return false; 
                }
                else if (document.getElementById("ctl00_BodyContentPH_txtTimeInterval").value.search(reExHoursMinitues)==-1)   
                {
                    alert(EntervalidTimeInterval);
                    document.getElementById("ctl00_BodyContentPH_txtTimeInterval").focus();
                    return false; 
                }
            }
            else
            {
                document.getElementById("ctl00_BodyContentPH_txtTimeInterval").value = "";
            }
            var PackageId = '<%= Session["packageID"] %>';

            if (PackageId=="" || PackageId >= "159") {
                if (document.getElementById("ctl00_BodyContentPH_txtLatePerDay").value.length==0)
                {
                    alert(EnterLateMintsPerDay);
                    document.getElementById("ctl00_BodyContentPH_txtLatePerDay").focus();
                    return false;
                }
                if (document.getElementById("ctl00_BodyContentPH_txtLatePerDay").value > 90)
                {
                    alert(InvalidLateMinsPerDay);
                    document.getElementById("ctl00_BodyContentPH_txtLatePerDay").focus();
                    return false;
                }
                if (document.getElementById("ctl00_BodyContentPH_txtLateMonth").value.length==0)
                {
                    alert(EnterLateDaysPerMonth);
                    document.getElementById("ctl00_BodyContentPH_txtLateMonth").focus();
                    return false;
                }
                if (document.getElementById("ctl00_BodyContentPH_txtLateMonth").value > 30)
                {
                    alert(InvalidLatInDaysMonth);
                    document.getElementById("ctl00_BodyContentPH_txtLateMonth").focus();
                    return false;
                }

                if (document.getElementById("ctl00_BodyContentPH_txtEarlyExitPerDay").value.length==0)
                {
                    alert(EnterEarlyExitMintsPerDay);
                    document.getElementById("ctl00_BodyContentPH_txtEarlyExitPerDay").focus();
                    return false;
                }
            
                if (document.getElementById("ctl00_BodyContentPH_txtEarlyExitPerDay").value > 90)
                {
                    alert(InvalidEarlyOutPerDay);
                    document.getElementById("ctl00_BodyContentPH_txtEarlyExitPerDay").focus();
                    return false;
                }
                if (document.getElementById("ctl00_BodyContentPH_txtEarlyExitDayperMonth").value.length==0)
                {
                    alert(EnterEarlyExitDaysPerMonth);
                    document.getElementById("ctl00_BodyContentPH_txtEarlyExitDayperMonth").focus();
                    return false;
                }
                if (document.getElementById("ctl00_BodyContentPH_txtEarlyExitDayperMonth").value > 30)
                {
                    alert(InvalidEarlyOutDaysMonth);
                    document.getElementById("ctl00_BodyContentPH_txtEarlyExitDayperMonth").focus();
                    return false;
                }
                

            }
            if (document.getElementById("ctl00_BodyContentPH_rbtnYesLunch").checked) 
            {
                if(document.getElementById("ctl00_BodyContentPH_txtDeductionHours").value.length==0)
                {
                    alert(EnterLunchDeductionHours);
                    document.getElementById("ctl00_BodyContentPH_txtDeductionHours").focus();
                    return false;
                }
                else if(document.getElementById("ctl00_BodyContentPH_txtDeductionHours").value.length!=0)
                {    
                    if (document.getElementById("ctl00_BodyContentPH_txtDeductionHours").value.search(reExHoursMinitues)==-1)   
                    {            
                        alert(EnterValidLunchDeductionHours);
                        document.getElementById("ctl00_BodyContentPH_txtDeductionHours").focus();
                        return false;
                    }
                    var splittedValue=document.aspnetForm.ctl00_BodyContentPH_txtDeductionHours.value.split(":");        
                    var HoursToMinutes=splittedValue[0]*60;
                    HoursToMinutes=parseInt(HoursToMinutes)+parseInt(splittedValue[1]);
                    if(HoursToMinutes>60 || HoursToMinutes <=0)
                    {
                        alert(EnterValidRangeLunchDeductionHours);           
                        document.aspnetForm.ctl00_BodyContentPH_txtDeductionHours.focus();
                        return false;
                    }
                }
            }            
            if(document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").value.length==0)
            {
                alert(EnterAfterShiftMaximumHours);
                //document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").focus();
                return false;
            }        
            else if(document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").value.length!=0)
            {
                if (document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").value.search(reExHoursMinitues)==-1)   
                {
                    alert(EntervalidAfterShiftMaximumHours);
                    document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").focus();
                    return false; 
                }
            }       
            if(document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").value=='00:00')
            {
                alert(EntervalidBeforeShiftMaximumHours);
                document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").focus();
                return false; 
            } 
            if (document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").value=='00:00')
            {
                alert(EntervalidAfterShiftMaximumHours);
                document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").focus();
                return false;          
            }
            if(document.getElementById("ctl00_BodyContentPH_txtWeekOffStartHours").value.length==0)
            {
                alert(EnterWeeklyOffShiftStartHours);
                document.getElementById("ctl00_BodyContentPH_txtWeekOffStartHours").focus();
                return false;
            }
            else if(document.getElementById("ctl00_BodyContentPH_txtWeekOffStartHours").value.length!=0)
            {    
                if (document.getElementById("ctl00_BodyContentPH_txtWeekOffStartHours").value.search(reExHoursMinitues)==-1)   
                {
                    alert(EntervalidWeeklyOffShiftStartHours);
                    document.getElementById("ctl00_BodyContentPH_txtWeekOffStartHours").focus();
                    return false;
                }
            }   
            if(document.getElementById("ctl00_BodyContentPH_txtNoOfSuccessiveDays").value.length==0)
            {
                alert(PleaseEnterNumberofSuccessiveDays);
                document.getElementById("ctl00_BodyContentPH_txtNoOfSuccessiveDays").focus();
                return false;
            }
            if(document.getElementById("ctl00_BodyContentPH_txtNoOfSuccessiveDays").value>365)
            {
                alert(NumberofSuccessiveDaysisnotmorethan365);
                document.getElementById("ctl00_BodyContentPH_txtNoOfSuccessiveDays").focus();
                return false;
            }
            if(document.aspnetForm.ctl00_BodyContentPH_rbtnOTEnable.checked==true)
            {
                //alert(document.getElementById("ctl00_BodyContentPH_hdf_controlID").value);
                if(document.getElementById("ctl00_BodyContentPH_hdf_controlID").value>0)
                {
                    var from,to,roundedAs,i;
                    i= parseInt(document.getElementById("ctl00_BodyContentPH_hdf_controlID").value);
                    from = 'txt_From'+i;   
                    to = 'txt_To'+i;
                    roundedAs = 'txt_RoundedAs'+i;
                    if(document.getElementById(from)!=null && document.getElementById(to)!=null && document.getElementById(roundedAs)!=null)                 
                    {
                        from = document.getElementById(from).value; 
                        to = document.getElementById(to).value; 
                        roundedAs = document.getElementById(roundedAs).value;
                        if(from=='' || to=='' || roundedAs=='')
                        {
                            alert(EnterallthethreeOTRoundoffvalues);
                            return false;
                        } 
                    }
                }
                else
                {
                    alert(AddtheOTRoundoffvaluesbyclickingADDbutton);
                    return false;
                }
            }
            return confirm(AreyousuretoSave);
        }  
        function ValidationShiftOT()
        {
            var DemoType="<%=Session["Demo"] %>";
            var rangeDemoFormat ="HH:mm" ;
            var rangeDemoFormats = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var reExHoursMinitues=/^([0-1][0-9]|[2][0-3]):([0-5][0-9])$/;     
            var reExHoursWeeklyMonthly=/^((\d+):([0-5][0-9]))$/;   
            var index=document.aspnetForm.ctl00_BodyContentPH_ddlCompanyOT.selectedIndex;
            var company=document.aspnetForm.ctl00_BodyContentPH_ddlCompanyOT.options[index].value;
            if(company==0)
            {
                alert(SelectCompany);
                document.aspnetForm.ctl00_BodyContentPH_ddlCompanyOT.focus();
                return false;
            }      
            if(DemoType!="Express")
            {
                if(document.getElementById("ctl00_BodyContentPH_txtHalfDayComoff").value.length==0)
                {
                    alert(EnterHalfDayComoff);
                    document.getElementById("ctl00_BodyContentPH_txtHalfDayComoff").focus();
                    return false;
                }
                else if(document.getElementById("ctl00_BodyContentPH_txtHalfDayComoff").value.length!=0)
                {
                    if (document.getElementById("ctl00_BodyContentPH_txtHalfDayComoff").value.search(reExHoursMinitues)==-1)
                    {            
                        alert(EntervalidTimeInterval);
                        document.getElementById("ctl00_BodyContentPH_txtHalfDayComoff").focus();
                        return false;
                    }
                }         
                if(document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").value.length==0)
                {
                    alert(EnterFullDayComoff);
                    document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").focus();
                    return false;
                }
                else if(document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").value.length!=0)
                {
                    if (document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").value.search(reExHoursMinitues)==-1)
                    {
                        alert(EntervalidTimeInterval);
                        document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").focus();
                        return false;
                    }
                }        
                var FullDay = document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").value;
                var HalfDay = document.getElementById("ctl00_BodyContentPH_txtHalfDayComoff").value;
                if((FullDay.replace(':', '.')) < (HalfDay.replace(':', '.')))
                {
                    alert(FullDayCompOffLessThenHalfDay);
                    document.getElementById("ctl00_BodyContentPH_txtFullDayComoff").focus();
                    return false;
                }        
                if(document.getElementById("ctl00_BodyContentPH_txtValidsDays").value.length==0)
                {
                    alert(EnterValidsDays);
                    document.getElementById("ctl00_BodyContentPH_txtValidsDays").focus();
                    return false;
                }
            }
            if(document.getElementById('ctl00_BodyContentPH_txtspecialOvertim1').value=="" && document.getElementById('ctl00_BodyContentPH_txtspecialOvertim2').value!="")
            {
                alert("Enter the value of special overtime 1");
                return false;
            }
            if(document.getElementById('ctl00_BodyContentPH_txtspecialOvertim1').value=="0" && document.getElementById('ctl00_BodyContentPH_txtspecialOvertim2').value!="0")
            {
                alert("Enter the value of special overtime 1");
                return false;
            }
            return confirm(AreyousuretoSave);
        }
        function Save_Conf() {
            //Alert_AreyousuretoDelete
            return confirm(AreyousuretoSave);
        }
        function chck(){             
            if(document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").value=='')
            {
                alert(EnterBeforeShiftMaxHours);
                document.getElementById("ctl00_BodyContentPH_txtBeforeShiftMax").focus();
                return false;
            }        
            if(document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").value=='')
            {
                alert(EnterAfterShiftMaxHours);
                document.getElementById("ctl00_BodyContentPH_txtAfterShiftMax").focus();
                return false;
            }
            if(document.getElementById("ctl00_BodyContentPH_txtShiftBreak").value=='')
            {
                alert(EnterShiftBreak);
                document.getElementById("ctl00_BodyContentPH_txtShiftBreak").focus();
                return false;
            }
            if(document.getElementById("ctl00_BodyContentPH_txtShiftMaxBreak").value=='')
            {
                alert(EnterShiftMaxBreakHours);
                document.getElementById("ctl00_BodyContentPH_txtShiftMaxBreak").focus();
                return false;
            }
            if(document.getElementById("ctl00_BodyContentPH_txtWorkingHoursWeek").value=='')
            {
                alert(EnterNoofWorkinghoursWeekly);
                document.getElementById("ctl00_BodyContentPH_txtWorkingHoursWeek").focus();
                return false;
            }
            if(document.getElementById("ctl00_BodyContentPH_txtWorkingHoursMonth").value=='')
            {
                alert(EnterNoofWorkinghoursMonthly);
                document.getElementById("ctl00_BodyContentPH_txtWorkingHoursMonth").focus();
                return false;
            }
            return confirm(AreyousuretoSave);
        }
        function numericval(e)
        {
            var keycode;
            if (window.event) keycode = window.event.keyCode;
            else if (event) keycode = event.keyCode;
            else if (e) keycode = e.which;
            else return true;
            if(!(keycode == 58 && e.value.indexOf(":") > -1))
            {
                if(keycode >= 48 && keycode <= 58 )
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return false;
            }        
            return true;
        }
        function DynamicDatePicker(Format,txtBoxId)
        {
            try
            {
                var rangeDemoFormat = Format;
                var rangeDemoConv = new AnyTime.Converter({format:rangeDemoFormat});                        
                $("#" + txtBoxId).AnyTime_picker({format:rangeDemoFormat});
            }
            catch(err)
            {
            }
        }    
        function DisplayLevel()
        {
            if(document.aspnetForm.ctl00_BodyContentPH_rbtIgnoreDuplicatesYes.checked == true)
            {
                document.getElementById('ctl00_BodyContentPH_txtTimeInterval').disabled=false;
            }
            else
            {
                document.getElementById('ctl00_BodyContentPH_txtTimeInterval').disabled=true;
            }    
        }
        function CheckReportMan(){       
            if(document.getElementById("ctl00_BodyContentPH_ddlWeekStartDay").value=='0')
            {
                alert(SelectWeekStartDay);
                document.getElementById("ctl00_BodyContentPH_ddlWeekStartDay").focus();
                return false;
            }        
            if(document.getElementById("ctl00_BodyContentPH_ddlWeekEndDay").value=='0')
            {
                alert(SelectWeekEndDay);
                document.getElementById("ctl00_BodyContentPH_ddlWeekEndDay").focus();
                return false;
            }
            if(document.getElementById("ctl00_BodyContentPH_ddlMonthStrDate").value=='0')
            {
                alert(SelectMonthStartDay);
                document.getElementById("ctl00_BodyContentPH_ddlMonthStrDate").focus();
                return false;
            }        
            if(document.getElementById("ctl00_BodyContentPH_ddlMonthEndDate").value=='0')
            {
                alert(SelectMonthEndDay);
                document.getElementById("ctl00_BodyContentPH_ddlMonthEndDate").focus();
                return false;
            }
        }
    </script>
    <script type="text/javascript">
        $( document ).ready(function() {
            var options = document.getElementById('ctl00_BodyContentPH_ddlWeekEndDay');
            for (var i=0; i<options.length; i++) {
                options[i].disabled = false;
            }
        }); 
        function ddlWeekStartDayOnChange(startdate)
        {
            var options = document.getElementById('ctl00_BodyContentPH_ddlWeekEndDay');
            for (var i=0; i<options.length; i++) {
                options[i].disabled = false;
            }
            if(startdate==1)
            {
                options.selectedIndex=7;
                $("#ctl00_BodyContentPH_ddlWeekEndDay").select2("val", 7);
                options[0].disabled = true;
            }
            else
            {
                options.selectedIndex=startdate-1;
                $("#ctl00_BodyContentPH_ddlWeekEndDay").select2("val", startdate-1);
                options[startdate-1].disabled = true;
            }
            $(".select2").select2();
        }
    </script>
    <script type="text/javascript">
        function ddlMonthStartDateOnChange(startdate)
        {
            var options = document.getElementById('ctl00_BodyContentPH_ddlMonthEndDate');
            for (var i=0; i<options.length; i++) {
                options[i].disabled = false;
            }
            if(startdate==1)
            {
                options.selectedIndex=31;
                $("#ctl00_BodyContentPH_ddlMonthEndDate").select2("val", 31);
                options[0].disabled = true;
            }
            else
            {
                options.selectedIndex=startdate-1;
                $("#ctl00_BodyContentPH_ddlMonthEndDate").select2("val", startdate-1);
                options[startdate-1].disabled = true;
            }
            $(".select2").select2();
        }    
        function clickshiftsettings()
        {                
            $('#tablist a[href="#ctl00_BodyContentPH_tab1"]').tab('show');
            if(<%= Convert.ToString(Session["payrollConfig"]) %>==1)
            {
                $('#ctl00_BodyContentPH_lblMandat').text("11 No.");
            }
            else
            {
                $('#ctl00_BodyContentPH_lblMandat').text("11 No.");
            }
            $('html, body').animate({ scrollTop: 0 }, 'slow');
            //             $('#ctl00_BodyContentPH_lblMandat2').text("8 No.");
        }
        function clickOverTime()
        {
            $('#tablist a[href="#ctl00_BodyContentPH_tab2"]').tab('show');
            $('#ctl00_BodyContentPH_lblMandat').text("4 No.");
            $('html, body').animate({ scrollTop: 0 }, 'slow');
            //        $('#ctl00_BodyContentPH_lblMandat2').text("4 No.");
        }
        function clickReportSettings()
        {
            var WeekStartDay ='<%= Session["WeekStartDay"]%>';
            var MonthStartDay ='<%= Session["MonthStartDay"]%>';
            $('#tablist a[href="#ctl00_BodyContentPH_tab3"]').tab('show');
            $('#ctl00_BodyContentPH_lblMandat').text("0 No.");
            $('html, body').animate({ scrollTop: 0 }, 'slow');
            disableendday(WeekStartDay,1);
            disableendday(MonthStartDay,2);
        }
        function clickApprovalSettings()
        {            
            $('#tablist a[href="#ctl00_BodyContentPH_tab4"]').tab('show');
            $('#ctl00_BodyContentPH_lblMandat').text("1 No.");
            $('html, body').animate({ scrollTop: 0 }, 'slow');
        }
        function clickMyPreferencesSettings()
        {
            $('#tablist a[href="#ctl00_BodyContentPH_tab5"]').tab('show');
            $('#ctl00_BodyContentPH_lblMandat').text("0 No.");
            $('html, body').animate({ scrollTop: 0 }, 'slow');
            GetRadioButtonListSelectedValue();
        }
        function MailConfiguration()
        {
            $('#tablist a[href="#ctl00_BodyContentPH_tab6"]').tab('show');
            $('#ctl00_BodyContentPH_lblMandat').text("3 No.");
            $('html, body').animate({ scrollTop: 0 }, 'slow');
        }
    </script>
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/shift-icon.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 class="row" style="display: none">
            <div class="col-md-12">
                <span style="color: red">* </span>
                <asp:Label ID="lbl_Error" runat="server" ForeColor="Red"></asp:Label>
            </div>
        </div>
    </div>
    <div class="content">
        <div class="respos-tab1">
            <ul class="nav nav-tabs responsive-tabs tab-header" id="tablist">
                <li id="liGeneral" runat="server"><a href="#ctl00_BodyContentPH_tab1" onclick="return clickshiftsettings();">
                    <img src="../dist/img/settings.png" class="padding-right-5" />
                    <asp:Label ID="lblGeneralTab" runat="server" Text="General"></asp:Label>
                    <div class="pull-right shiftVisibleman">
                        <span style="color: Red">|</span>
                        <asp:Label ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                        (<asp:Label ID="lblMandat2" runat="server" Text="11 No." Style="padding-right: 0px"></asp:Label>)
                    </div>
                </a></li>
                <li id="liOTCompoff" runat="server"><a href="#ctl00_BodyContentPH_tab2" onclick="return clickOverTime();">
                    <img src="../dist/img/over-time-Settings.png" class="padding-right-5" />
                    <asp:Label ID="lblOTCompTab" runat="server" Text="OT & Comp Off"></asp:Label>
                    <div class="pull-right shiftVisibleman">
                        <span style="color: Red">|</span>
                        <asp:Label ID="lbl_IndicatesMandatoryFields2" runat="server"></asp:Label>
                        (<asp:Label ID="Label12" runat="server" Text="4 No." Style="padding-right: 0px"></asp:Label>)
                    </div>
                </a>
                </li>
                <li id="lirepConfig" runat="server"><a href="#ctl00_BodyContentPH_tab3" onclick="return clickReportSettings();">
                    <img src="../dist/img/RptSettings.png" class="padding-right-5" />
                    <asp:Label ID="lblReportConfigTab" runat="server" Text="Report Config."></asp:Label>
                    <div class="pull-right shiftVisibleman">
                        <span style="color: Red">|</span>
                        <asp:Label ID="lbl_IndicatesMandatoryFields3" runat="server"></asp:Label>
                        (<asp:Label ID="Label5" runat="server" Text="0 No." Style="padding-right: 0px"></asp:Label>)
                    </div>
                </a></li>
                <li id="liApproval" runat="server"><a href="#ctl00_BodyContentPH_tab4" onclick="return clickApprovalSettings();">
                    <img src="../dist/img/org-approval.png" class="padding-right-5" />
                    <asp:Label ID="lblApprovalTab" runat="server" Text="Approval"></asp:Label>
                    <div class="pull-right shiftVisibleman">
                        <span style="color: Red">|</span>
                        <asp:Label ID="lbl_IndicatesMandatoryFields4" runat="server"></asp:Label>
                        (<asp:Label ID="Label6" runat="server" Text="1 No." Style="padding-right: 0px"></asp:Label>)
                    </div>
                </a></li>
                <li id="liMailConfig" runat="server"><a href="#ctl00_BodyContentPH_tab6" onclick="return MailConfiguration();">
                    <img src="../dist/img/org-mail.png" class="padding-right-5" />
                    <asp:Label ID="lblMailTab" runat="server" Text="Mail Config."></asp:Label>
                    <div class="pull-right shiftVisibleman">
                        <span style="color: Red">|</span>
                        <asp:Label ID="lbl_IndicatesMandatoryFields5" runat="server"></asp:Label>
                        (<asp:Label ID="Label7" runat="server" Text="3 No." Style="padding-right: 0px"></asp:Label>)
                    </div>
                </a></li>
                <li id="liMyPref" runat="server"><a href="#ctl00_BodyContentPH_tab5" onclick="return clickMyPreferencesSettings();">
                    <img src="../dist/img/org-branding.png" class="padding-right-5" />
                    <asp:Label ID="lblMyPrefTab" runat="server" Text="My Preferences"></asp:Label>
                    <div class="pull-right shiftVisibleman">
                        <span style="color: Red">|</span>
                        <asp:Label ID="lbl_IndicatesMandatoryFields6" runat="server"></asp:Label>
                        (<asp:Label ID="Label8" runat="server" Text="0 No." Style="padding-right: 0px"></asp:Label>)
                    </div>
                </a></li>
                <li class="pull-right empadd-man">
                    <h6>
                        <span style="color: Red">|</span><asp:Label ID="lbl_Man" runat="server" Text="Mandatory"></asp:Label>
                        (<asp:Label ID="lblMandat" runat="server"
                            Style="padding-right: 0px"></asp:Label>)
                    </h6>
                </li>
            </ul>
            <div class="tab-content">
                <!--TAB 1-->
                <div class="tab-pane active" id="tab1" runat="server">
                    <div class="form-horizontal">
                        <!--1-->
                        <div class="config-hdr con-spc">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lbl_CompanyDetails" runat="server" Text="Company Details"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblCompany" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:DropDownList ID="ddlCompany" runat="server" AppendDataBoundItems="true"
                                                AutoPostBack="True" onchange="return AssignCompanyId(this.value);" CssClass="form-control select2 Man-dat">
                                                <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="Default Settings" Value="-1">
                                                </asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="config-hdr">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lblDataProcess" runat="server" Text="Data Process Setting"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_MonthClosureDate" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtMonthClosureDate" runat="server" CssClass="form-control man-dat"
                                                MaxLength="11" oncut="return false;"></asp:TextBox>
                                            <asp:CustomValidator ID="CVMonthClosureDate" runat="server" EnableClientScript="False"
                                                ErrorMessage="" OnServerValidate="CompareTodate" Display="None"></asp:CustomValidator>
                                        </div>
                                        <%--Manikandan--%>
                                        <div class="col-sm-3 con-top" id="lblExceptionHrs" runat="server">
                                            <asp:Label ID="lblTestHours" runat="server" Text="Exception Hours"></asp:Label>
                                        </div>
                                        <div class="col-sm-3" id="txtExceptionHrs" runat="server">
                                            <asp:TextBox onpaste="return true" ID="txtExceptionHours" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" MaxLength="5" onDrop="return false" onkeypress="return number_dot(event,this)"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_ShiftMax" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtBeforeShiftMax" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" onDrop="return false" MaxLength="5" onkeypress="return number_dot(event,this)"></asp:TextBox>
                                        </div>
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_ShiftMax_24HrsShift" Text="Before Shift Max. Hrs for 24 Hrs Shift ( hh:mm )"
                                                runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtBeforeShiftMax_24HrsShift" runat="server"
                                                CssClass="form-control man-dat" onCut="return false" onDrop="return false" MaxLength="5"
                                                onkeypress="return number_dot(event,this)"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group" style="display: none">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_AfterShiftmax" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtAfterShiftMax" runat="server" CssClass="form-control"
                                                onCut="return false" onDrop="return false" Text="02:00" onkeypress="return number_dot(event,this)"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblIgnoreDuplicatePunches" runat="server" Text="Ignore Duplicate Punches"></asp:Label>
                                        </div>
                                        <div class="col-sm-3 pad-none">
                                            <div class="col-md-6">
                                                <asp:RadioButton ID="rbtIgnoreDuplicatesYes" runat="server" Text="Yes" GroupName="IgnoreDuplicates"
                                                    onclick="DisplayLevel()" CssClass="radio radio-primary" />
                                            </div>
                                            <div class="col-md-6">
                                                <asp:RadioButton ID="rbtIgnoreDuplicatesNo" runat="server" Text="No" GroupName="IgnoreDuplicates"
                                                    onclick="DisplayLevel()" Checked="true" CssClass="radio radio-primary" />
                                            </div>
                                        </div>
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblTimeInterval" runat="server" Text="Time Interval (hh:mm)"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">

                                            <asp:TextBox onpaste="return true" ID="txtTimeInterval" runat="server" CssClass="form-control"
                                                onCut="return false" onDrop="return false" onkeypress="return number_dot(event,this)"></asp:TextBox>

                                        </div>
                                    </div>
                                    <%--Vaigai--%>
                                    <div class="form-group" id="DivLateMinutes1" runat="server">
                                        <div class="col-sm-6 con-top">
                                            <asp:Label ID="lblAllowedlateminday" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtLatePerDay" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" MaxLength="3" onDrop="return false" onkeypress="return numbers_dot(event,this)"></asp:TextBox>
                                        </div>
                                        <div class="col-sm-3">
                                            <div class="panel-group" id="accordion" style="margin-bottom: 0px">
                                                <button class="btn fil-btn" id="btnExample1" runat="server" style="color: blue; text-decoration: underline; background-color: Transparent; background-repeat: no-repeat; border: none; cursor: pointer; overflow: hidden; outline: none;" onclick="return getFilter1();">
                                                </button>
                                                <div class="panel-collapse" id="trFiller1" style="display: none;" runat="server">
                                                    <div class="emp-filter" style="border: none; padding: 0px;">
                                                        <div class="row">

                                                            <div class="col-md-12">
                                                                <div class="form-horizontal">
                                                                    <div id="divFilter1" runat="server" align="left">
                                                                        <div>
                                                                            <div class="box-body">
                                                                                <div class="row">
                                                                                    <div class="col-md-12 pull-left">
                                                                                        <label id="lblLateInMintsDayExample" runat="server" style="text-align: justify;"></label>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>

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

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group" id="DivLateMinutes2" runat="server">
                                        <div class="col-sm-6 con-top">
                                            <asp:Label ID="lblAllowedlatedaymonth" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtLateMonth" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" MaxLength="2" onDrop="return false" onkeypress="return numbers_dot(event,this)"></asp:TextBox>
                                        </div>

                                        <div class="col-sm-3">
                                            <div class="panel-group" id="accordion1" style="margin-bottom: 0px">
                                                <button class="btn fil-btn" id="btnExample2" runat="server" style="color: blue; text-decoration: underline; background-color: Transparent; background-repeat: no-repeat; border: none; cursor: pointer; overflow: hidden; outline: none;" onclick="return getFilter2();">
                                                </button>
                                                <div class="panel-collapse" id="trFiller2" style="display: none;" runat="server">
                                                    <div class="emp-filter" style="border: none; padding: 0px;">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <div class="form-horizontal">
                                                                    <div id="divFilter2" runat="server" align="left">
                                                                        <div class="box-body">
                                                                            <div class="row">
                                                                                <div class="col-md-12 pull-left">
                                                                                    <label id="lblLateInMonthExample" runat="server" style="text-align: justify;"></label>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--Vaigai--%>

                                    <%--    Sohit Early exit point--%>

                                    <div class="form-group" id="DivEarlyExit1" runat="server">
                                        <div class="col-sm-6 con-top">
                                            <asp:Label ID="lblEarlyoutMintsPerDay" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtEarlyExitPerDay" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" MaxLength="3" onDrop="return false" onkeypress="return numbers_dot(event,this)"></asp:TextBox>
                                        </div>
                                        <div class="col-sm-3">
                                            <div class="panel-group" id="accordion" style="margin-bottom: 0px">
                                                <button class="btn fil-btn" id="btnExample3" runat="server" style="color: blue; text-decoration: underline; background-color: Transparent; background-repeat: no-repeat; border: none; cursor: pointer; overflow: hidden; outline: none;" onclick="return getFilter3();">
                                                </button>
                                                <div class="panel-collapse" id="trFiller3" style="display: none;" runat="server">
                                                    <div class="emp-filter" style="border: none; padding: 0px;">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <div class="form-horizontal">
                                                                    <div id="div6" runat="server" align="left">
                                                                        <div class="box-body">
                                                                            <div class="row">
                                                                                <div class="col-md-12 pull-left">
                                                                                    <label id="lblEarlyMintsDayExample" runat="server" style="text-align: justify;"></label>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

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

                                    <div class="form-group" id="DivEarlyExit2" runat="server">
                                        <div class="col-sm-6 con-top">
                                            <asp:Label ID="lblEarlyoutDaysPermonth" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtEarlyExitDayperMonth" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" MaxLength="2" onDrop="return false" onkeypress="return numbers_dot(event,this)"></asp:TextBox>
                                        </div>

                                        <div class="col-sm-3">
                                            <div class="panel-group" id="accordion1" style="margin-bottom: 0px">
                                                <button class="btn fil-btn" id="btnExample4" runat="server" style="color: blue; text-decoration: underline; background-color: Transparent; background-repeat: no-repeat; border: none; cursor: pointer; overflow: hidden; outline: none;" onclick="return getFilter4();">
                                                </button>
                                                <div class="panel-collapse" id="trFiller4" style="display: none;" runat="server">
                                                    <div class="emp-filter" style="border: none; padding: 0px;">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <div class="form-horizontal">
                                                                    <div id="div9" runat="server" align="left">
                                                                        <div class="box-body">
                                                                            <div class="row">
                                                                                <div class="col-md-12 pull-left">
                                                                                    <label id="lblEarlyoutMonthExample" runat="server" style="text-align: justify;"></label>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

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

                                    </div>

                                    <%--Monthly Exception Buffer Hours Create by Maria Parasanth Tawazun--%>
                                    <div class="form-group" id="DivMonthlyExceptionBufferHours" runat="server">
                                        <div class="col-sm-6 con-top">
                                            <asp:Label ID="lblMonthlyExceptionBufferHrs" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtMonthlyExceptionBufferHrs" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" onDrop="return false" MaxLength="5" onkeypress="return number_dot(event,this)"></asp:TextBox>

                                        </div>

                                        <div class="col-sm-3">
                                            <div class="panel-group" id="accordion1" style="margin-bottom: 0px">
                                                <button class="btn fil-btn" id="btnExample6" runat="server" style="color: blue; text-decoration: underline; background-color: Transparent; background-repeat: no-repeat; border: none; cursor: pointer; overflow: hidden; outline: none;" onclick="return getFilter6();">
                                                </button>
                                                <div class="panel-collapse" id="trFiller6" style="display: none;" runat="server">
                                                    <div class="emp-filter" style="border: none; padding: 0px;">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <div class="form-horizontal">
                                                                    <div id="div8" runat="server" align="left">
                                                                        <div class="box-body">
                                                                            <div class="row">
                                                                                <div class="col-md-12 pull-left">
                                                                                    <label id="lblMonthlyExceptionBufferHrsExample" runat="server" style="text-align: justify;"></label>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

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

                                    </div>

                                    <%--      sohit late Exit Point--%>

                                    <%--                       vaigai Leave Absent point--%>
                                    <div class="form-group" id="divAbsent" runat="server">
                                        <div class="col-md-9" style="text-align: justify;">
                                            <asp:CheckBox ID="chkEnableAbsent" runat="server" CssClass="checkbox checkbox-primary" />
                                        </div>
                                        <div class="col-md-3">
                                            <div class="panel-group" id="accordion1" style="margin-bottom: 0px">
                                                <button class="btn fil-btn" id="btnEnableAbsentExample" runat="server" style="color: blue; text-decoration: underline; background-color: Transparent; background-repeat: no-repeat; border: none; cursor: pointer; overflow: hidden; outline: none;" onclick="return getFilter5();">
                                                </button>
                                                <div class="panel-collapse" id="trFiller5" style="display: none;" runat="server">
                                                    <div class="emp-filter" style="border: none; padding: 0px;">
                                                        <div class="row">

                                                            <div class="col-md-12">
                                                                <div class="form-horizontal">
                                                                    <div id="div5" runat="server" align="left">
                                                                        <div class="box-body">
                                                                            <div class="row">
                                                                                <div class="col-md-12 pull-left">
                                                                                    <label id="lblEnableAbsent" runat="server" style="text-align: justify;"></label>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <%--                       vaigai Leave Absent point--%>
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <asp:CheckBox ID="chkboxFreescan" runat="server" CssClass="checkbox checkbox-primary" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <!--2-->
                        <div class="config-hdr">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lblWeeklyOffStartHours" runat="server" Text="Weekly Off Start Hours Setting"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblWeekOffStartHours" runat="server" Text="Weekly Off Configuration"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtWeekOffStartHours" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" MaxLength="5" onDrop="return false" onkeypress="return number_dot(event,this)"></asp:TextBox>
                                        </div>
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblWeekOffStartHours_24HrsShift" runat="server" Text="Weekly Off Start Hours for 24 Hrs Shift"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtWeekOffStartHours_24HrsShift" runat="server"
                                                CssClass="form-control man-dat" onCut="return false" MaxLength="5" onDrop="return false"
                                                onkeypress="return number_dot(event,this)"></asp:TextBox>
                                            <cc1:MaskedEditExtender ID="MaxHrsPerMonth" runat="server" TargetControlID="txtWeekOffStartHours_24HrsShift"
                                                InputDirection="RightToLeft" MaskType="Time" Mask="99:99" AcceptAMPM="false"
                                                ClearTextOnInvalid="true" ErrorTooltipEnabled="true">
                                            </cc1:MaskedEditExtender>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <!--3-->
                        <div class="config-hdr">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lblLuchDeductionSettings" runat="server" Text="Lunch Hours Deduction Setting"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblisLunchDeduct" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3 pad-none">
                                            <div class="col-md-6">
                                                <asp:RadioButton ID="rbtnYesLunch" runat="server" Text="Yes" GroupName="LunchGroup"
                                                    onclick="ShowLuchDeductionParameter();" CssClass="radio radio-primary" />
                                            </div>
                                            <div class="col-md-6">
                                                <asp:RadioButton ID="rbtnNoLunch" runat="server" Text="No" GroupName="LunchGroup"
                                                    onclick="ShowLuchDeductionParameter();" Checked="true" CssClass="radio radio-primary" />
                                            </div>
                                        </div>
                                        <div id="divLunchHoursDeduction" runat="server">
                                            <div id="Table2">
                                                <div class="col-sm-3 con-top">
                                                    <asp:Label ID="lblDeductionHours" runat="server" Text="Lunch Deduction Hours"></asp:Label>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:TextBox onpaste="return true" ID="txtDeductionHours" runat="server" CssClass="form-control"
                                                        onCut="return false" MaxLength="5" onDrop="return false" Enabled="false" onkeypress="return number_dot(event,this)"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <%--Manikandan--%>
                            <div class="row" id="divDefaultlunch" runat="server">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblDefaultLunch" runat="server" Text="Default Lunch Hours ( hh:mm )"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox ID="txtDefaultLunch" runat="server" CssClass="form-control man-dat"
                                                onCut="return false" onDrop="return false" onpaste="return true"></asp:TextBox>
                                        </div>
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="Label10" runat="server" Text="Max Lunch Hours ( hh:mm )"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox ID="txtLunchHrs" runat="server" CssClass="form-control man-dat" onCut="return false"
                                                onDrop="return false" onpaste="return true"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <!--4-->
                        <div class="config-hdr">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lblFlexibleHours" runat="server" Text="Flexible Shift Timings Setting"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-12 con-top">
                                            <asp:Label ID="Label15" runat="server" Text="This option calculates valid shift-in and shift-out entries of employees. <br/><B>For example :</B>&nbsp;&nbsp;If you shift-in at 9:00 am and shift-out at 10:30 am and again shift-in at 11:40 am, the system will calculate the hours you were in the office only. <br/><B>(i.e., between 9:00 am - 10:30 am = 01:30 hours)</B> and will not calculate the hours from the time you shift-out <B>(10:30 am - 11:40 am)</B>"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblFlexible" runat="server" Text="Flexible Timings"></asp:Label>
                                        </div>
                                        <div class="col-sm-3 pad-none">
                                            <div class="col-md-6">
                                                <asp:RadioButton ID="rbtnYes" runat="server" Text="Yes" GroupName="FlexibleTimeGroup"
                                                    onclick="ShowFlexibleParameter();" CssClass="radio radio-primary" />
                                            </div>
                                            <div class="col-md-6">
                                                <asp:RadioButton ID="rbtnNo" runat="server" Text="No" GroupName="FlexibleTimeGroup"
                                                    onclick="ShowFlexibleParameter();" Checked="true" CssClass="radio radio-primary" />
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divFlexibleParameter" style="display: none;" runat="server">
                                        <div id="Table1">
                                            <div class="row form-group">
                                                <div class="col-sm-3 con-top">
                                                    <asp:Label ID="lblOption" runat="server" Text="Option"></asp:Label>
                                                </div>
                                                <div class="col-sm-4 Pad-left-7px">
                                                    <div class="col-md-5 pad-right-0px">
                                                        <asp:RadioButton ID="rbtnOrganization" runat="server" Text="Organization" GroupName="FlexibleType"
                                                            CssClass="radioLeave radio-primary" />
                                                    </div>
                                                    <div class="col-md-7">
                                                        <asp:RadioButton ID="rbtnIndividualEmployee" runat="server" Text="Individual Employee"
                                                            CssClass="radioLeave radio-primary" GroupName="FlexibleType" Checked="true" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-sm-3 con-top">
                                                    <asp:Label ID="lblFullDay" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-sm-3 pad-none">
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbFullDayYes" runat="server" Text="Yes" GroupName="FullDay"
                                                            CssClass="radio radio-primary" Checked="true" />
                                                    </div>
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbFullDayNo" runat="server" Text="No" GroupName="FullDay" Enabled="false"
                                                            CssClass="radio radio-primary" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-sm-3 con-top">
                                                    <asp:Label ID="lblHalfDay" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-sm-3 pad-none">
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbHalfDayYes" runat="server" Text="Yes" GroupName="HalfDay"
                                                            Checked="true" CssClass="radio radio-primary" />
                                                    </div>
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbHalfDayNo" runat="server" Text="No" GroupName="HalfDay" CssClass="radio radio-primary" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div id="trException" runat="server">
                                                <div class="row form-group">
                                                    <div class="col-sm-3 con-top">
                                                        <asp:Label ID="lblExceptionDetails" runat="server" Text="Need To calculate Exception details"></asp:Label>
                                                    </div>
                                                    <div class="col-sm-3">
                                                        <asp:CheckBoxList ID="chkboxExceptionDetails" runat="server" RepeatLayout="flow"
                                                            RepeatDirection="vertical" CssClass="checkbox checkbox-primary checkbox-circle">
                                                            <asp:ListItem Text="Late Entry" Value="0"></asp:ListItem>
                                                            <asp:ListItem Text="Early Entry" Value="1"></asp:ListItem>
                                                            <asp:ListItem Text="Early Exit" Value="2"></asp:ListItem>
                                                            <asp:ListItem Text="Late Exit" Value="3"></asp:ListItem>
                                                        </asp:CheckBoxList>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group" style="display: none">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_ShiftBreak" runat="server"></asp:Label><span style="color: #ff0000">*</span>
                                        </div>
                                        <div class="col-sm-3">
                                            <div class="col-md-12">
                                                <asp:TextBox onpaste="return true" ID="txtShiftBreak" runat="server" CssClass="form-control"
                                                    onCut="return false" onDrop="return false" onkeypress="return numericval(this);"></asp:TextBox>
                                            </div>
                                            <div class="col-md-12">
                                                <input id="butShiftBreak" runat="server" src="../Images/dateicon.gif" type="image" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group" style="display: none">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_ShitMaxbreak" runat="server"></asp:Label><span style="color: #ff0000">*</span>
                                        </div>
                                        <div class="col-sm-3">
                                            <div class="col-md-12">
                                                <asp:TextBox onpaste="return true" ID="txtShiftMaxBreak" runat="server" CssClass="form-control"
                                                    onCut="return false" onDrop="return false" onkeypress="return numericval(this);"></asp:TextBox>
                                            </div>
                                            <div class="col-md-12">
                                                <input id="butShiftMaxBreak" runat="server" src="../Images/dateicon.gif" type="image" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group" style="display: none">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_WeeklyWorkinghrs" runat="server"></asp:Label><span style="color: #ff0000">*</span>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtWorkingHoursWeek" runat="server" CssClass="form-control"
                                                onCut="return false" onDrop="return false" onkeypress="return numericval(this);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="row form-group" style="display: none">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_MonthlyWorkinghrs" runat="server"></asp:Label><span style="color: #ff0000">*</span>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtWorkingHoursMonth" runat="server" CssClass="form-control"
                                                onCut="return false" onDrop="return false" onkeypress="return numericval(this);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="config-hdr">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lbl_LeaveOnSuc" runat="server" Text="Leave - On Successive Year"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblNoOfSuccessiveDays" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtNoOfSuccessiveDays" onkeypress="return numbers_dot(event,this)"
                                                CssClass="form-control man-dat" runat="server" MaxLength="3"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-sm-3 con-top">
                                        </div>
                                        <div class="col-sm-3">
                                            <div class="pull-right-button">
                                                <asp:LinkButton ID="btnSaveShiftSetting" CssClass="btn save-btn fa-floppy-o" runat="server"
                                                    OnClick="btn_Add_Click" OnClientClick="if(Page_ClientValidate())return validationShiftSetting();return false;" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <!--5-->
                    </div>
                </div>
                <!--TAB 2-->
                <div class="tab-pane" id="tab2" runat="server">
                    <div class="form-horizontal">
                        <!--1-->
                        <div class="config-hdr con-spc">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lbl_CompanyDetails1" runat="server" Text="Company Details"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblCompany2" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:DropDownList ID="ddlCompanyOT" runat="server" AppendDataBoundItems="true"
                                                AutoPostBack="True" onchange="return AssignCompanyIdForOT(this.value);" CssClass="form-control select2 Man-dat">
                                                <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="Default Settings" Value="-1">
                                                </asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="config-hdr  con-spc">
                            <div class="row" id="trOvertimehead" runat="server">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lblOverTimeSettings" runat="server" Text="Over Time Setting"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trFlexiOverTime" runat="server" style="display: none;">
                                        <div class="row form-group">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblFlexSettings" runat="server" Text="Flexible Over Time Settings"></asp:Label>
                                            </div>
                                            <div class="col-sm-4 Pad-left-7px">
                                                <div class="col-md-6">
                                                    <asp:CheckBox ID="chkflexAfter" runat="server" AutoPostBack="false" Text="After Shift Time"
                                                        CssClass="checkboxShift checkboxShift-primary checkbox-circle" />
                                                    <asp:Label ID="lblflexAfter" runat="server" Visible="false"></asp:Label>
                                                </div>
                                                <div class="col-md-6">
                                                    <asp:CheckBox ID="chkflexBefore" runat="server" AutoPostBack="false" Text="Before Shift Time"
                                                        CssClass="checkboxShift checkboxShift-primary checkbox-circle" />
                                                    <asp:Label ID="lblflexBefore" runat="server" Visible="false"></asp:Label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="NonFlexiSettings" runat="server">
                                        <div class="row form-group">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblConsiderDefinedWorkHours" runat="server"></asp:Label>
                                                <%--<a href="#" data-toggle="tooltip" title="1.If its set to yes, then when the employee total working hours meet out the defined work hours, after that only it will start to calculate the overtime hours.">
                                                    <i class="fa fa-edit"></i></a>--%>
                                            </div>
                                            <div class="col-sm-3 pad-none">
                                                <div class="col-md-6">
                                                    <asp:RadioButton ID="rbtnDefinedWorkHoursYes" runat="server" GroupName="rbDeFinedWorkHours"
                                                        CssClass="radio radio-primary" Text="Yes" />
                                                </div>
                                                <div class="col-md-6">
                                                    <asp:RadioButton ID="rbtnDefinedWorkHoursNo" runat="server" GroupName="rbDeFinedWorkHours"
                                                        CssClass="radio radio-primary" Text="No" Checked="true" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row form-group">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblNonFlexiSettings" runat="server" Text="Non-Flexible Overtime Setting"></asp:Label>
                                            </div>
                                            <div class="col-sm-4 Pad-left-7px">
                                                <div class="col-md-6">
                                                    <asp:CheckBox ID="chkboxAfterShiftTime" runat="server" AutoPostBack="false" Text="After Shift Time"
                                                        CssClass="checkboxShift checkboxShift-primary" />
                                                    <asp:Label ID="lblAfterShiftTime" runat="server" Visible="false"></asp:Label>
                                                </div>
                                                <div class="col-md-6">
                                                    <asp:CheckBox ID="chkboxBeforeShiftTime" runat="server" AutoPostBack="false" Text="Before Shift Time"
                                                        CssClass="checkboxShift checkboxShift-primary" />
                                                    <asp:Label ID="lblBeforeShiftTime" runat="server" Visible="false"></asp:Label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div id="trOverTime" runat="server">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lbl_OverTimeOnHolidays" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txt_OvertmeOnholidays" runat="server" CssClass="form-control"
                                                    MaxLength="4" onDrop="return false;" onkeypress="return numbers_dot(event,this)"
                                                    onchange="return onChangetwodecimalDay(this);"></asp:TextBox>
                                                <asp:RangeValidator ID="RngOverTimeOnHolidays" runat="server" ControlToValidate="txt_OvertmeOnholidays"
                                                    ErrorMessage="" Display="None" MaximumValue="365" MinimumValue="0" Type="Double"></asp:RangeValidator>
                                            </div>
                                        </div>
                                        <div id="trWkOff" runat="server">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lbl_OverTimeOnWeeklyOff" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txt_OvertimeOnWeeklyOff" runat="server" CssClass="form-control"
                                                    MaxLength="4" onDrop="return false;" onkeypress="return numbers_dot(event,this)"
                                                    onchange="return onChangetwodecimalDay(this);"></asp:TextBox>
                                                <asp:RangeValidator ID="RngOverTimeOnWeeklyOff" runat="server" ControlToValidate="txt_OvertimeOnWeeklyOff"
                                                    ErrorMessage="" MaximumValue="365" MinimumValue="0" Display="None" Type="Double"></asp:RangeValidator>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div id="Div2" runat="server">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblSpecialOvertime1" runat="server" Text="After"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txtspecialOvertim1" runat="server" CssClass="form-control"
                                                    onkeypress="return numbers_dot(event,this)" MaxLength="4" onDrop="return false;"></asp:TextBox>
                                            </div>
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblSpecialOvertime12" runat="server" Text="minute(s),apply <B>Special Overtime 1</B>"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div id="Div3" runat="server">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblSpecialOvertime2" runat="server" Text="After"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txtspecialOvertim2" runat="server" CssClass="form-control"
                                                    onkeypress="return numbers_dot(event,this)" MaxLength="4" onDrop="return false;"></asp:TextBox>
                                            </div>
                                            <div class="col-sm-6">
                                                <asp:Label ID="Label14" runat="server" Text="minute(s) of <B>[ Special Overtime 1 ]</B>, apply <B>Special Overtime 2</B>"></asp:Label>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row form-group">
                                        <div id="trHoliWkOff" runat="server">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblHoliWeek" runat="server"></asp:Label>
                                                <%--<a href="#" data-toggle="tooltip" title="If both weekly off and holiday is occured on same day, that time which one value need to be considered for overtime calculation. Holiday / Weekly Off">
                                                    <i class="fa fa-edit"></i></a>--%>
                                            </div>
                                            <div class="col-sm-3 pad-none">
                                                <div class="col-md-6">
                                                    <asp:RadioButton ID="rbtnHoliday" runat="server" Text="Holiday" GroupName="rbOption"
                                                        Checked="true" CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-6">
                                                    <asp:RadioButton ID="rbtnWeekoff" runat="server" Text="WeeklyOff" GroupName="rbOption"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                            <div id="DivCompoff" runat="server">
                                                <div class="col-sm-3 con-top">
                                                    <asp:Label ID="lblCompoffRequest" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-sm-3 pad-none">
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbtCompoffRequestYes" runat="server" Text="Yes" GroupName="CompoffRequest"
                                                            Checked="true" CssClass="radio radio-primary" />
                                                    </div>
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbtCompoffRequestNo" runat="server" Text="No" GroupName="CompoffRequest"
                                                            CssClass="radio radio-primary" Checked="true" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group" style="display: none;">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lblCompensation" runat="server" Text="Compensation Validity Days"></asp:Label>
                                        </div>
                                        <div class="col-sm-3">
                                            <asp:TextBox onpaste="return true" ID="txtCompensationDays" onkeypress="return numbers_dot(event,this)"
                                                CssClass="form-control" runat="server" MaxLength="3"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div id="trOTRoundOff" runat="server">
                                        <div class="row form-group">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblOTRoundOff" runat="server" Text="OT Roundoff"></asp:Label>
                                            </div>
                                            <div class="col-sm-3 pad-none">
                                                <div class="col-md-6">
                                                    <asp:RadioButton ID="rbtnOTEnable" runat="server" Text="Enable" GroupName="OTRoundoffOption"
                                                        onclick="ShowOTParameter();" CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-6">
                                                    <asp:RadioButton ID="rbtnOTDisable" runat="server" Text="Disable" GroupName="OTRoundoffOption"
                                                        Checked="true" onclick="ShowOTParameter();" CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="col-md-12 config-table">
                            <div id="divOTParameter" style="display: none;" runat="server">
                                <div class="form-group">
                                    <ul style="background: none;">
                                        <li>
                                            <asp:Label ID="Label17" runat="server" Text="This setting enables you to round -off overtime hours of a day to simplify payroll calculations."></asp:Label></li>
                                        <li>
                                            <asp:Label ID="Label18" runat="server" Text="Here if we configured start time as 00:01,End time as 00:30 and Rounded as 00:30."></asp:Label></li>
                                        <li>If any one employee's overtime hours is occurred anywhere from 0:01 - 0:30 , it will be rounded-off to 30 minutes</li>
                                        <li>For example: if overtime hours is 1:23 means, it will rounded off to 1.30 minutes by system automatically</li>
                                    </ul>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-3">
                                    </div>
                                    <div class="col-md-3">
                                        <asp:LinkButton ID="btnAdd" runat="server" Text="ADD" CssClass="btn add-btn fa-plus"
                                            OnClientClick="return AddOTParameter();return false;" />
                                    </div>
                                    <div id="tblOTParameter" style="display: none">
                                        <div class="row">
                                            <div class="col-md-3">
                                                <asp:Label ID="lblStartTime" runat="server" Text="Start Time"></asp:Label>
                                                <asp:Label ID="Label1" runat="server" Text="(hh:mm)"></asp:Label>
                                            </div>
                                            <div class="col-md-3">
                                                <asp:Label ID="lblEndTime" runat="server" Text="End Time"></asp:Label>
                                                <asp:Label ID="Label2" runat="server" Text="(hh:mm)"></asp:Label>
                                            </div>
                                            <div class="col-md-3">
                                                <asp:Label ID="lblRoundedAs" runat="server" Text="Rounded As"></asp:Label>
                                                <asp:Label ID="Label3" runat="server" Text="(hh:mm)"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div id="divOTRoundoff" runat="server" enableviewstate="true">
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <!--2-->
                        <div class="config-hdr">
                            <div class="row" id="trOTCompOffSettings" runat="server">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lblOTCompOffSettings" runat="server" Text="OT and CompOff Eligible Employees Setting"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trHalfDayComoff" runat="server">
                                        <div class="row form-group">
                                            <div class="col-sm-3 con-top">
                                                <asp:Label ID="lblHalfDayComoff" runat="server" Text="Min Extra Hrs for Half Day Comp Off"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:TextBox ID="txtHalfDayComoff" runat="server" CssClass="form-control mandatory"
                                                    onCut="return false" onpaste="return true" MaxLength="5" onDrop="return false"
                                                    onkeypress="return number_dot(event,this)"></asp:TextBox>
                                            </div>
                                            <div id="trFullDayComoff" runat="server">
                                                <div class="col-sm-3 con-top">
                                                    <asp:Label ID="lblFullDayComoff" runat="server" Text="Min Extra Hrs for Full Day Comp Off"></asp:Label>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:TextBox onpaste="return true" ID="txtFullDayComoff" runat="server" CssClass="form-control mandatory"
                                                        onCut="return false" MaxLength="5" onDrop="return false" onkeypress="return number_dot(event,this)"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="Compoff" runat="server">
                                            <div class="row form-group">
                                                <div class="col-sm-3 con-top">
                                                    <asp:Label ID="lblValidsDays" runat="server" Text="Comp Off Validity Days"></asp:Label>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:TextBox onpaste="return true" ID="txtValidsDays" onkeypress="return numbers_dot(event,this)"
                                                        CssClass="form-control mandatory" runat="server" MaxLength="3"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-3 con-top" style="display: none">
                                                    <asp:Label ID="lbl_Comoffcarry" runat="server" Text="Carry Forward the Comp Off to New Year"></asp:Label>
                                                </div>
                                                <div class="col-sm-3 pad-none" style="display: none">
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbtnCompCarryYes" runat="server" Text="Yes" GroupName="rbCompCarry"
                                                            Checked="true" CssClass="radio radio-primary" />
                                                    </div>
                                                    <div class="col-md-6">
                                                        <asp:RadioButton ID="rbtnCompCarryNo" runat="server" Text="No" GroupName="rbCompCarry"
                                                            CssClass="radio radio-primary" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row form-group">
                                            <div class="col-sm-3 con-top">
                                            </div>
                                            <div class="col-sm-3">
                                                <div class="pull-right-button">
                                                    <asp:HiddenField ID="Hidden1" runat="server" />
                                                    <asp:HiddenField ID="Hidden2" runat="server" />
                                                    <asp:LinkButton ID="btn_Add" CssClass="btn save-btn fa-floppy-o" runat="server" OnClick="btn_Add_Click"
                                                        OnClientClick="if(Page_ClientValidate())return ValidationShiftOT();return false;" />
                                                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                                                        ShowSummary="False" />
                                                    <asp:HiddenField ID="hdf_controlID" runat="server" />
                                                    <asp:HiddenField ID="hdf_OTRoundoff" runat="server" />
                                                    <asp:HiddenField ID="hdfCompanyId" runat="server" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-3">
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
                <!--Tab3-->
                <div class="tab-pane" id="tab3" runat="server">
                    <div class="form-horizontal">
                        <div class="config-hdr con-spc" style="border: none;">
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="Table3">
                                        <div class="row form-group">
                                            <div class="col-sm-2 con-top">
                                                <asp:Label ID="lbl_WeekStartDay" runat="server" Text="Week Start Day"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:DropDownList ID="ddlWeekStartDay" runat="server" CssClass="form-control select2"
                                                    onchange="ddlWeekStartDayOnChange(this.value); GetWeekCount();">
                                                    <asp:ListItem Text="Sunday" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="Monday" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="Tuesday" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="Wednesday" Value="4"></asp:ListItem>
                                                    <asp:ListItem Text="Thursday" Value="5"></asp:ListItem>
                                                    <asp:ListItem Text="Friday" Value="6"></asp:ListItem>
                                                    <asp:ListItem Text="Saturday" Value="7"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            <div class="col-sm-2 con-top">
                                                <asp:Label ID="lbl_WeekEndDay" runat="server" Text="Week End Day"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:DropDownList ID="ddlWeekEndDay" runat="server" CssClass="form-control select2"
                                                    onchange="GetWeekCount();">
                                                    <asp:ListItem Text="Sunday" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="Monday" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="Tuesday" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="Wednesday" Value="4"></asp:ListItem>
                                                    <asp:ListItem Text="Thursday" Value="5"></asp:ListItem>
                                                    <asp:ListItem Text="Friday" Value="6"></asp:ListItem>
                                                    <asp:ListItem Text="Saturday" Value="7"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            <div class="col-sm-2">
                                                <asp:Label ID="lbl_DayCount1" Text="Days Count :" runat="server"></asp:Label>
                                                <asp:Label ID="lblSelectDayCountWeek" runat="server" Text="7" ForeColor="red"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="Div1">
                                        <div class="row form-group">
                                            <div class="col-sm-2 con-top">
                                                <asp:Label ID="lblMonthStartDate" runat="server" Text="Month Start Date"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:DropDownList ID="ddlMonthStrDate" runat="server" CssClass="form-control select2"
                                                    onchange="ddlMonthStartDateOnChange(this.value);GetMonthCount();">
                                                    <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                    <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                                    <asp:ListItem Text="7" Value="7"></asp:ListItem>
                                                    <asp:ListItem Text="8" Value="8"></asp:ListItem>
                                                    <asp:ListItem Text="9" Value="9"></asp:ListItem>
                                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                    <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                                    <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                                    <asp:ListItem Text="13" Value="13"></asp:ListItem>
                                                    <asp:ListItem Text="14" Value="14"></asp:ListItem>
                                                    <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                    <asp:ListItem Text="16" Value="16"></asp:ListItem>
                                                    <asp:ListItem Text="17" Value="17"></asp:ListItem>
                                                    <asp:ListItem Text="18" Value="18"></asp:ListItem>
                                                    <asp:ListItem Text="19" Value="19"></asp:ListItem>
                                                    <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                    <asp:ListItem Text="21" Value="21"></asp:ListItem>
                                                    <asp:ListItem Text="22" Value="22"></asp:ListItem>
                                                    <asp:ListItem Text="23" Value="23"></asp:ListItem>
                                                    <asp:ListItem Text="24" Value="24"></asp:ListItem>
                                                    <asp:ListItem Text="25" Value="25"></asp:ListItem>
                                                    <asp:ListItem Text="26" Value="26"></asp:ListItem>
                                                    <asp:ListItem Text="27" Value="27"></asp:ListItem>
                                                    <asp:ListItem Text="28" Value="28"></asp:ListItem>
                                                    <asp:ListItem Text="29" Value="29"></asp:ListItem>
                                                    <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                                    <asp:ListItem Text="31" Value="31"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            <div class="col-sm-2 con-top">
                                                <asp:Label ID="lblMonthEndDate" runat="server" Text="Month End Date"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:DropDownList ID="ddlMonthEndDate" runat="server" CssClass="form-control select2"
                                                    onchange="GetMonthCount();">
                                                    <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                    <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                                    <asp:ListItem Text="7" Value="7"></asp:ListItem>
                                                    <asp:ListItem Text="8" Value="8"></asp:ListItem>
                                                    <asp:ListItem Text="9" Value="9"></asp:ListItem>
                                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                    <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                                    <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                                    <asp:ListItem Text="13" Value="13"></asp:ListItem>
                                                    <asp:ListItem Text="14" Value="14"></asp:ListItem>
                                                    <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                    <asp:ListItem Text="16" Value="16"></asp:ListItem>
                                                    <asp:ListItem Text="17" Value="17"></asp:ListItem>
                                                    <asp:ListItem Text="18" Value="18"></asp:ListItem>
                                                    <asp:ListItem Text="19" Value="19"></asp:ListItem>
                                                    <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                    <asp:ListItem Text="21" Value="21"></asp:ListItem>
                                                    <asp:ListItem Text="22" Value="22"></asp:ListItem>
                                                    <asp:ListItem Text="23" Value="23"></asp:ListItem>
                                                    <asp:ListItem Text="24" Value="24"></asp:ListItem>
                                                    <asp:ListItem Text="25" Value="25"></asp:ListItem>
                                                    <asp:ListItem Text="26" Value="26"></asp:ListItem>
                                                    <asp:ListItem Text="27" Value="27"></asp:ListItem>
                                                    <asp:ListItem Text="28" Value="28"></asp:ListItem>
                                                    <asp:ListItem Text="29" Value="29"></asp:ListItem>
                                                    <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                                    <asp:ListItem Text="31" Value="31"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            <div class="col-sm-2">
                                                <asp:Label ID="lbl_DayCount2" Text="Days Count :" runat="server"></asp:Label>
                                                <asp:Label ID="lblSelectDayCountMonth" runat="server" Text="31" ForeColor="red"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="config-hdr" style="display: none;">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="Label9" runat="server" Text="Googl Map"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-2 con-top">
                                            <asp:Label ID="Label13" runat="server" Text="Key value"></asp:Label>
                                        </div>
                                        <div class="col-md-9">
                                            <asp:TextBox onpaste="return true" ID="txtmapkey" runat="server" CssClass="form-control"
                                                onCut="return false" Text="123#" onDrop="return false" MaxLength="30"></asp:TextBox>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="clearfix"></div>
                            <div class="row">
                                <div class="row">
                                    <div class="line16" style="margin: 5px 0px 20px 0px">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <b>
                                        <asp:Label ID="lbl_Note" runat="server" Text="Note :"></asp:Label>
                                    </b>
                                    <ul style="background: none;">
                                        <li>
                                            <asp:Label ID="lbl_ReportCon" runat="server" Text="Doing configuration of Week & Month overhere will
                                    reflect in Reports Date filter."></asp:Label></li>
                                        <li>
                                            <asp:Label ID="lbl_ReportCon1" runat="server" Text="Configuration in Report Settings is common for all companies."></asp:Label></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div class="row form-group">
                                <div class="col-md-11">
                                    <div class="pull-right-button pull-right">
                                        <asp:LinkButton ID="btn_Save" CssClass="btn save-btn fa-floppy-o" runat="server" Style="margin-left: 0px"
                                            OnClick="btn_Save_Click" OnClientClick="return Save_Conf();" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
                <!--Tab4-->
                <div class="tab-pane" id="tab4" runat="server">
                    <div class="form-horizontal">
                        <div class="config-hdr con-spc" style="border: none;">
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="Table3">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lblApprovalCompany" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-4">
                                                <asp:DropDownList ID="ddlApprovalCompany" runat="server" AppendDataBoundItems="true" AutoPostBack="True"
                                                    onchange="return GettingApprovalSettingDetails(this.value);" CssClass="form-control select2 Man-dat">
                                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trPattern" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lbl_Pattern" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesPattern" runat="server" Text="Yes" GroupName="PatternGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoPattern" runat="server" Text="No" GroupName="PatternGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                            <div class="row">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trRoster" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lbl_Roster" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesRoster" runat="server" Text="Yes" GroupName="RosterGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoRoster" runat="server" Text="No" GroupName="RosterGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trManualEntry" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lbl_ManualEntry" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesManualEntry" runat="server" Text="Yes" GroupName="ManualEntryGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoManualEntry" runat="server" Text="No" GroupName="ManualEntryGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trApproval" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lblApproval" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesApproval" runat="server" Text="Yes" GroupName="ApprovalGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoApproval" runat="server" Text="No" GroupName="ApprovalGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trLeaveSanction" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lbl_LeaveSanction" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesLeaveSanction" runat="server" Text="Yes" GroupName="LeaveSanctionGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoLeaveSanction" runat="server" Text="No" GroupName="LeaveSanctionGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trOnDutyEntry" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lbl_OnDutyEntry" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesOnDutyEntry" runat="server" Text="Yes" GroupName="OnDutyEntryGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoOnDutyEntry" runat="server" Text="No" GroupName="OnDutyEntryGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trPermissionSanction" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lbl_PermissionSanction" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesPermissionSanction" runat="server" Text="Yes" GroupName="PermissionSanctionGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoPermissionSanction" runat="server" Text="No" GroupName="PermissionSanctionGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="trOTApproval" runat="server">
                                        <div class="row">
                                            <div class="col-md-4">
                                                <asp:Label ID="lbl_OTApproval" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnYesOTApproval" runat="server" Text="Yes" GroupName="OTApprovalGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnNoOTApproval" runat="server" Text="No" GroupName="OTApprovalGroup"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="divWebclockInOut" runat="server" style="display: none">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lblwebClockInOut" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnwebclkYes" runat="server" Text="Yes" GroupName="webClockInOut"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnwebclkNo" runat="server" Text="No" GroupName="webClockInOut"
                                                        CssClass="radio radio-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
<div class="row"> 
    <div class="row form-group">

    </div>
</div>
							<div class="row">
                                <div class="col-md-12">
                                    <div id="divCompressedWorkHours" runat="server">
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <asp:Label ID="lblCompressedworkHoursPerWeek" runat="server">Compressed Work Hours Per Week</asp:Label><br />
                                                <small style="color: #777;">(For Approval Taken Employees)</small>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnCompressedWorkYes" runat="server" Text="Yes"
                                                        GroupName="compressedworkHour" CssClass="radio radio-primary"
                                                        onclick="ShowHideMinWeeklyHours()" />
                                                </div>
                                                <div class="col-md-2" style="padding-left: 0px;">
                                                    <asp:RadioButton ID="rbtnCompressedWorkNo" runat="server" Text="No"
                                                        GroupName="compressedworkHour" CssClass="radio radio-primary"
                                                        onclick="ShowHideMinWeeklyHours()" />
                                                </div>
                                                <div id="divMinWeeklyHoursContainer" style="display: none; padding-left: 5px;" class="col-md-8">
<div class="col-sm-8"> 
   <asp:Label ID="lblMinWeeklyHours" runat="server" Text="Minimum Weekly Compressed Work Hours"></asp:Label>
</div>
                                                 <div class="col-sm-4">
<asp:TextBox ID="txtMinWeeklyHours" runat="server" CssClass="form-control man-dat"
                                                        MaxLength="6" Style="width: 100px; display: inline-block; margin-left: 5px;"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvMinWeeklyHours" runat="server"
                                                        ControlToValidate="txtMinWeeklyHours" Enabled="false"
                                                        ErrorMessage="Minimum Weekly Compressed Work Hours is required."
                                                        Display="None" ForeColor="Red"></asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="revMinWeeklyHours" runat="server"
                                                        ControlToValidate="txtMinWeeklyHours" Enabled="false"
                                                        ValidationExpression="^\d{1,3}(\.\d{1,2})?$"
                                                        ErrorMessage="Please enter a valid numeric hours value (e.g. 36 or 36.5)."
                                                        Display="none" ForeColor="Red"></asp:RegularExpressionValidator>
</div>
                                                    
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="Div1">
                                        <div class="row form-group">
                                            <div class="col-md-8">
                                                <div class="pull-right-button">
                                                    <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                                                    <asp:LinkButton ID="btnSaveApprovalSet" CssClass="btn save-btn fa-floppy-o" runat="server" OnClick="btnSaveApprovalSet_Click"
                                                        OnClientClick="javascript:if(Page_ClientValidate()) return ValidateApprovalSettings();return false;" />
                                                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True"
                                                        ShowSummary="False" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
                <div class="tab-pane" id="tab6" runat="server">
                    <div class="form-horizontal">
                        <!--Mail Configuration-->
                        <div class="config-hdr con-spc" style="border: none;">
                        </div>
                        <div class="config-hdr">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lblEmailSettingsConfig" runat="server" Text="Email Setting Configurations"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <style>
                                .switch {
                                    position: relative;
                                    display: inline-block;
                                    width: 60px;
                                    height: 30px;
                                }

                                    .switch input {
                                        opacity: 0;
                                        width: 0;
                                        height: 0;
                                    }

                                .slider {
                                    position: absolute;
                                    cursor: pointer;
                                    top: 0;
                                    left: 0;
                                    right: 0;
                                    bottom: 0;
                                    background-color: #ccc;
                                    -webkit-transition: .4s;
                                    transition: .4s;
                                }

                                    .slider:before {
                                        position: absolute;
                                        content: "";
                                        height: 24px;
                                        width: 24px;
                                        left: 4px;
                                        bottom: 4px;
                                        background-color: white;
                                        -webkit-transition: .4s;
                                        transition: .4s;
                                    }

                                input:checked + .slider {
                                    background-color: #2196F3;
                                }

                                input:focus + .slider {
                                    box-shadow: 0 0 1px #2196F3;
                                }

                                input:checked + .slider:before {
                                    -webkit-transform: translateX(26px);
                                    -ms-transform: translateX(26px);
                                    transform: translateX(26px);
                                }

                                /* Rounded sliders */
                                .slider.round {
                                    border-radius: 34px;
                                }

                                    .slider.round:before {
                                        border-radius: 50%;
                                    }
                            </style>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblEmailRequired" Text="Email Notification is required?" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <label class="switch">
                                        <input type="checkbox" id="chkboxIsRequired" runat="server">
                                        <span class="slider round" data-checked="On" data-unchecked="Off"></span>
                                    </label>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblMailId" runat="server" Text="Admin Mail Id"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtMailId" runat="server" CssClass="form-control mandatory"
                                        onCut="return false" onDrop="return false" MaxLength="50"></asp:TextBox>
                                    <%-- <asp:RegularExpressionValidator ID="RegVtxtMailId" runat="server" ErrorMessage="Enter Valid Email Id"
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="txtMailId"
                                        Display="None" SetFocusOnError="True">*</asp:RegularExpressionValidator>--%>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblServerIP" runat="server" Text="Server IP/Host Name"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtIPAddress" runat="server" CssClass="form-control mandatory"
                                        onCut="return false" onDrop="return false" MaxLength="30"></asp:TextBox>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblSMTPPort" runat="server" Text="SMTP Port"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtSMTPPort" runat="server" CssClass="form-control mandatory"
                                        onCut="return false" onDrop="return false" MaxLength="5"></asp:TextBox>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblSSLEnable" runat="server" Text="SSL Enable"></asp:Label>
                                </div>
                                <div class="col-md-3" style="padding-left: 0px">
                                    <div class="col-md-4">
                                        <asp:RadioButton ID="rbtnSSLYes" runat="server" CssClass="radio radio-primary" GroupName="SSL"
                                            Text="Yes" />
                                    </div>
                                    <div class="col-md-4">
                                        <asp:RadioButton ID="rbtnSSLNo" runat="server" GroupName="SSL" Text="No" CssClass="radio radio-primary" />
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblAuthentication" runat="server" Text="Authentication"></asp:Label>
                                </div>
                                <div class="col-md-3" style="padding-left: 0px">
                                    <div class="col-md-4">
                                        <asp:RadioButton ID="rbtnAuthenticationYes" GroupName="Authentication" runat="server"
                                            Text="Yes" onclick="return AuthenticateUserEnableDisable('1');" CssClass="radio radio-primary" />
                                    </div>
                                    <div class="col-md-4">
                                        <asp:RadioButton ID="rbtnAuthenticationNo" GroupName="Authentication" runat="server"
                                            Text="No" onclick="return AuthenticateUserEnableDisable('0');" CssClass="radio radio-primary" />
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblUserName" runat="server" Text="User Name"></asp:Label><span style="color: #ff0000"></span>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtUserName" runat="server" CssClass="form-control"
                                        onCut="return false" onDrop="return false" MaxLength="30"></asp:TextBox>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-3">
                                    <asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label><span style="color: #ff0000"></span>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtPassword" TextMode="Password" runat="server" autocomplete="new-password"
                                        CssClass="form-control" onCut="return false" onDrop="return false" MaxLength="30"></asp:TextBox>
                                  <%--  <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"
                                        CssClass="form-control" autocomplete="current-password"
                                        name="password" MaxLength="30">
</asp:TextBox>--%>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3">
                                </div>
                                <div class="col-md-3">
                                    <asp:CheckBox ID="chkboxShowpwd" Text="Show Password" runat="server"
                                        CssClass="checkbox checkbox-primary" onclick="showPassword(1)" />
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3">
                                </div>
                                <div class="col-md-3">
                                    <div class="pull-right-button">
                                        <asp:LinkButton ID="lnkMailConfig" CssClass="btn save-btn fa-floppy-o" runat="server"
                                            OnClientClick="javascript:if(Page_ClientValidate()) return MailValidation();return false;"
                                            OnClick="lnkMailConfig_Click" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="config-hdr">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="Label11" runat="server" Text="Test Email Functionality"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="row form-group">
                                        <div class="col-sm-3 con-top">
                                            <asp:Label ID="lbl_EmailIDTest" runat="server" Text="Enter valid Email Id "></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:TextBox onpaste="return true" ID="txtEmailIDTest" runat="server" CssClass="form-control mandatory" ValidationGroup="vgSubmit"
                                                onCut="return false" onDrop="return false" MaxLength="30"></asp:TextBox>
                                            <%--   <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmailIDTest" Display="None" ValidationGroup="vgSubmit"  ErrorMessage="Please Enter Email ID" ></asp:RequiredFieldValidator>
                                               <cc1:ValidatorCalloutExtender ID="valUsername" runat="server" TargetControlID="rfvEmail"
                                                 Width="125px"></cc1:ValidatorCalloutExtender>
                                              <asp:RegularExpressionValidator ID="REV_EmailID" runat="server" ErrorMessage="Please Enter Valid Email ID" Display="None"  ValidationGroup="vgSubmit" ControlToValidate="txtEmailIDTest"
                                             ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">  </asp:RegularExpressionValidator>
                                              <cc1:ValidatorCalloutExtender ID="valEmailID" runat="server" TargetControlID="REV_EmailID" 
                                                Width="125px"></cc1:ValidatorCalloutExtender>--%>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="pull-left-button">
                                                <asp:TextBox Visible="false" ID="mailSendingmethod" Text="1" runat="server"></asp:TextBox>
                                                <asp:LinkButton ID="lnkTestEmail" CssClass="btn save-btn fa fa-envelope-o" runat="server" Text="" OnClick="lnkTestEmail_Click" ValidationGroup="vgSubmit" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <%--<div style="text-align:center;align:center;width:100%;border-bottom:2px solid red">-------------------</div>--%>
                    </div>
                </div>
                <div class="tab-pane" id="tab5" runat="server">
                    <div class="form-horizontal">
                        <!--Date & Time Format-->
                        <div class="config-hdr con-spc">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lbl_HeaderDateandTimeFormat" runat="server" Text="Date & Time Format"></asp:Label></h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-4 src-padRightBorder" style="margin-top: -20px; padding-bottom: 10px">
                                    <div class="row" style="margin-top: 20px">
                                        <div class="col-md-12">
                                            <asp:Label ID="lbl_DateFormat" runat="server" Style="font-weight: bold"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <asp:RadioButton ID="rbtnddmmyyyy" Text="dd/MM/yyyy" runat="server" GroupName="date"
                                                CssClass="radio radio-primary" Visible="true" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <asp:RadioButton ID="rbtnmmddyyyy" Text="MM/dd/yyyy" runat="server" GroupName="date"
                                                CssClass="radio radio-primary" />
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <asp:RadioButton ID="rbtnddmmmyy" Text="dd-MMM-yyyy" runat="server" GroupName="date"
                                                CssClass="radio radio-primary" Visible="true" />
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="row" style="margin-top: 20px">
                                        <div class="col-md-12">
                                            <asp:Label ID="lbl_TimeFormat" runat="server" Style="font-weight: bold"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <asp:RadioButton ID="rbtnHHmmss" Text="HH:mm" runat="server" GroupName="time" CssClass="radio radio-primary" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12">
                                            <asp:RadioButton ID="rbtnhhmmsstt" Text="hh:mm tt" runat="server" GroupName="time"
                                                CssClass="radio radio-primary" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <!--Branding & Personalize-->
                        <div class="config-hdr con-spc" style="margin-top: 0px !important">
                            <div class="row">
                                <div class="col-md-12">
                                    <h3>
                                        <asp:Label Font-Bold="true" ID="lbl_Branding" runat="server" Text="Branding & Personalize"></asp:Label>
                                    </h3>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 config-table">
                            <div class="row">
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_CusLogo" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-4">
                                    <asp:FileUpload ID="fp_Upload" runat="server" onCut="return false" onDrop="return false"
                                        onkeydown="return key_press_nokey(event)" onkeypress="return AcceptTab(event);" />&nbsp;&nbsp;&nbsp;
                                </div>
                                <div class="col-md-3">
                                    <asp:LinkButton ID="btn_Delete" runat="server" CausesValidation="false" CssClass="btn del-btn fa-trash-o"
                                        OnClick="btn_Delete_Click" OnClientClick="return validationDelete();" />
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div>
                            <!--Branding & Personalize-->
                            <div class="config-hdr con-spc" style="margin-top: 0px !important">
                                <div class="row">
                                    <div class="col-md-12">
                                        <h3>
                                            <asp:Label Font-Bold="true" ID="lblDomain" runat="server" Text="Domain"></asp:Label>
                                        </h3>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-12 config-table">
                                <div class="form-group">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbldomainrequre" runat="server" Text="If Domain login request"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:RadioButtonList runat="server" ID="rbtDomain" CssClass="radio radio-primary" RepeatDirection="Horizontal" onchange="GetRadioButtonListSelectedValue();">
                                            <asp:ListItem Text="Yes" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="No" Value="1" Selected="True"></asp:ListItem>
                                        </asp:RadioButtonList>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:Label ID="Label4" runat="server" Text="Domain Name"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox runat="server" ID="txt_DomainName" CssClass="form-control"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-3">
                                        <asp:Label ID="lblDomainadmin" runat="server" Text="Administrator User Name"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox runat="server" ID="txt_AdminUserName" CssClass="form-control"></asp:TextBox>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:Label ID="lblDomainAdminPass" runat="server" Text="Password"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:TextBox runat="server" ID="txt_AdminPassword" CssClass="form-control" TextMode="Password"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-12" align="right">

                                        <asp:LinkButton ID="lnhbtnTestDomain" runat="server" CssClass="btn save-btn fa-check-square-o" OnClientClick="return DomainTest();"></asp:LinkButton>
                                    </div>

                                </div>
                            </div>
                            <div class="clearfix">
                            </div>
                        </div>

                        <div class="col-md-12 config-table">
                            <div class="row form-group">
                                <div class="col-md-3">
                                </div>
                                <div class="col-md-9">
                                    <div class="pull-left-button">
                                        <asp:LinkButton ID="lnkbtnmyReferences" CssClass="btn save-btn fa-floppy-o" runat="server" Text="My preferences" Style="margin-left: 0px"
                                            OnClick="lnkbtnmyReferences_Click" OnClientClick="javascript:if(Page_ClientValidate()) return ValidateFileUploader();return false;" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $('.responsive-tabs').responsiveTabs({
            accordionOn: ['xs', 'sm']
        });
    </script>
    <script type="text/javascript">
        function ValidateFileUploader() 
        {  
            var array = ['JPEG', 'JPG', 'BMP', 'GIF','jpeg', 'jpg', 'bmp', 'gif'];
            var xyz=  document.getElementById('<%= fp_Upload.ClientID %>');
            if(xyz.value!='')
            {
                var Extension = xyz.value.substring(xyz.value.lastIndexOf('.') + 1).toLowerCase();
                if (array.indexOf(Extension) <= -1) 
                {
                    alert(PleaseselectGifJPEGJPGBMPFiles);
                    return false;
                }
            }
        }
        function GetRadioButtonListSelectedValue() {
            var list = document.getElementById("ctl00_BodyContentPH_rbtDomain"); //Client ID of the radiolist
            var inputs = list.getElementsByTagName("input");
            var selected;
            for (var i = 0; i < inputs.length; i++) {
                if (inputs[i].checked) {
                    selected = inputs[i];
                    break;
                }
            }
            if(selected.value=="0")
            {
                document.getElementById("ctl00_BodyContentPH_txt_DomainName").disabled = false;
                document.getElementById("ctl00_BodyContentPH_txt_AdminUserName").disabled = false;
                document.getElementById("ctl00_BodyContentPH_txt_AdminPassword").disabled = false;
            }
            else
            {
                document.getElementById("ctl00_BodyContentPH_txt_DomainName").disabled = true;
                document.getElementById("ctl00_BodyContentPH_txt_AdminUserName").disabled = true;
                document.getElementById("ctl00_BodyContentPH_txt_AdminPassword").disabled = true;

                document.getElementById("ctl00_BodyContentPH_txt_DomainName").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_AdminUserName").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_AdminPassword").value = "";
                //alert(selected.value);
            }
            //if (selected) {
            //    alert(selected.value);
            //}
        }
    </script>
    <script language="javascript" type="text/javascript">
        var EnterAdminEmailId = "Enter Admin mail Id";
        var EnterIPAddress = "Enter IP Address / Host Name";
        var EnterPortNumber = "Enter Port Number";
        var Areyousuretosave = "Are you sure, to save?";
        function SetMyreferencesAlertMessages(enterAdminEmailId, enterIPAddress, enterPortNumber, areyousuretosave) {
            EnterAdminEmailId = enterAdminEmailId;
            EnterIPAddress = enterIPAddress;
            EnterPortNumber = enterPortNumber;
            Areyousuretosave = areyousuretosave;
        }
        function AuthenticateUserEnableDisable(btnValue) {
            if (btnValue == '1') {
                document.getElementById('ctl00_BodyContentPH_txtUserName').disabled = false;
                document.getElementById('ctl00_BodyContentPH_txtPassword').disabled = false;
                document.getElementById('ctl00_BodyContentPH_txtUserName').style.background = "#ffffff";
                document.getElementById('ctl00_BodyContentPH_txtPassword').style.background = "#ffffff";
            }
            else {
                document.getElementById('ctl00_BodyContentPH_txtUserName').disabled = true;
                document.getElementById('ctl00_BodyContentPH_txtPassword').disabled = true;
                document.getElementById('ctl00_BodyContentPH_txtUserName').style.background = "#d3dbe7";
                document.getElementById('ctl00_BodyContentPH_txtPassword').style.background = "#d3dbe7";
                document.getElementById('ctl00_BodyContentPH_txtUserName').value = '';
                document.getElementById('ctl00_BodyContentPH_txtPassword').value = '';
            }
        }
        function MailValidation() {                        
            if (document.getElementById('ctl00_BodyContentPH_txtMailId').value == '') 
            {
                alert(EnterAdminEmailId);
                return false;
            }
            if (document.getElementById('ctl00_BodyContentPH_txtMailId').value != '') 
            {                
                var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;  
                if(document.getElementById('ctl00_BodyContentPH_txtMailId').value.match(mailformat))  
                {               
                } 
                else
                {
                    alert(EnterValidEmailId);
                    return false;  
                }
            }
            if (document.getElementById('ctl00_BodyContentPH_txtIPAddress').value == '') 
            {
                alert(EnterIPAddress);
                return false;
            }
            if (document.getElementById('ctl00_BodyContentPH_txtSMTPPort').value == '') {
                alert(EnterPortNumber);
                return false;
            }
            if (document.getElementById('ctl00_BodyContentPH_rbtnAuthenticationYes').checked == true)
            {
                if (document.getElementById('ctl00_BodyContentPH_txtUserName').value == '')
                {
                    document.getElementById('ctl00_BodyContentPH_txtUserName').disabled = false;
                    document.getElementById('ctl00_BodyContentPH_txtPassword').disabled = false;
                    document.getElementById('ctl00_BodyContentPH_txtUserName').style.background = "#ffffff";
                    document.getElementById('ctl00_BodyContentPH_txtPassword').style.background = "#ffffff";
                    alert(EnterUserName);
                    return false;
                }
                if (document.getElementById('ctl00_BodyContentPH_txtPassword').value == '')
                {
                    document.getElementById('ctl00_BodyContentPH_txtUserName').disabled = false;
                    document.getElementById('ctl00_BodyContentPH_txtPassword').disabled = false;
                    document.getElementById('ctl00_BodyContentPH_txtUserName').style.background = "#ffffff";
                    document.getElementById('ctl00_BodyContentPH_txtPassword').style.background = "#ffffff";
                    alert(EnterPassword);
                    return false;
                }
            }
            return confirm(Areyousuretosave);        
        }
    </script>
</asp:Content>
