var move = 2;
var spd  = 200;
var m1="          ";
var m2="                   Congratulations to Dr. Chris Mayer's Student,  Kristen DeVanna. ";
var m3="She has been awarded a Lake Erie Protection Fund Grant, and a Sigma Xi Grant as well. ";
var m4="  ";
var msg=m1+m2+m3+m4;
var msg=msg+msg;

function scrollText() {
       	msg=msg.substring(move,msg.length)+msg.substring(0,move);
	document.getElementById("scrbox").value = msg;
	setTimeout("scrollText()",spd);
}

// gSlideshowInterval - determines how often the slide show is
// refreshed (time given in seconds).

gSlideshowInterval = 3;
gNumberOfImages = 12;
gImages = new Array(gNumberOfImages);
gImages[0] = "images/slideshow/0.jpg";
gImages[1] = "images/slideshow/1.jpg";
gImages[2] = "images/slideshow/2.jpg";
gImages[3] = "images/slideshow/3.jpg";
gImages[4] = "images/slideshow/4.jpg";
gImages[5] = "images/slideshow/5.jpg";
gImages[6] = "images/slideshow/6.jpg";
gImages[7] = "images/slideshow/7.jpg";
gImages[8] = "images/slideshow/1.jpg";
gImages[9] = "images/slideshow/9.jpg";
gImages[10] = "images/slideshow/10.jpg";
gImages[11] = "images/slideshow/11.jpg";
gImages[12] = "images/slideshow/12.jpg";

// canManipulateImages - check if the browser we're using can do
// clever stuff with document images.

function canManipulateImages() {
        if (document.images) return true;
        else                 return false;
}

// loadSlide
//
// Load a given image into place by substituting its URL for the URL 
// currently loaded by the <IMG> object called 'slide1' or 'slide2'. 

function loadSlide(imageURL) {
        if (gImageCapableBrowser) {
                document.slide1.src = document.slide2.src;
                document.slide2.src = imageURL;
                return false;
        }
        else {
                        return true;
        }
}

// nextSlide
//
// Update the counter that shows which slide is being displayed, and
// load it into place. The modulo (%) is there to ensure that we roll
// over when we reach the end of the slideshow.

function nextSlide() {
        gCurrentImage = (gCurrentImage + 1) % gNumberOfImages;
        loadSlide(gImages[gCurrentImage]);
}
// gImageCapableBrowser - is this browser hip to images? Set up
// a global variable so that we don't have to keep calling a function
// (useful if the function becomes costly to compute).

gImageCapableBrowser = canManipulateImages();

// gCurrentImage - a variable used to keep track of the image
// currently being displayed to the user.

gCurrentImage = 0;

// Set up the timer. This will call the 'nextSlide()' function repeatedly at 
// the specified interval (and will continue to do so until the page is unloaded).

setInterval("nextSlide()",gSlideshowInterval * 1000);