I think this is something along the lines of what you are looking for... You
can tweak it for your own purposes. The initArray function initialises the
array containing the location of the images. The script in the body section
writes out the links. The openImg function gets kicked off after you click
on any of the links. It then opens up a page containing a header the img and
a link to close the popup window. You can make this popup page look like
anything you specify. You will need to have a blank.htm file for the popup
function to load into the page initially otherwise you will see a page not
found error before you see the image come up. Just put the following html
into it "<html></html>" so that it takes the minimum length of time to load.
Peter.
___________________________
<html>
<head>
<title></title>
<script type="text/javascript">
var vntImg = new Array();
function initArray() {
for (var t = 0; t <= 9; t++) {
vntImg[t] = "/Windat/540/0" + String(t) + ".jpg";
}
}
function openImg(t) {
var strText = new String();
strText += "<html>\n";
strText += "<head>\n";
strText += "<title>Image " + String(t) + "</title>\n"
strText += "</head>\n\n";
strText += "<body>\n";
strText += "<center>\n";
strText += "<h1>Image " + String(t) + "</h1>\n";
strText += "<img border=\"0\" src=\"" + vntImg[t] + "\"><br>\n\n"
strText += "<a href="javascript:self.close();">Close this window</a>\n";
strText += "</body>\n";
strText += "</html>\n";
var popup = window.open("blank.htm", "popup",
"left=0,top=0,width=1024,height=730");
with (popup.document) {
open();
write(strText);
close();
}
}
</script>
</head>
<body onLoad="initArray();">
<script type="text/javascript">
for (var t = 1; t <= 9; t++) {
with (document) {
write("<a href=\"javascript
penImg(" + String(t) + ");\">Pic " +
String(t) + "</a><br>\n");
}
}
</script>
</body>
</html>
___________________________