function getViewportSize() { 
	var size = [0, 0]; 
	if (typeof window.innerWidth != "undefined") { 
		size = [window.innerWidth, window.innerHeight];
	} 
	else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
		size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; 
	}
	else {
		size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight]; 
	}
	return size; 
}

function createFullBrowserFlash() {
	swfobject.createCSS("html", "height:100%;");
	swfobject.createCSS("body", "height:100%;");
	swfobject.createCSS("#container", "margin:0; width:100%; height:100%; min-width:865px; min-height:600px;");
	window.onresize = function() {
		var el = document.getElementById("container");
		var size = getViewportSize(); 
		el.style.width = size[0] < 865 ? "865px" : "100%";
		el.style.height = size[1] < 600 ? "600px" : "100%";
		
		if ( document.all ) {
			fNewWidth	= document.documentElement.clientWidth;
			fNewHeight	= document.documentElement.clientHeight;
		}
		else {
			fNewWidth	= window.innerWidth;
			fNewHeight	= window.innerHeight;
		}
		makeCall('Breite: ' + fNewWidth + ' Hoehe: ' + fNewHeight);
	};
	//window.onresize();
}

function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}

function makeCall(str) {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	
	var swf = document.getElementById("application");
	swf.updateScreenDimensions(x,y);

	//thisMovie("application").updateScreenDimensions(x, y);
}
