var minHeight = 1;
var minWidth = 1;

function getHeight() {
	if (window.innerHeight) {
		theHeight=window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) {
		theHeight=document.documentElement.clientHeight;
	}
	else if (document.body) {
		theHeight=document.body.clientHeight;
	}
	return theHeight;
}

function getWidth() {
	if (window.innerWidth) {
		theWidth=window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth) {
		theWidth=document.documentElement.clientWidth;
	}
	else if (document.body) {
		theWidth=document.body.cleintWidth;
	}
	return theWidth;
}


function resizeFlashHeight(theHeight) {
	var flashContainer = document.getElementById('flashcontent');
	flashContainer.style.height=theHeight;
}

function resizeFlashWidth(theWidth) {
	var flashContainer = document.getElementById('flashcontent');
	flashContainer.style.width=theWidth;
}

function enforceDimensions() {
	setInterval("enforceInterval()", 300);	
}

function setMinWidth(minWidthParam) {
	minWidth = minWidthParam;
}

function setMinHeight(minHeightParam) {
	minHeight = minHeightParam;
}
function enforceInterval() {
	var theHeight = getHeight();
	var theWidth = getWidth();
	if (theHeight < minHeight) {
		resizeFlashHeight(minHeight + "px");
	}
	else {
		resizeFlashHeight("100%");
	}
	
	if (theWidth < minWidth) {
		resizeFlashWidth(minWidth + "px");
	}
	else {
		resizeFlashWidth("100%");
	}
	
}
