//*** Original:  Matt Lewis (matt999_999@yahoo.com)

// This script and many more are available free online at
// The JavaScript Source!! http://javascript.internet.com

var matrix_window;
function MatrixWrite(string, bold, italic, speed) {
var height = window.screen.height;
var width = window.screen.width;
var win_dimensions = "height = " + eval(height + 10) + ", width = " + eval(width + 30);
matrix_window = window.open("blank.htm", "matrix_window", win_dimensions);
matrix_window.document.open("text/html", "replace");
var i;
var timer = 0;
if(matrix_window.moveTo)
matrix_window.moveTo(-10, -30);
if(matrix_window.resizeBy)
matrix_window.resizeBy(0, 50);
matrix_window.document.write("<body bgcolor=000000 text=00ff00 onBlur='self.focus()'>");
matrix_window.document.write("<font face=system>");
if(bold == true) matrix_window.document.write("<b>");
if(italic == true) matrix_window.document.write("<i>");
for(i = 0; i <= string.length; i++) {
timer += (Math.random() * speed);
setTimeout("matrix_window.document.write('" + string.charAt(i) + "');", timer);
}
timer += 2000;
// setTimeout("matrix_window.close()", timer);
setTimeout("closeWindow()", timer);
}
var messages = new Array("Here is a clue, Neo", "Knock, knock, Neo", "Wake up, Neo", "We can show you, Neo", "We know all about you, Neo");
function GetRndIndex() {
return (parseInt(Math.random() * 4));
// return (parseInt(Math.random() * messages.length));
}
function WriteRndMsg(bold, italic, speed) {
MatrixWrite(messages[GetRndIndex()], bold, italic, speed);
}
function closeWindow() {
matrix_window.close();
document.location=(document.title=='poems by richard bryant reinertson')?'#the_play':'../index.html#the_play';
jsMatrixBackground_Init();
}
