var slideimages = new Array()
var slideblurbs = new Array()
var slidelinks = new Array()
function slideshowimages(){
    for (i=0;i<slideshowimages.arguments.length;i++) {
        slideimages[i]=new Image()
        slideimages[i].src=slideshowimages.arguments[i]
    }
}

function slideshowblurbs(){
    for (i=0;i<slideshowblurbs.arguments.length;i++)
        slideblurbs[i]=slideshowblurbs.arguments[i]
}
function slideshowlinks(){
    for (i=0;i<slideshowlinks.arguments.length;i++)
        slidelinks[i]=slideshowlinks.arguments[i]
}

function gotoshow(){
    location.href=slidelinks[whichlink]
}

//configure the paths of the images, plus corresponding target links
slideshowimages(
    "/images/splash/rugby.jpg",
    "/images/splash/anastacia-solo.jpg",
    "/images/splash/football.jpg",
    "/images/splash/charlie-rose.jpg",
    "/images/splash/dolcenera.jpg",
    "/images/splash/snowboarding.jpg",
    "/images/splash/u2.jpg",
    "/images/splash/superbug.jpg",
    "/images/splash/black-eyed-peas.jpg",
    "/images/splash/rave-blue-lights.jpg",
    "/images/splash/cycling.jpg",
    "/images/splash/michael-essien.jpg",
    "/images/splash/foo-fighters.jpg",
    "/images/splash/microbes.jpg",
    "/images/splash/bride-maid.jpg",
    "/images/splash/handball.jpg",
    "/images/splash/bloc-party.jpg",
    "/images/splash/sonic-vs-mario.jpg",
    "/images/splash/bride.jpg",
    "/images/splash/kate-voegele.jpg"
)
slideshowlinks(
    "http://www.ivi.tv/player/ivi-rugby",
    "http://www.ivi.tv/player/ivi-anastacia-solo",
    "http://www.ivi.tv/player/ivi-football",
    "http://www.ivi.tv/player/ivi-charlie-rose",
    "http://www.ivi.tv/player/ivi-dolcenera",
    "http://www.ivi.tv/player/ivi-snowboarding",
    "http://www.ivi.tv/player/ivi-u2",
    "http://www.ivi.tv/player/ivi-superbug",
    "http://www.ivi.tv/player/ivi-black-eyed-peas",
    "http://www.ivi.tv/player/ivi-rave-blue-lights",
    "http://www.ivi.tv/player/ivi-cycling",
    "http://www.ivi.tv/player/ivi-michael-essien",
    "http://www.ivi.tv/player/ivi-foo-fighters",
    "http://www.ivi.tv/player/ivi-microbes",
    "http://www.ivi.tv/player/ivi-bride-maid",
    "http://www.ivi.tv/player/ivi-handball",
    "http://www.ivi.tv/player/ivi-bloc-party",
    "http://www.ivi.tv/player/ivi-sonic-vs-mario",
    "http://www.ivi.tv/player/ivi-bride",
    "http://www.ivi.tv/player/ivi-kate-voegele"
)
slideshowblurbs(
    "Watch Rugby Highlights on Orange Sport Info",
    "Watch Anastacia on RTL 102.5",
    "Watch Football Goals on Orange Sport Info",
    "Watch Charlie Rose on Bloomberg",
    "Watch Dolcenera on RTL 102.5",
    "Watch Snowboarding on Massive Mag",
    "Watch U2 on RTL 102.5",
    "Watch Medical Breakthroughs on Research TV",
    "Watch The Black Eyed Peas on Play TV",
    "Watch Dance Clubs on Telenight",
    "Watch Cycling Finishes on Orange Sport Info",
    "Watch Michael Essien on Africast Sport",
    "Watch Foo Fighters on Zeilsteen",
    "Watch Seas of Microbes on UWTV",
    "Watch Unique Wedding Ideas on The Knot",
    "Watch Handball Highlights on Orange Sport Info",
    "Watch Bloc Party and Other Independent Music on ScreenPlay",
    "Watch The Latest Game Releases on Game TV",
    "Watch Brides and Bridesmaids on The Knot",
    "Watch Kate Voegele and Other Independent Music on ScreenPlay"
)

//configure the speed of the slideshow, in miliseconds
var slideshowspeed=5000

var start=Math.floor(Math.random()*slideimages.length)
var whichlink=start
var whichimage=start
function slideit(){

    if (!document.images)
        return
    document.getElementById("navigation").style.background="url('" + slideimages[whichimage].src + "') no-repeat";
    document.getElementById("blurb").innerHTML=slideblurbs[whichimage];

    whichlink=whichimage
    if (whichimage<slideimages.length-1)
        whichimage++
    else
        whichimage=0

    setTimeout("slideit()",slideshowspeed)
}
slideit()
