//Controla que los campos de vueloIda y vuelo vuelta tenga valores para pasar al plan de viaje
function ErroresDisponibilidad(event, tipoDisponibilidad, calendario, tipo, ow) {
    //Tipo de tarifas
    //if (tipo == '1') {
        fuente = 'ctl00_MainContentPlaceHolder_UC_DispOW1_'
    //}
//    else {
//        if (tipoDisponibilidad == "True") {
//            fuente = 'ctl00_MainContentPlaceHolder_UC_DispOW1_'
//        }
//        else {

//            fuente = 'ctl00_MainContentPlaceHolder_UC_DispRT1_'
//        }
//    }

    if (calendario == "") {
        if (tipoDisponibilidad == "False") {
            var VueloIda = $get(fuente + 'VueloIdaOculto').value;

            if (VueloIda == "") {
                BuscarErrorCache("82500002"); //_DISP_ERR_SEL_VUELO_IDA
                return false;
            }
        }
        else if (tipoDisponibilidad == "True") {
            var VueloIda = $get(fuente + 'VueloIdaOculto').value;

            if (VueloIda == "") {
                BuscarErrorCache("82500002"); //_DISP_ERR_SEL_VUELO_IDA
                return false;
            }
            else {
                var VueloVuelta = $get(fuente + 'VueloVueltaOculto').value;

                if (VueloVuelta == "") {
                    BuscarErrorCache("82500003"); //_DISP_ERR_SEL_VUELO_VUELTA
                    return false;
                }
            }
        }
    }
    else {
        return true;
    }

    return true;
}

function BuscadorHorarioVuelo() {
    var Result = true;
    var SelOri = $get('ctl00_MainContentPlaceHolder_UC_BHorario1_UC_OriDest1_lstOrigen');

    if (SelOri.options[SelOri.selectedIndex].innerHTML == 'Origen') {
        BuscarErrorCache("82500002"); //_DISP_ERR_SEL_VUELO_IDA
        Result = false;
    }
    else {
        var SelDest = $get('ctl00_MainContentPlaceHolder_UC_BHorario1_UC_OriDest1_lstDestino');

        if (SelDest.options[SelDest.selectedIndex].innerHTML == 'Destinos') {
            BuscarErrorCache("82500003"); //_DISP_ERR_SEL_VUELO_VUELTA
            Result = false;
        }
    }

    return Result;
}