I am designing a fishtank. The entire background of the page is the water. I want to set a function that changes the water from blue to brown after 5000 milliseconds and then pauses. The user would then click a button to "clean the tank" which would reset the background changing function. The only solutions I can find are loops that continue to change the background from blue to green. \[code\]var intPgColorIndex = 0;var arrPgColor = new Array("#999966", "#00ffff" );function SetPgColor(){var PgColor;intPgColorIndex++;if (intPgColorIndex >= arrPgColor.length){intPgColorIndex = 0;}PgColor = arrPgColor[intPgColorIndex];if (PgColor = "#999966" ) { document.body.style.backgroundColor = PgColor; setTimeout("SetPgColor()", 5000); } };\[/code\]