var secs
var timerID = null
var timerRunning = false
var delay = 2000

function runSlideShow()
{
    // Set the length of the timer, in seconds
    secs = 8
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==7)
    {
    	runSlideShow1()
    }
    if (secs==5)
    {
    	//runSlideShow2()    
    }
    if (secs==3)
    {
        	//runSlideShow3()
    }
    if (secs==1)
    {
        	//runSlideShow4()
    }
    else
    {
        //self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}



///first ss

var SlideShowSpeed1 = 3.000;		// Number of seconds between the start of each cross-fade.
var CrossFadeDuration1 = 0.0;	// Number of seconds the cross-fade lasts.
var Picture1 = new Array(); 


//Picture1[1]  = 'slideshow/pic12.jpg';
Picture1[1]  = 'slideshow/1.jpg';
Picture1[2]  = 'slideshow/2.jpg';
Picture1[3]  = 'slideshow/3.jpg';




var tss1;
var iss1;
var jss1 = 1;
var pss1 = Picture1.length-1;

var preLoad1 = new Array();
for (iss1 = 1; iss1 < pss1+1; iss1++)
{
	preLoad1[iss1] = new Image();
	preLoad1[iss1].src = Picture1[iss1];
}

function runSlideShow1()
{	
	//alert('SS 1');
//	if (document.all)
//	{
//		document.images.PictureBox1.style.filter="blendTrans(duration=" + CrossFadeDuration1 + ")";
//		document.images.PictureBox1.filters.blendTrans.Apply();
//	}
	document.images.PictureBox1.src = preLoad1[jss1].src;
//	if (document.all)
//	{
//		document.images.PictureBox1.filters.blendTrans.Play();
//	}
	jss1 = jss1 + 1;

	if (jss1 > pss1)
	{
		jss1 = 1;
	}

	tss1 = setTimeout('runSlideShow1()', SlideShowSpeed1 * 1000.0);
}

