Nåh, joh vinduet fylder også ... så er det straks lidt sværere
- da vinduer fylder forskelligt afhængig af browser og styresystem
... prøv denne her (har selv testet i IE 6.0, xp)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><script type="text/javascript" language="javascript">
function popit(pict){
popins=window.open("","popins","width=300,height=200,status=no,toolbar=no,location=no,directories=no,resizable=no,menubar=no");
popins.document.write('<html><head><title>Din titel</title><script type="text/javascript" language="javascript">function resizepopit(){pich=document.getElementById("pictpopit").offsetHeight+32;picw=document.getElementById("pictpopit").offsetWidth+6;if(pich>screen.availHeight)pich=screen.availHeight;if(picw>screen.availWidth)picw=screen.availWidth;window.resizeTo(picw,pich);window.moveTo((screen.availWidth-picw)/2,(screen.availHeight-pich)/2)}<\/script><style type="text/css">html,body{margin:0px;padding:0px;border:0px;}</style></head><body><img id="pictpopit" src="'+pict+'" onLoad="resizepopit();" onclick="window.close();"></body></html>');
}
</script>
</head>
<body>
<img src="lillebillede.jpg" onclick="popit('stortbillede.jpg');">
</body></html>