/***********************************
 *                                 *
 *  Insert Animation by JS         *
 *                                 *
 *  © 2007 Timo Besenreuther       *
 *         EZdesign (ezdesign.de)  *
 *                                 *
 *  Developed for DEBEOS GmbH      *
 *                                 *
 ***********************************
 
*/


function insertDebeosAnimation(filename, width, height, flashversion, bg, id) {
	// configs
	var name = "animation";
	var containerId = id ? id : "animation";
	
	// insert animation
	var swf = new SWFObject(filename+".swf", name, width, height, flashversion, bg);
	
	if (typeof(swf) != "undefined") {
		// flash installed
		swf.addParam("quality", "high");
		swf.addParam("wmode", "transparent");
		swf.addParam("play", "true");
		swf.addParam("loop", "false");
		swf.write(containerId);
	} else {
		// no flash
		var img = new Image(width, height);
		img.src = filename+".jpg";
		document.getElementById(containerId).appendChild(img);
	}
	
}
