

//Flash PlugIn vohanden?		
var mode = 0;
function checkPlugIn(i_name,i_version) {
	if (i_name=='flash') {
		if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
			if (navigator.plugins && navigator.plugins["Shockwave Flash"])// && !(ie4 && mac))
			mode = 1;
		}
		else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
		   	&& (navigator.userAgent.indexOf("Windows 9")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
			document.write('<SCRIPT LANGUAGE=VBScript\> \n');
			document.write('on error resume next \n');
			document.write('mode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
			document.write('</SCRIPT\> \n');
		}
		return mode;
	} 
}

/*
Funktion insertObject()
Leistung:	Fuegt ein Objekt ein, z.B. ActiveX-Control
Parameter:	i_plugin	fuer die Darstellung des Objektes erforderliches PlugIn
			i_path		relativer Pfad zum Objekt bzw. zum Fallback (WICHTIG: Angabe ohne file extension)
			i_name		Name des Objektes
			i_width		Breite des Objektes
			i_height	Hoehe des Objektes
			i_bgcolor	Hintergrundfarbe als Hex-Zahl
FALLBACK: gleicher dateiname wie normale datei
*/
function insertObject(i_plugin, i_path, i_name, i_width, i_height, i_bgcolor) {
	// FLASH
	if(i_plugin=='flash') {
		if (checkPlugIn(i_plugin)){
			document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
			document.write(' codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0"');
			document.write(' ID="' + i_name + '" WIDTH="' + i_width + '" HEIGHT="' + i_height + '">');
			document.write(' <PARAM NAME=movie VALUE="' + i_path + '.swf"> ');
			document.write(' <PARAM NAME=quality VALUE=autohigh> ');
			document.write(' <PARAM NAME=menu VALUE=false> ');
			document.write(' <PARAM NAME=bgcolor VALUE=#' + i_bgcolor + '> ');
			document.write('<EMBED SRC="' + i_path + '.swf"');
			document.write(' NAME=' + i_name + ' swLiveConnect="TRUE" WIDTH="' + i_width + '" HEIGHT="' + i_height + '"');
			document.write(' QUALITY="autohigh" MENU="false" BGCOLOR="#' + i_bgcolor + '"');
			document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
			document.write('</EMBED>');
			document.write('</OBJECT>');
		}
		else {
			document.write('<img src="' + i_path + '.jpg" width="' + i_width + '" height="' + i_height + '" border="0">')
		}
	}
} 

