// Flash-Detection
function einfuegeFlash(flashUri, flashName, flashBgColor, breitePx, hoehePx, altBildUri, altBildAltText) {
	var d = document;
	if (flashUri && flashName && breitePx && hoehePx) {
		if (detectFlash() && !((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))) {
			d.write('<object ');
			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('  <embed 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"></embed></object>');
		} else if (altBildUri) {
			var alt = altBildAltText;
			if (!altBildAltText)
				alt = "";
			d.write('<img src="' + altBildUri + '" alt="' + alt + '" width="' + breitePx + '" height="' + hoehePx + '" />');
		}
	}
}

var detectableWithVB = false;

if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
	var d = document;
    d.writeln('<script language="VBscript">');

    d.writeln('detectableWithVB = False');
    d.writeln('If ScriptEngineMajorVersion >= 2 then');
    d.writeln('  detectableWithVB = True');
    d.writeln('End If');

    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() {
    var daPlugins = detectPlugin.arguments;
    var pluginFound = false;
    if (navigator.plugins && navigator.plugins.length > 0) {
		var pluginsArrayLength = navigator.plugins.length;
		for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ ) {
			var numFound = 0;
			for (namesCounter=0; namesCounter < daPlugins.length; namesCounter++) {
				if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) ||
					(navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) {
					numFound++;
				}
			}
			if(numFound == daPlugins.length) {
				pluginFound = true;
				break;
			}
		}
    }
    return pluginFound;
}


function popUp(file, name, width, height) {
	var fenster = window.open(file, name, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + width + 'width,height=' + height);
	fenster.focus();
}''

/*	Positionierung des Flashfilms für den Mac IE 5.2*/
/*	Nicht mehr benötigt, da der Mac IE 5.2 nur Standardbilder ohne Flash anzeigt
function setFlash() {
	var intervalId = window.setInterval("positionFlash()",5);
}

function positionFlash(element) {		
	var divStyle = document.getElementById("zierbild").style;
	var fensterHoehe = document.body.offsetHeight;
	var neueHoehe = fensterHoehe - 450;
	divStyle.paddingTop = neueHoehe + "px";
}
*/