
var c=7;
var t;
var timer_is_on=0;
var MyValue="";
var MyImage="";

function timedCount()
{

	c=c-1;

	if(c < 1)
	{
		c=6;
	}
	
	if(c==6)
	{
	document.getElementById("testimg").src = "images/animatebg"+ c + ".jpg";

	}
	else if	(c==5)
	{
	document.getElementById("testimg").src = "images/animatebg"+ c + ".jpg";

	}
	else if	(c==4)
	{
	document.getElementById("testimg").src = "images/animatebg"+ c + ".jpg";

	}
	else if	(c==3)
	{
	document.getElementById("testimg").src = "images/animatebg"+ c + ".jpg";

	}

t=setTimeout("timedCount()",4000);
}


function doTimer()

{
    
    if (!timer_is_on)
    {
        timer_is_on=1;
        timedCount();
    }
}

window.onload = doTimer;
		
