function eBayMenu(root)
{
		var items = root.SearchResult[0].ItemArray.Item || [];
    	var html = [];
		var vsize = document.getElementById("main").clientHeight - 700;
		var ebayitems = vsize / 80;

		if (ebayitems <= 0)
			return;
		if (ebayitems > items.length)
			ebayitems = items.length;

		html.push("<table style='background: #660000;' 'width=150' cellspacing='1' cellpadding='2'>\n");
		html.push("<tr><td align='center' class='revcent'><img border=0 src='/ebay.gif'</td></tr>");
		html.push("<tr><td class='revcent'>&nbsp;</td></tr>");
		for (i = 0; i < ebayitems; ++i ) {
			html.push("<tr>\n");
			if (items[i].GalleryURL) {
				html.push("<td align=center>");
				html.push("<a class='revlink' target='_blank' href='" + items[i].ViewItemURLForNaturalSearch + "'>");
				html.push("<img valign=bottom border=0 height='50' width='50' src='" + items[i].GalleryURL + "' " + "</a></td></tr>\n");
			} else {
				html.push("<td align=center>");
				html.push("<a class='revlink' target='_blank' href='" + items[i].ViewItemURLForNaturalSearch + "'>");
				html.push("<img valign=bottom border=0 height='50' width='50' src='/nogallery.gif'></a></td></tr>\n");
			}
			html.push("<tr><td class='size9 revcent'><a class='revlink' target='_blank' href='" + items[i].ViewItemURLForNaturalSearch + "'>" + items[i].Title.replace(/[,\-\.\*]/ig, ' ') + "</a> <nobr>");
			html.push(items[i].ConvertedCurrentPrice.CurrencyID + " ");
			html.push(items[i].ConvertedCurrentPrice.Value.toFixed(2) + "</nobr></td>\n");
			html.push("</tr>\n");
		}			
		html.push("</table>\n");
  		document.getElementById("ebayMenu").innerHTML = html.join("");
}
