var theImages = new Array()
var theLinks = new Array() 

theImages[0] = 'images/Header_04_1.jpg'
theImages[1] = 'images/Header_04_2.jpg'
theImages[2] = 'images/Header_04_3.jpg'
theImages[3] = 'images/Header_04_4.jpg'
theImages[4] = 'images/Header_04_5.jpg'
theImages[5] = 'images/Header_04_6.jpg'
theImages[6] = 'images/Header_04_7.jpg'
//theImages[7] = 'images/Header_04_8.jpg'

theLinks[0] = 'http://www.petfinder.org/~IN135/Wishlist.html'
theLinks[1] = 'http://www.petfinder.org/~IN135/MissionStatement.html'
theLinks[2] = 'http://www.petfinder.org/~IN135/Donate.html'
theLinks[3] = 'http://www.petfinder.org/~IN135/Volunteer.html'
theLinks[4] = 'http://helptheanimalsapp.appspot.com/lost-and-found'
theLinks[5] = 'http://www.petfinder.org/~IN135/FeaturedCat.html'
theLinks[6] = 'http://www.petfinder.org/~IN135/FeaturedDog.html'
//theLinks[7] = 'http://www.petfinder.org/~IN135/FurBall.html'



var j = 0
var p = theImages.length;

var preBuffer = new Array()
for (i = 0; i < p ; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
document.write('<a href="'+theLinks[whichImage]+'">');
document.write('<img src="http://www.petfinder.org/~IN135/'+theImages[whichImage]+'" border="0">');
document.write('</a>');
}
