
var win = null;
function NewWindow(mypage,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes'
win = window.open(mypage,'_blank',settings);
win.focus();
}


function adjustIFrameSize (iframeWindow) {
  if (iframeWindow.document.height) {
    var iframeElement = parent.document.getElementById
(iframeWindow.name);
    iframeElement.style.height = iframeWindow.document.height + 'px';
    iframeElement.style.width = iframeWindow.document.width + 'px';
  }
  else if (document.all) {
    var iframeElement = parent.document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat') 
    {
      iframeElement.style.height = 
iframeWindow.document.documentElement.scrollHeight + 10 + 'px';
      iframeElement.style.width = 
iframeWindow.document.documentElement.scrollWidth + 0 + 'px';
    }
    else {
      iframeElement.style.height = 
iframeWindow.document.body.scrollHeight + 10 + 'px';
      iframeElement.style.width = 
iframeWindow.document.body.scrollWidth + 0 + 'px';
    }
  }
}



function BrowserCheck() {
	var b = navigator.appName;
	var a = navigator.userAgent;
	this.mac = (a.indexOf('Mac')>0);
	this.win = (a.indexOf('Win')>0);
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.v = parseInt(navigator.appVersion);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0);
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0);
	if (this.ie5) this.v = 5;
	this.min = (this.ns||this.ie);
}

// automatically create the "is" object
is = new BrowserCheck();


function printen() {
	// Deze functie werkt niet op de Mac, om onduidelijke reden.
	if(!is.mac)
	{
		if(window.print) window.print();
	}
	else alerter("printmelding.html");
}
