﻿window.onload = galleryStart;

// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this

Picture[1] = 'images/Home1.jpg';
Caption[1] = 'Flippers on the Beach';
Picture[2] = 'images/Home2.jpg';
Caption[2] = 'Family in a meddow';
Picture[3] = 'images/Home3.jpg';
Caption[3] = 'Walking Boots';
Picture[4] = 'images/Home4.jpg';
Caption[4] = 'Bicycles in a field';
Picture[5] = 'images/Home5.jpg';
Caption[5] = 'Steps into a swimming pool';

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 5000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;

// =====================================
// Do not edit anything below this line!
// =====================================
var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
var preLoadZoom = new Array();
for (iss = 1; iss < pss+1; iss++) {
    preLoad[iss] = new Image();
    preLoad[iss].src = Picture[iss];
}

var gallery = null;

function galleryStart() {
    galleryControl('F');
    gallery = window.setTimeout("galleryStart('F')", SlideShowSpeed);
}

function galleryControl(how) {
    if (how=="H") jss = 1;
    if (how=="F") jss = jss + 1;
    if (how=="B") jss = jss - 1;
    if (jss > (pss)) jss=1;
    if (jss < 1) jss = pss;

    if (document.all) {
        document.getElementById('ctl00_ContentPlaceHolder1_ImageTable').style.filter="blendTrans(duration=2)";
        document.getElementById('ctl00_ContentPlaceHolder1_ImageTable').style.filter="blendTrans(duration=CrossFadeDuration)";
        document.getElementById('ctl00_ContentPlaceHolder1_ImageTable').filters.blendTrans.Apply();
    }
    //document.getElementById('PictureBox').src = preLoad[jss].src;
    document.getElementById('ctl00_ContentPlaceHolder1_ImageTable').style.backgroundImage = "url(" + preLoad[jss].src + ")";
    document.getElementById('ctl00_ContentPlaceHolder1_ImageTable').title = Caption[jss];

    if (document.all) document.getElementById('ctl00_ContentPlaceHolder1_ImageTable').filters.blendTrans.Play();
}
