timeout = 0;
function Start(URL, WIDTH, HEIGHT) {
windowprops = "width=" + (WIDTH+2) + ",height=" + (HEIGHT+2);
text = "<html><head><title>Photo</title></head><body bgcolor='#dddddd' style='padding: 1px; margin: 0'";
if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";
text += "><div align=center><a href='javascript:top.window.close();'><img src='" + URL + "' border='0'>";
if (timeout != 0) text +="<br><span style='Tahoma, helvetica' size='-1'>Preview closes after " + timeout + " seconds.</span>";
text += "</a></div></body></html>";
preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}
//функция открытия нового окна с большой фотографией
//работает в: FF,IE,NN,Opera
//пример: <a href="javascript:Start('big_img.png', 600, 400)"><img src="small_img.png" alt="" border="0"/></a>