

//the following two arrays are used 
//for both the random image generation
//and the slide show.

//images array
var hpImage = new Array();
hpImage[0] = 'band_practice.jpg'
hpImage[1] = 'bike_rack_meeting.jpg'
hpImage[2] = 'bug_people.jpg'
hpImage[3] = 'changing_classes.jpg'
hpImage[4] = 'computer_lab.jpg'
//hpImage[5] = 'football3.jpg'
hpImage[6] = 'hall_meeting.jpg'
hpImage[7] = 'lecture.jpg'
hpImage[8] = 'les_students.jpg'
hpImage[9] = 'mt_marquette.jpg'
hpImage[10]= 'night_out.jpg'
hpImage[11] = 'professor.jpg'
hpImage[12] = 'radio_x.jpg'
//hpImage[13] = 'volleyball.jpg'
hpImage[14] = 'radiology.jpg'
hpImage[15] = 'rocks_and_books.jpg'
hpImage[5] = 'study_session.jpg'
hpImage[13] = 'summer_ski.jpg'
 

//captions array
var hpImageCaption = new Array();
hpImageCaption[0] = 'Pride of the North is the name of <a href="http://www.nmu.edu/music">NMU\'s marching band</a>, and with good reason.'
hpImageCaption[1] = 'Northern Michigan University has <a href="http://webb.nmu.edu/Admissions/SiteSections/Discover/MajorsAndMinors/MajorsAndMinors.shtml">180 programs</a> and nearly 300 <a href="http://www.nmu.edu/cse">student groups</a>,&nbsp;&nbsp;<br />but we\'re still small enough that you can\'t cross campus without seeing someone you know.'
hpImageCaption[2] = '<a href="http://www.nmu.edu/research">Research</a>? Yes, NMU has a lot of it, and the best part is that undergraduate students&nbsp;&nbsp;<br />get to participate along with faculty and graduate students.'
hpImageCaption[3] = 'Just about everything on the Northern Michigan University campus is within a 10-minute <a href="http://www.nmu.edu/map">walking distance</a>.'
hpImageCaption[4] = '<a href="http://webb.nmu.edu/ArtAndDesign">Art and design</a> is the fastest growing major and now one of NMU\'s largest academic programs.'
//hpImageCaption[5] = 'Fall wouldn\'t be complete without the sights and sounds of <a href="http://webb.nmu.edu/SportsAthletics/Sports/MensFootball/Home.shtml">Wildcat football</a>.'
hpImageCaption[6] = 'Northern has the first two LEED certified <a href="http://www.nmu.edu/housing">residence halls</a> in the Midwest.  That\'s sustainability worth talking about.'
hpImageCaption[7] = 'NMU’s <a href="http://www.nmu.edu/acac">Academic and Career Advisement Center</a> can help students who are undecided about their majors.'
hpImageCaption[8] = 'Meet <a href="http://www.nmu.edu/president">Dr. Les Wong</a>, NMU\'s 13th president. He\'d also like to get to know you too. E-mail him at <a href="NMUPres@nmu.edu">NMUPres@nmu.edu</a>.'
hpImageCaption[9] = 'NMU students can take a break from studying and enjoy the view from Marquette Mountain,&nbsp;&nbsp;<br />just a short distance from campus.'
hpImageCaption[10] = 'Don\'t let NMU\'s natural setting fool you. There\'s a lot to do in Northern\'s hometown of Marquette.'
hpImageCaption[11] = 'We know every university says it has caring <a href="http://webb.nmu.edu/Bulletin/SiteSections/08-09/4/MeetTheFaculty/MeetTheFaculty.shtml">faculty</a>, but NMU dares you to put ours to the test.'
hpImageCaption[12] = 'Rock out as a volunteer D.J. on <a href="http://wupx.nmu.edu/">WUPX Radio</a>, NMU\'s student-operated radio station.'
//hpImageCaption[13] = 'The <a href="http://webb.nmu.edu/SportsAthletics/Sports/WomensVolleyball/Home.shtml">NMU volleyball</a> team works to continue its winning ways in the 2008 season.'
hpImageCaption[14] = '<a href="http://www.nmu.edu/cls">Radiology and respiratory therapy</a> are two new NMU associate degrees offered&nbsp;&nbsp;<br />in conjunction with Marquette General Health Systems.'
hpImageCaption[15] = 'A classic novel, good friends and Marquette’s black rocks area, some of the oldest stone in North America&nbsp;&nbsp;<br /> &ndash; all things that get better with time.'
hpImageCaption[5] = 'High-tech: all full-time students get use of a <a href="http://www.nmu.edu/tlc">computer</a> as part of tuition. &nbsp;&nbsp;<br />Personal touch: Quality interaction and personal attention.  That\'s NMU.'
hpImageCaption[13] = '<a href="http://www.nmu.edu/sports">Cross country skiers</a> at NMU train for competition and for fun all year round.' 


//these ALTs were used to stop the problem with links and alt text
var hpAltCheck = new Array();
hpAltCheck[0] = 'Pride of the North is the name of NMU\'s marching band, and with good reason.'
hpAltCheck[1] = 'Northern Michigan University has 180 programs and nearly 300 student groups, but we\'re still small enough that you can\'t cross campus without seeing someone you know.'
hpAltCheck[2] = 'Research? Yes, NMU has a lot of it, and the best part is that undergraduate students get to participate along with faculty and graduate students.'
hpAltCheck[3] = 'Just about everything on the Northern Michigan University campus is within a 10-minute walking distance.'
hpAltCheck[4] = 'Art and design is the fastest growing major and now one of NMU\'s largest academic programs.'
hpAltCheck[5] = 'Fall wouldn\'t be complete without the sights and sounds of Wildcat football.'
hpAltCheck[6] = 'Northern has the first two LEED certified residence halls in the Midwest.  That\'s sustainability worth talking about.'
hpAltCheck[7] = 'NMU’s Academic and Career Advisement Center can help students who are undecided about their majors.'
hpAltCheck[8] = 'Meet Dr. Les Wong, NMU\'s 13th president. He\'d also like to get to know you too. E-mail him at NMUPres@nmu.edu.'
hpAltCheck[9] = 'NMU students can take a break from studying and enjoy the view from Marquette Mountain, just a short distance from campus.'
hpAltCheck[10]= 'Don\'t let NMU\'s natural setting fool you. There\'s a lot to do in Northern\'s hometown of Marquette.'
hpAltCheck[11] = 'We know every university says it has caring faculty, but NMU dares you to put ours to the test.'
hpAltCheck[12] = 'Rock out as a volunteer D.J. on WUPX Radio, NMU\'s student-operated radio station.'
hpAltCheck[13] = 'The NMU volleyball team works to continue its winning ways in the 2008 season.'
hpAltCheck[14] = 'Radiology and respiratory therapy are two new NMU associate degrees offered in conjunction with Marquette General Health Systems.'
hpAltCheck[15] = 'A classic novel, good friends and Marquette’s black rocks area, some of the oldest stone in North America -- all things that get better with time.'
hpAltCheck[16] = 'High-tech: all full-time students get use of a computer as part of tuition. Personal-touch: Quality interaction and personal attention.  That\'s NMU.'
hpAltCheck[17] = 'Cross country skiers at NMU train for competition and for fun all year round.'

//end image arrays

//start random image on page load
var j = 0;
var p = hpImage.length;
/*
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image();
   preBuffer[i].src = "images/homepage/"+hpImage[i];
}
*/
var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
   document.write('<img name="hpImage" src="images/homepage/fall_images08/'+hpImage[whichImage]+'" alt="'+hpAltCheck[whichImage]+'">');
}
function showCaption(){
   document.write(hpImageCaption[whichImage]);
}
// end random image on page load


//start slide show
var thePic = whichImage;

function goback() {
    if (document.images && thePic < 1) {
		thePic = p + 1;
	}
	thePic--
	document.hpImage.src='images/homepage/fall_images08/'+hpImage[thePic]
	document.getElementById('caption').innerHTML = hpImageCaption[thePic];
}

function goforward() {
    if (document.images && thePic == p-1) {
		thePic = -1;
	}
	thePic++
	document.hpImage.src='images/homepage/fall_images08/'+hpImage[thePic]
	document.hpImage.alt=hpImageCaption[thePic];
	document.getElementById('caption').innerHTML = hpImageCaption[thePic]+"&nbsp;&nbsp;";
}
//end slide show

