// the list of billboard strings to display
var aQuotes = new Array(
	"\"A man can do anything he wants to do in this world, at least if he wants to do it badly enough.\" -- E.W. Scripps",
   "\"I am an advocate of everything that tends to arouse the thinking of our people\" -- E.W. Scripps",
   "\"I am convinced that I have been able to accomplish much more than I would otherwise have been able to accomplish by reason of my own personal obscurity....I cannot be suspected of seeking glory or anything else excepting the approval and patronage of my readers.\" -- E.W. Scripps",
   "\"It is my belief that the greatest assistance is rendered society by that business organization of publicity which is called the daily paper.\" -- E.W. Scripps",
   "[Scripps papers] \"should always be devoted to the service of the 95%, namely the working man and the poor and unfortunate.\" -- E.W. Scripps",
   "\"The fact of the matter is that I am a plebian clean through and through. I like to associate with honest rascals!\" -- E.W. Scripps",
   "\"The most humiliating of all my experiences has been that of finding myself regarded as only a rich man, rather than a man of worth.\" -- E.W. Scripps",
   "\"Whenever any man has come to me to tell me that my editorial course was objectionable to him as a business man, I have told that man to go to the devil and be damn quick about getting there!\" -- E.W. Scripps"
	);
// the string number to start with (0 is first)

var iCurItem = 0;
// the numbers of items to display. if this is "null" then the browser
// is really old and we should do nothing
var iNumItems = aQuotes.length;
// the length (in milliseconds) for which each item will be displayed
var iDelayMilliseconds = 8000;

/* lets see if this is even needed
// test to see if the browser is IE4 or above
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
var browserIE4 = ((browserName == "Microsoft Internet Explorer") && (browserVer >= 4));
// if the browser isn't IE4+ then we'll need to remove any HTML from our
// billboard strings. We can use the function stripHTML to do this
if ((!(browserIE4)) && (iNumItems != null)) {
	for (var i = 0; i < iNumItems; i++) {
		aQuotes[i] = stripHTML(aQuotes[i]);
	}
}

function stripHTML(sHTML) {
	var sOutText = "";
	var iTagStart;
	var iTagEnd = 0;
	
	// look for the start of the first tag
	iTagStart = sHTML.indexOf("<");
	// repeat until we find no more HTML opening brackets
	while (iTagStart != -1) {
		// add the text since the last tag (or the beginning) until
		// the start of this tag
		sOutText += sHTML.substring(iTagEnd, iTagStart);
		// find the end of this tag
		iTagEnd = sHTML.indexOf(">", iTagStart) + 1;
		// find the start of the next tag
		iTagStart = sHTML.indexOf("<", iTagEnd);
	}
	if (iTagEnd != 0) {
		// finish up by adding the rest of the string
		sOutText += sHTML.substring(iTagEnd, sHTML.length);
	} else {
		// no HTML was found, so just return the string we got
		sOutText = sHTML;
	}
	// return the result string
	return sOutText;
}
*/

function showNextItem() {
	var sIEHTML;
	
	// show the text
	if (iNumItems != null) {
/*
		if (browserIE4) {
			// IE4+ specific code that removes the TEXTAREA control
			// and displays read-only text in a table
			//sIEHTML = '<TABLE WIDTH="300" BORDER="1"><TR><TD>';
			//sIEHTML += '<FONT FACE="Arial" SIZE="-1">';
			//sIEHTML += aQuotes[iCurItem];
			//sIEHTML += '</FONT></TD></TR></TABLE>';
			sIEHTML = aQuotes[iCurItem];
			quotes.innerHTML = sIEHTML;
		   // set the next item, roll-over to the start of the list, if needed
		   iCurItem = (iCurItem + 1) % iNumItems;
		   // run this function again after a delay
		   setTimeout("showNextItem()", iDelayMilliseconds);
		} else {
			sIEHTML = aQuotes[iCurItem];
			document.getElementById('quotes').firstChild.nodeValue=sIEHTML;
			//quotes.innerHTML = sIEHTML;
		   // set the next item, roll-over to the start of the list, if needed
		   iCurItem = (iCurItem + 1) % iNumItems;
		   // run this function again after a delay
		   setTimeout("showNextItem()", iDelayMilliseconds);
		   // Only scroll if it will work with replacing text in DIV tag
			//code for Netscape and other browsers
			//document.BillboardForm.BillboardTextArea.value = aQuotes[iCurItem];
		}
*/
   document.getElementById('quotes').firstChild.nodeValue=aQuotes[iCurItem];
   iCurItem = (iCurItem + 1) % iNumItems;
   setTimeout("showNextItem()", iDelayMilliseconds);
	}
}

