// JavaScript Document
function newsHolder(t,l,lt){
	this.text = t;
	this.link = l;
	this.linktext = lt;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	str += this.text;
	str += '<p class=\"news"><a href=\"' + this.link + '\">' + this.linktext + '<\/a><\/p>';
	return str;
}

var newsArray = new Array();
newsArray[0] = new newsHolder("<p class=\"news\"><b>01-18-2010<\/b><br\/>Profile by the University of Chicago Magazine.<\/p>","http://magazine.uchicago.edu/1002/arts_sciences/story01_english.shtml",'Read the full profile...').write(); 
newsArray[1] = new newsHolder("<p class=\"news\"><b>12-01-2009<\/b><br\/>Jinnie English, CEO of Chicago\'s High Achievers, appears on the Gerrard McClendon show to talk about the Tiger Woods incident.<\/p>",'news_12012009.html','Watch the show...').write();
newsArray[2] = new newsHolder("<p class=\"news\"><b>11-09-2009<\/b><br\/>Kicking 4 Kids President, Gregory English, Will represent the U.S. on the 1st Youth Olympic games Taekwondo 																																		team.<\/p>",'news_11092009.html','Watch the interview...').write();
newsArray[3] = new newsHolder("<p class=\"news\"><b>10-12-2009<\/b><br\/>Chicago&rsquo;s & International High Achievers announces launch of a new platform.<\/p>",'news_10122009.html','Read more...').write();
newsArray[4] = new newsHolder("<p class=\"news\"><b>09-24-2009<\/b><br\/>Jinnie English, CEO of Chicago\'s High Achievers, appears on the Gerrard McClendon show.<\/p>",'news_09242009.html','Watch the show...').write();

var nIndex = 0;
var timerID = null;

function rotateNews(){
	var len = newsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('stories').innerHTML = newsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateNews()',3000);
}

function pauseNews(){
	if(timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function resumeNews(){
	if(timerID == null) {
		timerID = setTimeout('rotateNews()', 1000);
	}
}