var i=0;
a1 = new Array();
a2 = new Array();
a3 = new Array();
function stop()
{
for (i=0;i<=151;i++)
  {clearTimeout(a2[i]);
   clearTimeout(a3[i]);
   clearTimeout(a1[i]);}
}
document.write("<div id='bar'> <input type='radio' name='rb' id='img1' onclick = 'animation(1); stop();' /> <input type='radio' name='rb' id='img2' onclick = 'animation(2); stop();' /> <input type='radio' name='rb' id='img3' onclick = 'animation(3); stop();' /> </div>");
document.getElementById("bar").style.position = "absolute";
document.getElementById("bar").style.left = "50%";
document.getElementById("bar").style.marginLeft = "400px";
document.getElementById("bar").style.top = "376px";
document.getElementById("bar").style.padding = "2px 4px";
document.getElementById("bar").style.border = "1px solid #adadad";
document.getElementById("img1").checked = "checked";
for (i=0;i<=150;i++)
{
a2[i] = window.setTimeout("animation(2)",i*12000+4000);
a3[i] = window.setTimeout("animation(3)",i*12000+8000);
a1[i] = window.setTimeout("animation(1)",i*12000+12000);
}

