﻿<!--

/*
 * flash detection
 * result ist stored in "success" as boolean type
 */
var success = false;
var required = 9;
var detected = 0;
var flashplugin = (navigator && navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
var plugins = (navigator && navigator.plugins && navigator.plugins["Shockwave Flash"]) ? navigator.plugins["Shockwave Flash"].description : "";
var token = plugins.split(" ");
var index = 0;

if (flashplugin)
{
    for (index = 1; index < token.length; index++)
    {
        if (isNaN(parseInt(token[index])))
        {
            continue;
        }
        detected = parseInt(token[index]); 
    }
    
    success = detected >= required;
}
else if (navigator && navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && navigator.appVersion && navigator.appVersion.indexOf("Win") != -1)
{
    document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
    document.write('on error resume next \n');
    document.write('success = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + required + '"))) \n');
    document.write('</SCR' + 'IPT\> \n');
}


/*
 * Load Flashmovie on the fly to ensure that the
 * control is interactive when its loaded (IE only)
 */
function loadFlashMovie(filename, width, height, flashvars, bgcolor)
{
    if (success)
    {
        var html = '';
        
        html += '<object id="movie" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width + '" height="' + height + '">';
        html += '<param name="wmode" value="transparent" />';
        html += '<param name="movie" value="' + filename + '" />';
        html += '<param name="quality" value="auto" />';
        html += '<param name="bgcolor" value="' + bgcolor + '" />';
        html += '<param name="allowScriptAccess" value="sameDomain" />';
        html += '<param name="FlashVars" value="' + flashvars + '" />';
        html += '<embed wmode="transparent" src="' + filename + '" FlashVars="' + flashvars + '" width="' + width + '" height="' + height + '" quality="auto" bgcolor="' + bgcolor + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" />';
        html += '</object>';

        document.write(html);
    }
    else
    {
        filename = filename.replace(/.swf/g, ".jpg");
        document.write('<img src="' + filename + '" width="' + width + '" height="' + height + '" alt="alternative flash image">');
    }
}

// -->
