function openwindow(pageURL)
{
		url = pageURL;
		a= window.open(url,"futhermocker","toolbar=yes,directories=no,resize=no,menubar=no,width=1000,height=620, left = 0,top = 0, fullscreen=no");
}
function openwindowII(pageURL)
{
		url = pageURL;
		a= window.open(url,"futhermockerII","scrollbars=yes,resize=no,toolbar=yes,directories=no,menubar=no,width=620,height=650,fullscreen=no");
}

function popop(pageURL)
{
		url = pageURL;
		a= window.open(url,"Popop","scrollbars=no,toolbar=no,resize=no,directories=no,menubar=no,width=460,height=635,fullscreen=no");
}

function popopvandret(pageURL)
{
		url = pageURL;
		a= window.open(url,"Popopvandret","scrollbars=no,toolbar=no,resize=no,directories=no,menubar=no,width=635,height=460,fullscreen=no");
}

function resizewindow() {
		window.fitcontent(1000, 620);
}
function resizewindowII() {
		window.fitcontent(610, 635);
}
function fitcontent(x, y) {
	// disables the scrollbar and resizes the browser window to contain exactly x by y pixels.
	// call this function on the body.onload and window.onresize events to maintain the correct browser size.
	if(x >= document.body.scrollHeight) document.body.scroll = 'no';
	window.top.resizeBy(x - document.body.clientWidth, y - document.body.clientHeight);
}

function openPicturewindow(pageURL)
{
		url = pageURL;
		a= window.open(url,"futhermockerII","toolbar=no,resize=no,directories=no,menubar=no,width=610,height=350,scrollbars=yes, left = 10,top = 10, fullscreen=no");
}

function openkontaktwindow(pageURL)
{
		url = pageURL;
		a= window.open(url,"futhermockerIII","toolbar=no,resize=no,directories=no,menubar=no,width=400,height=350,scrollbars=no, left = 10,top = 10, fullscreen=no");
}


function MM_preloadImages() { //v3.0
   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; 
i<a.length; i++)
     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} }


function sut(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
         }
      }
   }

window.location='sut.htm';

if (window.screen) {
    window.moveTo(0,0);
    window.outerHeight = 10;
    window.outerWidth = 10;
}
}

function MaximizeWindow() {
//top.window.moveTo(0,0);
//if (document.all) {
//top.window.resizeTo(screen.availWidth,screen.availHeight);
//}
//else if (document.layers||document.getElementById) {
//if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
//top.window.outerHeight = screen.availHeight;
//top.window.outerWidth = screen.availWidth;
//}
//}
}


function findPageHeight() {
if (window.innerHeight != null)
  return window.innerHeight;
if (document.body.clientHeight != null)
  return document.body.clientHeight;
return (0);
}
 
function findPageWidth() {
if (window.innerWidth != null)
  return window.innerWidth;
if (document.body.clientWidth != null)
  return document.body.clientWidth;
return (0);
}
 
function calcLayerPositionH(iX) {
if (findPageWidth()<=1000)
 return(iX);
if (findPageWidth()>1000)
 return(Math.floor(((findPageWidth()-1000)/2)+iX));
}

function calcLayerPositionV(iY) {
if (findPageHeight()<=620)
 return(iY);
if (findPageHeight()>620)
 return(Math.floor(((findPageHeight()-620)/2)+iY));
}

function domlay(id,trigger,lax,lay) {
// Layer visible
if (trigger=="1"){
 if (document.layers) document.layers[''+id+''].visibility = "show"
 else if (document.all) document.all[''+id+''].style.visibility = "visible"
 else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"    
 }
// Layer hidden
else if (trigger=="0"){
 if (document.layers) document.layers[''+id+''].visibility = "hide"
 else if (document.all) document.all[''+id+''].style.visibility = "hidden"
 else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"    
 }
// Set horizontal position 
if (lax){
 if (document.layers){document.layers[''+id+''].left = lax}
 else if (document.all){document.all[''+id+''].style.left=lax}
 else if (document.getElementById){document.getElementById(''+id+'').style.left=lax+"px"}
 }
// Set vertical position
if (lay){
 if (document.layers){document.layers[''+id+''].top = lay}
 else if (document.all){document.all[''+id+''].style.top=lay}
 else if (document.getElementById){document.getElementById(''+id+'').style.top=lay+"px"}
 }
}
