/*
document.write("Browser CodeName: " + navigator.appCodeName);
document.write("<br /><br />");
document.write("Browser Name: " + navigator.appName);
document.write("<br /><br />");
document.write("Browser Version: " + navigator.appVersion);
document.write("<br /><br />");
document.write("Cookies Enabled: " + navigator.cookieEnabled);
document.write("<br /><br />");
document.write("Platform: " + navigator.platform);
document.write("<br /><br />");
document.write("User-agent header: " + navigator.userAgent);
if(true)
{
	s_w = window.document.body.clientWidth;
	s_h = window.document.body.clientHeight;
}
else
{
	s_w = window.innerWidth;
	s_h = window.innerHeight;
}

http://www.quirksmode.org/js/detect.html
*/
function resizeFlash(w,h){
var s_w = document.body.clientWidth-20;
var s_h = document.body.clientHeight-20;

if(w <= 1)
	w = s_w;
if(h <= 1)
	h = s_h;

var wLimit = 1200;
var hLimit = 750;



	if(s_w > wLimit)
		window.document["main_fla"].setAttribute('width', wLimit + "px");
	else if (wLimit == s_w)
		window.document["main_fla"].setAttribute('width', "100%");
	else
		window.document["main_fla"].setAttribute('width', w + "px");
		
		
	if(s_h > hLimit)
		window.document["main_fla"].setAttribute('height', hLimit + "px");
	else if (hLimit == s_h)
		window.document["main_fla"].setAttribute('height', "100%");
	else
		window.document["main_fla"].setAttribute('height', h + "px");
		
		
	w = parseFloat(window.document["main_fla"].width);
	h = parseFloat(window.document["main_fla"].height);
	//alert(w + " : " + h);
	var sX = w/wLimit;
	var sY = h/hLimit;
	
	if(sX > sY)
		sX = sY;
	else
		sY = sX;
	
	w = sX*wLimit;
	h = sY*hLimit;
	
	
	window.document["main_fla"].setAttribute('width', w + "px");
	window.document["main_fla"].setAttribute('height', h + "px");
}
