﻿function SelectRibbonTab(tabId, force) {
    ULSxSy: ;
    var ribbon = null;
    if (tabId == "Ribbon.Document" || tabId == "Ribbon.ListItem") {
        tabId = "Ribbon.Browse";
    }
    try {
        ribbon = SP.Ribbon.PageManager.get_instance().get_ribbon();
    }
    catch (e) {
    }
    if (!ribbon) {
        if (typeof (_ribbonStartInit) == "function")
            _ribbonStartInit(tabId, false, null);
    }
    else if (force || ribbon.get_selectedTabId() == "Ribbon.Read") {
        ribbon.selectTabById(tabId);
    }
}

