
var divWidthMin = 	980;
var divHeightMin = 	680;
var flashDivName = 	"content";
var flashName = 	"myFlash";
var flashRef;


function bodyOnLoad(){
	flashRef = 		flashMovie(flashName);
	setFlashDivSize();
	flashRef.focus();
}


window.onresize = function(){
	setFlashDivSize();
}


function clientWidth(){
	var size = 	0;
	if(typeof(window.innerHeight) == 'number'){
		size = 	window.innerWidth;
	}else{
		// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
		if(document.documentElement && document.documentElement.clientHeight){
			size = 	document.documentElement.clientWidth;
		}else{
			// older versions of IE
			if(document.body && document.body.clientHeight){
				size = 	document.body.clientWidth;
			}
		}
	}
	return(size);
}


function clientHeight(){
	var size = 	0;
	if(typeof(window.innerHeight) == 'number'){
		size = 	window.innerHeight;
	}else{
		// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
		if(document.documentElement && document.documentElement.clientHeight){
			size = 	document.documentElement.clientHeight;
		}else{
			// older versions of IE
			if(document.body && document.body.clientHeight){
				size = 	document.body.clientHeight;
			}
		}
	}
	return(size);
}



function setFlashDivSize(){
	var divWidth;
	var divHeight;
	var windowWidth = 	clientWidth();
	var windowHeight = 	clientHeight();
	
	divWidth = 	(windowWidth > divWidthMin) ? windowWidth : divWidthMin;
	divHeight = (windowHeight > divHeightMin) ? windowHeight : divHeightMin;
	
	resizeDiv(flashDivName, divWidth, divHeight);
}


function resizeDiv(divName, divWidth, divHeight){
	if(document.getElementById){
		var contentElement = 	document.getElementById(divName);
		contentElement.style.width = divWidth + 'px';
		contentElement.style.height = divHeight + 'px';
	}
}


function flashMovie(movieName) {
    if(navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    }else{
        return document[movieName];
    }
}