You are on page 1of 2

<script type="text/javascript"> function tb4_makeArray(n){ this.length = n; return this.

length; } tb4_messages = new tb4_makeArray(1); tb4_messages[0] = "Hacker Newbie Community"; tb4_rptType = 'infinite'; tb4_rptNbr = 50; tb4_speed = 50; tb4_inputDelay = 2000; var tb4_counter = 100; var tb4_chars = "________________________"; var tb4_pogodjenih = 0; var tb4_stsmsg = ""; var tb4_currMsg = 0; var tb4_timer = null; var tb4_mozeDalje=true; function tb4_addChar(ch){ if (tb4_chars.search(ch) == -1){ tb4_chars=tb4_chars+ch; } } for (var i=0; i<tb4_messages.length; i++){ for (var j=0; j<tb4_messages[i].length; j++) tb4_addChar(tb4_messages[i].charAt(j)); } function tb4_shuffle(arr){ var k; for (i=0; i<arr.length; i++){ k = Math.round(Math.random() * (arr.length - i - 1)) + i; temp = arr[i];arr[i]=arr[k];arr[k]=temp; } return arr; } tb4_arr = new tb4_makeArray(tb4_messages[tb4_currMsg].length); tb4_sts = new tb4_makeArray(tb4_messages[tb4_currMsg].length); for (var i=0; i<tb4_messages[tb4_currMsg].length; i++){ tb4_arr[i] = i; } tb4_arr = tb4_shuffle(tb4_arr); for (var i=0; i<tb4_messages[tb4_currMsg].length; i++){ tb4_sts[i] = tb4_messages[tb4_currMsg].charAt(tb4_arr[i]); } function tb4_setChar(k){ r = Math.round(Math.random() * tb4_chars.length); tb4_sts[k] = tb4_chars.charAt(r); tb4_stsmsg = ""; for (var i=0; i<tb4_sts.length; i++) tb4_stsmsg += tb4_sts[i]; document.title = tb4_stsmsg; if (tb4_chars.charAt(r) == tb4_messages[tb4_currMsg].charAt(k)){ tb4_stsmsg = ""; for (var i=0; i<tb4_sts.length; i++) tb4_stsmsg += tb4_sts[i]; document.title = tb4_stsmsg; tb4_pogodjenih++; return;

} setTimeout("tb4_setChar("+k+")", tb4_speed); } function tb4_init(k){ if (tb4_mozeDalje){ for (var k=0; k<tb4_messages[tb4_currMsg].length; k++){ tb4_msgchar = tb4_messages[tb4_currMsg].charAt(k); tb4_setChar(k); } tb4_mozeDalje=false; tb4_delay=200; } if (tb4_pogodjenih == tb4_messages[tb4_currMsg].length){ if (tb4_currMsg == tb4_messages.length-1){ if ((tb4_rptType == 'finite') && (tb4_counter==tb4_rptNbr)){ clearTimeout(tb4_timer); return; } tb4_currMsg=0; tb4_counter++; } else{ tb4_currMsg++; } tb4_arr = new tb4_makeArray(tb4_messages[tb4_currMsg].length); tb4_sts = new tb4_makeArray(tb4_messages[tb4_currMsg].length); for (var i=0; i<tb4_messages[tb4_currMsg].length; i++){ tb4_arr[i] = i; tb4_mozeDalje=true; tb4_pogodjenih=0; tb4_delay=tb4_inputDelay; } tb4_arr = tb4_shuffle(tb4_arr); for (var i=0; i<tb4_messages[tb4_currMsg].length; i++){ tb4_sts[i] = tb4_messages[tb4_currMsg].charAt(tb4_arr[i]); } } tb4_timer = setTimeout("tb4_init(0)", tb4_delay); } function tb4_picktitle(){ tb4_init(0); } tb4_picktitle() </script>