
var rainbow_colors = new Array('Red','Orange','Yellow','Green','Blue','Indigo','Violet','Indigo','Blue','Green','Yellow','Orange');

function change_rainbow_color() {
  var x = document.getElementsByTagName('span');
  for(i=0;i<x.length;i++) {
      if(x[i].className == 'rainbow_text') {
        if(x[i].id==11) {
            x[i].style.color = 'red';
            x[i].id = "-1";
        }
        x[i].style.color = rainbow_colors[parseInt(x[i].id)+1];
        x[i].id = parseInt(x[i].id)+1;
      }
  }
  setTimeout("change_rainbow_color()",100);
}

change_rainbow_color();

ubb_tag("Rainbow","rflash","rflash","<span id='-1' class='rainbow_text'><% INNER %></span>",0,"Make text blink the colors of the rainbow||Enter the text you want to flash the colors of the rainbow");
