/* Flash ohne Aktivierung abspielen */
//embedFlash("film.swf","myMovie",994,427,"#FFFFFF","7,0,0,0","movieId=myMovie","transparent","/myPath");

/**
 * Function to circumvent the ActiveX-restrictions in Microsoft Internet-Explorer
 * 
 * @param file the filename of the swf to embed
 * @param id the id of the swf in the page
 * @param width the width of the swf
 * @param height the height of the swf
 
 */

function embedFlash(file,id,width,height,bgcolor,ieVersion,flashVars,wmode,base) {
	var embedString = "";
	var objectString = "";
	if(!bgcolor) bgcolor = "#A5A992";
	if(!ieVersion) ieVersion = "7,0,0,0";
	if(flashVars && flashVars != "") {
		embedString += 'FlashVars="'+flashVars+'" ';
		objectString += '<param name="FlashVars" value="'+flashVars+'" />';
	}
	if(wmode && wmode != "") {
		embedString += 'wmode="'+wmode+'" ';
		objectString += '<param name="wmode" value="'+wmode+'" />';
	}
	if(base && base != "") {
		embedString += 'base="'+base+'" ';
		objectString += '<param name="base" value="'+ base+'" />';
	}
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ieVersion+'" width="'+width+'" height="'+height+'" id="'+id+'">');
	document.write('<param name=movie value="'+file+'">');
	document.write('<param name=quality value="high">');
	document.write('<param name=bgcolor value="'+bgcolor+'">');
	document.write(objectString);
	document.write('<embed src="'+file+'" '+embedString+'quality="high" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true" id="'+id+'" name="'+id+'">');
	document.write('</embed></object>');
}
