var xsize = screen.availWidth
var ysize = screen.availHeight
var b0=800, h0=600, x0=(xsize-b0)/2, y0=(ysize-h0)/2
var options = "scrollbars=yes,resizable=yes,width="+b0+",height="+h0+",screenX="+x0+",screenY="+y0+",top="+y0+",left="+x0;

var myspeed=0;
var scrollInt;

function initAfterLoad(){
 if (navigator.userAgent.indexOf("Netscape")==-1){
 $('content').style.overflow='hidden';
 } deactivateLinkFocus();
}

function scrollwindow(){
 $('content').scrollTop = $('content').scrollTop + myspeed;
 if ( $('content').scrollTop + myspeed <0 ){
 stopScroll();
 disableUp();
 }
 if ( Element.getHeight('content') + $('content').scrollTop + myspeed > $('content').scrollHeight ){
 stopScroll();
 disableDown();
 }
}

function scroll(speed){
 myspeed = speed;
 scrollInt = window.setInterval("scrollwindow()",20);
}

function stopScroll(){
 myspeed = 0;
 window.clearInterval(scrollInt);
}

function disableUp(){
 $('content').scrollTop = 0;
}
function disableDown(){
 $('content').scrollTop = $('content').scrollHeight - Element.getHeight('content');
}

function deactivateLinkFocus(){
 var allLinks = document.getElementsByTagName('a');
 for (var i=0; i<allLinks.length;i++) {
 allLinks[i].onmousedown= link_down;
 allLinks[i].onmouseup= link_up;
 }
}
function link_down() { this.onfocus= this.blur; }
function link_up() { this.onfocus= {}; }

function show_3d(page){
	return false;
}

function Details(page){
	return false;
}

function Zeltrundgang() {
 tent = window.open("/virtualtent/innen.php", "Zeltrundgang", options); tent.focus();
}

function Mirror(page){
  mirrorp = window.open("/mirror/"+page, "Seitenkopie", options);  mirrorp.focus();
}
