function aan(ButName)
{if (document.images)
	{imgOn=eval(ButName + "on.src");
	 document[ButName].src= imgOn;
	}
}

function uit(ButName)
{if (document.images)
	{imgOff=eval(ButName + "off.src");
	 document[ButName].src= imgOff;
	}
}

function newwindow(popup,w,h,scroll) { 
	var winleft = (top.screen.width - w) / 2;
	var yMax = top.screen.height/3*2;
	hoog = (h==0)? yMax:h;
	var winup = (top.screen.height - hoog) / 3;
	winProp = 'width='+w+',height='+hoog+',left='+winleft+',top='+winup+',scrollbars='+scroll+',toolbar=no,menubar=no,resizable=no'
	Win = window.open(popup, "", winProp)
}

function newmaxwindow(Naam) {
	var xMax = top.screen.width, yMax = top.screen.height;
	window.open(Naam,'','width='+xMax+',height='+yMax+',left=0,top=0,scrollbars=yes,toolbar=yes,menubar=yes,resizable=no');
}

function blankwindow(Naam) {
	var xMax = top.screen.width, yMax = top.screen.height;
	window.open(Naam,'','width='+xMax+',height='+yMax+',left=0,top=0,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function loadTool(whichTool) {
	if (document.getElementById(whichTool).style.display != 'none') {
		document.getElementById(whichTool).style.display = 'none';
	} else {
		document.getElementById(whichTool).style.display = 'block';
	}
}

function gelezen(PageName,DocName) {
	parent.content.location="../content/leescontrole.php?id="+PageName+"&lid="+DocName;
}
