ho riprovato a modificare il codice:
codice:
// Set the horizontal and vertical position for the popup
PositionX = 100;
PositionY = 100;
// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth = 500;
defaultHeight = 500;
// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = true;
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<script>\nvar isNN,isIE;\nif (parseInt(navigator.appVersion.charAt(0))>=4){\nisNN=(navigator.appName=="Netscape")?1:0;\nisIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}\nfunction reSizeToImage(){\nif (isIE){\nif(navigator.appVersion.search("MSIE 7.0")!=-1){\nwindow.resizeTo(100,100);\nwidth=100-(document.body.clientWidth-document.images[0].width);\nheight=100-(document.body.clientHeight-document.images[0].height);\nwindow.resizeTo(width+150,height);\n}else{\nwindow.resizeTo(100,100);\nwidth=100-(document.body.clientWidth-document.images[0].width);\nheight=100-(document.body.clientHeight-document.images[0].height);\nwindow.resizeTo(width,height);\n}\n}\nif (isNN){\nwindow.innerWidth=document.images["George"].width;\nwindow.innerHeight=document.images["George"].height;\n}\n}\nfunction doTitle(){document.title="";}\n</script>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();">');
writeln('[img]+imageURL+[/img]</body></html>');
close();
}}
dimmi se ti funziona o se ti da problemi (a me non li da, ma non si sa mai visto che non sono esperto di javascript)