<script type="text/javascript">
var count=0;
function ClickImageSwap(id)
{
if(id==5)
id=count;
if(count==2)
count=0;
var tempImage=document.getElementById("TempImage");
if(id==0)
{
tempImage.src="images/topt1.jpg";
}
else if(id==1)
{
tempImage.src="images/topt2.jpg";
}
else if(id==2)
{
tempImage.src="images/topt3.jpg";
}
count++;
setTimeout("ClickImageSwap(5)",3000);
}
</script>
<script type="text/javascript">
var count=0;
var b = true;
function ImageSwap()
{
if(b)
{
if(count > 2)
{
count = 0;
}
else
{
count++;
}
ClickImageSwap(count);
setTimeout("ImageSwap()",5000);
}
}
function ClickImageSwap(id)
{
var tempImage=document.getElementById("TempImage");
if(id==0)
{
tempImage.src="images/topt1.jpg";
}
else if(id==1)
{
tempImage.src="images/topt2.jpg";
}
else if(id==2)
{
tempImage.src="images/topt3.jpg";
}
}
function Out(id)
{
b = true;
count = id;
ImageSwap();
}
function In(id)
{
b = false;
ClickImageSwap(id);
}
ImageSwap();
</script>