function eBayResults(root)
{
		var items = root.SearchResult[0].ItemArray.Item || [];
    	var html = [];

		html.push("<table width=80%>\n");
		if (items.length)
			document.getElementById("ebayres").style.display = '';
		for (i = 0; i < items.length; ++i ) {
			html.push("<tr>\n");
			if (items[i].GalleryURL) {
				html.push("<td align=center>");
				html.push("<a class='llink' target='_blank' href='" + items[i].ViewItemURLForNaturalSearch + "'>");
				html.push("<img valign=bottom border=0 height='50' width='50' src='" + items[i].GalleryURL + "' " + "</a></td>\n");
			} else {
				html.push("<td align=center>");
				html.push("<a class='llink' target='_blank' href='" + items[i].ViewItemURLForNaturalSearch + "'>");
				html.push("<img valign=bottom border=0 height='50' width='50' src='/nogallery.gif'></a></td>\n");
			}
			html.push("<td class='size12'><b><a class='llink' target='_blank' href='" + items[i].ViewItemURLForNaturalSearch + "'>" + items[i].Title.replace(/[,\-]/ig, ' ') + "</a></b></td>");
			html.push("<td class='size12'>");
			html.push(items[i].ConvertedCurrentPrice.CurrencyID + " ");
			html.push(items[i].ConvertedCurrentPrice.Value.toFixed(2) + "</td>\n");
			html.push("</tr>\n");
		}			
		html.push("<tr><td colspan=3>&nbsp;</td></tr>");
		html.push("<tr><td colspan=3 class=\"right10\"><a href=\"" + root.ItemSearchURL + "\" class=\"llink\" target=\"_blank\">see all " + root.TotalItems + " matching items on eBay</a></td></tr>\n");
		html.push("</table>\n");
  		document.getElementById("ebayResults").innerHTML = html.join("");
}
