// browser detection
// var theWidth, theHeight;

var targetSWFHeight = 800;
var contentDiv;

function init(){
	contentDiv = document.getElementById("content");
	
	setVersion("flash");
}

// Window dimensions:
function getDimensions(){
	var obj = {};

	if( window.innerWidth) {
		obj.width=window.innerWidth;
	}
	else if(document.documentElement && document.documentElement.clientWidth) {
		obj.width=document.documentElement.clientWidth;
	}
	else if(document.body) {
		obj.width=document.body.clientWidth;
	}
	else {
	}

	if( window.innerHeight ) {
		obj.height=window.innerHeight;
	}
	else if(document.documentElement && document.documentElement.clientHeight) {
		obj.height=document.documentElement.clientHeight;
	}
	else if(document.body) {
		obj.height=document.body.clientHeight;
	}
	else{
	}
	//alert(obj.height);
	
	return obj;
}

function resizeContent() {
	if( getDimensions().height < targetSWFHeight ){
		newHeight = String(targetSWFHeight) + "px";
	}else{
		newHeight = "100%";
	}
	contentDiv.style.height = newHeight;
	contentDiv.style.top = "0px";
}

function adjustHeight(value) {
	//alert('resize'); 
	targetSWFHeight = value;
	resizeContent();
}

var win_o = null;
var win_p = self;
