// JavaScript Document
//Chooses a random picture to insert into the page
mySmallPix = new Array("images/index/butterfly_small.jpg",
					   "images/index/bee_small.jpg",
					   "images/index/fly_small.jpg",
					   "images/index/mouse_small.jpg",
					   "images/index/bug_small.jpg",
					   "images/index/fox_small.jpg",
					   "images/index/squirrel_small.jpg",
					   "images/index/spider_small.jpg",
					   "images/index/IMG_8050_small.jpg"
					   );
myMediumPix = new Array("images/index/butterfly_med.jpg",
					   "images/index/bee_med.jpg",
					   "images/index/fly_med.jpg",
					   "images/index/mouse_med.jpg",
					   "images/index/bug_med.jpg",
					   "images/index/fox_med.jpg",
					   "images/index/squirrel_med.jpg",
					   "images/index/spider_med.jpg",
					   "images/index/IMG_8050_med.jpg"
					   );

myTextPix = new Array("Seen recently in the garden: a cinnabar moth, <i>Euchelia Jacobaeae</i>",
					   "Seen recently in the garden: a bee gets stuck into the pollen !",
					   "Seen recently in the garden: A bug (what sort?) on a Californian Poppy",
					   "Seen recently in the garden: a field mouse has lunch on the Valerian",
					   "Seen recently in the garden: A flying insect of unknown type",
					   "Seen recently in next door's garden: A smart young fox cub",
					   "Chandlers Ford in November - a squirrel enjoys the noonday sun",
					   "Lunch ! This little spider built the most amazing web by the front door",
					   "May 2009 - visiting from Northern France, a Painted Lady butterfly"
					   );

imageCount = mySmallPix.length;

function choosePic(){
	if(document.images){
		randomNum=Math.floor((Math.random() * imageCount));
		document.write('<A href=' + myMediumPix[randomNum] +'>');
		document.write('<IMG SRC=' + mySmallPix[randomNum] + ' ALT= "A Picture from the garden" BORDER="0" ALIGN="LEFT"></A></td></tr>');
		document.write('<tr><td class="small"><strong>' + myTextPix[randomNum] + '</strong></td></tr>');
	}
}



