// JavaScript Document
//Chooses a random picture to insert into the page
mySmallPix = new Array(	"myImages/random/backache_small.jpg",
					   	"myImages/random/corn_small.jpg",
					   	"myImages/random/large_spud_small.jpg",
					   	"myImages/random/peppers.jpg",
					   	"myImages/random/slugs_and_beer.jpg",
					   	"myImages/random/snow_small.jpg",
					   	"myImages/random/sunflower.jpg",
					   	"myImages/random/trespassers_small.jpg",
					   	"myImages/random/butterfly.jpg",
						"myImages/random/steve_marv_small.jpg",
						"myImages/random/pumpkin.jpg"
					  );

myTextPix = new Array(	"Ouch - we've all felt like this at one time or another",
					   	"The corn is as high as an elephant's eye. Warsash, 6AA, August 2009",
					   	"A monster spud from Warsash, September 2009",
					   	"Peppers: How many of these have you grown ?",
					   	"If only it were so easy !",
					   	"Unusual weather in Warsash - April 2009",
					   	"One of the few bug free plants which are easy to grow - pity you can't eat them",
					   	"No comment needed, really",
					   	"May 2009 - visiting from Northern France, a Painted Lady butterfly",
						"Marvin & Steve - winners of the best allotment in Fareham 2008 and 2009",
						"Oh what a beauty ! Irene shows off with her pumpkin" 
					   );

imageCount = mySmallPix.length;

function choosePic(){
	if(document.images){
		randomNum=Math.floor((Math.random() * imageCount));
		document.write('<IMG SRC=' + mySmallPix[randomNum] + ' ALT= "A Picture from the allotment" BORDER="0" ALIGN="LEFT"></td></tr>');
		document.write('<tr><td style="padding-right:10px" class="caption"><strong>' + myTextPix[randomNum] + '</strong></td></tr></table>');
	}
}



