
//**********************************************************************
//***** code for the home page slide show

NewImg = new Array
(
	"images/slideshow/SEATCO-prison-1875.gif",
	"images/slideshow/Thurston-County-Courthouse-1892.gif",
	"images/slideshow/Billings-Family-Late-1800s.gif",
	"images/slideshow/CountyJail-and-Courthouse-Circa-1903.gif",
	"images/slideshow/2nd-Patrolcar-1922-Studebaker.gif",
	"images/slideshow/Sheriff-Havens-with-Sad-Sam-1st-K-9.gif",
	"images/slideshow/Sheriff-Havens-with-seized-liquor.gif",
	"images/slideshow/Still-in-Tree-Circa-1930.gif",
	"images/slideshow/County-Courthouse-1930.gif",
	"images/slideshow/1st-Reserve-Car.gif",
	"images/slideshow/Deputy-Keithan-with-unknown-prisoner.gif",
	"images/slideshow/Main-Cellblock-Jail-1930-1977.gif",
	"images/slideshow/Sheriff-Huntamer-and-Deputies-1940s.gif",
	"images/slideshow/One-of-the-first-TCSO-Divers-Jack-Crawford.gif",
	"images/slideshow/Sheriff-VanAllen-and-Deputies-1960s.gif",
	"images/slideshow/1970s-K-9-unit.gif",
	"images/slideshow/Deputies-with-1970s-patrol-cars.gif",
	"images/slideshow/1976-Dodges-with-lightbars.gif",
	"images/slideshow/1990s-SWAT-DARE-car.gif",
	"images/slideshow/Deputies-with-90s-Patrol-car.gif",
	"images/slideshow/Air-1-in-2001.gif",
	"images/slideshow/Booking-Area-in-the-Corrections-Facility.gif",
	"images/slideshow/TCSOs-Finest-in-the-new-millenium.gif"
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;

//Time delay between Slides in milliseconds
var delay = 4000;

var lock = false;
var run;
function chgImg(direction)
{
	if (document.images)
	{
		ImgNum = ImgNum + direction;
		if (ImgNum > ImgLength)
		{
			ImgNum = 0;
		}
		if (ImgNum < 0)
		{
			ImgNum = ImgLength;
		}
		document.slideshow.src = NewImg[ImgNum];
   	}
}
function auto()
{
	if (lock == true)
	{
		lock = false;
		window.clearInterval(run);
	}
	else if (lock == false)
	{
		lock = true;
		run = setInterval("chgImg(1)", delay);
   }
}