﻿// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 7000;
// Duration of crossfade (milliseconds)
var crossFadeDuration = 15;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'http://www.olympic.edu/ocmcms/Images/splash/current/schedule.jpg'
Pic[1] = 'http://www.olympic.edu/ocmcms/Images/splash/current/winterquarterdates.jpg'
Pic[2] = 'http://www.olympic.edu/ocmcms/Images/splash/current/calendar.jpg'
Pic[3] = 'http://www.olympic.edu/ocmcms/Images/splash/current/E2Campus.jpg'
Pic[4] = 'http://www.olympic.edu/ocmcms/Images/splash/current/facevals.jpg'


var Link = new Array();

Link[0] = 'http://apps.olympic.edu/classschedule'
Link[1] = 'http://www.olympic.edu/students/registration'
Link[2] = 'http://www.olympic.edu/OCCalendar'
Link[3] = 'http://www.olympic.edu/Alerts'
Link[4] = 'http://www.olympic.edu/FacEval'

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();

for (i = 0; i < p; i++) 
{
    preLoad[i] = new Image();
    preLoad[i].src = Pic[i];
}
window.onload=runSlideShow;

function runSlideShow() 
{
    if (document.all)
    {
        document.getElementById('SlideShowImage').style.filter="blendTrans(duration=2)";
        document.getElementById('SlideShowImage').style.filter="blendTrans(duration=crossFadeDuration)";
        document.getElementById('SlideShowImage').filters.blendTrans.Apply();
    }
    document.getElementById('SlideShowImage').src = preLoad[j].src;
    document.getElementById('SlideShowLink').href = Link[j];
    if (document.all) 
    {
        document.getElementById('SlideShowImage').filters.blendTrans.Play();
    }
    j = j + 1;
    if (j > (p - 1)) j = 0;
    t = setTimeout('runSlideShow()', slideShowSpeed);
}
