var textValuesAndFilenames = ["Sculpture Exhibit.", "exhibit2.jpg", 
"Researchers in Action.", "researchers.jpg", 
"ACW TA team during final exam marking.", "ACW-TAs1.jpg", 
"ACW TA team during final exam marking.", "ACW-TAs2.jpg", 
"Promoting the MATH 150 Distance Course.", "mathOnline.jpg", 
"Math mentorship helps aboriginal children", "aboriginal.jpg",
"NSERC Summer Students of 2004.", "nserc2004.jpg", 
"Feedback from our SFU Open House Visitors.", "pi_board.jpg", 
"NSERC Summer Students of 2004.", "nserc2004_1.jpg", 
"Sculpture Exhibit.", "exhibit.jpg", 
"NSERC Summer Students of 2004.", "nserc2004_2.jpg",  
"Professor Berggren demonstrates how to use a sundial.", "img02.jpg", 
"Solution of the absolute minimizing Lipschitz extension problem with boundary data 4 points.", "oberman01.jpg", 
"Solution with boundary data x^3- 3xy^2.", "oberman02.jpg", 
"Solution with boundary linear saddle.", "oberman03.jpg", 
"Solution of the Infinity Laplacian with boundary data |x| on the unit square.", "oberman04.jpg", 
"2004 Esso &middot; CMS &middot; PIMS Summer Math Camp at SFU.", "mathcamp04.jpg", 
"Putnam competitors from 2009", "putnam09.jpg",
"A Taste of Pi, 2007", "pi07_1.jpg",
"A Taste of Pi, 2007", "pi07_2.jpg",
"High school students are watching 'Math Girl' during the Meet and Greet Math event, 2007", "meetMath07.jpg",
"SFU Open House, June 3, 2006", "openhouse1.jpg",
"SFU Open House, June 3, 2006", "openhouse2.jpg",
"SFU Open House, June 3, 2006", "openhouse3.jpg",
"SFU Open House, June 3, 2006", "openhouse4.jpg",
"SFU Open House, June 3, 2006", "openhouse5.jpg",
"SFU Open House, June 3, 2006", "openhouse6.jpg",
"SFU Open House, June 3, 2006", "openhouse7.jpg",
"SFU Open House, June 3, 2006", "openhouse8.jpg",
"SFU Open House, June 3, 2006", "openhouse9.jpg",
"SFU Open House, June 3, 2006", "openhouse10.jpg",
"Surface streamlines for an asymmetric dipole which executes a circular trajectory.  Research by D. Muraki.", "muraki1.jpg",
"Gravity waves at moderate Rossby number. Research by D. Muraki.", "muraki2.jpg"];

                var randomIndex = 0;
                var startImageTag = '<img src="/img/';
                var endImageTag = '" width="420" height="336"/>';

                function randomize()
                {         
                        randomIndex = Math.floor(Math.random() *                
                        textValuesAndFilenames.length/2);
                }
          
                function randomText()
                {    
                        document.write(textValuesAndFilenames[2*randomIndex]);
                }
  
                function randomImage()
                {
                        document.write(startImageTag + textValuesAndFilenames[2*randomIndex+1] +
                        endImageTag);
                }
