// JScript source code

var secs1
var timerID1 = null
var timerRunning1 = false
var delay1 = 1000
var imageStatus1 = 1

function InitializeTimer1()
{
    // Set the length of the timer, in seconds
    secs1 = 1
    StopTheClock1()
    StartTheTimer1()
}

function StopTheClock1()
{
    if(timerRunning1)
        clearTimeout(timerID1)
    timerRunning1 = false
}

function StartTheTimer1()
{
    if (secs1==0)
    {
        StopTheClock1()
        InitializeTimer2()
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:
        // alert("testing..testing..1..2..3..")
        if (imageStatus1 == 1) {
			
			swapImage('misc','miscTwo')
			imageStatus1 = 2
			
		}
		
		else if (imageStatus1 == 2) {
		
			swapImage('misc','miscOne')
			imageStatus1 = 1
			
		}
		
		InitializeTimer2();
		
    }
    else
    {
        //self.status = secs1
        secs1 = secs1 - 1
        timerRunning1 = true
        timerID1 = self.setTimeout("StartTheTimer1()", delay1)
    }
}


