function startIO() {
    var url;
    var scorm = null;

    if (checkLMSPresence()) {
        scorm = 'scorm=true';
    }

    if (scorm || location.search.indexOf('newwin=false') >= 0) {
        url  = document.location.pathname;
        url  = url.substring(0, url.lastIndexOf('/') + 1);
        url += 'html/hidden.htm' + location.search;
        if (scorm) {
            url += (location.search != '') ? '&' + scorm : '?' + scorm;
        }
        document.location.href = url;
    } else {
        var srch = location.search;
        if (sessionid) {
            srch += (srch == '' ? '?' : '&') + sessionid;
        }
        var mainWin = openWin(getWidthOfWBC(), getHeightOfWBC(), 'html/hidden.htm' + srch, 'mainWin', false);

        if (!mainWin) {
            top.location.href = './support/error.html';
            return; 
        }

        url = document.location.href;
        if (url.indexOf('file:') == 0) {
            if (!browser.ie) {
                self.close();
            }
        } else {
            self.history.back();
        }
    }
}

function startLogin() {
    checkLMSInitialization();
    parent.login.document.location.href = 'login.htm';
}

function startWBC() {
    var url;
    url  = document.location.href;
    url  = url.substring(0, url.lastIndexOf('/') + 1);
    url += 'frame.htm';
    document.location.href = url;
}

function quitWBC() {
    if (parent.location.search.indexOf('newwin=false') < 0) {
        top.close();
    } else {
        top.document.location.href = 'blank.htm';
    }
}