var cnt = 1;
var NUM = 16;

var captions = new Array();
captions[0] = "Please obey all rules and follow staff instructions.<br />Mind your safety and safety of others too. <br /> Enjoy a ride today and AGAIN and AGAIN!";
captions[1] = "Your race starts here";
captions[2] = "Enjoy a picnic along with a ride. <br />Have an enjoyable day with the whole family.";
captions[3] = "Exchange your coupons for tickets here at the ticket booth.";
captions[4] = "Enjoy a ride on a brand new 2007 kart this summer.";
captions[5] = "Four kart models. Pick your favourite."
captions[6] = "Our staff member, Jamie is happy to help you.";
captions[7] = "Our staff member Laura carries a big smiles serving you.";
captions[8] = "Our friendly staff is always ready to welcome you and your family";
captions[9] = "Here are some of our staff members. <br /> The Shanty Bay Go Kart staff is here to serve you with a big smile. ";
captions[10] = "Your golf championship title starts here.";
captions[11] = "Enjoy a game of mini golf on our 18 hole course.";
captions[12] = "Call now to reserve our roomy party hall for birthdays<br /> and large group events.";
captions[13]="Watch for this sign. Look for this complete family stop on your way on the west side of HWY #11 about 10km north of Barrie."
captions[14]="You're getting close!"
captions[15]="You're here! Prepare yourself  for an outstanding day."

function setLoading() {
    document.getElementById('loadingimg').src="/images/searching.gif";
    return true;
}

function unsetLoading(e)
{

    document.getElementById('loadingimg').src="/images/blanksearching.gif";
    return true;
}

function showPic (whichpic) {
    if (document.getElementById) {
    setLoading();
    document.getElementById('placeholder').src = "/images/img" + whichpic + ".jpg";
    document.getElementById('captiontext').innerHTML = captions[whichpic - 1];
        return false;
    } else {
        return true;
    }
}
function prev_onClick(e)
{
    cnt-=1;
    if (cnt < 1) {
        cnt = NUM;
    }
    showPic(cnt);
}
function next_onClick(e)
{
    cnt+=1;
    if (cnt > NUM) {
        cnt = 1;
    }
    showPic(cnt);
}

