/* 2009-07-16 function openTicker() { ticker = window.open("http://investors.skf.com/ticker.php", "ticker", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=190,height=50"); } */

/* Open map from karthotellet */
function oppnaMap() { world=window.open("http://www.karthotellet.com/map?id=997", "map", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=530,height=360"); }

function downloadMsg(msg, uri) { alert(msg); world = window.open(uri, "win1"); return false; }

function displayLoadingBox(str) {
    var o = document.getElementById('AFW-loading');
    if (str) {
        o.innerHTML = '<div>'+str+'</div>';
    }
    o.style.display = 'block';
}

window.onload = init;

function init()
{
    if(window.location.search.indexOf('p=finstat') > -1 && self != parent)
    {
		document.domain = document.domain.replace(/(.*\.)?([^.]+\.[^.]+)$/, '$2');
        var iHeight = document.documentElement.scrollHeight;
        if(iHeight > window.parent.document.getElementById('iframe_content').offsetHeight)
            window.parent.document.getElementById('iframe_content').style.height = (iHeight + 10) + 'px';
    }
    else if(window.location.search.indexOf('redirect%3Dhttp%3A%2F%2F') > -1)
    {
        location.href = decodeURIComponent(window.location.search.replace(/.*redirect%3D/gi, ''));
    }
}