if (typeof Ext == 'undefined') {
document.write('<script type="text/javascript" src="/scripts/ext/adapter/ext/ext-base.js"></script>');
document.write('<script type="text/javascript" src="/scripts/ext/ext-core.js"></script>');
}
function embedflash(src, w, h) {
    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="'+w+'" height="'+h+'"'
    + 'data="'+src+'"'
    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
    + '<param name="movie" value="'+src+'" />'
    + '<param name="loop" value="false"/>'
    + '<param name="menu" value="false" />'
    + '<param name="quality" value="high" />'
    + '<param name="wmode" value="transparent" />'
    + '<param name="bgcolor" value="#FFFFFF" />'
    + '<embed src="'+src+'" quality="high" bgcolor="#FFFFFF" wmode="transparent" width="'+w+'" height="'+h+'" name="trailer" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'
    + '<\/object>';
    document.write(oeTags);
}

var invaccept = function(el) {
    if (el.checked) {
        document.cookie = "investoraccept=true";
        window.location.reload();
    }
}

var timer=false;
var moving = false;
var stopslide = false;
var acc = 1;
var offx = 0;
var el;

var slide = function() {
    if (!el || stopslide) return;
    offx+=acc;
    if(offx>=1100) {
        offx = 0;
        moving = false;
        el.scrollLeft = offx;
        return;
    }
    el.scrollLeft = offx;
    moving = true;
}

window.onload = function() {
    cnt = Ext.select('div.ticker');
    if (cnt.getCount() > 0) {
        var tck = cnt.first().createChild({
            tag: 'div',
            id: 'tickercnt'
        });
        var txt = '';
        var loc = document.location;
        var path = loc.pathname.split('/');
        if (path[1] && path[1]==='en') {
            txt = '+++ advides shares WKN 914 542 are listed on the Berlin Stock Exchange +++';
        } else {
            txt = '+++ advides Aktien unter WKN 914 542 an der Börse Berlin handelbar +++';
        }
        var tcnt = tck.createChild({
            tag: 'div',
            id: 'tickercontent',
            html: txt
        });
        el = tck.dom;
    }
    timer = window.setInterval("slide()", 20);
}