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 addFlash(){
	swfobject.createCSS("html", "margin:0; padding:0; width:100%; height:100%;");
	swfobject.createCSS("body", "margin:0; padding:0; width:100%; height:100%;");
	swfobject.createCSS("#flashcontent", "margin:0; padding:0; width:100%; height:100%; min-width:955px; min-height:599px;");
	
	var flashvars = {};
	var params = {quality:"best", scale:"noscale", wmode:"window", allowFullScreen:"true", allowscriptaccess:"always", bgcolor:"#000000"};
	var attributes = {id:"flashcontent"};
	
	swfobject.embedSWF("main.swf", "flashcontent", "100%", "100%", "9.0.124", "features/js/expressInstall.swf", flashvars, params, attributes);
	
	window.onresize = function() {
		var el = document.getElementById("flashcontent");
		var size = getViewportSize(); 
		el.style.width = size[0] < 955 ? "955px" : "100%";
		el.style.height = size[1] < 599 ? "599px" : "100%";
	};
	
	window.onresize();
}

if (swfobject.hasFlashPlayerVersion("6.0.65")) {
        swfobject.addDomLoadEvent(addFlash);
}
else if (!swfobject.hasFlashPlayerVersion("6.0.65")) {
        window.location = "features/noflash/noflash.html";
}