  // Set up the image files to be used.
  var theImages = new Array() 
  //var theLinks = new Array()
  var theLinksLeft	 = new Array()
  var theLinksMiddle = new Array()
  var theLinksRight	 = new Array()
  var theCaptionsLeft	 = new Array()
  var theCaptionsMiddle = new Array()
  var theCaptionsRight	 = new Array()

  // Set up the factoids to be used.
  var theFactoids = new Array() 
  var theFactoidsLinks = new Array() 

  // To add more image files, continue with the pattern below, adding to the array.

  theImages[0] 		= '/oisp/images/rotating/oisp_rotating1.jpg'
  theLinksLeft[0] 	= '/oisp/student-reports/#enrollment_profile'
  theCaptionsLeft[0]= 'Enrollment Profile report provides in-depth University-wide statistics related to student enrollment and student demographics'
  theLinksMiddle[0] = 'https://oisp.tamu.edu/cognos8/'
  theCaptionsMiddle[0]= 'Cognos Reporting Portal gives users in colleges and departments direct access to data and interactive reporting tools'
  theLinksRight[0] 	= '/oisp/faculty-reports/#whos_teaching_whom'
  theCaptionsRight[0]= 'Who\'s Teaching Whom report details course sections taught from department and faculty perspective'

  theImages[1] 		= '/oisp/images/rotating/oisp_rotating2.jpg'
  theLinksLeft[1] 	= '/vision2020/2008presentation.pps'
  theCaptionsLeft[1]= 'Vision 2020 Progress report is updated annually to monitor University\'s progress towards achieving its goals and imperatives'
  theLinksMiddle[1] = '/oisp/degree-reports/#degree_profile'
  theCaptionsMiddle[1]= 'Degree Profile provides in-depth information for degrees awarded by each college'
  theLinksRight[1] 	= '/oisp/reports/data-request.pdf'
  theCaptionsRight[1]= 'Can\'t find the data you need in any of the available OISP reports?  Fill out the Data Request Form to request a custom report from OISP'

//  theImages[2] 		= '/oisp/images/rotating/oisp_rotating3.jpg'
//  theLinksLeft[2] 	= 'http://www.tamu.edu/oisp/reports/student.html'
//  theLinksMiddle[2] = 'http://www.tamu.edu/oisp/reports/faculty.html'
//  theLinksRight[2] 	= 'http://www.tamu.edu/oisp/reports/course.html'
//
//  theImages[3] 		= '/oisp/images/rotating/oisp_rotating4.jpg'
//  theLinksLeft[3] 	= 'http://www.tamu.edu/oisp/reports/student.html'
//  theLinksMiddle[3] = 'http://www.tamu.edu/oisp/reports/faculty.html'
//  theLinksRight[3] 	= 'http://www.tamu.edu/oisp/reports/course.html'

  theFactoids[0] = 'University total enrollment during fall 2009 was 48,703 (increasing by 664 students or 1.4% compared to fall 2008).'
  theFactoidsLinks[0] = 'student-reports/enrollment-profile-fall-2009.pdf'

  theFactoids[1] = 'In fall 2009, the Qatar campus enrolled a total of 414 students (see page 97).'
  theFactoidsLinks[1] = 'student-reports/enrollment-profile-fall-2009.pdf'
  
  theFactoids[2] = 'In fall 2009, College of Geosciences posted the largest percentage increases in both undergraduate (112, 21.3%) and Master\'s (29, 16.4%) enrollment from last fall.'
  theFactoidsLinks[2] = 'student-reports/enrollment-profile-fall-2009.pdf'

  theFactoids[3] = 'In fall 2009 at the doctoral level, Dwight Look College of Engineering had the highest percentage increase of 94 students (10.1%).'
  theFactoidsLinks[3] = 'student-reports/enrollment-profile-fall-2009.pdf'

  theFactoids[4] = 'Fall 2009 First Time in College (FTIC) undergraduates decreased by 22 (-0.3%).'
  theFactoidsLinks[4] = 'student-reports/enrollment-profile-fall-2009.pdf'

  theFactoids[5] = 'Fall 2009 First Time Transfer Undergraduates decreased by 133 (-8.0%).'
  theFactoidsLinks[5] = 'student-reports/enrollment-profile-fall-2009.pdf'

  theFactoids[6] = 'In fall 2009, First Time Master’s enrollment decreased by 138 (-8.0%).'
  theFactoidsLinks[6] = 'student-reports/enrollment-profile-fall-2009.pdf'

  theFactoids[7] = 'Total undergraduates who were taking 15-17 SCH in fall 2009 decreased by 727 (-4.9%); however, those taking 12-14 SCH increased by 1,174 (6.1%).'
  theFactoidsLinks[7] = 'student-reports/enrollment-profile-fall-2009.pdf'


function showImage()  {

//  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));

  document.getElementById("imap").style.background = 'url(\''+theImages[whichImage]+'\')';
  
  document.getElementById("rLeft").innerHTML ='<span>'+theCaptionsLeft[whichImage]+'</span>'
  document.getElementById("rLeft").href=theLinksLeft[whichImage]
  
  document.getElementById("rMiddle").innerHTML ='<span>'+theCaptionsMiddle[whichImage]+'</span>'
  document.getElementById("rMiddle").href=theLinksMiddle[whichImage]
  
  document.getElementById("rRight").innerHTML ='<span>'+theCaptionsRight[whichImage]+'</span>'
  document.getElementById("rRight").href=theLinksRight[whichImage]
}

function showFactoid() {
	
  var f = theFactoids.length;
  
  var whichFact = Math.round(Math.random()*(f-1));
  
  document.getElementById("spotlight").innerHTML = theFactoids[whichFact] + '<br /><a href="' 
                                            + theFactoidsLinks[whichFact] + '">...click to view full report</a> ';

}