﻿DynamicCss = function() {
}

DynamicCss.prototype = {
    csses: [],
    initialize: function() {

        this.csses = ["global.css", "pages.css", "popup.css"];

    },
    dispose: function() {
        //Add custom dispose actions here
        DynamicCss.callBaseMethod(this, 'dispose');
    }
}
function addCss() {

    var header = document.getElementsByTagName("head")[0];

    if (header != null) {

        var siteCss = new DynamicCss();
        siteCss.initialize();

        for (var i = 0; i < siteCss.csses.length; i++) {

            var cssPath = siteCss.csses[i];
            var cssNode = document.createElement('link');
            
            cssNode.type = 'text/css';
            cssNode.rel = 'stylesheet';
            cssNode.href = cssRootPath + cssPath;
            cssNode.media = 'screen';

            header.appendChild(cssNode);
            
        }
    }
}