function toggleScreenReaderMode() {
    if (window.location.href.indexOf("ScreenReader.html") >= 0) {
       window.location.href = 'Default.html';
    } else {
         var querystring = '';
        if (window.location && window.location.href) {
            var matches = window.location.href.match(/[\?\&]{1}(plugin=[^\?\&\#]+)/i);
            if (matches && matches.length && matches.length == 2) {
                querystring = '?' + matches[1];
            }
        }
        window.location.href = 'ScreenReader.html' + querystring;
    }
    
}

function setupPopoutPlayerUrl(url, popoutPlayerBehavior) {
    if (popoutPlayerBehavior == Mediasite.Player.PopOutPlayer.FullExperience) {
        // url: ".../UnknownPlayer.html?params..."
        var popoutPlayer = 'NewStandardPlayer.html';

        url = url.replace(/\/[a-z]*\.html/i, '/' + popoutPlayer);
    }
    return url;
}