// Funzione per aprire le immagini ingrandite in popup
function imgOpen(img,name) {
    var myWin=window.open("","foto","width=100,height=100,toolbar=0,scrollbars=0,resizable=0,left=100,top=100");
    if (myWin) {
        myWin.document.open();
        myWin.document.write('<html><head>');
        myWin.document.write('<scr'+'ipt type="text/javascr'+'ipt">function resizeWin(img) {var i=new Image();i.src=img;window.resizeTo(i.width+30,i.height+75);}</scr'+'ipt>');
        myWin.document.write('<style>body{background:#dee3e6;padding:0;margin:0;}#foto{margin:10px;}</style>');
        myWin.document.write('</head><body onload="resizeWin(\''+img+'\');">');
        myWin.document.write('<div id="foto"><img src="'+img+'" alt="'+name+'" title="'+name+'"></div>');
        myWin.document.write('</body></html>');
        myWin.document.title=name;
        myWin.document.close();
    }
    myWin.focus();
}