Can anyone explain why this code won't alternate the background color of my website between two different colors?
<script type="text/javascript">
function blinkit() {
intrvl = 0;
for (nTimes = 0; nTimes < 3; nTimes++) {
intrvl += 1000;
setTimeout("document.bgColor='#0000FF';", intrvl);
intrvl += 1000;
setTimeout("document.bgColor='#FFFFFF';", intrvl);
}
}
</script>