}
private TextBuilder itemListHtml(L2TradeList tradeList, int page)
{
TextBuilder replyMSG = new TextBuilder();
replyMSG.append("<html><title>Merchant Shop List Page: "+page+"</title>");
replyMSG.append("<body>");
replyMSG.append("<br>Edit, add or delete entries in a merchantList.");
replyMSG.append("<table>");
replyMSG.append("<tr><td width=150>Item Name</td><td width=60>Price</td><td width=40>Delete</td></tr>");
int start = ((page-1) * PAGE_LIMIT);
int end = Math.min(((page-1) * PAGE_LIMIT) + (PAGE_LIMIT-1), tradeList.getItems().size() - 1);
for (L2ItemInstance item : tradeList.getItems(start, end+1))
{
replyMSG.append("<tr><td><a action=\"bypass -h admin_editShopItem "+tradeList.getListId()+" "+item.getItemId()+"\">"+item.getItem().getName()+"</a></td>");
replyMSG.append("<td>"+item.getPriceToSell()+"</td>");
replyMSG.append("<td><button value=\"Del\" action=\"bypass -h admin_delShopItem "+tradeList.getListId()+" "+item.getItemId()+"\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
replyMSG.append("</tr>");
}//*/
replyMSG.append("<tr>");
int min = 1;
int max = tradeList.getItems().size() / PAGE_LIMIT + 1;
if (page > 1)
{
replyMSG.append("<td><button value=\"Page"+(page - 1)+"\" action=\"bypass -h admin_showShopList "+tradeList.getListId()+" "+(page - 1)+"\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
}
if (page < max)
{
if (page <= min)
replyMSG.append("<td></td>");
replyMSG.append("<td><button value=\"Page"+(page + 1)+"\" action=\"bypass -h admin_showShopList "+tradeList.getListId()+" "+(page + 1)+"\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
}
replyMSG.append("</tr><tr><td>.</td></tr>");
replyMSG.append("</table>");
replyMSG.append("<center>");
replyMSG.append("<button value=\"Add\" action=\"bypass -h admin_addShopItem "+tradeList.getListId()+"\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
replyMSG.append("<button value=\"Close\" action=\"bypass -h admin_close_window\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
replyMSG.append("</center></body></html>");
return replyMSG;
}