// JavaScript Document
var messages = new Array();
messages[0] = "Sometimes, you may think you are alone. But you are truly not alone. GOD is always there. He has been there even though you may not know it";
messages[1] = "Thou shalt increase my greatness, and comfort me on every side - Ps.71:21.";
messages[2] = "Divine visitation is the key to revival. When you are down you need a divine visitation. When you are confused you need a divine visitation";
messages[3] = "And by a prophet the LORD brought Israel out of Egypt, and by a prophet was he preserved - Hosea 12:13.";
messages[4] = "God rewards those who diligently seek him - Heb.11:6";
messages[5] = "Then shall thou delight thyself in the LORD;and I will cause thee to ride upon the high places of the earth...- Is.58: 14";
messages[6] = "… Neither will I offer burnt offerings unto the LORD my God of that which doth cost me nothing….";
messages[7] = "There are different levels of anointing. There are certain doors that can never open to you until you encounter a particular measure or level of anointing.";
messages[8] = "A man with the uncommon anointing never gets stranded. River Jordan parted as soon as it saw Elijah's mantle. There are some obstacles that will never give way until you confront them with a special anointing";

var textLength = 0;
var textContent = 'I am a winner in God';
var textIndex = 0;
var y=0;
var speed = 50
var delay = 3500;

function typewriter(layer){
	textContent = messages[y];
	textLength = textContent.length;
	setTimeout('doWrite()',speed);
}

function doWrite(){
	var twritelayer = document.getElementById('infobar');
	var dText = textContent.substr(0,textIndex);
	twritelayer.innerHTML = dText;
	//alert(dText);
	textIndex++;
	if(textIndex < (textLength+1)){
		setTimeout('doWrite()',speed);
	} else {
		 textIndex = 0;
		if(y < (messages.length-1)){
			y++;
		} else {
			y = 0;
		}
		setTimeout('typewriter()',delay);
	}
}
