// This script and many more are available free online at
// The JavaScript Source!! http://javascript.internet.com

// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.
theImages[0] = 'graphics/frontpage/gallery01.jpg'
theImages[1] = 'graphics/frontpage/gallery02.jpg'
theImages[2] = 'graphics/frontpage/gallery03.jpg'
theImages[3] = 'graphics/frontpage/gallery04.jpg'
theImages[4] = 'graphics/frontpage/gallery05.jpg'
theImages[5] = 'graphics/frontpage/gallery06.jpg'
theImages[6] = 'graphics/frontpage/gallery07.jpg'
theImages[7] = 'graphics/frontpage/gallery08.jpg'
theImages[8] = 'graphics/frontpage/gallery09.jpg'
theImages[9] = 'graphics/frontpage/gallery10.jpg'
theImages[10] = 'graphics/frontpage/gallery11.jpg'
theImages[11] = 'graphics/frontpage/gallery12.jpg'
theImages[12] = 'graphics/frontpage/gallery13.jpg'
theImages[13] = 'graphics/frontpage/gallery14.jpg'
theImages[14] = 'graphics/frontpage/gallery15.jpg'
theImages[15] = 'graphics/frontpage/gallery16.jpg'
theImages[16] = 'graphics/frontpage/gallery17.jpg'




// do not edit anything below this line
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
  preBuffer[i] = new Image()
  preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
  document.write('<style type="text/css"> #galleryIntro {background: transparent url('+theImages[whichImage]+') no-repeat right bottom;} </style>');
}


/****** SECOND ******/
var theImagesB = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.
theImagesB[0] = 'graphics/frontpage/institute01.jpg'
theImagesB[1] = 'graphics/frontpage/institute02.jpg'
theImagesB[2] = 'graphics/frontpage/institute03.jpg'
theImagesB[3] = 'graphics/frontpage/institute04.jpg'
theImagesB[4] = 'graphics/frontpage/institute05.jpg'
theImagesB[5] = 'graphics/frontpage/institute06.jpg'
theImagesB[6] = 'graphics/frontpage/institute07.jpg'
theImagesB[7] = 'graphics/frontpage/institute08.jpg'
theImagesB[8] = 'graphics/frontpage/institute09.jpg'
theImagesB[9] = 'graphics/frontpage/institute10.jpg'
theImagesB[10] = 'graphics/frontpage/institute11.jpg'
theImagesB[11] = 'graphics/frontpage/institute12.jpg'
theImagesB[12] = 'graphics/frontpage/institute13.jpg'
theImagesB[13] = 'graphics/frontpage/institute14.jpg'

// do not edit anything below this line
var k = 0
var q = theImagesB.length;
var preBufferB = new Array()
for (h = 0; h < q; h++){
  preBufferB[h] = new Image()
  preBufferB[h].src = theImagesB[h]
}
var whichImageB = Math.round(Math.random()*(q-1));
function showImage2(){
  document.write('<style type="text/css"> #instituteIntro {background: transparent url('+theImagesB[whichImageB]+') no-repeat right bottom;} </style>');
}

/****** THIRD ******/ 
var theImagesC = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.
/*
theImagesC[0] = 'graphics/frontpage/institute03.jpg'
theImagesC[1] = 'graphics/frontpage/institute01.jpg'
theImagesC[2] = 'graphics/frontpage/institute02.jpg'
theImages[21] = 'graphics/frontpage/gallery21.jpg'
theImages[22] = 'graphics/frontpage/gallery22.jpg'
theImages[23] = 'graphics/frontpage/gallery23.jpg'
theImages[24] = 'graphics/frontpage/gallery24.jpg'
theImages[25] = 'graphics/frontpage/gallery25.jpg'
theImages[26] = 'graphics/frontpage/gallery26.jpg'
theImages[27] = 'graphics/frontpage/gallery27.jpg'
theImages[28] = 'graphics/frontpage/gallery28.jpg'
theImages[29] = 'graphics/frontpage/gallery29.jpg'
theImages[30] = 'graphics/frontpage/gallery30.jpg'
theImages[31] = 'graphics/frontpage/gallery31.jpg'

*/

// do not edit anything below this line
var l = 0
var r = theImagesC.length;
var preBufferC = new Array()
for (g = 0; g < r; g++){
  preBufferC[g] = new Image()
  preBufferC[g].src = theImagesC[h]
}
var whichImageC = Math.round(Math.random()*(r-1));
function showImage3(){
  document.write('<img src="'+theImagesC[whichImageC]+'" width="220" height="100" alt="image" />');
}