?intermediate_frame_id.js?

function navigateToCupStub(url) {
    if(isInsideIntermediateFrame())
    {
        window.location.replace(url);
        return;
    }
    var frame = document.createElement('iframe');
    frame.style.cssText = "position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; z-index:9999";
    frame.style.display = "none";
    frame.setAttribute("name", IntermediateFrameId);
    document.body.appendChild(frame);
    document.body.style.overflow = "hidden";

    var onFrameLoad = function (event) {
        var frameDocument = event.target.contentWindow.document;
        document.title = frameDocument.title;

        try {
            Object.defineProperty(frameDocument, "title", {
                get: function() { return document.title; },
                set: function(newValue) { document.title = newValue; },
                enumerable: true,
                configurable: false
            });
        } catch (e) {}
        
        frame.style.display = "block";
    }

    if (frame.addEventListener) {
        frame.addEventListener('load', onFrameLoad, false);
    } else if (frame.attachEvent) {
        frame.attachEvent('onload', onFrameLoad);
    } else {
        frame.onload = onFrameLoad;
    }

    frame.src = url;
}

function navigateFromStub(url) {
    getNearestMeaningfulFrame().location.replace(url);
}