var win = null;
function popUp(mypage, myname, w, h, scroll){
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings = 'height='+h+',';
		settings += 'width='+w+',';
		settings += 'top='+wint+',';
		settings += 'left='+winl+',';
		settings += 'scrollbars='+scroll+',';
		settings += 'resizable=no';
	win = window.open(mypage, myname, settings);

if (parseInt(navigator.appVersion) >= 4){
	win.window.focus();
	}
}

function MM_openBrWindow(theURL, winName, features){ 
	window.open(theURL, winName, features);
}

function fotoPop(img,txt){
	foto = new Image();
	foto.src = (img);
	checkFoto(img,txt);
}

function checkFoto(img,txt){
	if ((foto.width != 0) && (foto.height!=0)){
		viewFoto(img,txt);
	} else {
		uitvoering = "checkFoto('"+img+"','"+txt+"')";
		interval = setTimeout(uitvoering, 5);
	}
}

function viewFoto(img,txt){
	imgbreedte = foto.width;
	imghoogte = foto.height;
	
	if(!txt) {
		txt = img;
	}
	
	vars = "width="+imgbreedte+",height="+imghoogte+",left="+((screen.width-imgbreedte)/2)+",top="+((screen.height-imghoogte)/2)+",scrollbars=no";
	newwindow = window.open("","nieuwvenster",vars);
	newwindow.document.clear();
	newwindow.document.write("<html>\n<head>\n<title>"+txt+"</title>\n");
	newwindow.document.write("<meta http-equiv='imagetoolbar' content='no'>\n");
	newwindow.document.write("</head>\n\n<body style='margin:0; overflow:hidden;' onBlur='window.close()'>\n"); 
	newwindow.document.write("<a href='#'><img src='"+img+"' border='0' onClick='javascript:window.close();' title='klik om te sluiten'></a>");
	newwindow.document.write("</body>\n</html>\n"); 

	if (newwindow.document.focus){
		newwindow.document.focus();
	}
newwindow.document.close(); 
}