/*
Methods for resizing the flash stage at runtime.
*/
var flashHeight = 400;

function setFlashHeight(divid, newH){
	flashHeight = newH;
	setMovieSize();
}

function setMovieSize(){

	window.scroll(0,0);
   
	width = document.body.clientWidth > 810 ? "100%":"810px";
	height = document.body.clientHeight > flashHeight ? "100%":flashHeight + "px";

	if (navigator.userAgent.toLowerCase().indexOf("safari") != -1){
		FitFlash ("simpleFlash", 810, flashHeight);
	}else{
		el = document.getElementById("flashcontent");
		el.style.width = document.body.clientWidth > 810 ? "100%":"810px";
		el.style.height = document.body.clientHeight > flashHeight ? "100%":flashHeight + "px";
	}
};

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;
}
