/*
* randomImage.js
* by Kevin Chin. v1.00 000404
* Copyright (c) 2000 All Rights Reserved.
* You may use this code on a public Web
* site only if this entire copyright notice
* appears unchanged. Not much of a price is it?
*
* Contact chin@cs.ucdavis.edu/~chin/ for all other uses.
*
* Add the following line to your HTML code:
* <script lanuage=JavaScript src=PathOfJavaScriptFile></script>
*
*
*
* Edited 13 September 2005 by Brian J. Won (brian@brian1.net)
* for personal use. http://www.brian1.net
*
*/

var choice = 0;          // used as a number variable
var picNumber = 0;       // used to show picture number
var imageName = "";      // used to store final image

// path name of the image
// make sure the last image does not have a ',' after it
// all other lines will be like this "imagePath",
// only works for 100 images or less
imageArray = new Array(
"http://www.brian1.net/images/main2a.jpg",
"http://www.brian1.net/images/main4c.jpg",
"http://www.brian1.net/images/main5b.jpg",
"http://www.brian1.net/images/main6c.jpg",
"http://www.brian1.net/images/main7f.jpg",
"http://www.brian1.net/images/main8c.jpg"
);

// gets random number
with(Math)
{
  choice = ceil(random() * 100);
  choice = ceil(choice % imageArray.length);
}

picNumber = choice + 1;

// sets up html tag with random image
imageName += '<table cellpadding=0 cellspacing=0 border=0><tr><td align=center>';
imageName = imageName + '<img src=' + imageArray[choice] + '>';
imageName = imageName + '</td></tr></table>';

// writes html tag with random image
document.write(imageName)

