var lastContentHeight = "100%";
var minHeight = 706;
var minWidth = 1010;


function anchorJumpTo(y) {
	window.scrollTo(0, y);
}

function resizeHeight(contentHeight) {
	//if (contentHeight != lastContentHeight) anchorJumpTo(0);
	if (typeof contentHeight == "undefined" || typeof contentHeight == "object") {
		contentHeight = lastContentHeight;
	};
	h = "100%";
	//For Firefox and Co
	if (window.innerHeight) {
		if (window.innerHeight < minHeight) {
			h=minHeight;
			if (contentHeight > minHeight) h = contentHeight;
		} else if (window.innerHeight < contentHeight) {
			h=contentHeight;
		}
	//for Internet Explorer
	} else if (document.body.clientHeight) {
		if (document.body.clientHeight < minHeight) {
			h=minHeight;
			if (contentHeight > minHeight) h = contentHeight;
		} else if (document.body.clientHeight < contentHeight) {
			h=contentHeight;
		}
	}

	
	//98% weil sonst im Firefox horizontaler Scrollbalken
	w = "100%";
	if (window.innerWidth && window.innerWidth < minWidth) {
		w=minWidth;
	} else if (document.body.clientWidth && document.body.clientWidth < minWidth) {
		w=minWidth;
	}
	//Flash Film skalieren
	var flashElement = document.getElementById("content");
	if( flashElement ) {
		//Einstellung für IE
		if(navigator.appName == "Microsoft Internet Explorer"){
  			flashElement.width = ''+w;
  			flashElement.height = ''+h;
		}
		//Einstellung fü alle anderen über style Attribut und Abfrage ob Prozent oder Pixelwert
		else{
	  		flashElement.style.width = w;
  			flashElement.style.height = h;
			if (w != "100%") flashElement.style.width += "px";
			if (h != "100%") flashElement.style.height += "px";
		}

	}
	lastContentHeight = contentHeight;
	


}

window.onresize = resizeHeight;
window.onload = function (){ 
	resizeHeight(); 
	if(h==minHeight){
		anchorJumpTo(minHeight-window.innerHeight);	
	};
}

