function einfuegeFlash(flashUri, flashName, flashBgColor, breitePx, hoehePx, altBildUri, altBildAltText) {
	var d = document;
	if (flashUri && flashName && breitePx && hoehePx) {
		if (detectFlash()) {
			// Movie einfuegen
			d.write('<table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top" align="left"><obj'+'ect ');
			d.write('  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
			d.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"');
			d.write('  width="'+breitePx+'" height="'+hoehePx+'">');
			d.write('  <param name="movie" value="'+flashUri+'">');
			d.write('  <param name="quality" value="high"><param name="wmode" value="transparent"><param name="scale" value="exactfit"><param name="bgcolor" value="'+flashBgColor+'">');
			d.write('  <em'+'bed src="'+flashUri+'" quality="high" ');
			d.write('    pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"');
			d.write('    type="application/x-shockwave-flash" width="'+breitePx+'" height="'+hoehePx+'" bgcolor="'+flashBgColor+'" border="0" hspace="0" vspace="0"></em'+'bed></obj'+'ect></td></tr></table>');
		} else if (altBildUri) {
			// Einsetzen des Alternativbildes
			var alt = altBildAltText;
			if (!altBildAltText)
				alt = "";
			d.write('<table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top" align="left"><img src="'+altBildUri+'" alt="'+alt+'" width="'+breitePx+'" height="'+hoehePx+'"></td></tr></table>');
		}
	}
}


// Ab hier angepasster Standard-Code, nicht aus der HTML-Seite aufrufen

// initialize global variables
var detectableWithVB = false;

// Here we write out the VBScript block for MSIE Windows
if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
	var d = document;
    d.writeln('<script language="VBscript">');

    d.writeln('\'do a one-time test for a version of VBScript that can handle this code');
    d.writeln('detectableWithVB = False');
    d.writeln('If ScriptEngineMajorVersion >= 2 then');
    d.writeln('  detectableWithVB = True');
    d.writeln('End If');

    d.writeln('\'this next function will detect most plugins');
    d.writeln('Function detectActiveXControl(activeXControlName)');
    d.writeln('  on error resume next');
    d.writeln('  detectActiveXControl = False');
    d.writeln('  If detectableWithVB Then');
    d.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');
    d.writeln('  End If');
    d.writeln('End Function');

    d.writeln('</scr' + 'ipt>');
}

function detectFlash() {
	var pluginFound = false;
    pluginFound = detectPlugin('Shockwave', 'Flash'); 
    if(!pluginFound && detectableWithVB) {
		pluginFound = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');
    }
    return pluginFound;
}

function detectPlugin() {
    // allow for multiple checks in a single pass
    var daPlugins = detectPlugin.arguments;
    // consider pluginFound to be false until proven true
    var pluginFound = false;
    // if plugins array is there and not fake
    if (navigator.plugins && navigator.plugins.length > 0) {
	var pluginsArrayLength = navigator.plugins.length;
	// for each plugin...
	for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ ) {
	    // loop through all desired names and check each against the current plugin name
	    var numFound = 0;
	    for(namesCounter=0; namesCounter < daPlugins.length; namesCounter++) {
		// if desired plugin name is found in either plugin name or description
		if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) || 
		    (navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) {
		    // this name was found
		    numFound++;
		}   
	    }
	    // now that we have checked all the required names against this one plugin,
	    // if the number we found matches the total number provided then we were successful
	    if(numFound == daPlugins.length) {
		pluginFound = true;
		// if we've found the plugin, we can stop looking through at the rest of the plugins
		break;
	    }
	}
    }
    return pluginFound;
}
