var minWidth = 1000;
var minHeight = 596;

function initFlashResizing() {
	var ua = navigator.userAgent;
	if (ua.indexOf('Opera')!=-1 || ua.indexOf('IE')!=-1 )
	{
		window.onresize = fixFlashResizing;
		fixFlashResizing();
	} else {
		window.onresize = fixFlashTop;
	}
}

function fixFlashResizing() {
	if(area.clientHeight < minHeight) {
		f.style.height = minHeight + 'px';
		area.style.overflowY = 'scroll';
	} else {
		area.style.overflowY = 'visible';
		f.style.height = '100%';
	}

	if(area.clientWidth < minWidth) {
		f.style.width = minWidth + 'px';
		area.style.overflowX = 'scroll';
	} else {
		f.style.width = '100%';
		area.style.overflowX = 'visible';
	}
	fixFlashTop()
}

function fixFlashTop() {
	if(area.clientHeight < minHeight) {
		fc.style.paddingTop = '0px';
	} else {
		fc.style.paddingTop = (area.clientHeight - minHeight) / 2 + 'px';
	}
}
