function Foto(img,txt){
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;
if (!txt) {txt=img}
vars="width="+imgbreedte+",height="+imghoogte+",left="+((screen.width-imgbreedte)/2)+",top="+((screen.height-imghoogte)/2)+",scrollbars=no,resize=no,menubar=no";
newwindow=window.open("","nieuwvenster",vars);
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 oncontextmenu=\"return false\" ondragstart=\"return false\" onselectstart=\"return false\" style=\"margin:0px; padding:0px;\" onBlur=\"window.close()\">\n");
newwindow.document.write("<img src=\""+img+"\" border=\"0\" style=\"cursor: pointer\" onclick=\"javascript:window.close()\">\n");
newwindow.document.write("</body>\n</html>\n");
if (newwindow.document.focus) {newwindow.document.focus();}
newwindow.document.close();
}