chiark / gitweb /
For printable trading plan: example fetch rune
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 Oct 2009 17:24:53 +0000 (18:24 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 18 Oct 2009 14:30:48 +0000 (15:30 +0100)
yarrg/TODO
yarrg/example-plan.html [new file with mode: 0644]

index b202aad..c96e75e 100644 (file)
@@ -1,3 +1,8 @@
+
+printable trading plan
+  curl -s 'http://yarrg.chiark.net/lookup?routestring=eta%2C+jorvik&capacitystring=&lossperleague=&capitalstring=&submit=Go' >example-plan.html
+
+
 UPLOADER
 --------
 
 UPLOADER
 --------
 
diff --git a/yarrg/example-plan.html b/yarrg/example-plan.html
new file mode 100644 (file)
index 0000000..3cbd388
--- /dev/null
@@ -0,0 +1,1320 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+    This HTML is generated by the YARRG website, which is
+    Copyright 2009 Ian Jackson, Clare Boothby, Steve Early.
+
+    The YARRG website is Free Software and licenced according to the
+    GNU Affero General Public Licence (v3 or later).  See the link at
+    the bottom of this page for full licence and copyright
+    information.
+
+    Many YARRG web pages also display data from the YARRG database,
+    which contains mostly contributions from YARRG users and is not
+    covered by the AGPL.
+-->
+
+
+
+
+<html lang="en"><head><title>Trades for route - YARRG</title>
+<style type="text/css">
+body {
+  color: #000000;
+  background: #ffffff;
+}
+tr.datarow0 { background: #e3e3e3; }
+tr.datarow1 { background: #ffffff; }
+</style>
+<script type="text/javascript">
+<!--
+
+  function register_onload(f) {
+    var previous_onload= window.onload;
+    window.onload= function() {
+      if (previous_onload) previous_onload();
+      f();
+    };
+  }
+
+// -->
+</script>
+
+</head><body>
+
+<a href="lookup">YARRG</a> -
+ Yet Another Revenue Research Gatherer
+|
+<a href="intro">introduction</a>
+|
+<a href="docs">documentation</a>
+|
+<a href="devel">development</a>
+<p>
+Ocean: <b>Midnight</b>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;ocean=Cobalt">
+Cobalt</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;ocean=Ice">
+Ice</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;ocean=Hunter">
+Hunter</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;ocean=Malachite">
+Malachite</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;ocean=Sage">
+Sage</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;ocean=Viridian">
+Viridian</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;ocean=Crimson">
+Crimson</a><p>
+
+Interface: <b>Type in names</b>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;dropdowns=4&amp;capitalstring=&amp;capacitystring=">
+Select from menus</a><p>
+
+Query: <b>Trades for route</b>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;query=commod&amp;capacitystring=">
+Prices for commodity</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;query=offers&amp;capacitystring=">
+Offers at location</a>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;query=age&amp;capacitystring=">
+Data age</a><p>
+
+
+<hr>
+
+
+
+<h1>Specify route</h1>
+
+<form action="lookup" method="post">
+
+<b>Show total quantity at each price</b>
+|
+<a href="lookup?lossperleague=&amp;routestring=eta%2C+jorvik&amp;capitalstring=&amp;capacitystring=&amp;showstalls=1">
+Show individual stalls</a><p>
+
+
+
+
+Enter route (islands, or archipelagoes, separated by |s or commas;
+ abbreviations are OK):<br>
+
+
+<script type="text/javascript">
+<!--
+
+rl_uri= "qtextstringcheck?format=application/json&ctype=text/xml"
+               + "&what=routestring"
+               + "&ocean=Midnight";
+
+rl_timeout=false;
+rl_request=false;
+rl_done='';
+rl_needed='';
+function rl_Later(){
+  window.clearTimeout(rl_timeout);
+  rl_timeout = window.setTimeout(rl_Needed, 500);
+}
+function rl_Needed(){
+  window.clearTimeout(rl_timeout);
+  rl_element= document.getElementById('routestring');
+  rl_needed= rl_element.value;
+  rl_Request();
+}
+function rl_Request(){
+  if (rl_request || rl_needed==rl_done) return;
+  rl_done= rl_needed;
+  rl_request= new XMLHttpRequest();
+  uri= rl_uri+'&string='+encodeURIComponent(rl_needed);
+  rl_request.open('GET', uri);
+  rl_request.onreadystatechange= rl_Ready;
+  rl_request.send(null);
+}
+function rl_Ready() {
+  if (rl_request.readyState != 4) return;
+  if (rl_request.status == 200) {
+    response= rl_request.responseText;
+    debug('rl_ got '+response);
+    eval('results='+response);
+    toedit= document.getElementById('rl_results');
+    toedit.innerHTML= results.show;
+  }
+  rl_request= false;
+  rl_Request();
+}
+register_onload(rl_Needed);
+
+// -->
+</script>
+
+
+<input type="text" 
+ size=80
+
+ id="routestring" name="routestring"
+ onchange="rl_Needed();" onkeyup="rl_Later();"
+ value="eta, jorvik"
+ >
+<br>
+<div id="rl_results">&nbsp;</div><br>
+
+
+
+
+
+
+
+
+<strong>Advanced options - you may leave these blank:</strong>
+<p>
+<table><tr><td>
+
+Vessel or capacity:
+
+<script type="text/javascript">
+<!--
+
+cs_uri= "qtextstringcheck?format=application/json&ctype=text/xml"
+               + "&what=capacitystring"
+               + "&ocean=Midnight";
+
+cs_timeout=false;
+cs_request=false;
+cs_done='';
+cs_needed='';
+function cs_Later(){
+  window.clearTimeout(cs_timeout);
+  cs_timeout = window.setTimeout(cs_Needed, 500);
+}
+function cs_Needed(){
+  window.clearTimeout(cs_timeout);
+  cs_element= document.getElementById('capacitystring');
+  cs_needed= cs_element.value;
+  cs_Request();
+}
+function cs_Request(){
+  if (cs_request || cs_needed==cs_done) return;
+  cs_done= cs_needed;
+  cs_request= new XMLHttpRequest();
+  uri= cs_uri+'&string='+encodeURIComponent(cs_needed);
+  cs_request.open('GET', uri);
+  cs_request.onreadystatechange= cs_Ready;
+  cs_request.send(null);
+}
+function cs_Ready() {
+  if (cs_request.readyState != 4) return;
+  if (cs_request.status == 200) {
+    response= cs_request.responseText;
+    debug('cs_ got '+response);
+    eval('results='+response);
+    toedit= document.getElementById('cs_results');
+    toedit.innerHTML= results.show;
+  }
+  cs_request= false;
+  cs_Request();
+}
+register_onload(cs_Needed);
+
+// -->
+</script>
+
+
+<input type="text" 
+ size=40
+
+ id="capacitystring" name="capacitystring"
+ onchange="cs_Needed();" onkeyup="cs_Later();"
+ value=""
+ ><a href="docs#capacity">[?]</a>
+<br>
+<div id="cs_results">&nbsp;</div><br>
+
+
+
+
+
+
+<td>
+&nbsp;
+&nbsp;
+
+<td>
+Expected losses:
+
+
+<script type="text/javascript">
+<!--
+
+ll_uri= "qtextstringcheck?format=application/json&ctype=text/xml"
+               + "&what=lossperleague"
+               + "&ocean=Midnight";
+
+ll_timeout=false;
+ll_request=false;
+ll_done='';
+ll_needed='';
+function ll_Later(){
+  window.clearTimeout(ll_timeout);
+  ll_timeout = window.setTimeout(ll_Needed, 500);
+}
+function ll_Needed(){
+  window.clearTimeout(ll_timeout);
+  ll_element= document.getElementById('lossperleague');
+  ll_needed= ll_element.value;
+  ll_Request();
+}
+function ll_Request(){
+  if (ll_request || ll_needed==ll_done) return;
+  ll_done= ll_needed;
+  ll_request= new XMLHttpRequest();
+  uri= ll_uri+'&string='+encodeURIComponent(ll_needed);
+  ll_request.open('GET', uri);
+  ll_request.onreadystatechange= ll_Ready;
+  ll_request.send(null);
+}
+function ll_Ready() {
+  if (ll_request.readyState != 4) return;
+  if (ll_request.status == 200) {
+    response= ll_request.responseText;
+    debug('ll_ got '+response);
+    eval('results='+response);
+    toedit= document.getElementById('ll_results');
+    toedit.innerHTML= results.show;
+  }
+  ll_request= false;
+  ll_Request();
+}
+register_onload(ll_Needed);
+
+// -->
+</script>
+
+
+<input type="text" 
+ size=9
+
+ id="lossperleague" name="lossperleague"
+ onchange="ll_Needed();" onkeyup="ll_Later();"
+ value=""
+ ><a href="docs#losses">[?]</a>
+<br>
+<div id="ll_results">&nbsp;</div><br>
+
+
+
+
+
+
+</table>
+<table><tr>
+
+<td>Available capital:
+
+
+<script type="text/javascript">
+<!--
+
+ac_uri= "qtextstringcheck?format=application/json&ctype=text/xml"
+               + "&what=capitalstring"
+               + "&ocean=Midnight";
+
+ac_timeout=false;
+ac_request=false;
+ac_done='';
+ac_needed='';
+function ac_Later(){
+  window.clearTimeout(ac_timeout);
+  ac_timeout = window.setTimeout(ac_Needed, 500);
+}
+function ac_Needed(){
+  window.clearTimeout(ac_timeout);
+  ac_element= document.getElementById('capitalstring');
+  ac_needed= ac_element.value;
+  ac_Request();
+}
+function ac_Request(){
+  if (ac_request || ac_needed==ac_done) return;
+  ac_done= ac_needed;
+  ac_request= new XMLHttpRequest();
+  uri= ac_uri+'&string='+encodeURIComponent(ac_needed);
+  ac_request.open('GET', uri);
+  ac_request.onreadystatechange= ac_Ready;
+  ac_request.send(null);
+}
+function ac_Ready() {
+  if (ac_request.readyState != 4) return;
+  if (ac_request.status == 200) {
+    response= ac_request.responseText;
+    debug('ac_ got '+response);
+    eval('results='+response);
+    toedit= document.getElementById('ac_results');
+    toedit.innerHTML= results.show;
+  }
+  ac_request= false;
+  ac_Request();
+}
+register_onload(ac_Needed);
+
+// -->
+</script>
+
+
+<input type="text" 
+ size=9
+
+ id="capitalstring" name="capitalstring"
+ onchange="ac_Needed();" onkeyup="ac_Later();"
+ value=""
+ ><a href="docs#capital">[?]</a>
+<br>
+<div id="ac_results">&nbsp;</div><br>
+
+
+
+
+
+
+</table>
+
+
+<input type=submit name=submit value="Update">
+
+
+
+
+
+<h1>Relevant trades</h1>
+<script type="text/javascript">
+<!--
+
+  da_pageload= Date.now();
+
+// -->
+</script>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<table id="trades" rules=groups>
+<colgroup span=1>
+<colgroup span=2>
+
+<colgroup span=1>
+<colgroup span=2>
+<colgroup span=2>
+<colgroup span=2>
+<colgroup span=3>
+<colgroup span=3>
+<colgroup span=3>
+<tr class="spong">
+<th>
+<th>Collect
+<th>Deliver
+<th>
+<th colspan=2>Collect
+<th colspan=2>Deliver
+<th colspan=2>Profit
+<th colspan=3>Max
+<th colspan=1>
+<th colspan=2>Max
+<th colspan=3>Planned
+
+<tr>
+<th>
+<th>Island 
+<th>Island 
+<th>Commodity
+<th>Price
+<th>Qty
+<th>Price
+<th>Qty
+<th>Margin
+<th>Unit
+<th>Qty
+<th>Capital
+<th>Profit
+<th>Dist
+<th>Mass
+<th>Vol
+<th>Qty
+<th>Capital
+<th>Profit
+
+<tr id="trades_sort">
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+<th>
+
+<tr id="id_row_XcIbTKbU" class="datarow0">
+<td><input type=hidden   name=RXcIbTKbU value="">
+    <input type=checkbox name=TXcIbTKbU value=""
+       checked >
+<td colspan=1 >Eta Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Iron
+<td colspan=1 align=right>14
+<td colspan=1 align=right>2795
+<td colspan=1 align=right>15
+<td colspan=1 align=right>21
+<td colspan=1 align=right>7.1%
+<td colspan=1 align=right>1
+<td colspan=1 align=right>21
+<td colspan=1 align=right>294
+<td colspan=1 align=right>21
+<td colspan=1 align=right>5
+<td colspan=1 align=right>0.2
+<td colspan=1 align=right>0.0
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<tr id="id_row_UgIb1Kb4" class="datarow1">
+<td><input type=hidden   name=RUgIb1Kb4 value="">
+    <input type=checkbox name=TUgIb1Kb4 value=""
+       checked >
+<td colspan=1 >Eta Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Wood
+<td colspan=1 align=right>22
+<td colspan=1 align=right>276
+<td colspan=1 align=right>25
+<td colspan=1 align=right>839
+<td colspan=1 align=right>13.6%
+<td colspan=1 align=right>3
+<td colspan=1 align=right>276
+<td colspan=1 align=right>6072
+<td colspan=1 align=right>828
+<td colspan=1 align=right>5
+<td colspan=1 align=right>48.3
+<td colspan=1 align=right>69.0
+<td colspan=1 align=right>192
+<td colspan=1 align=right>4224
+<td colspan=1 align=right>576
+<tr id="id_row_UgIb1Kb3" class="datarow0">
+<td><input type=hidden   name=RUgIb1Kb3 value="">
+    <input type=checkbox name=TUgIb1Kb3 value=""
+       checked >
+<td colspan=1 >Eta Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Wood
+<td colspan=1 align=right>22
+<td colspan=1 align=right>276
+<td colspan=1 align=right>24
+<td colspan=1 align=right>1786
+<td colspan=1 align=right>9.1%
+<td colspan=1 align=right>2
+<td colspan=1 align=right>276
+<td colspan=1 align=right>6072
+<td colspan=1 align=right>552
+<td colspan=1 align=right>5
+<td colspan=1 align=right>48.3
+<td colspan=1 align=right>69.0
+<td colspan=1 align=right>84
+<td colspan=1 align=right>1848
+<td colspan=1 align=right>168
+<tr id="id_row_UgIb2Kb4" class="datarow1">
+<td><input type=hidden   name=RUgIb2Kb4 value="">
+    <input type=checkbox name=TUgIb2Kb4 value=""
+       checked >
+<td colspan=1 >Eta Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Wood
+<td colspan=1 align=right>23
+<td colspan=1 align=right>647
+<td colspan=1 align=right>25
+<td colspan=1 align=right>839
+<td colspan=1 align=right>8.7%
+<td colspan=1 align=right>2
+<td colspan=1 align=right>647
+<td colspan=1 align=right>14881
+<td colspan=1 align=right>1294
+<td colspan=1 align=right>5
+<td colspan=1 align=right>113.2
+<td colspan=1 align=right>161.8
+<td colspan=1 align=right>647
+<td colspan=1 align=right>14881
+<td colspan=1 align=right>1294
+<tr id="id_row_UgIb1Kb2" class="datarow0">
+<td><input type=hidden   name=RUgIb1Kb2 value="">
+    <input type=checkbox name=TUgIb1Kb2 value=""
+       checked >
+<td colspan=1 >Eta Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Wood
+<td colspan=1 align=right>22
+<td colspan=1 align=right>276
+<td colspan=1 align=right>23
+<td colspan=1 align=right>233
+<td colspan=1 align=right>4.5%
+<td colspan=1 align=right>1
+<td colspan=1 align=right>233
+<td colspan=1 align=right>5126
+<td colspan=1 align=right>233
+<td colspan=1 align=right>5
+<td colspan=1 align=right>40.8
+<td colspan=1 align=right>58.2
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<tr id="id_row_UgIb2Kb3" class="datarow1">
+<td><input type=hidden   name=RUgIb2Kb3 value="">
+    <input type=checkbox name=TUgIb2Kb3 value=""
+       checked >
+<td colspan=1 >Eta Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Wood
+<td colspan=1 align=right>23
+<td colspan=1 align=right>647
+<td colspan=1 align=right>24
+<td colspan=1 align=right>1786
+<td colspan=1 align=right>4.3%
+<td colspan=1 align=right>1
+<td colspan=1 align=right>647
+<td colspan=1 align=right>14881
+<td colspan=1 align=right>647
+<td colspan=1 align=right>5
+<td colspan=1 align=right>113.2
+<td colspan=1 align=right>161.8
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<tr id="id_row_UgIb3Kb4" class="datarow0">
+<td><input type=hidden   name=RUgIb3Kb4 value="">
+    <input type=checkbox name=TUgIb3Kb4 value=""
+       checked >
+<td colspan=1 >Eta Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Wood
+<td colspan=1 align=right>24
+<td colspan=1 align=right>301
+<td colspan=1 align=right>25
+<td colspan=1 align=right>839
+<td colspan=1 align=right>4.2%
+<td colspan=1 align=right>1
+<td colspan=1 align=right>301
+<td colspan=1 align=right>7224
+<td colspan=1 align=right>301
+<td colspan=1 align=right>5
+<td colspan=1 align=right>52.7
+<td colspan=1 align=right>75.2
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<td colspan=1 align=right>
+<tr id="id_row_XcKbTKbU" class="datarow1">
+<td><input type=hidden   name=RXcKbTKbU value="">
+    <input type=checkbox name=TXcKbTKbU value=""
+       checked >
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Iron
+<td colspan=1 align=right>14
+<td colspan=1 align=right>1001
+<td colspan=1 align=right>15
+<td colspan=1 align=right>21
+<td colspan=1 align=right>7.1%
+<td colspan=1 align=right>1
+<td colspan=1 align=right>21
+<td colspan=1 align=right>294
+<td colspan=1 align=right>21
+<td colspan=1 align=right>
+<td colspan=1 align=right>0.2
+<td colspan=1 align=right>0.0
+<td colspan=1 align=right>21
+<td colspan=1 align=right>294
+<td colspan=1 align=right>21
+<tr id="id_row_OfKbZbKb7b" class="datarow0">
+<td><input type=hidden   name=ROfKbZbKb7b value="">
+    <input type=checkbox name=TOfKbZbKb7b value=""
+       checked >
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Jorvik Island
+<td colspan=1 >Rambutan
+<td colspan=1 align=right>51
+<td colspan=1 align=right>2
+<td colspan=1 align=right>59
+<td colspan=1 align=right>1000
+<td colspan=1 align=right>15.7%
+<td colspan=1 align=right>8
+<td colspan=1 align=right>2
+<td colspan=1 align=right>102
+<td colspan=1 align=right>16
+<td colspan=1 align=right>
+<td colspan=1 align=right>0.2
+<td colspan=1 align=right>0.2
+<td colspan=1 align=right>2
+<td colspan=1 align=right>102
+<td colspan=1 align=right>16
+<tr id="trades_total">
+<th>
+<th colspan=2>Total
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+<td align=right>
+417.1
+<td align=right>
+595.2
+<td align=right>
+<td align=right>
+21349
+<td align=right>
+2075
+</table>
+
+
+
+
+<script type="text/javascript">
+<!--
+
+
+
+  ts_sortkeys= {"11":{"id_row_XcIbTKbU":294,"id_row_UgIb3Kb4":7224,"id_row_UgIb1Kb2":5126,"id_row_UgIb2Kb4":14881,"id_row_OfKbZbKb7b":102,"id_row_UgIb2Kb3":14881,"id_row_XcKbTKbU":294,"id_row_UgIb1Kb3":6072,"id_row_UgIb1Kb4":6072},"7":{"id_row_XcIbTKbU":21,"id_row_UgIb3Kb4":839,"id_row_UgIb1Kb2":233,"id_row_UgIb2Kb4":839,"id_row_OfKbZbKb7b":1000,"id_row_UgIb2Kb3":1786,"id_row_XcKbTKbU":21,"id_row_UgIb1Kb3":1786,"id_row_UgIb1Kb4":839},"17":{"id_row_XcIbTKbU":"","id_row_UgIb3Kb4":"","id_row_UgIb1Kb2":"","id_row_UgIb2Kb4":14881,"id_row_OfKbZbKb7b":102,"id_row_UgIb2Kb3":"","id_row_XcKbTKbU":294,"id_row_UgIb1Kb3":1848,"id_row_UgIb1Kb4":4224},"2":{"id_row_XcIbTKbU":"Jorvik Island","id_row_UgIb3Kb4":"Jorvik Island","id_row_UgIb1Kb2":"Jorvik Island","id_row_UgIb2Kb4":"Jorvik Island","id_row_OfKbZbKb7b":"Jorvik Island","id_row_UgIb2Kb3":"Jorvik Island","id_row_XcKbTKbU":"Jorvik Island","id_row_UgIb1Kb3":"Jorvik Island","id_row_UgIb1Kb4":"Jorvik Island"},"1":{"id_row_XcIbTKbU":"Eta Island","id_row_UgIb3Kb4":"Eta Island","id_row_UgIb1Kb2":"Eta Island","id_row_UgIb2Kb4":"Eta Island","id_row_OfKbZbKb7b":"Jorvik Island","id_row_UgIb2Kb3":"Eta Island","id_row_XcKbTKbU":"Jorvik Island","id_row_UgIb1Kb3":"Eta Island","id_row_UgIb1Kb4":"Eta Island"},"18":{"id_row_XcIbTKbU":"","id_row_UgIb3Kb4":"","id_row_UgIb1Kb2":"","id_row_UgIb2Kb4":1294,"id_row_OfKbZbKb7b":16,"id_row_UgIb2Kb3":"","id_row_XcKbTKbU":21,"id_row_UgIb1Kb3":168,"id_row_UgIb1Kb4":576},"16":{"id_row_XcIbTKbU":"","id_row_UgIb3Kb4":"","id_row_UgIb1Kb2":"","id_row_UgIb2Kb4":647,"id_row_OfKbZbKb7b":2,"id_row_UgIb2Kb3":"","id_row_XcKbTKbU":21,"id_row_UgIb1Kb3":84,"id_row_UgIb1Kb4":192},"13":{"id_row_XcIbTKbU":5,"id_row_UgIb3Kb4":5,"id_row_UgIb1Kb2":5,"id_row_UgIb2Kb4":5,"id_row_OfKbZbKb7b":"","id_row_UgIb2Kb3":5,"id_row_XcKbTKbU":"","id_row_UgIb1Kb3":5,"id_row_UgIb1Kb4":5},"6":{"id_row_XcIbTKbU":"15","id_row_UgIb3Kb4":"25","id_row_UgIb1Kb2":"23","id_row_UgIb2Kb4":"25","id_row_OfKbZbKb7b":"59","id_row_UgIb2Kb3":"24","id_row_XcKbTKbU":"15","id_row_UgIb1Kb3":"24","id_row_UgIb1Kb4":"25"},"3":{"id_row_XcIbTKbU":"Iron","id_row_UgIb3Kb4":"Wood","id_row_UgIb1Kb2":"Wood","id_row_UgIb2Kb4":"Wood","id_row_OfKbZbKb7b":"Rambutan","id_row_UgIb2Kb3":"Wood","id_row_XcKbTKbU":"Iron","id_row_UgIb1Kb3":"Wood","id_row_UgIb1Kb4":"Wood"},"9":{"id_row_XcIbTKbU":1,"id_row_UgIb3Kb4":1,"id_row_UgIb1Kb2":1,"id_row_UgIb2Kb4":2,"id_row_OfKbZbKb7b":8,"id_row_UgIb2Kb3":1,"id_row_XcKbTKbU":1,"id_row_UgIb1Kb3":2,"id_row_UgIb1Kb4":3},"12":{"id_row_XcIbTKbU":21,"id_row_UgIb3Kb4":301,"id_row_UgIb1Kb2":233,"id_row_UgIb2Kb4":1294,"id_row_OfKbZbKb7b":16,"id_row_UgIb2Kb3":647,"id_row_XcKbTKbU":21,"id_row_UgIb1Kb3":552,"id_row_UgIb1Kb4":828},"15":{"id_row_XcIbTKbU":21000,"id_row_UgIb3Kb4":75250000,"id_row_UgIb1Kb2":58250000,"id_row_UgIb2Kb4":161750000,"id_row_OfKbZbKb7b":200000,"id_row_UgIb2Kb3":161750000,"id_row_XcKbTKbU":21000,"id_row_UgIb1Kb3":69000000,"id_row_UgIb1Kb4":69000000},"14":{"id_row_XcIbTKbU":163800,"id_row_UgIb3Kb4":52675000,"id_row_UgIb1Kb2":40775000,"id_row_UgIb2Kb4":113225000,"id_row_OfKbZbKb7b":250000,"id_row_UgIb2Kb3":113225000,"id_row_XcKbTKbU":163800,"id_row_UgIb1Kb3":48300000,"id_row_UgIb1Kb4":48300000},"8":{"id_row_XcIbTKbU":"10714","id_row_UgIb3Kb4":"10416","id_row_UgIb1Kb2":"10454","id_row_UgIb2Kb4":"10869","id_row_OfKbZbKb7b":"11568","id_row_UgIb2Kb3":"10434","id_row_XcKbTKbU":"10714","id_row_UgIb1Kb3":"10909","id_row_UgIb1Kb4":"11363"},"4":{"id_row_XcIbTKbU":"14","id_row_UgIb3Kb4":"24","id_row_UgIb1Kb2":"22","id_row_UgIb2Kb4":"23","id_row_OfKbZbKb7b":"51","id_row_UgIb2Kb3":"23","id_row_XcKbTKbU":"14","id_row_UgIb1Kb3":"22","id_row_UgIb1Kb4":"22"},"10":{"id_row_XcIbTKbU":21,"id_row_UgIb3Kb4":301,"id_row_UgIb1Kb2":233,"id_row_UgIb2Kb4":647,"id_row_OfKbZbKb7b":2,"id_row_UgIb2Kb3":647,"id_row_XcKbTKbU":21,"id_row_UgIb1Kb3":276,"id_row_UgIb1Kb4":276},"5":{"id_row_XcIbTKbU":2795,"id_row_UgIb3Kb4":301,"id_row_UgIb1Kb2":276,"id_row_UgIb2Kb4":647,"id_row_OfKbZbKb7b":2,"id_row_UgIb2Kb3":647,"id_row_XcKbTKbU":1001,"id_row_UgIb1Kb3":276,"id_row_UgIb1Kb4":276}};
+
+function ts_s_trades(compar) {
+  debug('sorting compar='+compar);
+  var table= document.getElementById('trades');
+  var firstrow= table.getElementsByTagName('tr').item(0);
+  var tbody= firstrow.parentNode
+  var rows= tbody.childNodes
+  var newrows= new Array;
+  var finalrows= new Array;
+  var rowix= 0;
+  for (; rowix < rows.length; rowix++) {
+    var row= rows.item(rowix);
+    if (row.id == 'trades_sort') break;
+    debug('skip row '+rowix+' [[ '+row+' ]] id='+row.id);
+  }
+  rowix++;
+  for (; rowix < rows.length; rowix++) {
+    var row= rows.item(rowix);
+    if (row.id == 'trades_total') break;
+    if (!row.id) { debug('noid row '+rowix+' [[ '+row+' ]]'); continue; }
+    if (row.tagName != 'TR') {
+      debug('no-tr row '+rowix+' tagName='+row.tagName+' [[ '+row+' ]]');
+      continue;
+    }
+    debug('process row '+rowix+' [[ '+row+' ]] id='+row.id);
+    newrows.push(row);
+  }
+  for (; rowix < rows.length; rowix++) {
+    var row= rows.item(rowix);
+    finalrows.push(row);
+    debug('final row '+rowix+' [[ '+row+' ]]');
+  }
+  newrows.sort(compar);
+  for (var rowix=0; rowix < newrows.length; rowix++) {
+    var row= newrows[rowix];
+    var classname= 'datarow'+(rowix % 2);
+    debug('fix row '+rowix+' class '+classname);
+    row.className= classname;
+  }
+  newrows= newrows.concat(finalrows);
+  for (var rowix=0; rowix < newrows.length; rowix++) {
+    var row= newrows[rowix];
+    debug('add row '+rowix+' [[ '+row+' ]]');
+    tbody.appendChild(row);
+  }
+}
+
+
+function ts_1m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[1][rowid];
+}
+
+function ts_1c0_trades(a,b) {
+  var ak = ts_1m_trades(a);
+  var bk = ts_1m_trades(b);
+  if (ak < bk) return -1;
+  if (ak > bk) return +1;
+  return 0;
+}
+
+
+function ts_2m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[2][rowid];
+}
+
+function ts_2c0_trades(a,b) {
+  var ak = ts_2m_trades(a);
+  var bk = ts_2m_trades(b);
+  if (ak < bk) return -1;
+  if (ak > bk) return +1;
+  return 0;
+}
+
+
+function ts_3m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[3][rowid];
+}
+
+function ts_3c0_trades(a,b) {
+  var ak = ts_3m_trades(a);
+  var bk = ts_3m_trades(b);
+  if (ak < bk) return -1;
+  if (ak > bk) return +1;
+  return 0;
+}
+
+
+function ts_4m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[4][rowid];
+}
+
+function ts_4c0_trades(a,b) {
+  var ak = ts_4m_trades(a);
+  var bk = ts_4m_trades(b);
+  return ak - bk
+}
+
+function ts_4c1_trades(a,b) { return -ts_4c0_trades(a,b); }
+
+
+function ts_5m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[5][rowid];
+}
+
+function ts_5c0_trades(a,b) {
+  var ak = ts_5m_trades(a);
+  var bk = ts_5m_trades(b);
+  return ak - bk
+}
+
+function ts_5c1_trades(a,b) { return -ts_5c0_trades(a,b); }
+
+
+function ts_6m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[6][rowid];
+}
+
+function ts_6c0_trades(a,b) {
+  var ak = ts_6m_trades(a);
+  var bk = ts_6m_trades(b);
+  return ak - bk
+}
+
+function ts_6c1_trades(a,b) { return -ts_6c0_trades(a,b); }
+
+
+function ts_7m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[7][rowid];
+}
+
+function ts_7c0_trades(a,b) {
+  var ak = ts_7m_trades(a);
+  var bk = ts_7m_trades(b);
+  return ak - bk
+}
+
+function ts_7c1_trades(a,b) { return -ts_7c0_trades(a,b); }
+
+
+function ts_8m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[8][rowid];
+}
+
+function ts_8c0_trades(a,b) {
+  var ak = ts_8m_trades(a);
+  var bk = ts_8m_trades(b);
+  return ak - bk
+}
+
+function ts_8c1_trades(a,b) { return -ts_8c0_trades(a,b); }
+
+
+function ts_9m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[9][rowid];
+}
+
+function ts_9c0_trades(a,b) {
+  var ak = ts_9m_trades(a);
+  var bk = ts_9m_trades(b);
+  return ak - bk
+}
+
+function ts_9c1_trades(a,b) { return -ts_9c0_trades(a,b); }
+
+
+function ts_10m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[10][rowid];
+}
+
+function ts_10c0_trades(a,b) {
+  var ak = ts_10m_trades(a);
+  var bk = ts_10m_trades(b);
+  return ak - bk
+}
+
+function ts_10c1_trades(a,b) { return -ts_10c0_trades(a,b); }
+
+
+function ts_11m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[11][rowid];
+}
+
+function ts_11c0_trades(a,b) {
+  var ak = ts_11m_trades(a);
+  var bk = ts_11m_trades(b);
+  return ak - bk
+}
+
+function ts_11c1_trades(a,b) { return -ts_11c0_trades(a,b); }
+
+
+function ts_12m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[12][rowid];
+}
+
+function ts_12c0_trades(a,b) {
+  var ak = ts_12m_trades(a);
+  var bk = ts_12m_trades(b);
+  return ak - bk
+}
+
+function ts_12c1_trades(a,b) { return -ts_12c0_trades(a,b); }
+
+
+function ts_13m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[13][rowid];
+}
+
+function ts_13c0_trades(a,b) {
+  var ak = ts_13m_trades(a);
+  var bk = ts_13m_trades(b);
+  return ak - bk
+}
+
+function ts_13c1_trades(a,b) { return -ts_13c0_trades(a,b); }
+
+
+function ts_14m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[14][rowid];
+}
+
+function ts_14c0_trades(a,b) {
+  var ak = ts_14m_trades(a);
+  var bk = ts_14m_trades(b);
+  return ak - bk
+}
+
+function ts_14c1_trades(a,b) { return -ts_14c0_trades(a,b); }
+
+
+function ts_15m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[15][rowid];
+}
+
+function ts_15c0_trades(a,b) {
+  var ak = ts_15m_trades(a);
+  var bk = ts_15m_trades(b);
+  return ak - bk
+}
+
+function ts_15c1_trades(a,b) { return -ts_15c0_trades(a,b); }
+
+
+function ts_16m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[16][rowid];
+}
+
+function ts_16c0_trades(a,b) {
+  var ak = ts_16m_trades(a);
+  var bk = ts_16m_trades(b);
+  return ak - bk
+}
+
+function ts_16c1_trades(a,b) { return -ts_16c0_trades(a,b); }
+
+
+function ts_17m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[17][rowid];
+}
+
+function ts_17c0_trades(a,b) {
+  var ak = ts_17m_trades(a);
+  var bk = ts_17m_trades(b);
+  return ak - bk
+}
+
+function ts_17c1_trades(a,b) { return -ts_17c0_trades(a,b); }
+
+
+function ts_18m_trades(re) {
+  var rowid = re.id;
+  return ts_sortkeys[18][rowid];
+}
+
+function ts_18c0_trades(a,b) {
+  var ak = ts_18m_trades(a);
+  var bk = ts_18m_trades(b);
+  return ak - bk
+}
+
+function ts_18c1_trades(a,b) { return -ts_18c0_trades(a,b); }
+
+
+function ts_onload__trades() {
+  var ts_add_heads= {"11":"<a href=\"javascript:ts_s_trades(ts_11c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_11c0_trades)\">&and;<\/a>","7":"<a href=\"javascript:ts_s_trades(ts_7c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_7c0_trades)\">&and;<\/a>","17":"<a href=\"javascript:ts_s_trades(ts_17c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_17c0_trades)\">&and;<\/a>","2":"<a href=\"javascript:ts_s_trades(ts_2c0_trades)\">&and;<\/a>","1":"<a href=\"javascript:ts_s_trades(ts_1c0_trades)\">&and;<\/a>","18":"<a href=\"javascript:ts_s_trades(ts_18c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_18c0_trades)\">&and;<\/a>","16":"<a href=\"javascript:ts_s_trades(ts_16c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_16c0_trades)\">&and;<\/a>","13":"<a href=\"javascript:ts_s_trades(ts_13c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_13c0_trades)\">&and;<\/a>","6":"<a href=\"javascript:ts_s_trades(ts_6c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_6c0_trades)\">&and;<\/a>","3":"<a href=\"javascript:ts_s_trades(ts_3c0_trades)\">&and;<\/a>","9":"<a href=\"javascript:ts_s_trades(ts_9c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_9c0_trades)\">&and;<\/a>","12":"<a href=\"javascript:ts_s_trades(ts_12c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_12c0_trades)\">&and;<\/a>","14":"<a href=\"javascript:ts_s_trades(ts_14c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_14c0_trades)\">&and;<\/a>","15":"<a href=\"javascript:ts_s_trades(ts_15c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_15c0_trades)\">&and;<\/a>","8":"<a href=\"javascript:ts_s_trades(ts_8c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_8c0_trades)\">&and;<\/a>","4":"<a href=\"javascript:ts_s_trades(ts_4c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_4c0_trades)\">&and;<\/a>","10":"<a href=\"javascript:ts_s_trades(ts_10c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_10c0_trades)\">&and;<\/a>","5":"<a href=\"javascript:ts_s_trades(ts_5c1_trades)\">&or;<\/a><a href=\"javascript:ts_s_trades(ts_5c0_trades)\">&and;<\/a>"};
+  var ctr= document.getElementById('trades_sort');
+  var firstth= ctr.getElementsByTagName('th').item(0);
+  var thlist= firstth.parentNode.getElementsByTagName('th');
+  debug('thlist='+thlist);
+  debug('thlist.item(2)=' + thlist.item(2));
+  for (var cix in ts_add_heads) {
+    var ah = ts_add_heads[cix];
+    debug('appending to cix='+cix+' ah='+ah);
+    thlist.item(cix).innerHTML += ah;
+  }
+}
+
+register_onload(ts_onload__trades);
+
+// -->
+</script>
+
+
+
+<input type=submit name=update value="Update">
+
+<h1>Voyage trading plan</h1>
+<table rules=groups>
+<tbody>
+<tr><td colspan=4>
+<strong>Start at Eta Island</strong>
+<td colspan=2>(Data age: <span id="da_0">2 days</span>)
+<tr class="datarow0">
+<td rowspan=2>Collect
+<td rowspan=2>Wood
+<td>Finagle&#39;s Distilling Stall
+<td rowspan=2 align=right>22 poe ea.
+<td rowspan=2 align=right>276 unit(s)
+<td rowspan=2 align=right>6072 total
+<tr class="datarow0">
+<td>Samjones&#39;s Ironworking Stall
+<tr class="datarow1">
+<td rowspan=3>Collect
+<td rowspan=3>Wood
+<td>Acute Irony
+<td rowspan=3 align=right>23 poe ea.
+<td rowspan=3 align=right>647 unit(s)
+<td rowspan=3 align=right>14881 total
+<tr class="datarow1">
+<td>Fumundacheez&#39;s Ironworking Stall
+<tr class="datarow1">
+<td>Tesla Foils
+<tr>
+<td colspan=1>
+<td colspan=2>In hold 161525kg, 230750 l.
+
+<td colspan=2 align=right>Outlay
+<td align=right>20953 total
+<tbody>
+<tr><td colspan=4>
+<strong>Sail to Jorvik Island</strong>
+- 5 leagues,
+ 22991poe at risk
+ </td>
+<td colspan=2>(Data age: <span id="da_1">2 days</span>)
+<tr class="datarow0">
+<td rowspan=4>Deliver
+<td rowspan=4>Wood
+<td>Biker&#39;s Distilling Stall
+<td rowspan=4 align=right>25 poe ea.
+<td rowspan=4 align=right>839 unit(s)
+<td rowspan=4 align=right>20975 total
+<tr class="datarow0">
+<td>Canterbury Ales
+<tr class="datarow0">
+<td>Darkseid&#39;s Ironworking Stall
+<tr class="datarow0">
+<td>Spearhalk&#39;s Distilling Stall
+<tr class="datarow1">
+<td rowspan=2>Deliver
+<td rowspan=2>Wood
+<td>Affjordable Furnishing
+<td rowspan=2 align=right>24 poe ea.
+<td rowspan=2 align=right>84 unit(s)
+<td rowspan=2 align=right>2016 total
+<tr class="datarow1">
+<td>Helsingkor
+<tr>
+<td colspan=1>
+<td colspan=2>
+<td colspan=2 align=right>Proceeds
+<td align=right>22991 total
+<tbody>
+<tr class="datarow0">
+<td rowspan=1>Collect
+<td rowspan=1>Iron
+<td>Helsingkor
+<td rowspan=1 align=right>14 poe ea.
+<td rowspan=1 align=right>21 unit(s)
+<td rowspan=1 align=right>294 total
+<tr class="datarow1">
+<td rowspan=1>Collect
+<td rowspan=1>Rambutan
+<td>Yggdrasil
+<td rowspan=1 align=right>51 poe ea.
+<td rowspan=1 align=right>2 unit(s)
+<td rowspan=1 align=right>102 total
+<tr>
+<td colspan=1>
+<td colspan=2>
+<td colspan=2 align=right>(Arbitrage) outlay
+<td align=right>396 total
+<tbody>
+<tr class="datarow0">
+<td rowspan=1>Deliver
+<td rowspan=1>Iron
+<td>Jergs&#39;s Ironworking Stall
+<td rowspan=1 align=right>15 poe ea.
+<td rowspan=1 align=right>21 unit(s)
+<td rowspan=1 align=right>315 total
+<tr class="datarow1">
+<td rowspan=1>Deliver
+<td rowspan=1>Rambutan
+<td>Merchant of Vanir
+<td rowspan=1 align=right>59 poe ea.
+<td rowspan=1 align=right>2 unit(s)
+<td rowspan=1 align=right>118 total
+<tr>
+<td colspan=1>
+<td colspan=2>
+<td colspan=2 align=right>(Arbitrage) proceeds
+<td align=right>433 total
+<tbody><tr>
+<td colspan=2>Total distance: 5 leagues.
+<td colspan=3 align=right>Overall net cash flow
+<td align=right><strong>2075 gain</strong>
+</table>
+
+<script type="text/javascript">
+<!--
+
+  function da_Refresh() {
+    var now= Date.now();
+    debug('updating now='+now);
+    for (var ageid in da_ages) {
+      var oldage= da_ages[ageid];
+      var el= document.getElementById(ageid);
+      var age= oldage + (now - da_pageload) / 1000;
+      var newhtml=         age < 60 ?             'less than a minute'                    :
+        age < 60*2 ?           '1 minute'                              :
+        age < 3600*2 ?         Math.floor (age/60) +' minutes'        :
+        age < 86400*2 ?        Math.floor (age/3600) + ' hours'       :
+                                Math.floor (age/86400) + ' days';
+;
+      el.innerHTML= newhtml;
+    }
+  }
+  da_ages= {"da_1":174403,"da_0":174443};
+  window.setInterval(da_Refresh, 10000);
+  register_onload(da_Refresh);
+
+// -->
+</script>
+
+
+
+
+</form>
+
+
+<p>
+
+
+
+<script type="text/javascript">
+<!--
+
+function debug (m) {
+}
+
+// -->
+</script>
+
+
+<hr>
+<address>
+YARRG is Yet Another Revenue Research Gatherer, a project of the
+crew Special Circumstances on the Midnight Ocean
+and of the Sinister Greenend Organisation.
+<p>
+
+YARRG is Free Software.
+You may share and modify the code and the
+website, according to the terms of the GNU General Public Licence and
+the GNU Affero General Public Licence respectively (v3 or later).
+Note that there is <strong>NO WARRANTY</strong>.
+Please see the <a href="devel">YARRG Development webpage</a> for
+details of how to obtain the client and server code and full details
+of the licences.
+
+<p>
+YARRG is Copyright 2009 Ian Jackson, Clare Boothby, Steve Early.
+Yohoho and Puzzle Pirates are trademarks of Three Rings and are used
+without permission.  YARRG is not endorsed or sponsored by Three
+Rings.
+
+</address>
+
+
+