// Script to display an image chosen at random
// Adapted from Craig Grannell "Web Designer's Reference"

function randomContent()
{
var chosenImage=new Array();
// filenames of images in this array; path is relative to document, not to script
chosenImage[1]="photos\/candf.jpg";
chosenImage[2]="photos\/crew2000.jpg";
chosenImage[3]="photos\/flipchart.jpg";
chosenImage[4]="photos\/lunchtime.jpg";
chosenImage[5]="photos\/networkagm1.jpg";
chosenImage[6]="photos\/networkagm2.jpg";
chosenImage[7]="photos\/parentnetwork.jpg";
chosenImage[8]="photos\/pre-nursery.jpg";
chosenImage[9]="photos\/russian.jpg";
chosenImage[10]="photos\/staffteam2.jpg";

// title and alt copy for images goes here
var chosenAltCopy=new Array();
chosenAltCopy[1]="Children and Families Briefing";
chosenAltCopy[2]="Crew 2000";
chosenAltCopy[3]="Planning the Eke-Out Project's work";
chosenAltCopy[4]="Network AGM 2005";
chosenAltCopy[5]="Network AGM 2005";
chosenAltCopy[6]="Network AGM 2005";
chosenAltCopy[7]="Parent Network Scotland";
chosenAltCopy[8]="Edinburgh Pre-Nursery Services";
chosenAltCopy[9]="Russian Edinburgh";
chosenAltCopy[10]="The Eke-Out staff team";

// and here is the caption
var chosenCaption=new Array();
chosenCaption[1]="Children and Families Briefing";
chosenCaption[2]="Crew 2000";
chosenCaption[3]="Planning the Eke-Out Project's work";
chosenCaption[4]="Network AGM 2005";
chosenCaption[5]="Network AGM 2005";
chosenCaption[6]="Network AGM 2005";
chosenCaption[7]="Parent Network Scotland";
chosenCaption[8]="Edinburgh Pre-Nursery Services";
chosenCaption[9]="Russian Edinburgh";
chosenCaption[10]="The Eke-Out staff team";

var getRan=Math.floor(Math.random()*chosenImage.length);
if (getRan==0)
getRan=1;
document.write('<img src="'+chosenImage[getRan]+'" alt=\"'+chosenAltCopy[getRan]+'\" title=\"'+chosenAltCopy[getRan]+'\" width=\"300\"   /><br />'+chosenCaption[getRan]);
}