// JavaScript Document
// This file is used as the random image rotator for the home page.

// Create a new array, will be used for linking images.
var images = new Array()

// To add url for each image file here 
images[0] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture1.jpg'
images[1] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture2.jpg'
images[2] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture3.jpg'
images[3] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture4.jpg'
images[4] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture5.jpg'
images[5] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture6.jpg' 
images[6] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture7.jpg'
images[7] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture8.jpg'
images[8] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture9.jpg'
images[9] = 'http://www.okstate.edu/finaid/TRIO/upwardbound/sitepics/picture10.jpg'

// Randomize array selection
var j = 0
var k = images.length;
var temp = new Array()
for (i = 0; i < k; i++){
   temp[i] = new Image()
   temp[i].src = images[i]
}
var whichImage = Math.round(Math.random()*(k-1));
function DisplayImage(){
document.write('<img src="'+images[whichImage]+'" width="300" height="230">');
}
//-->