var locale;

function resizeSwf() {
	var element = document.getElementById("flash");
	if( BrowserDetect.browser.toLowerCase() == "explorer" &&  BrowserDetect.version == 6 ) {
		var height = document.body.clientHeight > meta.minHeight ? document.body.clientHeight : meta.minHeight;
		var width = document.body.clientWidth > meta.minWidth ? document.body.clientWidth : meta.minWidth;
		element.style.width = width + "px";
		element.style.height = height + "px";
	}
	if( BrowserDetect.browser.toLowerCase() == "safari" ) {
		var width = document.width > meta.minWidth ? document.width : meta.minWidth;
		var height = document.height > meta.minHeight ? document.height : meta.minHeight;
		element.style.height = height + "px";
		element.style.width = width + "px";
	}
}

window.onload = function(event) {
	BrowserDetect.init();
	resizeSwf();
	var params = {

		wmode: "transparent"
	};
	flashvars = {
		s_division: "CP",
		s_section: "latteselect",
		s_country: window.country,
		s_language: window.language,
		s_domainperiods: "3",
		locale: window.locale 
	}
	swfobject.embedSWF(meta.swf, "swf", "100%", "100%", "9.0.0", null, flashvars, params );
	//swfobject.embedSWF(meta.swf, "swf", "100%", "100%", "9.0.0", null, { "locale": window.locale } ); //old
};

window.onresize = function(event) {
	resizeSwf();	
}