function getQueryVariable() {
	var str = window.location.toString();
	var a = str.split("#");
	var s = a[1];
	if(s==undefined)
		s = '';
	s = s.toLowerCase();
	//alert('location:'+location +' a:'+a+' s:'+s)
	return s;
}


function updateFlashSize() {
	var a = getViewPortSize();
	var w = a[0];
	var h = a[1]-5;
	var flashContainer = document.getElementById('flashcontent');
	flashContainer.style.width = (w < 1000) ? '1000px' : '';   
	//flashContainer.style.height = (h < 720) ? '720px' : '';
	var hs
	if(minH>h)
	{
		hs = minH+'px';
		
	}
	else
	{
		hs = h+'px';
	}
	flashContainer.style.height = hs;
	
	//alert("flashContainer.style.height: "+flashContainer.style.height+' minH:'+minH+' h:'+h+' hs:'+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)
	//alert('getViewPortSize arr: '+arr)
	return arr;
};

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

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