foaly, I just finished trying your code, it did seem to be working at first, but then it gave me an error in the script debugger
quote:
Error: Out of stack space (code: -2146828260)
File: test.js. Line: 68.
which is this line
code:
return GetIndex(Text,intRepeatAfter);
Also, it returned one undefined result, but I think that just has to do with the random number rounding up to a nonexistant number, as its using math.round in the code Volv provided, so thats no biggy to fix. But I think I am going to take your advice and just stick to Cookies code, so thanks a lot for the suggestion anyways