// fill this variable with the relative folder to the images, in
// this case a folder below the current one called images.
var img_path = 'images';

// edit / extend this array with the names if the images for display,
// it is assumed they end in '.jpg' - this is added later via script.
// it is also assumed that thumbnails will have the same name, with
// the letter 's' after, e.g. big: 3.jpg, thumbnail: 3s.jpg

var pix = new Array(6);
pix[0] = '1';
pix[1] = '2';
pix[2] = '3';
pix[3] = '4';
pix[4] = '5';
pix[5] = '6';

   //var pix1 = new array();
//pix[6] = '7';
//pix[7] = '8';
//pix[8] = '9';
//pix[9] = '10';
//pix[10] = '11';

//pix[9] = '10';
//pix[10] = '11';
//pix[11] = '12';
//pix[12] = '6';

var tex = new Array(6);
tex[0] = '1928 Rolls-Royce Park Ward in Burgundy & Black';
tex[1] = '1927 Austin Clifton Convertible in Dark Blue & Black';
tex[2] = '1926 Austin Clifton Convertible in Burgundy & Black';
tex[3] = 'Matching Pair- 1928 Rolls-Royce and 1927 Austin Windsor';
tex[4] = '1938 Morgan 4/4 Sports in Bright Red';
tex[5] = '1927 Austin Windsor Saloon in Burgundy & Black';

   //var tex1 = new array();
//tex[6] = '1928 Rolls-Royce & Austin Windsor Saloon';
//tex[7] = '1928 Rolls-Royce & Austin Clifton Convertible';
//tex[8] = '1926 Austin Clifton Convertible & Austin Windsor Saloon';
//tex[9] = 'Pair of 1927 Austin Windsor Saloons';
//tex[10] = '1927 Austin Clifton Convertible & Austin 7 Convertible';
//tex[11] = '';
   //tex[12] = 'Image 13 is showing';

var thumb_rows = 1; // Rows of Thumbs

// this pre-loads the large versions of images, causing slowness on initial
// page load in exchange for instant switching of images when thumbnails are
// mouse-overed
function image_prefetch(image_name)
{
var x = new Image();
x.src = img_path + '\/' +image_name;
}
for (var i=0; i<pix.length; i++)
{
image_prefetch(pix[i]+'.jpg');
}

// this chunk builds up a variable containing html code for the main picture
// and a table of the thumbnails. This will probably need changing, depending
// on the format desired, for now it does a one-row table of the thumbnails.

var x = '';
x += '<table border=8><tr><td>';
x += '<img name=\"thebigpicture\" src=\"'+img_path+'\/'+pix[0]+'.jpg\"><br>\n';
x += '<\/tr><\/td><\/table>';
x += '<br>';
x += '<form name=\"theform\"><textarea rows=2 cols=47 name=\"thetext\"><\/textarea><\/form>';
x += '<font size="3" color="#FF0000">Move mouse over thumbnails to view full image </b></font>'
x += '<table cellpadding=2 cellspacing=3 border=3 center><tr>';

var pix_per_row = Math.ceil(pix.length / thumb_rows);

//alert(pix_per_row);

var total_pix = pix_per_row * thumb_rows;

//alert(total_pix);

for (var i=0; i<pix.length; i++)
{
if( i > 0)
{
if (i % pix_per_row == 0)
{
x += '<\/tr><\/tr>';
}
}
x += '<td align="center" bgcolor=\"#FFFFFF\"><img src=\"'+img_path+'\/'+pix[i]+'s.jpg\"';
x += 'onmouseover=\"';
x += 'document.thebigpicture.src=\''+img_path+'\/'+pix[i]+'.jpg\';';
x += 'document.theform.thetext.value=\''+tex[i]+'\';\"><\/td>\n';
if ( (total_pix > pix.length) && (i == pix.length-1))
{
var dummies = total_pix - pix.length;

//alert(dummies);

for (var j=0; j<dummies; j++)
{

//alert('dummy');

x += '<td bgcolor=\"#FFFFFF\"><\/td>';
}
}
}
x += '<\/tr><\/table>';

//alert(x);  // used to display the script-created html code for debugging
document.write(x);  // this command injects the variable into the browser.

document.theform.thetext.value=tex[0]








      

