请教如何能叫它按时间轮换
鼠标移动到链接上停止轮换,鼠标离开时又按时间轮换
<SCRIPT language=javascript>
function woaicssq(num){
for(var id = 1;id<=4;id++)
{
var ad="advertisement"+id;
if(id==num)
document.getElementById(ad).style.display="block";
else
document.getElementById(ad).style.display="none";
}
}
</SCRIPT>
<div style="MARGIN: 0px; OVERFLOW: hidden; WIDTH: 360px; POSITION: relative; HEIGHT: 195px;">
<DIV id=advertisement1 style="DISPLAY: block">
<a href="http://www.1.com/"><img height=195 src="images/1.jpg" width=360 border=0 /></a></DIV>
<DIV id=advertisement2 style="DISPLAY: none">
<a href="http://www.2.com/"><img height=195 src="images/2.jpg" width=360 border=0 /></a></DIV>
<DIV id=advertisement3 style="DISPLAY: none">
<a href="http://www.3.com/"><img height=195 src="images/3.jpg" width=360 border=0 /></a></DIV>
<DIV id=advertisement4 style="DISPLAY: none">
<a href="http://www.4.com/"><img height=195 src="images/4.jpg" width=360 border=0 /></a></DIV>
</div>
<DIV style="Z-INDEX: 9999999; LEFT: 214px; WIDTH: 150px; POSITION: absolute; TOP: 182px; HEIGHT: 16px">
<A onmouseover=javascript:woaicssq(1) href="javascript:void(0)">1</A>
<A onmouseover=javascript:woaicssq(2) href="javascript:void(0)">2</A>
<A onmouseover=javascript:woaicssq(3) href="javascript:void(0)">3</A>
<A onmouseover=javascript:woaicssq(4) href="javascript:void(0)">4</A></DIV>