window.onresize = doResize;
doResize();
function doResize()
{
	var maxHeight = 590;
	var winW = 960, winH = 590;
	if (parseInt(navigator.appVersion)>3) {
 		if (navigator.appName=="Netscape") {
  			winW = window.innerWidth;
  			winH = window.innerHeight;
 		}
 		if (navigator.appName.indexOf("Microsoft")!=-1) {
  			winW = document.body.offsetWidth;
  			winH = document.body.offsetHeight;
 		}
	} 
	if(winW < 960) {
		setFlashWidth('flash_div',960);
	} else {
		setWidthToPerc('flash_div');
	}
	if(winH < maxHeight)
	{
		setFlashHeight('flash_div',maxHeight);
	} else {
		setHeightToPerc('flash_div');
	}
}
function setFlashWidth(divid, newW)
{
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH)
{
	document.getElementById(divid).style.height = newH+"px";		
}
function setFlashSize(divid, newW, newH)
{
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
	document.getElementById(divid).style.position = "absolute";
}
function setWidthToPerc(divid)
{
	document.getElementById(divid).style.width ="100%";
}
function setHeightToPerc(divid)
{
	document.getElementById(divid).style.height ="100%";
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
doResize();