 
 
function fnCheckUnCheck(objId) {

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


  
    var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");

    var rdoArray = grd.getElementsByTagName("input");



    for (i = 0; i <= rdoArray.length - 1; i++) {

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

        }
        else {
            j = i;

        }


        if (rdoArray[i].type == 'radio') {

            if (rdoArray[i].id == objId) {

                rdoArray[i].checked = true;

                if (rdoArray[i].id == objId) {

 
                    document.getElementById("ctl00_ContentPlaceHolder1_img_flightimage_selectedflight").src = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_ImageFlight").src;
                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_airlinename_selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelAirllinename").innerHTML;
                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_flightnumber_Selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelFlightNumber").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_airlinecode_Selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelAirlinecode").innerHTML;

               //     document.getElementById("ctl00_ContentPlaceHolder1_lbl_date_Selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelArrivedate").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_arrivaltime_Selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelArrivalTime").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_departuretime_selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelDepartTime").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare1_selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelTotalFare").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare_selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelTotalFare").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_netfare_selectedflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_lbl_netfare").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_agentearning_selecteflight").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_lbl_agentearning").innerHTML;

                    //______________LAVI____________
                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_basefare_Selected_One").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelBaseFare").innerHTML;
                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_AirportTax_Selected_One").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelAirportTax").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_Serice_Tax_Selected_One").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelServiceTax").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_txn_fee_Selected_One").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelScharge").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_bookingdiscount_Selected_One").innerHTML ="-"+ document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_Labeldiscount").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_total_fee_Selected_One").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare_selectedflight").innerHTML;

                    document.getElementById("ctl00_ContentPlaceHolder1_lbl_mics_selected").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_lbl_mics").innerHTML;
                    

                }
            }
            if (rdoArray[i].id != objId) {
                rdoArray[i].checked = false;

            }




        }

    }
}

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



// Retun radio button CheckUncheck and div display

function fnCheckUnCheckRound(objId) {




     

    var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");

    var rdoArray = grd.getElementsByTagName("input");


    for (i = 0; i <= rdoArray.length - 1; i++) {

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

        }
        else {
            j = i;

        }


        if (rdoArray[i].type == 'radio') {

            if (rdoArray[i].id == objId) {

                rdoArray[i].checked = true;

                if (rdoArray[i].id == objId) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_HiddenField_DepartRouteSeleted").value == "True") {

                        document.getElementById("ctl00_ContentPlaceHolder1_price_Detail").style.display = 'block';                                       
                                       document.getElementById("ctl00_ContentPlaceHolder1_img_flightimage_selectedflight_return").src=       document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_ImageFlight").src;
                     document.getElementById("ctl00_ContentPlaceHolder1_lbl_airlinename_selectedflight_return").innerHTML=  document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelAirllinename").innerHTML;
                      document.getElementById("ctl00_ContentPlaceHolder1_lbl_flightnumber_Selectedflight_return").innerHTML=  document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelFlightNumber").innerHTML;
                      document.getElementById("ctl00_ContentPlaceHolder1_lbl_airlinecode_Selectedflight_return").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelAirlinecode").innerHTML;




                      document.getElementById("ctl00_ContentPlaceHolder1_lbl_netfare_selectedflight_return").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_lbl_netfare").innerHTML;
                      document.getElementById("ctl00_ContentPlaceHolder1_lbl_agentearning_selecteflight_return").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_lbl_agentearning").innerHTML;



                   //     document.getElementById("ctl00_ContentPlaceHolder1_lbl_date_Selectedflight_return").innerHTML=  document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelArrivedate").innerHTML;

                                          document.getElementById("ctl00_ContentPlaceHolder1_lbl_arrivaltime_Selectedflight_return").innerHTML=  document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelArrivalTime").innerHTML;

                                             document.getElementById("ctl00_ContentPlaceHolder1_lbl_departuretime_selectedflight_return").innerHTML=  document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelDepartTime").innerHTML;

                                          document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare1_selectedflight_return").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelTotalFare").innerHTML;

                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare_selectedflight").innerHTML = parseInt(document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare1_selectedflight").innerHTML) + parseInt(document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare1_selectedflight_return").innerHTML);



                        //________Lavi ______
                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_basefare_Selected_Round").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelBaseFare").innerHTML;
                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_AirportTax_Selected_Round").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelAirportTax").innerHTML;

                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_Serice_Tax_Selected_Round").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelServiceTax").innerHTML;

                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_txn_fee_Selected_Round").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelScharge").innerHTML;

                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_bookingdiscount_Selected_Round").innerHTML ="-"+ document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_Labeldiscount").innerHTML;

                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_total_fee_Selected_Round").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_lbl_totalfare1_selectedflight_return").innerHTML;

                        document.getElementById("ctl00_ContentPlaceHolder1_lbl_mics_return_selected").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_lbl_mics_return").innerHTML;

                        var netfare = parseInt(document.getElementById("ctl00_ContentPlaceHolder1_lbl_netfare_selectedflight").innerHTML) + parseInt(document.getElementById("ctl00_ContentPlaceHolder1_lbl_netfare_selectedflight_return").innerHTML);
                     var agentearning= parseInt(document.getElementById("ctl00_ContentPlaceHolder1_lbl_agentearning_selecteflight").innerHTML) + parseInt(document.getElementById("ctl00_ContentPlaceHolder1_lbl_agentearning_selecteflight_return").innerHTML);
                     document.getElementById("ctl00_ContentPlaceHolder1_lbl_fare_withcompanycomm").innerHTML = "Net Fare: " + netfare + " Agent Earning: " + agentearning; 
                        
                      }


                }
            }
            if (rdoArray[i].id != objId) {
                rdoArray[i].checked = false;

            }

        }

    }

    if (document.getElementById("ctl00_ContentPlaceHolder1_HiddenField_DepartRouteSeleted").value == "") {
        alert("Please First Select the Departure Route");
    }

}


 
  



// Filter According to Airline Code//

function SelectedAirlines(flightCode, checkboxid) {


   try {
  

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");

        var rdoArray = grd.rows;



        for (i = 0; i <= rdoArray.length - 1; i++) {


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

            }
            else {
                j = i;

            }


            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelAirlinecode").innerHTML== flightCode) {



                if (document.getElementById(checkboxid).checked == true) {


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                        var m = parseInt(j,10) + 1;


                        if (m < 10) {
                            var n = '0' + m;

                        }
                        else {
                            n = m;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                        }

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'none';
                       
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'none';



                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }

  }
    catch (err) {
   }
}





// Filter According to Airline Code Return Flight//

function SelectedAirlines_Return(flightCode, checkboxid) {

    try {

        

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");

        var rdoArray = grd.rows;



        for (i = 0; i <= rdoArray.length - 1; i++) {


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

            }
            else {
                j = i;

            }


            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelAirlinecode").innerHTML == flightCode) {



                if (document.getElementById(checkboxid).checked == true) {


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                        var m = parseInt(j,10) + 1;


                        if (m < 10) {
                            var n = '0' + m;

                        }
                        else {
                            n = m;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                        }

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'none';
                      
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'none';



                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }
    }
    catch (err) {
    }
}







// Filter According to Refundable and Non-Refundable//

function Search_Refundable_Non_Refundable(flightfairStatus, checkboxid) {


    try {

        document.getElementById("ctl00_ContentPlaceHolder1_txt_focus").focus();

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");
        var rdoArray = grd.rows;



        for (i = 0; i <= rdoArray.length - 1; i++) {


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

            }
            else {
                j = i;

            }


            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelFlght_Refund_noRefund").innerHTML == flightfairStatus) {



                if (document.getElementById(checkboxid).checked == true) {



                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'block';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'block';

                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                    var m = parseInt(j,10) + 1;


                    if (m < 10) {
                        var n = '0' + m;

                    }
                    else {
                        n = m;


                    }



                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {






                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {
                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                        
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'none';


                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }
    }
    catch (err) {
    }
}





// Filter According to Refundable and Non-Refundable Return Flight//

function Search_Refundable_Non_Refundable_Return(flightfairStatus, checkboxid) {

    try {

        document.getElementById("ctl00_ContentPlaceHolder1_txt_focus").focus();

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");
        var rdoArray = grd.rows;


        for (i = 0; i <= rdoArray.length - 1; i++) {


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

            }
            else {
                j = i;

            }


            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelFlght_Refund_noRefund").innerHTML == flightfairStatus) {



                if (document.getElementById(checkboxid).checked == true) {



                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'block';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'block';

                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                    var m = parseInt(j,10) + 1;


                    if (m < 10) {
                        var n = '0' + m;

                    }
                    else {
                        n = m;


                    }



                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {






                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'none';


                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }
    }
    catch (err) {
    }
}




 

// Filter According to Depart Time//



function Search_DepartTime(DepartTime) {

    try {

        var hours = Math.floor(DepartTime / 4);
        if (hours < 10) {
            var F_hours = '0' + hours;
        }

        else {
            F_hours = hours;
        }

        var minutes = (DepartTime % 4) * 15;

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

        else {
            F_minutes = minutes;
        }
        var SelectedTotalTime = F_hours + ':' + F_minutes;
        var dtSliderTime = new Date("1/1/2007 " + SelectedTotalTime);


        document.getElementById("ctl00_ContentPlaceHolder1_Label_Slder_SelTime").innerHTML = SelectedTotalTime;


        document.getElementById("ctl00_ContentPlaceHolder1_txt_focus").focus();
        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");
        var rdoArray = grd.getElementsByTagName("span");



        for (i = 0; i <= rdoArray.length - 1; i++) {

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


            var temp = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelDepartTime");
            if (temp) {
                var Flight_DepartTime = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelDepartTime").innerHTML;
                var dtFlightDTime = new Date("1/1/2007 " + Flight_DepartTime);

                //________________________________________________________________________________________
                if (dtFlightDTime <= dtSliderTime) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";


                        var m = parseInt(j,10) + 1;

                        if (m < 10) {
                            var n = '0' + m;
                        }
                        else {
                            n = m;

                        }


                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                        }

                        var m = parseInt(j,10) + 2;

                        if (m < 10) {
                            var n = '0' + m;
                        }
                        else {
                            n = m;

                        }


                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                        }
                    }
                }


                //_________________________________________________________________________________
                if (dtFlightDTime > dtSliderTime) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'none';
                  
                        var k = parseInt(j,10) + 1;

                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }


                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                        }

                        var k = parseInt(j,10) + 2;

                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }


                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }
                //___________________________________________________________________________________
            }



        }
    }
    catch (err) {
    }
    
}








// Filter According to Depart Time Return Flight//



function Search_DepartTime_ReturnFlight(DepartTime) {


    try {
        var hours = Math.floor(DepartTime / 4);
        if (hours < 10) {
            var F_hours = '0' + hours;
        }

        else {
            F_hours = hours;
        }

        var minutes = (DepartTime % 4) * 15;

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

        else {
            F_minutes = minutes;
        }
        var SelectedTotalTime = F_hours + ':' + F_minutes;
        var dtSliderTime = new Date("1/1/2007 " + SelectedTotalTime);


        document.getElementById("ctl00_ContentPlaceHolder1_Label_Slder_SelTime_ReturnFlight").innerHTML = SelectedTotalTime;


        document.getElementById("ctl00_ContentPlaceHolder1_txt_focus").focus();
        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");
        var rdoArray = grd.getElementsByTagName("span");



        for (i = 0; i <= rdoArray.length - 1; i++) {

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


            var temp = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelDepartTime");
            if (temp) {
                var Flight_DepartTime = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelDepartTime").innerHTML;
                var dtFlightDTime = new Date("1/1/2007 " + Flight_DepartTime);


                if (dtFlightDTime <= dtSliderTime) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";


                        var m = parseInt(j,10) + 1;

                        if (m < 10) {
                            var n = '0' + m;
                        }
                        else {
                            n = m;

                        }


                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                        }
                        var m = parseInt(j,10) + 2;

                        if (m < 10) {
                            var n = '0' + m;
                        }
                        else {
                            n = m;

                        }
                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                        }
                        
                        
                        
                    }
                }



                if (dtFlightDTime > dtSliderTime) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'none';
                       
                        var k = parseInt(j,10) + 1;

                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }


                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                        }

                        var k = parseInt(j,10) + 2;

                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }


                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                        
                        
                        
                        
                    }
                }
            }



        }
    }
    catch (err) {
    }
}




//FLight filter click on check all
function checkalllavi() {
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_AI").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_G8").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IC").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_6E").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9W").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_S2").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IT").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9H").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_I7").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_SG").checked = true;

    SelectedAirlines("AI", "ctl00_ContentPlaceHolder1_CheckBox_AI");
    SelectedAirlines("G8", "ctl00_ContentPlaceHolder1_CheckBox_G8");
    SelectedAirlines("IC", "ctl00_ContentPlaceHolder1_CheckBox_IC");
    SelectedAirlines("6E", "ctl00_ContentPlaceHolder1_CheckBox_6E");
    SelectedAirlines("9W", "ctl00_ContentPlaceHolder1_CheckBox_9W");
    SelectedAirlines("S2", "ctl00_ContentPlaceHolder1_CheckBox_S2");
    SelectedAirlines("IT", "ctl00_ContentPlaceHolder1_CheckBox_IT");
    SelectedAirlines("9H", "ctl00_ContentPlaceHolder1_CheckBox_9H");
    SelectedAirlines("I7", "ctl00_ContentPlaceHolder1_CheckBox_I7");
    SelectedAirlines("SG", "ctl00_ContentPlaceHolder1_CheckBox_SG");



}


//Flight Filter click on check all
function uncheckAlllavi() {
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_AI").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_G8").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IC").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_6E").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9W").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_S2").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IT").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9H").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_I7").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_SG").checked = false;

    SelectedAirlines("AI", "ctl00_ContentPlaceHolder1_CheckBox_AI");
    SelectedAirlines("G8", "ctl00_ContentPlaceHolder1_CheckBox_G8");
    SelectedAirlines("IC", "ctl00_ContentPlaceHolder1_CheckBox_IC");
    SelectedAirlines("6E", "ctl00_ContentPlaceHolder1_CheckBox_6E");
    SelectedAirlines("9W", "ctl00_ContentPlaceHolder1_CheckBox_9W");
    SelectedAirlines("S2", "ctl00_ContentPlaceHolder1_CheckBox_S2");
    SelectedAirlines("IT", "ctl00_ContentPlaceHolder1_CheckBox_IT");
    SelectedAirlines("9H", "ctl00_ContentPlaceHolder1_CheckBox_9H");
    SelectedAirlines("I7", "ctl00_ContentPlaceHolder1_CheckBox_I7");
    SelectedAirlines("SG", "ctl00_ContentPlaceHolder1_CheckBox_SG");

}


//FLight filter click on check all
function checkalllavi_return() {
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_AI_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_G8_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IC_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_6E_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9W_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_S2_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IT_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9H_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_I7_return").checked = true;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_SG_return").checked = true;

    SelectedAirlines_Return("AI", "ctl00_ContentPlaceHolder1_CheckBox_AI_return");
    SelectedAirlines_Return("G8", "ctl00_ContentPlaceHolder1_CheckBox_G8_return");
    SelectedAirlines_Return("IC", "ctl00_ContentPlaceHolder1_CheckBox_IC_return");
    SelectedAirlines_Return("6E", "ctl00_ContentPlaceHolder1_CheckBox_6E_return");
    SelectedAirlines_Return("9W", "ctl00_ContentPlaceHolder1_CheckBox_9W_return");
    SelectedAirlines_Return("S2", "ctl00_ContentPlaceHolder1_CheckBox_S2_return");
    SelectedAirlines_Return("IT", "ctl00_ContentPlaceHolder1_CheckBox_IT_return");
    SelectedAirlines_Return("9H", "ctl00_ContentPlaceHolder1_CheckBox_9H_return");
    SelectedAirlines_Return("I7", "ctl00_ContentPlaceHolder1_CheckBox_I7_return");
    SelectedAirlines_Return("SG", "ctl00_ContentPlaceHolder1_CheckBox_SG_return");



}


//Flight Filter click on check all
function uncheckAlllavi_return() {
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_AI_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_G8_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IC_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_6E_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9W_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_S2_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_IT_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_9H_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_I7_return").checked = false;
    document.getElementById("ctl00_ContentPlaceHolder1_CheckBox_SG_return").checked = false;


    SelectedAirlines_Return("AI", "ctl00_ContentPlaceHolder1_CheckBox_AI_return");
    SelectedAirlines_Return("G8", "ctl00_ContentPlaceHolder1_CheckBox_G8_return");
    SelectedAirlines_Return("IC", "ctl00_ContentPlaceHolder1_CheckBox_IC_return");
    SelectedAirlines_Return("6E", "ctl00_ContentPlaceHolder1_CheckBox_6E_return");
    SelectedAirlines_Return("9W", "ctl00_ContentPlaceHolder1_CheckBox_9W_return");
    SelectedAirlines_Return("S2", "ctl00_ContentPlaceHolder1_CheckBox_S2_return");
    SelectedAirlines_Return("IT", "ctl00_ContentPlaceHolder1_CheckBox_IT_return");
    SelectedAirlines_Return("9H", "ctl00_ContentPlaceHolder1_CheckBox_9H_return");
    SelectedAirlines_Return("I7", "ctl00_ContentPlaceHolder1_CheckBox_I7_return");
    SelectedAirlines_Return("SG", "ctl00_ContentPlaceHolder1_CheckBox_SG_return");

}




// Stop fliter
function Stopages(val, checkboxid) {


    try {

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");
        var rdoArray = grd.rows;
        
         for (i = 0; i <= rdoArray.length - 1; i++) {
            if (i < 10) {
                var j = '0' + i;
            }
            else {
                j = i;
            }

            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelStopQuantity").innerHTML == val) {



                if (document.getElementById(checkboxid).checked == true) {


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                        var m = parseInt(j,10) + 1;


                        if (m < 10) {
                            var n = '0' + m;

                        }
                        else {
                            n = m;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                        }

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'none';
                   
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'none';



                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }

    }
    catch (err) {
    }
}




//stopagfe filter for 1+
function Stopages1p(val, checkboxid) {


    try {

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");
        var rdoArray = grd.rows;
        for (i = 0; i <= rdoArray.length - 1; i++) {
            if (i < 10) {
                var j = '0' + i;
            }
            else {
                j = i;
            }

            if (parseInt(document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelStopQuantity").innerHTML) > parseInt(val)) {



                if (document.getElementById(checkboxid).checked == true) {


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                        var m = parseInt(j,10) + 1;


                        if (m < 10) {
                            var n = '0' + m;

                        }
                        else {
                            n = m;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                        }

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {
                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') { 

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'none';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'none';



                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }

    }
    catch (err) {
    }
}





// Stop fliter
function Stopages_return(val, checkboxid) {


    try {

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");
        var rdoArray = grd.rows;
        for (i = 0; i <= rdoArray.length - 1; i++) {
            if (i < 10) {
                var j = '0' + i;
            }
            else {
                j = i;
            }

            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelStopQuantity").innerHTML == val) {



                if (document.getElementById(checkboxid).checked == true) {


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                        var m = parseInt(j,10) + 1;


                        if (m < 10) {
                            var n = '0' + m;

                        }
                        else {
                            n = m;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                        }

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {
                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
 
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'none';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'none';



                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }

    }
    catch (err) {
    }
}




//stopagfe filter for 1+
function Stopages1p_return(val, checkboxid) {


    try {

        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");
        var rdoArray = grd.rows;
        for (i = 0; i <= rdoArray.length - 1; i++) {
            if (i < 10) {
                var j = '0' + i;
            }
            else {
                j = i;
            }

            if (parseInt(document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelStopQuantity").innerHTML) > parseInt(val)) {



                if (document.getElementById(checkboxid).checked == true) {


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                        var m = parseInt(j,10) + 1;


                        if (m < 10) {
                            var n = '0' + m;

                        }
                        else {
                            n = m;


                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';

                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                        }

                    }
                }


                if (document.getElementById(checkboxid).checked == false) {

                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') { 
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'none';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'none';



                        var k = parseInt(j, 10) + 1;


                        if (k < 10) {
                            var l = '0' + k;

                        }
                        else {
                            l = k;

                        }



                        if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {


                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                            document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                        }
                    }
                }

            }

        }

    }
    catch (err) {
    }
}








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 grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");

    var rdoArray = grd.rows;


    for (i = 0; i <= rdoArray.length - 1; i++) {


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

        }
        else {
            j = i;

        }
        var Flight_fair = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelTotalFare").innerHTML;







        if (parseInt(Flight_fair) >= parseInt(fair) && parseInt(Flight_fair) <= parseInt(maxfare)) {


            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'block';

                document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'block';

                document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                var m = parseInt(j, 10) + 1;


                if (m < 10) {
                    var n = '0' + m;

                }
                else {
                    n = m;


                }



                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {






                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';

                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                }
            }
        }




        else {

            if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'none';
 
                document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'none';


                var k = parseInt(j, 10) + 1;


                if (k < 10) {
                    var l = '0' + k;

                }
                else {
                    l = k;


                }



                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {


                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                }
            }
        }




    }

}






function Search_Price_return(minfair, maxfare) {

    try {

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


        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_minprice_slider_return").innerHTML = fair;
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_maxprice_slider_return").innerHTML = maxfare;


        var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");

        var rdoArray = grd.rows;


        for (i = 0; i <= rdoArray.length - 1; i++) {


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

            }
            else {
                j = i;

            }
            var Flight_fair = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelTotalFare").innerHTML;







            if (parseInt(Flight_fair) >= parseInt(fair) && parseInt(Flight_fair) <= parseInt(maxfare)) {


                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'block';

                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'block';

                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";



                    var m = parseInt(j, 10) + 1;


                    if (m < 10) {
                        var n = '0' + m;

                    }
                    else {
                        n = m;


                    }



                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {






                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                    }
                }
            }




            else {

                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'none';

                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'none';


                    var k = parseInt(j, 10) + 1;


                    if (k < 10) {
                        var l = '0' + k;

                    }
                    else {
                        l = k;


                    }



                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {


                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                    }
                }
            }




        }
    }
    catch (err) {
    }

}






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 = min % 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 grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne");
    var rdoArray = grd.rows;



    for (i = 0; i <= rdoArray.length - 1; i++) {

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


        var temp = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelDepartTime");
        if (temp) {
            var Flight_DepartTime = document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_LabelDepartTime").innerHTML;
            var dtFlightDTime = new Date("1/1/2007 " + Flight_DepartTime);

            //________________________________________________________________________________________
            if (dtFlightDTime >= dtSliderTimemin && dtFlightDTime <= dtSliderTimemax) {

                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'block';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'block';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";


                    var m = parseInt(j, 10) + 1;

                    if (m < 10) {
                        var n = '0' + m;
                    }
                    else {
                        n = m;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                    }

                    var m = parseInt(j, 10) + 2;

                    if (m < 10) {
                        var n = '0' + m;
                    }
                    else {
                        n = m;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_div_FlightData").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + n + "_trseperatorline").style.display = 'none';

                    }
                }
            }


            //_________________________________________________________________________________
            else {

                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_trseperatorline").style.display == 'block') {
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_div_FlightData").style.display = 'none';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + j + "_img_seperator").style.display = 'none';

                    var k = parseInt(j, 10) + 1;

                    if (k < 10) {
                        var l = '0' + k;

                    }
                    else {
                        l = k;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                    }

                    var k = parseInt(j, 10) + 2;

                    if (k < 10) {
                        var l = '0' + k;

                    }
                    else {
                        l = k;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListOne_ctl" + l + "_trseperatorline").style.display = 'none';

                    }
                }
            }
            //___________________________________________________________________________________
        }



    }
}





function Time_Filter_return(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_return").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 = min % 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_return").innerHTML = SelectedTotalTime;
    var dtSliderTimemax = new Date("1/1/2007 " + SelectedTotalTime);
    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_dash_return").style.display = 'block';
    document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_maxtime_slider_return").style.display = 'block';

    if (min == "0" && max == "1440") {
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_mintime_slider_return").innerHTML = "Anytime";
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_dash_return").style.display = 'none';
        document.getElementById("ctl00_ContentPlaceHolder1_lbl_filter_maxtime_slider_return").style.display = 'none';
    }

    //___________





    var grd = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound");
    var rdoArray = grd.rows;



    for (i = 0; i <= rdoArray.length - 1; i++) {

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


        var temp = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelDepartTime");
        if (temp) {
            var Flight_DepartTime = document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_LabelDepartTime").innerHTML;
            var dtFlightDTime = new Date("1/1/2007 " + Flight_DepartTime);

            //________________________________________________________________________________________
            if (dtFlightDTime >= dtSliderTimemin && dtFlightDTime <= dtSliderTimemax) {

                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'block';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'block';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").src = "../images/rowseperator.jpg";


                    var m = parseInt(j, 10) + 1;

                    if (m < 10) {
                        var n = '0' + m;
                    }
                    else {
                        n = m;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                    }

                    var m = parseInt(j, 10) + 2;

                    if (m < 10) {
                        var n = '0' + m;
                    }
                    else {
                        n = m;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_div_FlightData").style.display = 'block';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + n + "_trseperatorline").style.display = 'none';

                    }
                }
            }


            //_________________________________________________________________________________
            else {

                if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_trseperatorline").style.display == 'block') {
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_div_FlightData").style.display = 'none';
                    document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + j + "_img_seperator").style.display = 'none';

                    var k = parseInt(j, 10) + 1;

                    if (k < 10) {
                        var l = '0' + k;

                    }
                    else {
                        l = k;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                    }

                    var k = parseInt(j, 10) + 2;

                    if (k < 10) {
                        var l = '0' + k;

                    }
                    else {
                        l = k;

                    }


                    if (document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display == 'none') {

                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_div_FlightData").style.display = 'none';
                        document.getElementById("ctl00_ContentPlaceHolder1_DataListRound_ctl" + l + "_trseperatorline").style.display = 'none';

                    }
                }
            }
            //___________________________________________________________________________________
        }



    }
}



   