var message=new Array(
"This is a test.",
"For the next sixty seconds,",
"this Web site will conduct a test of the Emergency Network System.",
"This is only a test..............................................",
".................................................................",
".................................................................",
"The Network administrators of your area in voluntary cooperation",
"with the World Wide Web and other authorities",
"have developed this system to keep you informed",
"in the event of an emergency.",
"If this had been an actual emergency,",
"you would have been instructed where to go in your area",
"for news and official information.",
"This Web site serves the area in which this Web page resides.",
"This concludes this test of the Emergency Network System...",
".................................................................",
"................................................................."
);

var msgLength = message[0].length;
var msgPosition = 0;
var speed = 60;
var contents, row;
var index = 0; 

function typeText()
{
	contents = "";

	row = Math.max(0, index-1);

	while(row < index) { 
    	contents += message[row] + '\r\n';
		row++; 
	}
	
	document.msgForm.dynamicText.value = contents + message[index].substring(0,msgPosition) + "_";
	
  	if(msgPosition == msgLength) {
    	msgPosition = 0;
    	index++;
		
    	if(index != message.length) {
			msgLength = message[index].length;
			setTimeout("typeText()", 1000);
    	}
		else {
			msgLength = message[0].length;
			msgPosition = 0;
			index = 0; 
			setTimeout("typeText()", 5000);
		}
  	} 
	else {
		msgPosition++;
		setTimeout("typeText()", speed);
	}
}
