function updateFlashSize() {
	var a = getViewPortSize();
	var w = a[0];
	var h = a[1]-5;
	var flashContainer = document.getElementById('Mola');
	flashContainer.style.width = (w < 1024) ? '1024px' : '';   
	//flashContainer.style.height = (h < 720) ? '720px' : '';
	var hs
	if(minH>h)
	{
		hs = minH+'px';
		
	}
	else
	{
		hs = h+'px';
	}
	flashContainer.style.height = hs;
}

/* get viewport dimensions */
function getViewPortSize() {

	var de = document.documentElement;
	var db = document.body;

	var arr = [];
	var windowWidth = 0;
	var windowHeight = 0;

	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
	}
	else {
		if (de && de.clientWidth) {
			windowWidth = de.clientWidth;
			windowHeight = de.clientHeight;
		}
		else {
			if (db && db.clientWidth) {
				windowWidth = db.clientWidth;
				windowHeight = db.clientHeight;
			}
		}
	}

	arr.push(windowWidth,windowHeight)
	return arr;
};

// set flash's minimum height from flash when content changes
function setMinHeight(h) {
	minH = h;
	updateFlashSize();
}

var minH = 674;
window.onresize = updateFlashSize;
window.onload = updateFlashSize;
