document.domain=document.domain.replace(/(.*\.)?([^.]+\.[^.]+)$/, '$2');

var AFW_fontSizeManipulation =
{
    stylesheets :
    {
        skf : null
        ,alertir : null
    }
    ,addStylesheet : function()
    {
        document.write('<link id="autosheet_alertir_fontsize" rel="stylesheet" type="text/css" href="http://investor.skf.com/styles/font_size_normal.css" />');
        AFW_fontSizeManipulation.stylesheets.skf = top.document.getElementById('sheet');
        AFW_fontSizeManipulation.stylesheets.alertir = document.getElementById('autosheet_alertir_fontsize');
    }
    ,changeStylesheet : function()
    {
        if(AFW_fontSizeManipulation.stylesheets.skf && AFW_fontSizeManipulation.stylesheets.alertir)
        {
            var match = AFW_fontSizeManipulation.stylesheets.skf.href.toString().match(/[a-z]*?\.css/i);
            if(match)
            {
                AFW_fontSizeManipulation.stylesheets.alertir.href = 'http://investors.skf.com/styles/font_size_' + match[0];
            }
        }
        FF_fbDump(AFW_fontSizeManipulation.stylesheets.skf);
    }
    ,injectClickEvent : function()
    {
        var ele =
        {
            normal : top.document.getElementById('normalsize')
            ,large : top.document.getElementById('largesize')
            ,xlarge : top.document.getElementById('xlargesize')
        }
        if(ele.normal && ele.large && ele.xlarge)
        {
            var doc = (top != self) ? top.document.getElementByName('content')[0].contentWindow : document;
            addEvent(ele.normal.parentNode, 'click', function(){ AFW_fontSizeManipulation.changeStylesheet(); });
            addEvent(ele.large.parentNode, 'click', function(){ AFW_fontSizeManipulation.changeStylesheet(); });
            addEvent(ele.xlarge.parentNode, 'click', function(){ AFW_fontSizeManipulation.changeStylesheet(); });
        }
    }
}

AFW_fontSizeManipulation.addStylesheet();
AFW_fontSizeManipulation.changeStylesheet();
addEvent(window, 'load', AFW_fontSizeManipulation.injectClickEvent);