function popupFoto(sezione, foto, titolo) {
var URL = 'gallery/'+ sezione + '/'+ foto + '.jpg';
var w = winw;
var h = winh;
var l = Math.floor((screen.width-w)/2);
var t = Math.floor((screen.height-h)/2);
searchWin=window.open(URL,"","width=" + w + ",height=" + h +", top=" + t + ",left=" + l,"scrollbar=no, status=no, menubar=no, toolbar=no");
pag = "<TITLE>"+titolo+"</TITLE>";
pag+="<body scroll=no topmargin=0 leftmargin=0>[img]"+URL+"[/img]</body>";
searchWin.document.write(pag);
}
prova così...
ovviamente la chiamata è
popupFoto('casa','mareA2','titolo di prova');