﻿// Image Slideshow

var strSponsorImages = new Array();
var strSponsorImageAlt = new Array();
var strSponsorImageURL = new Array();

// Enter the names of the images below

strSponsorImages[0] = "/html/sponsor/small/dsr.jpg";
strSponsorImageAlt[0] = "Department of Sport & Recreation";
strSponsorImageURL[0] = "http://www.dsr.wa.gov.au";

strSponsorImages[1] = "/html/sponsor/small/West Australian.jpg";
strSponsorImageAlt[1] = "The West Australian";
strSponsorImageURL[1] = "http://www.thewest.com.au";

strSponsorImages[2] = "/html/sponsor/small/JASON MAZDA.jpg";
strSponsorImageAlt[2] = "Jason Mazda";
strSponsorImageURL[2] = "http://www.jasonmazda.com.au/";

strSponsorImages[3] = "/html/sponsor/small/shell.jpg";
strSponsorImageAlt[3] = "Shell Company of Australia";
strSponsorImageURL[3] = "http://www.shell.com/";

strSponsorImages[4] = "/html/sponsor/small/Hancock.jpg";
strSponsorImageAlt[4] = "Hancock Family Medical Foundation";
strSponsorImageURL[4] = "http://www.hancockprospecting.com.au/";

strSponsorImages[5] = "/html/sponsor/small/telstra.jpg";
strSponsorImageAlt[5] = "Telstra";
strSponsorImageURL[5] = "http://telstra.com/";

strSponsorImages[6] = "/html/sponsor/small/watercorporation.jpg";
strSponsorImageAlt[6] = "Water Corporation";
strSponsorImageURL[6] = "http://www.watercorporation.com.au/";

strSponsorImages[7] = "/html/sponsor/small/vorgee.jpg";
strSponsorImageAlt[7] = "Vorgee for water";
strSponsorImageURL[7] = "http://www.vorgee.com/";

strSponsorImages[8] = "/html/sponsor/small/96fm.jpg";
strSponsorImageAlt[8] = "96fm";
strSponsorImageURL[8] = "http://www.96fm.com.au/";



var lngCurrentSponsorImage = -1;
var lngTotalNumberSponsorImages = strSponsorImages.length;

function MoveToNextSponsorImage()
{
    lngCurrentSponsorImage++;
    if (lngCurrentSponsorImage == lngTotalNumberSponsorImages)
    {
        lngCurrentSponsorImage = 0;
    }
    
    imgSponsorLogo.src = strSponsorImages[lngCurrentSponsorImage];
    imgSponsorLogo.alt = strSponsorImageAlt[lngCurrentSponsorImage];
    SponsorURL.href = "/referral.asp?" + strSponsorImageURL[lngCurrentSponsorImage];

    // set the time below for length of image display in 1000 per second
    // i.e., "5*1000" is 5 seconds
    setTimeout("MoveToNextSponsorImage()", 6*1000);
}
//window.onload=MoveToNextSponsorImage;




