/* CONFIG */
var returnFlashFile = '/user/media/flash/Startseite_A1_2009_04.swf';
var defaultTargetId = 'bigflash';

/* SCRIPTS */
function activate_flash(movie, width, height, obj_id, wmode, bgcolor){ 
	document.write("<div class=\"dnd_flash_overlay\" style=\"display: none; height: "+height+"px; width: "+width+"px;\"></div>");
	document.write("<object id=\"" + obj_id + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" align=\"middle\" width=\"" + width + "\" height=\"" + height + "\">");
	document.write("	<param name=\"movie\" value=\"" + movie + "\">");
	document.write("	<param name=\"quality\" value=\"high\">");
	document.write("	<param name=\"wmode\" value=\"" + wmode + "\">");
	document.write("	<param name=\"bgcolor\" value=\"" + bgcolor + "\">");
	document.write("	<embed name=\"" + obj_id + "\" wmode=\"" + wmode + "\" bgcolor=\"" + bgcolor + "\" src=\""+ movie +"\" quality=\"high\" pluginspage=\"https://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\"></embed>");
	document.write("</object>");
}

function findeFlash (flash) {
	if (document.all) {
		if (document.all[flash]) {
			return document.all[flash];
		}
		if (window.opera) {
			var movie = eval(window.document + flash);
			if (movie.SetVariable) {
				return movie;
			}
		}
		return;
	}	
	if(document.layers) {
		if(document.embeds) {
			var movie = document.embeds[flash];
			if (movie.SetVariable) {
				return movie;
			}
		}
		return;
	}
	if (!document.getElementById) {
		return;
	}
	var movie = document.getElementById(flash);
	if (movie.SetVariable) {
		return movie;
	}
	var movies = movie.getElementsByTagName('embed');
	if (!movies || !movies.length) {
		return;
	}
	movie = movies[0];
	if (movie.SetVariable) {
		return movie;
	}
	return;
}

function switchFlash(flashname, targetId) {
	if (typeof(targetId) == 'undefined') targetId = defaultTargetId;
	
	try {
		clearTimeout(returnToMainflash);
	} catch(e){
	
	}	
	
	var movie = findeFlash(targetId);
	if (movie) {
		
		movie.LoadMovie(0, flashname);
		movie.Play();
	}
}

function returnFlash() {
	if (typeof(targetId) == 'undefined') targetId = defaultTargetId;
	
	var movie = findeFlash(targetId);
	if (movie) {
		movie.LoadMovie(0, returnFlashFile);
		movie.Play();
	}
}