/* FLASH */
var jsReady = false;

/* declare swfobject vars */
var swfobjects = new Array();
var flashvars = {};
var params = {};
params.menu = "false";
params.allowscriptaccess = "always";
params.wmode = "opaque";
params.scale = "noscale";
var attributes = {};


/*
 * getSwfObject
 * return object depending on browser
 */
function getSwfObject(objectName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[objectName];
	} else {
		return document[objectName];
	}
}


/*
 * addSwfObject
 * populate swfobjects array with values,
 * set parameters and then inject swfobject into container with id equal to name of swfobjects[id]["id"]
 * optional parameters should be set by another value in function call
 */
function addSwfObject(id,source,type,height,width,feed,startId,pageContext){
	
	// register new flash at our array
	swfobjects[id] = new Array();
	swfobjects[id]["id"] = "swfobject_"+id;
	swfobjects[id]["source"] = source;
	swfobjects[id]["type"] = type;
	swfobjects[id]["feed"] = feed;
	swfobjects[id]["preview"] = "notloaded";
	swfobjects[id]["startId"] = startId;
	swfobjects[id]["pageContext"] = pageContext;
	
	// set swfobject variables
	flashvars.coverflowId = swfobjects[id]["id"];
	flashvars.xmlFeedUri = swfobjects[id]["feed"];
	flashvars.startId = swfobjects[id]["startId"];
	flashvars.pageContext = swfobjects[id]["pageContext"];
	
	attributes.id = swfobjects[id]["id"];
	attributes.name = swfobjects[id]["id"];
	
	// inject new swfobject
	swfobject.embedSWF(source, swfobjects[id]["id"], width, height, "9.0.0", "/static/flash/expressInstall.swf", flashvars, params, attributes);
}

/* ENDE FLASH */
