//Creates an array to hold the different text
function araVob() { }
var txt = new araVob();

// List out all text that will be apart of the rotation
var txt = new Array();
txt[0] = 'Tour any Southerland Community and enter to win The Million Miles Giveaway';
txt[1] = 'A Not-Too-Wild West Cowboy Town';
txt[2] = 'Ranch & Retreat: Bandera';
txt[3] = 'San Antonio Housing Market Bucks National Downward Trend';
txt[4] = 'America\'s Recession Proof Cities';

// Set the count for how many texts there are
var count = txt.length - 1;

//Set the amount of time the text will show (in milliseconds)
var DisplayTime = 6000;

var pos = 0;

function rotateTxt() {
	if (pos == count) { pos = 0; }else{ pos++; }
	
	setTimeout("changeTxt()", DisplayTime);
}

function changeTxt() {
	// Randomize the text rotation
	//var nextTxt = Math.floor((txtCount-0)*Math.random()) + 1;
	
	// Retrieve the element that will contain the txt
	var element = document.getElementById('rotateTxt');
	
	// Inject the txt code into the element
	element.innerHTML = txt[pos];
	
	rotateTxt();
}