/*****************************************************
flash-object detect & embed by oliver rose, 8sense ;-)
*/
function MakeFlashObj(movien,mode,breite,hoehe,css,linktext,alturl){
	//browser netscape
	if(navigator.appName == "Netscape"){	
		for(i=0; i<navigator.plugins.length; i++){	
			if(navigator.plugins[i].name == "Shockwave Flash"){	
				hasFlash = true	
			}
		}
	}	
	//browser IE
	else if(navigator.appName == "Microsoft Internet Explorer"){
		// GEÄNDERT, DA NUR DIE codebase BEIM Einbinden das Problem gemacht hat. 
		// bei SSL kein flash, sonst gibt es die "Nicht sichere Elemente"-Meldung:
		//var strurl = parent.parent.location.href;
		//var sslaccess = strurl.indexOf("https");
		//if(sslaccess != "-1") {
			//document.writeln(".");
			//hasFlash = false;
		//} else {
			document.writeln("<script language='VBscript'>")
			document.writeln('\'Test to see if VBScripting works')
			document.writeln("detectableWithVB = False")
			document.writeln("If ScriptEngineMajorVersion >= 2 then")
			document.writeln("   detectableWithVB = True")
			document.writeln("End If")
			document.writeln('\'This will check for the plugin')
			document.writeln("Function detectActiveXControl(activeXControlName)")
			document.writeln("   on error resume next")
			document.writeln("   detectActiveXControl = False")
			document.writeln("   If detectableWithVB Then")
			document.writeln("      detectActiveXControl = IsObject(CreateObject(activeXControlName))")
			document.writeln("   End If")
			document.writeln("End Function")
			document.writeln("</scr" + "ipt>")
			hasFlash = detectActiveXControl("ShockwaveFlash.ShockwaveFlash.1")
		//}
	}
	//hasFlash = false; // NUR ZUM TESTEN.
	//if(!hasFlash) alert('FLASH NICHT DA!');	
	//if(hasFlash) alert('HURRA FLASH IST DA!');
	//alert(movien); 
	// VERURSACHT FEHLER BEIM MSIE mit SSL:  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
	if(hasFlash) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH='+breite+' HEIGHT='+hoehe+' name="meinFilm">');
		document.write('<PARAM NAME=movie VALUE="'+movien+'">'); //+'&gMode='+mode
		document.write('<PARAM NAME=menu VALUE=false>');
		document.write('<PARAM NAME=quality VALUE=high>');
		document.write('<PARAM NAME=FlashVars VALUE="gMode='+mode+'">');
		document.write('<PARAM NAME="wmode" value="transparent">');
		document.write('<EMBED src="'+movien+'" flashvars="gMode='+mode+'" menu=false quality=high WIDTH='+breite+' HEIGHT='+hoehe+' wmode="transparent" swLiveConnect=true TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="meinFilm" allowscriptaccess="always"></EMBED>');
		document.write('</OBJECT>');
		//if(css=="mnav") 
		document.write('<br />');
	} else {
		if(css=="h1") {
			document.write('<h1>'+linktext+'</h1>');
		} else {
			if(css=="h2") {
				document.write('<h2>'+linktext+'</h2>');
			} else {
				document.write('<a href="'+alturl+'" class="'+css+'">'+linktext+'</a>');
			}
		}
	}
	
}




