window.onload = function() {
	/*var flashvars = {allowscriptaccess:"sameDomain"};
	var params = {};
	var attributes = {};
	swfobject.embedSWF("script/chaos.swf", "flashcontenu", "100%", "100%", "10.0.0", false, flashvars, params, attributes);
	*/
	
	var size = getViewportSize();	 
	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%;width:100%;");
		swfobject.createCSS("body", "height:100%;width:100%;");
		//swfobject.createCSS("#container", "margin:0; width:100%; height:100%; min-width:1000px; min-height:800px;");		
	}	
	function setHeight( h )
	{
		if ( h < size[1] ) h = "100%";
		var el = document.getElementById("container");
		if ( h != "100%" ) el.style.height = h < 600 ? "600px" : h + "px";
		else el.style.height = "100%";
		alert(el.style.height);
	}	
	
	
	var flashvars = { };
	var params = { allowscriptaccess : "samedomain" , bgcolor : "#000000" };

	swfobject.embedSWF("script/chaos.swf", "flashcontenu", "100%", "100%", "10.0.0", false, flashvars, params);
	if (swfobject.hasFlashPlayerVersion("10.0.0")) {
		swfobject.addDomLoadEvent( createFullBrowserFlash );
	}
	
};
