//DISPLAY A RANDOM IMAGE ON THE HOME PAGE


	//THE IMAGES

		var theImages = new Array();

			theImages[0] = "/graphics/facebook-promotion6.png";
			//theImages[0] = "/news/graphics/july/open-weekend.jpg";
			//theImages[0] = "/graphics/hpfeature-exams.jpg";
			//theImages[0] = "/graphics/entertainment-promotion.png";


	//THE LINKS AND ASSOCIATED ALT/TITLE TEXT

		var theLinks = new Array();

			theLinks[0] = "http://www.facebook.com/suffolkyouthconnexions";
			//theLinks[0] = "http://www.openweekendinsuffolk.com/whats_on.html";
			//theLinks[0] = "/educationnwork/index.asp#prepare";
			//theLinks[0] = "/entertainment/";

		var theAlts = new Array();

			theAlts[0] = "Find us on Facebook";
			//theAlts[0] = "Suffolk celebrates London 2012 Open Weekend";
			//theAlts[0] = "Helping you prepare for exams";
			//theAlts[0] = "Visit our Entertainment page";

		var theTitles = new Array();

			theTitles[0] = "Find us on Facebook";
			//theTitles[0] = "Suffolk celebrates London 2012 Open Weekend";
			//theTitles[0] = "Helping you prepare for exams";
			//theTitles[0] = "Visit our Entertainment page";


	//PRELOAD IMAGES AND DISPLAY ONE AT RANDOM

		var arrayLength = theImages.length;

		var counter = 0;
		var preBuffer = new Array();

			for ( counter = 0; counter < arrayLength; counter++ )
				{
					preBuffer[counter] = new Image();
					preBuffer[counter].src = theImages[counter];
				}

		var whichImage = Math.round(Math.random()*(arrayLength-1));

		function showImage()
			{
				document.write("<a href='"+theLinks[whichImage]+"' alt='"+theAlts[whichImage]+"' title='"+theTitles[whichImage]+"' rel='external'><img src='"+theImages[whichImage]+"'></a>");
			}