function fnCheckUnChecknew(spanChk, TotalfareID, LabelBaseFareID, TaxFareId, 
TotalFareWitoutmarkupID, LabelTotalfareWithoutMarkup_Datalist, LabelAgentEarning_Datalist,
 HiddenField_SelectedFlght_Taxes, flightNumberID, flightAirLineCodeID, FlightNameiD,ImageUrl, AgentCOmmission, CompanyCommission) {

  
    
    
    try {
        document.getElementById("ctl00_ContentPlaceHolder1_HiddenField_DepartRouteSeleted").value = "True";
        if (document.getElementById("ctl00_ContentPlaceHolder1_HiddenField_Roundtrip").value == "True") {
            document.getElementById("ctl00_ContentPlaceHolder1_divbooking").style.display = 'none';
        }
        else {
            document.getElementById("ctl00_ContentPlaceHolder1_divbooking").style.display = 'block';
        }

        //
        //
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalFare").innerHTML = document.getElementById(TotalfareID).innerHTML;
        document.getElementById("ctl00_ContentPlaceHolder1_LabelBaseFare").innerHTML = document.getElementById(LabelBaseFareID).innerHTML;
        document.getElementById("ctl00_ContentPlaceHolder1_LabelTaxes").innerHTML = document.getElementById(HiddenField_SelectedFlght_Taxes).innerHTML;
//        document.getElementById("ctl00_ContentPlaceHolder1_LabelTotalfareWithoutMarkup").innerHTML = document.getElementById(LabelTotalfareWithoutMarkup).innerHTML;
 
        document.getElementById("ctl00_ContentPlaceHolder1_Labelflightname").innerHTML = document.getElementById(FlightNameiD).innerHTML;
        document.getElementById("ctl00_ContentPlaceHolder1_LabelOperatingAirlineCode").innerHTML = document.getElementById(flightAirLineCodeID).innerHTML.replace("<br>", '');
        document.getElementById("ctl00_ContentPlaceHolder1_Labelflightnumber").innerHTML = document.getElementById(flightNumberID).innerHTML;
        document.getElementById("ctl00_ContentPlaceHolder1_LabelTfare").innerHTML = document.getElementById(TotalfareID).innerHTML;
        
//        document.getElementById("ctl00_ContentPlaceHolder1_LabelTotalfareWithoutMarkupShow").innerHTML = document.getElementById(LabelTotalfareWithoutMarkup).innerHTML;
        document.getElementById("ctl00_ContentPlaceHolder1_imageselectedflight").src = document.getElementById(ImageUrl).src;
        var agentcommssion = parseInt(document.getElementById(AgentCOmmission).innerHTML);
        var companycommssion = parseInt(document.getElementById(CompanyCommission).innerHTML);
        var farewithagentcommission = parseInt(document.getElementById(TotalfareID).innerHTML);
        var farewithcompanycommission = farewithagentcommission - agentcommssion;  //+ companycommssion;
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_fare_withcompanycomm").innerHTML = "Net Fare :" + farewithcompanycommission + " Agent Earning :" + agentcommssion;
        document.getElementById("ctl00_ContentPlaceHolder1_LabelTfare").innerHTML = farewithcompanycommission;
    
        var oItem = spanChk.children;
        var theBox = (spanChk.type == "radio") ?
    spanChk : spanChk.children.item[0];


        if (theBox == null) { }
        else {
            xState = theBox.unchecked;
            elm = theBox.form.elements;

            for (i = 0; i < elm.length; i++)
                if (elm[i].type == "radio" &&
elm[i].id != theBox.id) {
                elm[i].checked = xState;
            }
        }
    }
    catch (err) {
    }

 }

 function showhide_netfare_selected() {
     if (document.getElementById('link_showhidenetfare').innerHTML == "SNF") {
         document.getElementById('ctl00_ContentPlaceHolder1_lbl_fare_withcompanycomm').style.display = '';
         document.getElementById('link_showhidenetfare').innerHTML = "HNF";
     }
     else {
         document.getElementById('ctl00_ContentPlaceHolder1_lbl_fare_withcompanycomm').style.display = 'none';
         document.getElementById('link_showhidenetfare').innerHTML = "SNF";
     }
 }
 
  function show_hide_netfare_all() {
      if (document.getElementById('link_show_hide_all_fare').innerHTML == "SNF") {
           var table = document.getElementById("sortabletable");
           for (var i = 1, row; row = table.rows[i]; i++) {
               if (i < 10) {
                   var j = '0' + i;

               }
               else {
                   j = i;

               }

               document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_lbl_shownetfare_text").style.display = '';
               document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_lbl_showagentearning_text").style.display = '';
               

           }
         
         document.getElementById('link_show_hide_all_fare').innerHTML = "HNF";
     }
     else {
         var table = document.getElementById("sortabletable");
         for (var i = 1, row; row = table.rows[i]; i++) {
             if (i < 10) {
                 var j = '0' + i;

             }
             else {
                 j = i;

             }

             document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_lbl_shownetfare_text").style.display = 'none';
             document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_lbl_showagentearning_text").style.display = 'none';


         }

         document.getElementById('link_show_hide_all_fare').innerHTML = "SNF";
     }
 }
 
 
  
function hideRows(flightCode, IndexCheckbox) {



    if (IndexCheckbox.checked == false) {
        var table = document.getElementById("sortabletable");
        for (var i = 1, row; row = table.rows[i]; i++) {


            if (i < 10) {
                var j = '0' + i;

            }
            else {
                j = i;

            }

            var flihtCodeSS = document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_lbl_flightcode_0").innerHTML;

            // flihtCodeSS = flihtCodeSS.replace("-", "");
            flihtCodeSS = flihtCodeSS.substring(0, 2);

            if (flihtCodeSS == flightCode) {

                rowcurrent = table.rows[i].rowIndex;
                table.rows[i].style.display = 'none';





            }


        }



    }
    else {
        var table = document.getElementById("sortabletable");
        for (var i = 1, row; row = table.rows[i]; i++) {


            if (i < 10) {
                var j = '0' + i;

            }
            else {
                j = i;

            }


            var flihtCodeSS = document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_lbl_flightcode_0").innerHTML;
            flihtCodeSS = flihtCodeSS.substring(0, 2);

            if (flihtCodeSS == flightCode) {

                rowcurrent = table.rows[i].rowIndex;
                table.rows[i].style.display = 'block';
                table.rows[i].style.display = '';


            }


        }



    }

}






function Search_Price(minfair, maxfare) {



    var fair = parseInt(minfair);
    var maxfare = maxfare;


    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_minprice_slider").innerHTML = fair;
    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_maxprice_slider").innerHTML = maxfare;


    var table = document.getElementById("sortabletable");
    for (var i = 1, row; row = table.rows[i]; i++) {


        if (i < 10) {
            var j = '0' + i;

        }
        else {
            j = i;

        }

        var Flight_fair = document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_LabelTotalFare").innerHTML;
        if (parseInt(Flight_fair) >= parseInt(fair) && parseInt(Flight_fair) <= parseInt(maxfare)) {
            rowcurrent = table.rows[i].rowIndex;
            table.rows[i].style.display = 'block';
            table.rows[i].style.display = '';

        }
        else {
            rowcurrent = table.rows[i].rowIndex;
            table.rows[i].style.display = 'none';
        }
    }
}





function Time_Filter(min, max) {

    var hours = parseInt(min / 60, 10);
    if (hours < 10) {
        var F_hours = '0' + hours;
    }

    else {
        F_hours = hours;
    }

    var minutes = min % 60;

    if (minutes < 10) {
        var F_minutes = '0' + minutes;
    }

    else {
        F_minutes = minutes;
    }
    var SelectedTotalTime = F_hours + ':' + F_minutes;
    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_mintime_slider").innerHTML = SelectedTotalTime;
    var dtSliderTimemin = new Date("1/1/2007 " + SelectedTotalTime);
    //___________________
    hours = parseInt(max / 60, 10);
    if (hours < 10) {
        var F_hours = '0' + hours;
    }

    else {
        F_hours = hours;
    }

    minutes = max % 60;

    if (minutes < 10) {
        var F_minutes = '0' + minutes;
    }

    else {
        F_minutes = minutes;
    }
    SelectedTotalTime = F_hours + ':' + F_minutes;
    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_maxtime_slider").innerHTML = SelectedTotalTime;
    var dtSliderTimemax = new Date("1/1/2007 " + SelectedTotalTime);
    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_dash").style.display = 'block';
    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_maxtime_slider").style.display = 'block';

    if (min == "0" && max == "1440") {
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_mintime_slider").innerHTML = "Anytime";
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_dash").style.display = 'none';
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_maxtime_slider").style.display = 'none';
    }

    //___________

    var table = document.getElementById("sortabletable");
    for (var i = 1, row; row = table.rows[i]; i++) {


        if (i < 10) {
            var j = '0' + i;

        }
        else {
            j = i;

        }



        var Flight_DepartTime = document.getElementById("ctl00_ContentPlaceHolder1_rep_InterNationalAir_ctl" + j + "_Lbl_DepartTime_0").innerHTML.replace('<br>', '');
      Flight_DepartTime=  Flight_DepartTime.split(' ')[1];
        var dtFlightDTime = new Date("1/1/2007 " + Flight_DepartTime);

        //________________________________________________________________________________________
        if (dtFlightDTime >= dtSliderTimemin && dtFlightDTime <= dtSliderTimemax) {
            rowcurrent = table.rows[i].rowIndex;
            table.rows[i].style.display = 'block';
            table.rows[i].style.display = '';

        }
        else {
            rowcurrent = table.rows[i].rowIndex;
            table.rows[i].style.display = 'none';
            


        }
    }
}


 


          

           


  












  

 
   

   