/*
	******************************************************************
	*	Fine Arts homepage scripts for:						*
	*	homepage image randomizer							*
	*	Created - 2/15/06 by JCO								*
	******************************************************************
*/

//Random image script
//Enter the link to the picture here
var theImages = new Array()
theImages[0] = 'images/homepage/homepage1.jpg'
theImages[1] = 'images/homepage/homepage2.jpg'
theImages[2] = 'images/homepage/homepage3.jpg'
theImages[3] = 'images/homepage/homepage4.jpg'
theImages[4] = 'images/homepage/homepage5.jpg'
theImages[5] = 'images/homepage/homepage6.jpg'
theImages[6] = 'images/homepage/homepage7.jpg'
theImages[7] = 'images/homepage/homepage8.jpg'
theImages[8] = 'images/homepage/homepage9.jpg'
theImages[9] = 'images/homepage/homepage10.jpg'
theImages[10] = 'images/homepage/homepage11.jpg'
theImages[11] = 'images/homepage/homepage12.jpg'

//Add the 508 description
var theDescription = new Array()
theDescription[0] = 'Get involved at Central!'
theDescription[1] = 'Central’s Teacher Academy'
theDescription[2] = 'Our faculty know you'
theDescription[3] = 'Central education = affordable investment'
theDescription[4] = 'Our graduates succeed'
theDescription[5] = 'An education for life'
theDescription[6] = 'A purposefully residential campus'
theDescription[7] = 'Glass blowing at Central'
theDescription[8] = 'Jazz at Central'
theDescription[9] = 'The arts at Central'
theDescription[10] = 'Need a break? Meet friends at the Cafe'
theDescription[11] = 'Sing, play and compose at Central'

//Now Randomize
var p = theImages.length

var preBuffer = new Array()
for (i=0; i<p; i++){
		preBuffer[i] = new Image()
		preBuffer[i].src = theImages[i]
}

//Get random image
var whichImage = Math.round(Math.random()*(p-1));

//Write the image and alt tag code to the document
function showImage(){
	document.write('<img src="'+theImages[whichImage]+'" alt="'+theDescription[whichImage]+'" width="240" height="325" />');
}

