

//Flash-Detection
var requiredVersion = 6;
var flash2Installed = false;
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;
var flash7Installed = false;
var flash8Installed = false;
var maxVersion = 8;
var actualVersion = 0;
var hasRightVersion = false;
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

if(isIE && isWin){
        document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
        document.write('on error resume next \n');
        document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
        document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
        document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
        document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
        document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
        document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
        document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
        document.write('</SCR' + 'IPT\> \n');
}

function detectFlash(flashurl,bildurl,weite,hoehe)
{
        if (navigator.plugins)
		{
                if (navigator.plugins["Shockwave Flash 2.0"]
                || navigator.plugins["Shockwave Flash"])
				{
                        var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
                        var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
                        var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));

                        flash2Installed = flashVersion == 2;
                        flash3Installed = flashVersion == 3;
                        flash4Installed = flashVersion == 4;
                        flash5Installed = flashVersion == 5;
                        flash6Installed = flashVersion == 6;
                        flash7Installed = flashVersion == 7;
                        flash8Installed = flashVersion == 8;
                }
        }

        for (var i = 2; i <= maxVersion; i++) {
                if (eval("flash" + i + "Installed") == true) actualVersion = i;
        }
        if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 2;

        if ((actualVersion >= requiredVersion) && (flashurl != ""))
        {
            var nn4 = (navigator.appName.indexOf("Netscape") >= 0) && (navigator.appVersion.indexOf("4.") >= 0);
            if (nn4)
                document.write("<ilayer>");
            document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+weite+' HEIGHT='+hoehe+'><param name="menu" value=false><PARAM NAME=movie VALUE="'+flashurl+'"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="'+flashurl+'" quality=high bgcolor=#FFFFFF WIDTH='+weite+' HEIGHT='+hoehe+' Menu="False" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
            if (nn4)
               document.write("</ilayer>");
        }
        else
            document.write("<IMG src="+bildurl+" width="+weite+" height="+hoehe+" border=0>");
}

// ende Flash-Detection


// News-Ticker ----------------------------------------------
function Fensterweite()
{
    if (window.innerWidth)
    {
        return window.innerWidth;
    }
    else
    {
        if (document.body && document.body.offsetWidth)
            return document.body.offsetWidth;
        else
            return 0;
    }
}

function regenerate()
{
    window.location.reload();
}

//nn-Version
function regenerate2()
{
    if (document.layers)
    {
        setTimeout("window.onresize=regenerate",450);
        intializemarquee();
    }
}

function intializemarquee()
{
    document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>');
    document.cmarquee01.document.cmarquee02.document.close();
    thelength=document.cmarquee01.document.cmarquee02.document.width;
    scrollit();
}

function scrollit()
{
    if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1))
    {
        document.cmarquee01.document.cmarquee02.left-=speed;
        setTimeout("scrollit()",60);
    }
    else
    {
        document.cmarquee01.document.cmarquee02.left=marqueewidth;
        scrollit();
    }
}


function writeMarque()
{
    if (document.getElementById && !document.all)
    {
        document.write('<div id="divlogo" style="position:absolute;width:10000px;height:25px;left:'
                        +window.innerWidth+'px;top:0px;z-index:5;">'+marqueecontents+'</div>');
        logo = eval("document.getElementById('divlogo').style");

        // Auslesen der Inhaltslaenge
        dieLinks=marquee.split("<a");
        for (i=0; i<dieLinks.length; i++)
        {
                linkInhalt=eval('dieLinks['+i+'].split(">")');
                buchstaben+=linkInhalt[1];
        }

        bewegDich();
    }
}

function bewegDich()
{
    x+=2;
    logo.left=window.innerWidth-x;
    if (x>=(buchstaben.length*7+window.innerWidth))	x=0;// Wert "7" ist geschaetzte Buchstabenbreite
    setTimeout('bewegDich()',50);
}

function readKDDBCookie(name)	{
    var dc = document.cookie;
    var prefix = name + '=';
    var begin = dc.indexOf('; ' + prefix);
    if( begin == -1) {
        begin = dc.indexOf(prefix);
        if( begin != 0) return null;
    }
    else {
        begin += 2;
    }
    var end = document.cookie.indexOf(';', begin);
    if( end == -1) end = dc.length;
    return unescape( dc.substring( begin + prefix.length, end));
}



