function getEPDate(story)  { 
	if ( story.feedtime != "" ) { 
		return story.feedTime; 
	} else { 
		var a = story.storyid.match(/.*?(\d\d)(\d\d).+/); 
		return a[1] + '/' + a[2] + '/' + (new Date()).getFullYear(); 
	} 
}
var getter = new ES.TopicRetriever( topicURL, myOnLoadComplete, 10);

function myOnLoadComplete() {

	var s = '';

	if ( !topics || topics == 0 || topics.length == 0 ) {
		s = "<span class='error-message'>No topics found</span>";
	}
	else if ( !topics[0].searchid || topics[0].searchid.length == 0 ) {
		s += "<span class='error-message'>No topics found</span>";
	}
	else if ( !stories || stories == 0 || stories.length == 0) {
		s += "<span class='error-message'>No stories found</span>";
	}
	else {
		showBrief	= true;  //default --show briefs
//maxstories is how many stories you want displayed from those retrieved
		maxStories	= 15;
		maxStories	= maxStories == 0 ? 132 : maxStories;
		storiesUpperBound = maxStories < stories.length ? maxStories : stories.length;

		s += "<DIV>";
		for (var counter=0; counter < storiesUpperBound ; counter++)
		{
			
			
			s += "<DIV>";
	s += "<A class='newsheadline' HREF='http://dialog.newsedge.com/portal.asp?site=2007010417184806957514&portlet=ep&searchfolderid=pg20070105135130153467102&block=portaldefault&action=sitetopics&related=off&searchid=552&storyid=" + stories[counter].storyid + "&rtcrdata=" + stories[counter].rtcrdata + "'>";

	s += stories[counter].headline + "<br></A>";
			s += "<span class='newsdate-time'>";
			s += stories[counter].feedtime + "  </span>";
			if( showBrief == true ) s += "<br><span class='newsbrief'>" + stories[counter].brief + "</span>";
			s += "<br><span class='newssource'>[" + stories[counter].provider + "]<br><br></span>";
			s += "</DIV>";

					}
		s += "</DIV>";
	}

	var obj = document.getElementById("placeholder");

	obj.innerHTML = s;
}
