function bannerSizeMe(finishSizeVar)
{
	var finishSize = 25.625;
	if(typeof(finishSizeVar) != 'undefined')
	{
		finishSize = finishSizeVar;
	}
	var intervals = 25;
	var startSize = 0;
	
	if(!(sizeMe = document.getElementById("contentFlash")))
	{
		return false;
	}
	
	var intervalSize = (finishSize - startSize) / intervals;
	intervalCount = 1;
	initIntervalSizeMe = window.setInterval("intervalSizeMe(" + startSize + "," + intervalSize + "," + finishSize+ ")",30);
	return true;
}

function intervalSizeMe(startSize, intervalSize, finishSize)
{
	var sizeMe = null;
	var sizeMeToo = null;
	if(!(sizeMe = document.getElementById("contentFlash")))
	{
		window.clearInterval(initIntervalSizeMe);
		return false;
	}
	if(!(sizeMeToo = document.getElementById("bannerFlash")))
	{
		sizeMeToo = null;
	}
	if(!(moveMeToo = document.getElementById("backgroundMenu")))
	{
		moveMeToo = null;
	}
	
	// intervals muss > 0 sein
	if(intervalCount<=0)
	{
		// Display des bannerflashs
		window.clearInterval(initIntervalSizeMe);
		return false;	
	}
	
	var targetSize  = startSize + ( intervalSize * intervalCount );
	intervalCount++;
	// wenn fertig aufgebaut
	if(targetSize >= finishSize)
	{
		// groesse erreicht, ENDE
		sizeMe.style.height =  (finishSize + 2.5).toString() + "em";
		// innerFlashSichtbar
		if((oContentFlashInner = document.getElementById('contentFlashInner')))
		{
			oContentFlashInner.style.display = "block";	
		}
		if(sizeMeToo != null)
		{
			sizeMeToo.style.height =  finishSize.toString() + "em";
			sizeMeToo.style.display = "block";
		}
		if(moveMeToo != null)
		{
			moveMeToo.style.bottom =  0;
		}
		window.clearInterval(initIntervalSizeMe);
		return true;
	}
	
	sizeMe.style.height =  (targetSize + 2.5).toString() + "em";
	if(sizeMeToo != null)
	{
		sizeMeToo.style.height =  targetSize.toString() + "em";
	}
}

// Object erstellen
function createFlash(DivID, ObjectID, ObjectURL,widthEm,heightEm)
{
	var oFlashObject = null;
	// Check ob objekt existiert
	if(!(oTargetDiv = document.getElementById(DivID)))
	{
		return;	
	}
	
	try
	{
		var createElementString = '<object style="width: ' + widthEm + 'em; height: ' + heightEm + 'em;" />';
		// Attribute erstellen
		oFlashObject = document.createElement(createElementString);
	}
	catch(e){}
	
	// Normale DOM Browser
	if(!oFlashObject || oFlashObject.nodeName != "OBJECT")
	{
		// nicht IE also kommt mit /n zurecht anstelle /r
		lineBreakType = "n";
		
		// auslesen des Namens
		oFlashObject = document.createElement('object');
	
		// Attribute erstellen
		attributesLength = oFlashObject.attributes.length;
		oFlashObject.setAttribute('style','width: ' + widthEm + 'em; height: ' + heightEm + 'em;');
	}
	
	// aktuellen inhalt entfernen
	var contentLength = oTargetDiv.childNodes.length
	for(var i=0;i<contentLength;i++)
	{
		oTargetDiv.removeChild(oTargetDiv.firstChild);
	}
	
	// Neuen inhalt einhaengen
	oTargetDiv.appendChild(oFlashObject);
	
	//params
	oParam = document.createElement('param');
	oParam.setAttribute("name","movie");
	oParam.setAttribute("value",ObjectURL);
	oFlashObject.appendChild(oParam);
	
	oParam = document.createElement('param');
	oParam.setAttribute("name","quality");
	oParam.setAttribute("value","best");
	oFlashObject.appendChild(oParam);
	
	oParam = document.createElement('param');
	oParam.setAttribute("name","play");
	oParam.setAttribute("value","true");
	oFlashObject.appendChild(oParam);
	
	oParam = document.createElement('param');
	oParam.setAttribute("name","bgcolor");
	oParam.setAttribute("value","#dbb119");
	oFlashObject.appendChild(oParam);
	
	if(ObjectURL.search(/quiz\.swf+/)== -1)
	{
	oParam = document.createElement('param');
	oParam.setAttribute("name","wmode");
	oParam.setAttribute("value","transparent");
	oFlashObject.appendChild(oParam);
	}
	
	oParam = document.createElement('param');
	oParam.setAttribute("name","scale");
	oParam.setAttribute("value","noborder");
	oFlashObject.appendChild(oParam);
	
	oParam = document.createElement('param');
	oParam.setAttribute("name","salign");
	oParam.setAttribute("value","lt");
	oFlashObject.appendChild(oParam);
	
	oParam = document.createElement('param');
	oParam.setAttribute("name","menu");
	oParam.setAttribute("value","false");
	oFlashObject.appendChild(oParam);
	
	//object
	oFlashObject.setAttribute("id",ObjectID);
	oFlashObject.setAttribute("type","application/x-shockwave-flash");
	oFlashObject.setAttribute("data",ObjectURL);
	
	
	
}