Run this program, and watch the color change accelerate.<br /><html><br /><head><br /><br /><script type="text/javascript"><br />var c=-1;<br />var tmr;<br />ntimer=1000;<br />var ArrColor=new Array();<br />ArrColor[0]="green";<br />ArrColor[1]="blue";<br />ArrColor[2]="red";<br />ArrColor[3]="#ffffff";<br />function showpos()<br />{<br />if(c==3) c=0;<br />else c++;<br />if(ntimer<=5) ntimer=1000;<br />else ntimer = ntimer-5;<br />document.body.style.backgroundColor=ArrColor[c];<br />clearTimeout(tmr);<br />tmr=setTimeout("showpos()", ntimer);<br />}<br /><br />tmr=setTimeout("showpos()", ntimer);<br /></script><br /></head><br /><br /><body><br /><p>Run this program, and watch it accelerate, slowly and slowly.</p><br /></body><br /></html><br /><br />