<!-- 
// Dit script is gemaakt door mark knol @ proximedia.nl
// Deze versie laadt een plaatje in een popupvenster 
// zonder witte randen en pakt automatisch de goede maat.
// gebruik: 
// <a href="fotogroot.jpg" rel="popupFoto" title="Titel van Foto"><img src="thumbnail.jpg" alt="Klik voor een vergroting" /></a>

function ActiveerPopupFoto() {
	var ls=document.getElementsByTagName('a');
	if (ls.length > 0) {
		for(var i=0;i<ls.length;i++){
			if(ls[i].getAttribute('rel')=='popupFoto') {
				ls[i].className+=ls[i].className?' extlink':'extlink';
				ls[i].onclick=function(){				
					Foto(this.href,this.title); 
					return false
				}
			}
		}
	}
}

function Foto(img,txt){
	if (!txt) {txt=img}
	foto1= new Image();
	foto1.src=(img);
	CheckFoto(img,txt);
}

function CheckFoto(img,txt){
	if((foto1.width!=0)&&(foto1.height!=0)){
		viewFoto(img,txt);
	}
	else {
		uitvoering="CheckFoto('"+img+"','"+txt+"')";
		interval=setTimeout(uitvoering,20);
	}
}

function viewFoto(img,txt){
	imgbreedte=foto1.width;
	imghoogte=foto1.height;
	vars="width="+imgbreedte+",height="+imghoogte+",left="+((screen.width-imgbreedte)/2)+",top="+((screen.height-imghoogte)/2)+",scrollbars=no,resize=no,menubar=no";
	nieuwVenster=window.open("","vensternaam",vars);
	nieuwVenster.document.write("<html>\n<head>\n<title>"+txt+"</title>\n");
	nieuwVenster.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n");
	nieuwVenster.document.write("</head>\n\n<body style=\"margin:0px; padding:0px;\" onBlur=\"window.close()\">\n"); 
	nieuwVenster.document.write("<img src=\""+img+"\" border=\"0\" onclick=\"javascript:window.close()\">\n"); 
	nieuwVenster.document.write("</body>\n</html>\n"); 
	if (nieuwVenster.document.focus) {
		nieuwVenster.document.focus();
	}
 	nieuwVenster.document.close(); 
}

// Popupvenster voor html-pagina's

function popitup(url) {
	newwindow=window.open(url,'nieuwvenster','width=650,height=500,status=yes,scrollbars=yes,resizable=yes,left='+((screen.width-655)/2)+',top='+((screen.height-500)/2));
	if (window.focus) {newwindow.focus()}
	return false;
}

//  einde script 
-->