var Pic = new Array() 

Pic[0] ="graphics/slidepics/pic01.jpg" 
Pic[1] ="graphics/slidepics/pic02.jpg" 
Pic[2] ="graphics/slidepics/pic03.jpg"
Pic[3] ="graphics/slidepics/pic04.jpg"
Pic[4] ="graphics/slidepics/pic05.jpg"
Pic[5] ="graphics/slidepics/pic06.jpg"
Pic[6] ="graphics/slidepics/pic07.jpg"
Pic[7] ="graphics/slidepics/pic08.jpg"
Pic[8] ="graphics/slidepics/pic09.jpg"
Pic[9] ="graphics/slidepics/pic10.jpg"

// =============================
// Set the following variables
// =============================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossFade (seconds)
var crossFadeDuration = 3

var autoRun = true;
var t;
var j = 0;
var d = 1;			// Direction	
var p = Pic.length;

var preLoad = new Array();

for (i = 0; i < p; i++) {
   	preLoad[i] = new Image();
   	preLoad[i].src = Pic[i];
}

function runSlideShow() {
   	if (document.all){
      	document.images.SlideShow.style.filter="blendTrans(duration=2)";
     	document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
    	document.images.SlideShow.filters.blendTrans.Apply();      
   	}
   	document.images.SlideShow.src = preLoad[Math.abs(j)].src;
   
   	// element = document.getElementById('caption');
   	// element.innerHTML = Cap[Math.abs(j)];
   
   	// element = document.getElementById('copyright');
   	// element.innerHTML = Cop[Math.abs(j)];
   
   	if (document.all) {
    	document.images.SlideShow.filters.blendTrans.Play();
   	}
   	j = j + d;   
   	if (j > (p - 1)) 
   	{
	j = 0;
	}
   	if (autoRun)
   	{
		t = setTimeout('runSlideShow()', slideShowSpeed);
   	}
}

function setAutoRun()
{
	autoRun = true;
	runSlideShow();
}

function stopAutoRun()
{
	autoRun = false;	
}

function NavPicture(s)
{
	if (s < 0 )
	{
		d = -1;
	}	
	else
	{
		d = 1;
	}
	
	if (!autoRun)
	{	
		runSlideShow();
	}
}

function ShowSpeed(s)
{
	if (slideShowSpeed > 1000)
	{
		slideShowSpeed = slideShowSpeed + (1000 * s);
	}
	else
	{
		slideShowSpeed = 1000;
	}
	// alert(slideShowSpeed)
	// runSlideShow()
}

