De javascript:
[code:1:ec61606401]
function upm_pop_img(src, w, h, name, title)
{
ww = w ;
wh = h;
if (ww < 175)
{
ww = 175;
}
if (wh < 100)
{
wh = 100;
}
if (!title)
{
title = name;
}
t = (screen.height) ? (screen.height - wh) / 2 : 0;
l = (screen.width) ? (screen.width - ww) / 2 : 0;
var upm_pop_win = window.open(’’, ‘upm_pop_win’, ‘top=’+t+’, left=’+l+’, width=’+ww+’, height=’+wh+’, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, copyhistory=no, resizable=yes’);
upm_pop_win.document.open();
upm_pop_win.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">');
upm_pop_win.document.writeln(’<html>’);
upm_pop_win.document.writeln(’<html>’);
upm_pop_win.document.writeln(’<head>’);
upm_pop_win.document.writeln(’<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”>’);
upm_pop_win.document.writeln(’<meta http-equiv=“imagetoolbar” content=“no”>’);
upm_pop_win.document.writeln(’<title>’+title+’</title>’);
upm_pop_win.document.writeln(’<style type=“text/css”>’);
upm_pop_win.document.writeln(’<!–’);
upm_pop_win.document.writeln(‘body {’);
upm_pop_win.document.writeln(‘margin: 0;’);
upm_pop_win.document.writeln(‘padding: 0;’);
upm_pop_win.document.writeln(‘color: #000;’);
upm_pop_win.document.writeln(‘background-color: #fff;’);
upm_pop_win.document.writeln(‘text-align: center;’);
upm_pop_win.document.writeln(‘overflow: hidden;’);
upm_pop_win.document.writeln(’}’);
upm_pop_win.document.writeln('');
upm_pop_win.document.writeln(‘img {’);
upm_pop_win.document.writeln(‘margin: 0;’);
upm_pop_win.document.writeln(‘padding: 0;’);
upm_pop_win.document.writeln(‘border: none;’);
if (wh == 100)
{
upm_pop_win.document.writeln('margin-top: '+Math.floor(50-(h/2))+'px');
}
upm_pop_win.document.writeln(’}’);
upm_pop_win.document.writeln('-->');
upm_pop_win.document.writeln('</style>');
upm_pop_win.document.writeln(’</head>’);
upm_pop_win.document.writeln(’<body>’);
upm_pop_win.document.writeln(’<div id=“upm-image-view”>’);
upm_pop_win.document.writeln(’<img src="’+src+’" width="’+w+’" height="’+h+’" alt="">’);
upm_pop_win.document.writeln(’</div>’);
upm_pop_win.document.writeln(’</body>’);
upm_pop_win.document.write(’</html>’);
upm_pop_win.document.close();
upm_pop_win.focus();
}
[/code:1:ec61606401]
Gebruik:
[code:1:ec61606401]
<a href=“images/fotos/groot/P1010003.jpg” onclick=“upm_pop_img(this.href, ‘600’, ‘450’, ‘’, this.title); return false;”>
<img src=“images/fotos/klein/P1010003.jpg” alt="" /></a>
[/code:1:ec61606401]
Ik gebruik het op www.sinkin.be en dan collecties.