function displayText()
{
	var editionList=null;
	var volume=0;
    var volumeNoZeros=0;
	var issue=0;
	var editionList=null;
	var year=0;
	var latestYear=0;
	var editionYear=0;
	var articleList=null;
	var currentEditionYear="";
	var	fileName="";
	var	title="";
	var authorName="";
	var translator="";

	//check ready state
	if(xmlhttp.readyState!=4)
	{
		return;
	}

	if(xmlhttp.status!=200)
	{
	  	alert("Problem retrieving XML data");
	  	return;
	}

//build text string
	archivetxt="<h1>Archive</h1><hr><h2>";
	editionList=xmlhttp.responseXML.documentElement.getElementsByTagName("EDITION");

	//get the latest year
	for (n=0;n<editionList.length;n++) 
	{
		year=editionList[n].getAttribute("year");
		if (year>latestYear) latestYear=year;
	}

	//list the in-page links to the years
	for (m=1999;m<=latestYear;m++)
	{
		archivetxt+="<a href='#" + m + "' class='black'>" + m + "</a>";
		if (m!=latestYear) archivetxt+=" | ";
	}

	archivetxt+="</h2><br>";

	//list the articles
	for (x=0;x<editionList.length;x++) 
	{
		editionYear=editionList[x].getAttribute("year");
		articleList=editionList[x].getElementsByTagName("ARTICLE");

	  	volume=editionList[x].getAttribute("volume");
	  	issue=editionList[x].getAttribute("issue");

		if (editionYear!==currentEditionYear)
		{
			currentEditionYear=editionYear;
			archivetxt+="<h2><a name='" + editionYear + "'>" + editionYear + "</a></h2>";
		}

		if (volume<10)
			{
                volumeNoZeros=volume*1;
                archivetxt+="<p><a href='index.html?" + volume + "," + issue + "' class='black'>Volume " + volumeNoZeros + ", Issue " + issue + "</a></p><ul>";
            }
            else
            {
                archivetxt+="<p><a href='index.html?" + volume + "," + issue + "' class='black'>Volume " + volume + ", Issue " + issue + "</a></p><ul>";
            }
        

		for (z=0;z<articleList.length;z++)
		{
			try
			{
				articleType=articleList[z].getElementsByTagName("TYPE")[0].firstChild.nodeValue;
				fileName=articleList[z].getElementsByTagName("FILENAME")[0].firstChild.nodeValue;
				title=articleList[z].getElementsByTagName("TITLE")[0].firstChild.nodeValue;
			}
			catch (e) {	}

			switch (articleType)
			{
				case "Editor":
			      	archivetxt+="<li><a href='articles/" + fileName + "' class='black' target='_blank'><i>" + title + "</i></a></li>";
					break;
				case "Translation":
					try
					{
						authorName="";
						authorName=articleList[z].getElementsByTagName("AUTHOR")[0].firstChild.nodeValue;
						authorName+=", ";
					}
					catch (e)
					{
						authorName+="";
					}
					translator=articleList[z].getElementsByTagName("TRANSLATOR")[0].firstChild.nodeValue;
		      		archivetxt+="<li><a href='articles/" + fileName + "' class='black' target='_blank'>" + authorName + "<i>" + title + "</i>, translation by " + translator + "</a></li>";
					break;
				default:
					authorName=articleList[z].getElementsByTagName("AUTHOR")[0].firstChild.nodeValue;
			      	archivetxt+="<li><a href='articles/" + fileName + "' class='black' target='_blank'>" + authorName + ", <i>" + title + "</i></a></li>";
			}
		}
		archivetxt+="</ul>";
	}
//write the assembled text string
document.getElementById('display_archive').innerHTML=archivetxt;
}