<script>
i=1;
function myplay()
{
if(i>3)i=1;
document.all("flash"+i).style.zIndex=document.all("flash"+i).style.zIndex+3;
i++;
setTimeout(myplay,1000);
}
</script>
<body onload=myplay()>
<div id=flash1 style="position:absolute;top:0;left:0;width:400;height:200;background:red;z-index:1">flash1</div>
<div id=flash2 style="position:absolute;top:0;left:0;width:400;height:200;background:yellow;z-index:2">flash2</div>
<div id=flash3 style="position:absolute;top:0;left:0;width:400;height:200;background:blue;z-index:3">flash3</div>