function Foto(img,txt,width,height) {

        foto1 = document.createElement('img');
        foto1.src = img;
        
        if(!txt) {txt=img}
        vars="width="+width+",height="+height+",left="+((screen.width-width)/2)+",top="+((screen.height-height)/2);
        
        newwindow=window.open("","newwindow",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:0px; padding:0px; cursor:pointer;\" onblur=\"javascript:window.close();\">\n");
        newwindow.document.write("<img src=\""+img+"\" border=\"0\" onclick=\"javascript:window.close();\">\n");
        newwindow.document.write("</body>\n</html>\n");
        if(newwindow.document.focus) {newwindow.document.focus();}
        newwindow.document.close();
}
