// Fullscreen-Modus
//window.moveTo(0, 0);
availHeight=screen.availHeight;
availWidth=screen.availWidth;
//window.resizeTo(availWidth, availHeight);

function openWindow(url){
	win = window.open(url, "karten", "width="+availWidth+",height="+availHeight+",left="+0+",top="+0+",scrollbars=no,status=no,toolbar=no,location=no,menubar=no,resizable=no");
	win.focus();
}

// Flashfilm anpassen
function getViewportSize(){ 
	var size = [0, 0]; 
	if(typeof window.innerWidth != "undefined") { 
		size = [window.innerWidth, window.innerHeight];
	}else if(typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
		size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; 
	}else if(typeof document.body != "undefined" && typeof document.body.clientWidth != "undefined" && document.body.clientWidth != 0) {
		size = [document.body.clientWidth, document.body.clientHeight]; 
	}else{
		size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight]; 
	}
	return size; 
}
function setContainer(){
	var el = document.getElementById("container");
	var size = getViewportSize(); 
	el.style.width = size[0] < 770 ? "770px" : "100%";
	el.style.height = size[1] < 390 ? "390px" : "100%";
	if(navigator.userAgent.indexOf("Netscape/8")!=-1 || navigator.userAgent.indexOf("Opera/")!=-1){
		el.style.height = size[1] < 390 ? "390px" : size[1]-3+"px";
	}
}
window.onresize = setContainer;

// Druckansicht
function openPrint(url){
	pLeft = (screen.width-500)/2;
	pTop = (screen.height-520)/2;
	impr = window.open(url, "impressum", "width=500,height=520,left="+pLeft+",top="+pTop+",scrollbars=no,status=yes,toolbar=no,location=no,menubar=no,resizable=no");
	impr.focus();
}

