﻿
// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 6000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 1;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var imagesHREF = 'images/';
var contentHREF = 'content/';

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!
Picture[0]  = imagesHREF+'Current_Members_sm.JPG';
Picture[1]  = imagesHREF+'Current_Members_sm.JPG';
Picture[2]  = imagesHREF+'miles.jpg';
Picture[3]  = imagesHREF+'s1.jpg';
Picture[4]  = imagesHREF+'johnston.jpg';
Picture[5]  = imagesHREF+'miles.jpg';
Picture[6]  = imagesHREF+'s6.jpg';
Picture[7]  = imagesHREF+'vec.jpg';
Picture[8]  = imagesHREF+'kj5hy.jpg';
Picture[9]  = imagesHREF+'oic.jpg';
Picture[10]  = imagesHREF+'xo.jpg';
Picture[11] = imagesHREF+'or.jpg';
Picture[12] = imagesHREF+'tower.jpg';
Picture[13] = imagesHREF+'climb.jpg';
Picture[14] = imagesHREF+'clubfair.jpg';
Picture[15] = imagesHREF+'rmb.jpg';
Picture[16] = imagesHREF+'bsbadge.jpg';
Picture[17] = imagesHREF+'jota.jpg';
Picture[18] = imagesHREF+'gspatch.jpg';
Picture[19] = imagesHREF+'scr.jpg';
Picture[20] = imagesHREF+'camporee.jpg';
Picture[21] = imagesHREF+'patch.jpg';

// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "Amateur Radio Club";
Caption[2]  = "CIC: Josh Miles, KC2VDO";
Caption[3]  = "ACIC/S3: Michael Weigand, KB3PDB";
Caption[4]  = "S1: Michael Johnston, KG6RPI";
Caption[5]  = "S4: Josh Miles, KC2VDO";
Caption[6]  = "S6: Joshua Mauldin, KD5FUM";
Caption[7]  = "VE: Tom Dean, KB1JIJ";
Caption[8]  = "OIC/VE: Stephen Hamilton, KJ5HY";
Caption[9]  = "OR: Ryan Ebel, KC2TED";
Caption[10]  = "XO/VE: Roy Spells, KC2NDQ";
Caption[11] =  "OR: John Rogers, KC2PCX";
Caption[12] = "Bartlett Hall Tower";
Caption[13] = "Tower Qualification";
Caption[14] = "Club Fair";
Caption[15] = "Radio Merit Badge Training";
Caption[16] = "Boy Scout Radio Merit Badge";
Caption[17] = "Jamboree On The Air";
Caption[18] = "Girl Scout Ham Patch";
Caption[19] = "School Club Roundup";
Caption[20] = "West Point Camporee";
Caption[21] = "W2KGY";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var buttons = new Array();

// load a single named button into the buttons array
function preload_button(name, path)
{
	buttons[name] = new Image();
	buttons[name].src = path;
}

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
	preLoad[iss] = new Image();
	preLoad[iss].src = Picture[iss];}

preload_button('pause', imagesHREF+'icons/pause.png');
preload_button('pausegrayed', imagesHREF+'icons/pausegrayed.png');

function runSlideShow()
{
	if (document.all){
		document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
		document.images.PictureBox.filters.blendTrans.Apply();}
		document.images.PictureBox.src = preLoad[jss].src;
	if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
	if (document.all) document.images.PictureBox.filters.blendTrans.Play();
	jss = jss + 1;
	if (jss > (pss)) jss = 1;
	tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

function on_click_advance(direction)
{
	document['pausebutton'].src = buttons['pause'].src;
	jss = jss + direction;
	if (jss < 1) jss = jss + pss;
	if (jss > pss) jss = jss - pss;
	clearInterval(tss);
	runSlideShow();
}

function on_click_pause()
{
	document['pausebutton'].src = buttons['pausegrayed'].src;
	clearInterval(tss);
}