Lo que tienes que hacer es abrir una ventana de un tamaño x predefinido, pasandole por la url con parámetros ? la url de la nueva imagen. Una vez abierto este html, esta nueva ventana debe leer la url de la imagen de la url pasada, y cargarla... una vez cargada, cambiar su propio tamaño para adaptarse al tamaño de la imagen que contiene... mexplico ?
Imagino que no asi que te dejo un ejemplo.
A meter en el fichero que muestra los thumbnails (imágenes pequeñas). Sustituye
www.dominio.com por la url de tu web:
<script>
function abrete_sesamo(laimagen) {
window.open('http://www.dominio.com/imagen.html?img='+laimagen+'','mostrando_imagen',' height=10,width=10,status=no,toolbar=no,menubar=no ,location=no');
}
</script>
Y ahora por cada imagen algo tal que asi, sustituyendo obviamente
www.dominio.com por la url y nombre de la imagen:
<img style="cursor:hand;" onclick="javascript
:abrete_sesamo('http://www.dominio.com/imagenquesea.jpg');return false" width=100 height=100 src=imagenpequeña.jpg border=1>
Cuando pulses la imagen pequeña se abrirá imagen.html?urldelaimagengrande
ok ?
Y ahora el código del imagen.html, que es el que "hace magia", este lo puedes copiar tal cual en un imagen.html, tan sólo sustituye los
www.tudominio.com:
<html>
<head>
<meta http-equiv="imagetoolbar" content="false">
<title>Ampliación de imagen</title>
<script language="javascript">
<!--
var i=0;
function yomelohago_yomelocomo() {
if (navigator.appName == 'Netscape') i=40;
if (document.images[0].width < 300) document.images[0].width=300;
if (document.images[0].height > 450) document.images[0].height=450;
if (document.images[0]) window.resizeTo(document.images[0].width +10, document.images[0].height+30-i);
if (document.images[0]) window.moveTo((screen.availWidth-document.images[0].width-30),(screen.availHeight/2)-(document.images[0].height/2)-10);
}
//-->
</script>
</head>
<body onblur="self.close();" oncontextmenu="return false" onclick="self.close();" onload="yomelohago_yomelocomo();" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
<script language="JavaScript">
<!--
var is_input = document.URL.indexOf('=');
if (is_input != -1)
{
addr_str = document.URL.substring(is_input+1, document.URL.length);
document.write("<img onError=this.src='http://www.dominio.com/nopudecargarlaimagen.gif'; src="+addr_str+" border=0 alt='Pulse la imagen para cerrar.'>");
}
else
{document.write("No ha creado la llamada correctamente");}
-->
</script>
</body>
</html>
NOTA IMPORTANTISIMA: Este código NO FUNCIONA EN LOCAL, es decir, en tu pc, debes subirlo a internet para poder probarlo, o arrancarlo desde tu servidor local, un doble click en el fichero html NO FUNIONARA, porque el navegador no pasa variables por la url en ese tipo de ficheros, debe ser probado ONLINE.
Ya me contarás si entiendes todo bien. Un saludo.