if (userip==betatestip) { putrendererver(); dw(" - putidxtable2.js 20080506-1<br>"); }
if (iframes==0)
 document.write("<br><center><font size=+2>Sorry, you need an iframes-enabled browser to view this page properly.</font></center><br><br>");
else if (mwshowdata==0)
{
 dw("<br><h2><center><b>Sorry, the Market Watch service is down. No data to show atm.</b></center></h2><br>");
}
else
{    
 CookieString_Parse(); 
 
 var pset=QueryString(bareaofname);
 if (pset)
 {
  var pql=parseInt(pset.split(",")[0]);
  if (!isNaN(pql) && (pql>=0) && (pql<=500)) fromql=pql;
  pql=parseInt(pset.split(",")[1]);
  if (!isNaN(pql) && (pql>=0) && (pql<=500)) toql=pql;
 }

 dw('<form name=idxfilters method=get onSubmit="window.location.replace(IdxFilterUpdate()); return false;">QL Range: From <input type="text" name="ffromql" size="3" value="'+fromql+'"> to <input type="text" name="ftoql" size="3" value="'+toql+'">');
 dw('&nbsp;&nbsp;<input type="submit" value="Update"><br>');
 dw('</form>');

 var tshead; 
 if (idxtsnum)
 {
  tshead="<b>How long ago?</b>";
  dw("<br><center>Page last updated " + mindifTS2verb(nowts+difTs,idxts,0) + " ago");
  if (mwnewscheck && mwldfid>'')
  {
     var url=rdroot+"/ao/mw/newscheck.shtml?f="+mwldfid;
     dw('<br><iframe src="'+url+'" width="100%" height=25 scrolling=no hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0></iframe>');
  }
  else
     dw(" &nbsp;&nbsp; <nobr><a href='javascript:window.location.reload()'><b><font size='+1'>Reload it at will to keep it current</font></b></a></nobr>");
  dw("</center><br>");
 }
 else
 {
  tshead="<a href='/xl/timenow.htm' target='_blank'><b>Timestamp</b></a>";
  if (idxts!="") dw("<br><center>Last update: " + idxts + " <a href='/xl/timenow.htm' target='_blank'><b>Spain time</b></a></center><br>");
 }

 var i;
 dw("<center><b><a href='http://arpa3.net/ao/tools.html#aorc'>Do you need to contact some player and you're not ingame?</a></b></center>");
 
 if (typeof rsspath!='undefined') {
  if (rsspath!="" && userip==betatestip)
  {
     var rssuri=rdroot+rsspath;
     rssuri=rssuri.replace( /\/public_html/g, "" );
     dw("<center><br>");
      if (typeof newfeat_rss!='undefined') { dw('<font color="red"><b>NEW</b></font> '); }
      dw("Get this report's new items by <a href='"+rssuri+"'><img src='/gif/rss.gif' border=0 alt='RSS'><img src='/gif/xml.gif' border=0 alt=' XML'> feed.</a>");
      dw(" - ");
      dw("<a href='http://fusion.google.com/add?feedurl="+rssuri+"' target='_blank'><img src='/gif/add_to_google.gif' width='104' height='17' border='0' alt='Add to Google'></a>");
      dw(" <a href='http://add.my.yahoo.com/rss?url="+rssuri+"' target='_blank'><img border=0 src='/gif/addtomyyahoo2.gif' vspace='2' alt='Add to My Yahoo'></a>");
      //dw("<a href='http://my.msn.com/addtomymsn.armx?id=rss&ut="+rssuri+"' target='_blank'><img border=0 src='/gif/mymsn.gif'></a>");
     dw("</center>");
  }
 }

 dw('<table border="2" cellspacing="0" cellpadding="2" width="100%" style="text-align: left; width: 100%; background-color: rgb(255, 255, 255);"><tbody>');
 puttabrow("<b>Report/Offer</b>","<b>Items</b>",tshead,"<b>QL</b>","<b>Posted by</b>",0);
 if (idxnumitems<0) { puttabrow("Index data is incomplete. Please reload the page in a few seconds.<br><br>If after a few tries you still can't see it, try to clear your browser's cache and reload again.<br>If that doesn't work please check the <a href='/ao/mw-troubleshooting.html'><b>Market Watch Troubleshooting page</b></a>","","","","",0); }
 else if (!idxnumitems) { puttabrow("Nothing to report at the moment.","","","","",0); }
 else
 {
  for (i=0;i<idxnumitems;i++)
  {
      var ql=idxitem[i][4];
      if ((ql>=fromql) && (ql<=toql))
         putitem(idxitem[i],i);
  }
 }
 puttabrow("<b>Report/Offer</b>","<b>Items</b>",tshead,"<b>QL</b>","<b>Posted by</b>",0);
 dw('</tbody></table>');
 setupDatarows();
}

