//DAVID, Here's the beta version of your new js file. I haven't tested it out. You will need to rename this file to the correct name, replace the existing one (copy the old one to a safe place). You can see that I have added an "Array" of picture file names (next_pic). You will need to update this every time you add or delete an htm file in the first array (np_links). The order of the HTMs should corresponde exactly with the order of the JPGs. The other solution (which preloads every picture) is at the bottom of this page. You can test it out by removing the "//" symbols before each line. Search for "DAVID" for more details&#133;

document.write('<SPAN CLASS=nb><A CLASS=prevlink HREF="javascript:NextPrev(\'P\',this);" OnMouseOver="window.status=\'Appuyez sur la touche &#147;Moins&#148; pour aller &agrave; la pr&eacute;c&eacute;dente photo de Paris\'; return true;"><IMG SRC="../images/ARROWP.GIF" ALT="Press the &#147;Minus&#148; key to go to the previous picture in this series of photographs of Paris." WIDTH=79 HEIGHT=27 BORDER=0 ALIGN=middle></A>&nbsp;<A CLASS=homelink HREF="index.htm" OnMouseOver="window.status=\'Aller &agrave; l&#146;index des photos de Paris\'; return true;"><SUP><IMG SRC="../images/HOME.GIF" ALT="Go to the index page of pictures of Paris." WIDTH=81 HEIGHT=27 BORDER=0 HSPACE=8 ALIGN=middle></SUP></A>&nbsp;<A CLASS=nextlink HREF="javascript:NextPrev(\'N\',this);" OnMouseOver="window.status=\'Appuyez sur la touche &#147;Plus&#148; pour aller &agrave; la prochaine photo de Paris\'; return true;"><IMG SRC="../images/ARROWN.GIF" ALT="Press the &#147;Plus&#148; key to go to the next photograph in this series of pictures of Paris" WIDTH=79 HEIGHT=26 BORDER=0 ALIGN=middle></A></SPAN>');
// My deepest thanks go out to James Alarie, jalarie@flint.umich.edu, http://spruce.flint.umich.edu/~jalarie/, for writing this script for me!
var np_links = new Array(
"reunion2-01.htm",
"reunion2-02.htm",
"reunion2-03.htm",
"reunion2-04.htm",
"reunion2-05.htm",
"reunion2-06.htm",
"reunion2-07.htm",
"reunion2-08.htm",
"reunion2-09.htm",
"reunion2-10.htm",
"reunion2-11.htm",
"reunion2-12.htm",
"reunion2-13.htm",
"reunion2-14.htm",
"reunion2-15.htm",
"reunion2-16.htm",
"reunion2-17.htm",
"reunion2-18.htm",
"reunion2-19.htm",
"reunion2-20.htm",
"reunion2-21.htm",
"reunion2-22.htm",
"reunion2-23.htm",
"reunion2-24.htm",
"reunion2-25.htm",
"reunion2-26.htm",
"reunion2-27.htm",
"reunion2-28.htm",
"reunion2-29.htm",
"reunion2-30.htm",
"reunion2-31.htm",
"reunion2-32.htm",
"reunion2-33.htm",
"reunion2-34.htm",
"reunion2-35.htm");

//DAVID here is the new array. Update this every time you update the other array

var next_pic = new Array(
"roll2-01.jpg",
"roll2-02.jpg",
"roll2-03.jpg",
"roll2-04.jpg",
"roll2-05.jpg",
"roll2-06.jpg",
"roll2-07.jpg",
"roll2-08.jpg",
"roll2-09.jpg",
"roll2-10.jpg",
"roll2-11.jpg",
"roll2-12.jpg",
"roll2-13.jpg",
"roll2-14.jpg",
"roll2-15.jpg",
"roll2-16.jpg",
"roll2-17.jpg",
"roll2-18.jpg",
"roll2-19.jpg",
"roll2-20.jpg",
"roll2-21.jpg",
"roll2-22.jpg",
"roll2-23.jpg",
"roll2-24.jpg",
"roll2-25.jpg",
"roll2-26.jpg",
"roll2-27.jpg",
"roll2-28.jpg",
"roll2-29.jpg",
"roll2-30.jpg",
"roll2-31.jpg",
"roll2-32.jpg",
"roll2-33.jpg",
"roll2-34.jpg",
"roll2-35.jpg");

function NextPrev(Which,This)
{

Loop='yes';
URL=document.location.href;
ix1=URL.indexOf('?');
if (ix1 > -1)
{
URL=URL.substring(0,ix1);
}

ix1=URL.lastIndexOf('/');

if (ix1 > -1)
{
URL=URL.substring(ix1+1);
}

links_len=np_links.length;

for (ix1=0; ix1<links_len; ix1++)
{
link=np_links[ix1];
if (link == URL)
{
if (Which == 'N')
{
ix2=ix1*1 + 1;
if (ix2 >= links_len)
{
if (Loop == 'no')
{
alert('Last picture in the series on Paris.');
if (This.href) { This.href=URL; }
return false;
}

ix2=0;
}

locn=np_links[ix2];
document.location=locn;
if (This.href)
{
This.href=locn;
}

//DAVID here is the next picture preload
ix2=ix2 + 1;
if (ix2 < next_pic.length)
{
ImageNext = new Image(1,1)
ImageNext.src = next_pic[ix1]
noel( ix2, "after" );
}

return false;

}
else
{

ix2=ix1 - 1;
if (ix2 < 0)
{
if (Loop == 'no')
{
alert('Beginning of list.');
if (This.href) { This.href=URL; }
return false;
}
ix2=links_len-1;
}

locn=np_links[ix2];
document.location=locn;
if (This.href) { This.href=locn; }

//DAVID here is the previous preload image
ix2=ix2 - 1;
if (ix2 >= 0)
{
ImageNext = new Image(1,1)
ImageNext.src = next_pic[ix2]
noel( ix2, "before" );
}

return false;
}
}
}
}

var timer = null
function slideshow() { NextPrev('N',this); }
timer=setTimeout('slideshow()',300000)

function ejs_code_clavier(keyStroke) {
ejs_code_eventChooser = (!document.all) ? keyStroke.which : event.keyCode;
ejs_code_which = String.fromCharCode(ejs_code_eventChooser);
if (ejs_code_which =='+' ){ NextPrev('N',this); }
else if (ejs_code_which == '-' ){ NextPrev('P',this); }
return true
}
document.onkeypress = ejs_code_clavier;

//DAVID, try this if you want to see the behaviour of preloading more than one photo loads next or previous 10 photos (you can change the 10 to 15 etc. for more or less)

function noel( justOpened, theDay )
{
if ( theDay == "before" )
{
for (gift=justOpened-1; (gift >= 0) && (gift > justOpened - 10) ; gift-- )
{
santa = new Image(1,1)
santa.src = next_pic[gift]
}
}
else
{
for (gift=justOpened+1; (gift<next_pic.length) && (gift < justOpened + 10); gift++ )
{
santa = new Image(1,1)
santa.src = next_pic[gift]
}
}
}
