Msettings.cssFiles.push('theme/' + CMsettings.config.theme + '.css');
                document.documentElement.className += CMsettings.config.theme.replace(/(^|\s)\s*/g, " cm-s-");
            }

            // Write stylesheets
            for (i = 0; i < CMsettings.cssFiles.length; i++) {
                document.write('<li' + 'nk rel="stylesheet" type="text/css" href="' + CMsettings.path + CMsettings.cssFiles[i] + '" />');
            }

            // Write JS source files
            for (i = 0; i < CM