<!--
    YAHOO.namespace("gmission.container");

    function delayLoad(e, url, secure) {
        // Initialize the temporary Panel to display while waiting for external content to load
        YAHOO.gmission.container.wait =
        new YAHOO.widget.Panel("wait",
	        { width: "240px",
	            fixedcenter: true,
	            close: false,
	            draggable: false,
	            zindex: 4,
	            modal: true,
	            visible: false
	        }
        );

        YAHOO.gmission.container.wait.setHeader("Loading, please wait...");
        YAHOO.gmission.container.wait.setBody('<img src="/images/loading.gif" />');
        YAHOO.gmission.container.wait.render(document.body);

        var loadTime = new scriptTime();

        function setLocation(url, secure) {
            YAHOO.gmission.container.wait.hide();
            window.location = getSecureUrl(url, secure);
        }
        
        function callbackHandler(o) {
            loadTime.setEndTime();
            var destUrl = this.url;
            var makeSecure = this.secure;
            if (loadTime.getRunTime() >= 1000) {
                setLocation(destUrl, makeSecure);
            } else {
                var loadTimeout = setTimeout(function(){setLocation(destUrl, makeSecure)}, 1000-loadTime.getRunTime());
            }
        }
        
        var callback = {
            success: callbackHandler,
            failure: callbackHandler,
            url: url,
            secure: secure
        }

        // Show the Panel
        YAHOO.gmission.container.wait.show();
        loadTime.setStartTime();
        
        // Connect to our data source and load the data
        YAHOO.util.Connect.asyncRequest("GET", url, callback);
        YAHOO.util.Event.stopEvent(e);
    }
//-->


