var rotation = 1; function propControl() { if (rotation == 3) { rotation = 1; } else { rotation++; } document.dude_lyr.document.propeller_lyr.document.propeller_img.src = eval("propeller" + rotation + ".src"); setTimeout("propControl()", 30); }