//this is a personal page, so i won't be assulting anyone else with an annoying flashing background//


What I'm trying to do is this:

page loads and the bgcolor is white for 10 sec
then turns red for 20 sec
then white for 10
then red for 20
and so on for eight total repititions ending in red
then it turns black for 60 sec
then it starts all over at white for 10 sec
I need it to do the total cycle 4 times

the code below doesn't work but should give you masters 'o' java an idea what i'm trying to do

Code:
<html>
<head>
<script>
function colorchange(){
cycle=0;
intrvl=0;
for(nCycles=0;nCycles<4;nCycles++)(
for(nTimes=0;nTimes<8;nTimes++){
intrvl += 10000;
setTimeout("document.bgColor='#FF0000';",intrvl);
intrvl += 20000;
setTimeout("document.bgColor='#FFFFFF';",intrvl);
}
cycle += 60000;
setTimeout("document.bgColor='#000000';",cycle);
)}
</script>
</head>
<body onload="colorchange(0)">
<table>
<tr>
<td>
</td>
</tr>
</table>
</body>
</html>