var timeoutFuturos;
                
function onLoadFuturos() {
    onLoadColumnaDerecha();
    // Defino el tiempo a esperar para obtener nuevamente los datos.
    timeoutFuturos = setTimeout("getCotizacionesFuturos()", timeToRefresh);
    // Defino el tiempo para cancelar la solicitud.
    DWREngine.setTimeout(timeToCancelRefresh);
    // Defino el manejador de errores para dwr.
    DWREngine.setErrorHandler(errorHandlerDwr);
}

function getCotizacionesFuturos() {
    // Cancelo el timer para que no refresque por el momento.
    window.clearTimeout(timeoutFuturos);
    // Obtengo los datos.
    Futuros.getHTMLCotizaciones(onDatosRecibidosCotizacionFuturos);
    // Defino el tiempo a esperar para obtener nuevamente los datos.
    timeoutFuturos = setTimeout("getCotizacionesFuturos()", timeToRefresh);
}
  
function onDatosRecibidosCotizacionFuturos(data) {
    // Cancelo el timer para que no refresque por el momento.
    window.clearTimeout(timeoutFuturos);
    // Cargo en la página los datos obtenidos.
    DWRUtil.setValue("cotizacionFuturo", data);
    // Defino el tiempo a esperar para obtener nuevamente los datos.
    timeoutFuturos = setTimeout("getCotizacionesFuturos()", timeToRefresh);
}

function errorHandlerDwr(msg) {
    window.defaultStatus="Error al obtener los datos... " + msg;
}
