SHARE
TWEET

JumpGate Shipper Widget

a guest Jun 14th, 2017 168 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- App code only, missing icons, start page, and help. v7.02, 19 August 2005. For details, see https://timhowgego.wordpress.com/jumpgate/ -->
  2.  
  3. <?xml version="1.0"?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6.  
  7. <head>
  8.  
  9. <title>JumpGate Shipper Widget</title>
  10. <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
  11. <meta name="description" content="A widget for the Jumpgate universe that tells you which commodities to ship." />
  12. <meta name="keywords" content="JumpGate Shipper Widget, JumpGate, Widget, Shipper, Handler, tool, trade, cargo, economy, trading" />
  13. <link rel="shortcut icon" href="favicon.ico" />
  14.  
  15. <style type="text/css">
  16. body {background: #000000; color: #318eff; text-align: left; font-family: arial, helvetica, sans-serif; font-size: 75%;}
  17. table {text-align: left; font-family: arial, helvetica, sans-serif; padding: 0em; font-size: 100%; margin: 0em;}
  18. th {color: #ffffff; text-align: left; padding-top: 0.3em; padding-bottom: 0.3em; padding-right: 0.5em; padding-left: 0.5em; margin: 0em;}
  19. td {text-align: left; padding-top: 0.1em; padding-bottom: 0.1em; padding-right: 0.5em; padding-left: 0.5em; margin: 0em;}
  20. .tdd {border-top: 1px dashed #333333;}
  21. .tdr {text-align: right; border-top: 1px dashed #333333;}
  22. b {color: #ffffff; font-weight: bold;}
  23. i {font-style: italic;}
  24. a:link, a:visited, a:active {text-decoration: underline; color: #318eff;}
  25. a:hover {text-decoration: none; color: #318eff;}
  26. img {vertical-align: middle;}
  27. .main {position: absolute; top: 10px; left: 5px; visibility: hidden;}
  28. .intro {position: absolute; top: 10px; left: 5px; visibility: visible;}
  29. .form {background: #333333; color: #ffffff; text-align: left; font-family: arial, helvetica, sans-serif; cursor: pointer; font-size: 100%; margin: 0em; padding: 0em;}
  30. .minitimer {position: absolute; top: 0px; left: 0px; visibility: hidden; line-height: 1em;}
  31. .toolbar {text-align: center; font-family: arial, helvetica, sans-serif; padding: 0em; font-size: 100%; margin-top: 0em; margin-left: 0em; margin-right: 0em; margin-bottom: 0.4em; display: inline;}
  32. .toolbartd {text-align: center; padding: 0.2em; margin: 0em;}
  33. .text {margin-bottom: 0.6em; margin-top: 0.6em;}
  34. .title {margin-bottom: 0.2em; margin-top: 0em; color: #ffffff; font-weight: bold;}
  35. .tbb {text-align: center; padding: 2px; display: block; background: #222222; border-top: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #333333; border-bottom: 1px solid #333333;}
  36. a.tbb:link, a.tbb:visited, a.tbb:active {text-decoration: none;}
  37. a.tbb:hover {background: #444444; border-top: 1px solid #555555; border-left: 1px solid #555555;  border-right: 1px solid #222222; border-bottom: 1px solid #222222; text-decoration: none;}
  38. .tbc {text-align: center; padding-right: 5px; padding-left: 5px; background: #444444; border-top: 1px solid #555555; border-left: 1px solid #555555;  border-right: 1px solid #222222; border-bottom: 1px solid #222222; text-decoration: none;}
  39. a.tbc:link, a.tbb:visited, a.tbb:active {text-decoration: none;}
  40. a.tbc:hover {background: #222222; border-top: 1px solid #000000; border-left: 1px solid #000000;  border-right: 1px solid #333333; border-bottom: 1px solid #333333; text-decoration: none;}
  41. .flowline {text-align: center; color: #ffffff;}
  42. .tdw {border: 1px dotted #ffffff;}
  43. </style>
  44.  
  45. <script language="JavaScript1.2" type="text/javascript">
  46.  
  47. var versionarray = new Array ('7.02','19 August 2005. All I need is the air that I breath... Patch v1.0103 changes: Abattis and laser production requirements.','','7.01','19 July 2005. Added ML Amplifier. Or Mining Lantern.','','7.00','14 June 2005. Following Mightygames decision to close the EU server, the widget now only supports the global (former US) server. EU and German language support has been removed. Updates will be rare, but please continue to send feedback - even if I seem to ignore it, it will be acted on eventually.<br />Data changes: Updated known production location changes. Added FuelScoop - although the commodities scooped are not all known. Altered various engine and newbie spacecraft statistics. Prices and other statisics not listed on JOSSH probably inaccurate.','','1.0','First release 5 June 2001 as a utility linking demands and supplies within the economy.','');
  48.  
  49.  
  50.  
  51. // ***** Start Updatable ******
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. var infolist = new Array ('','','Transport container.','','RoyofCA\'s secret missile.','','Armchair\'s ham sandwich.','','Artifact.','','2% increase to power plant, engine thrust, capacitor and shield recharge rates. Artifact.','','4% increase to power plant, engine thrust, capacitor and shield recharge rates. Artifact.','','6% increase to power plant, engine thrust, capacitor and shield recharge rates. Artifact.','','9% increase to power plant, engine thrust, capacitor and shield recharge rates. Artifact.','','3% increase to capacitor recharge rate. Artifact.','','5% increase to capacitor recharge rate. Artifact.','','8% increase to capacitor recharge rate. Artifact.','','8% reduction to total ship mass. Artifact.','','11% reduction to total ship mass. Artifact.','','15% reduction to total ship mass. Artifact.','','20% reduction to total ship mass. Artifact.','','3.5% increase to total capacitor energy storage. Artifact.','','5% increase to total capacitor energy storage. Artifact.','','7% increase to total capacitor energy storage. Artifact.','','3% increase to engine thrust. Artifact.','','5% increase to engine thrust. Artifact.','','8% increase to engine thrust. Artifact.','','2% reduction to engine power consumption. Artifact.','','3% reduction to engine power consumption. Artifact.','','4% reduction to engine power consumption. Artifact.','','5% increase in efficiency of engines, and 2% for shields. Artifact.','','3% increase to power plant output. Artifact.','','5% increase to power plant output. Artifact.','','8% increase to power plant output. Artifact.','','20% reduction to power consumption of radar and ECM. Artifact.','','3% increase to shield recharge rate. Artifact.','','5% increase to shield recharge rate. Artifact.','','8% increase to shield recharge rate. Artifact.','','2% reduction to shield recharge power consumption. Artifact.','','3% reduction to shield recharge power consumption. Artifact.','','4% reduction to shield recharge power consumption. Artifact.','','2% reduction (per shot) to weapon power consumption. Artifact.','','4% reduction (per shot) to weapon power consumption. Artifact.','','6% reduction (per shot) to weapon power consumption. Artifact.','','3% increase in efficiency of engines, shield and capacitor. Artifact.','','4.5% increase in efficiency of engines, shield and capacitor. Artifact.','','Artifact component.','','Solrain Shuttle','','Solrain Fighter','','Solrain Tow','','Solrain Light Fighter','','Solrain Transport','','Solrain Shuttle','','Solrain Scout','','Solrain Large Shuttle','','Solrain Medium Fighter','','Solrain Fast Transport','','Solrain Bomber','','Solrain Ranger','','Solrain Light Miner','','Production bugged.','','Production suspended.','','Quantar Shuttle','','Quantar Fighter','','Quantar Tow','','Quantar Light Fighter','','Quantar Transport','','Quantar Shuttle','','Quantar Scout','','Quantar Large Shuttle','','Quantar Medium Fighter','','Quantar Fast Transport','','Quantar Bomber','','Quantar Ranger','','Quantar Light Miner','','Octavius Shuttle','','Octavius Fighter','','Octavius Tow','','Octavius Light Fighter','','Octavius Transport','','Octavius Shuttle','','Octavius Scout','','Octavius Large Shuttle','','Octavius Medium Fighter','','Octavius Fast Transport','','Octavius Bomber','','Octavius Ranger','','Octavius Light Miner','','Nuke','','Camera','','Scanner','','','','Solrain Heavy Miner','','Solrain Freighter','','Solrain Heavy Fighter','','Quantar Heavy Miner','','Quantar Freighter','','Quantar Heavy Fighter','','Octavius Heavy Miner','','Octavius Freighter','','Octavius Heavy Fighter','','POS Module','');
  61.  
  62. var infolook = new Array (47,4,48,4,49,4,50,4,51,4,52,4,53,4,54,4,55,4,56,4,57,4,58,4,59,4,60,4,61,4,62,4,63,41,64,41,65,41,66,41,67,41,68,41,69,41,70,41,71,41,72,41,73,41,74,41,75,41,76,41,77,41,78,41,103,1,104,1,105,1,106,1,107,1,108,1,109,1,159,2,162,83,169,83,173,83,202,4,203,4,204,4,205,4,248,4,249,4,250,4,251,4,277,4,278,4,279,4,280,4,310,96,314,96,315,96,316,96,325,3,326,84,327,96,329,85,330,84,331,85,332,96,333,5,334,6,335,7,336,8,337,39,338,40,339,9,340,10,341,11,342,12,343,13,344,14,345,15,346,16,347,17,348,18,349,19,350,20,351,21,352,22,353,23,354,24,355,25,356,26,357,27,358,28,359,29,360,30,361,31,362,32,363,33,364,34,365,35,366,36,367,37,368,38,369,96,370,96,372,85,373,96,374,96,376,84,377,75,378,70,379,52,380,64,381,77,382,91,383,78,384,72,385,60,386,95,387,81,388,62,389,69,390,79,391,61,392,43,393,45,394,89,395,50,396,90,397,87,398,92,399,76,400,51,401,71,402,44,403,42,404,49,405,47,406,54,407,48,408,80,409,73,410,94,411,63,412,82,413,68,414,57,415,65,416,59,417,67,418,46,419,58,420,53,421,88,422,93,423,66,424,74);
  63.  
  64. var itemd = new Array (0,0,0,0,0,0,0,0,0,-1,1,2702,2940,0,1,0,0,0,0,2,1,8000,12350,0,1,0,0,0,0,49,1,6684,44300,0,1,0,0,0,0,3,1,8200,22930,0,1,0,0,0,0,58,1,3510,11740,0,1,0,0,0,0,4,1,2340,14290,0,1,0,0,0,0,5,1,2620,2440,0,1,0,0,0,0,46,1,1873,47640,0,1,0,0,0,0,6,1,650,14290,0,1,0,0,0,0,40,1,7190,9400,0,1,0,0,0,0,7,1,8900,9530,0,1,0,0,0,0,9,1,8000,3821,0,1,0,0,0,0,175,1,1800,18760,0,1,0,0,0,0,51,1,100,52800,0,1,0,0,0,0,95,1,650,12800,0,1,0,0,0,0,41,1,8960,2220,0,1,0,0,0,0,8,1,650,44550,0,1,0,0,0,0,36,1,650,26750,0,1,0,0,0,0,37,1,8795,26580,0,1,0,0,0,0,10,1,4200,30670,0,1,0,0,0,0,48,1,670,25320,0,1,0,0,0,0,59,1,650,57320,0,1,0,0,0,0,38,1,5907,5870,0,1,0,0,0,0,11,1,5323,10220,0,1,0,0,0,0,12,1,19320,30610,0,1,0,0,0,0,13,1,930,2500,0,1,0,0,0,0,1,1,3600,59800,0,1,0,0,0,0,55,1,892,13610,0,1,0,0,0,0,43,1,4500,5721,0,1,0,0,0,0,177,1,7310,22150,0,1,0,0,0,0,14,1,22500,14130,0,1,0,0,0,0,15,1,7860,980,0,1,0,0,0,0,16,1,1300,37360,0,1,0,0,0,0,47,1,530,12500,0,1,0,0,0,0,17,1,90,3500,0,1,0,0,0,0,34,1,3800,20660,0,1,0,0,0,0,53,1,1738,33330,0,1,0,0,0,0,18,1,1780,20360,0,1,0,0,0,0,54,1,450,3750,0,1,0,0,0,0,32,1,650,19350,0,1,0,0,0,0,33,1,10220,6710,0,1,0,0,0,0,19,1,1250,5560,0,1,0,0,0,0,45,1,1200,2990,0,1,0,0,0,0,62,1,1700,17690,0,1,0,0,0,0,50,1,450,5000,0,1,0,0,0,0,31,1,12020,36370,0,1,0,0,0,0,20,1,50,40000,0,1,0,0,0,0,-1,1,50,200000,0,1,0,0,0,0,-1,1,50,20000,0,1,0,0,0,0,-1,1,50,100000,0,1,0,0,0,0,-1,1,85,45000,0,1,0,0,0,0,-1,1,85,210000,0,1,0,0,0,0,-1,1,85,25000,0,1,0,0,0,0,-1,1,85,105000,0,1,0,0,0,0,-1,1,100,50000,0,1,0,0,0,0,-1,1,100,220000,0,1,0,0,0,0,-1,1,100,30000,0,1,0,0,0,0,-1,1,100,110000,0,1,0,0,0,0,-1,1,120,55000,0,1,0,0,0,0,-1,1,120,240000,0,1,0,0,0,0,-1,1,120,35000,0,1,0,0,0,0,-1,1,120,120000,0,1,0,0,0,0,-1,1,150,21000,0,1,0,0,0,0,-1,1,280,91700,0,1,0,0,0,0,-1,1,410,88200,0,1,0,0,0,0,-1,1,540,94050,0,1,0,0,0,0,-1,1,150,147000,0,1,0,0,0,0,-1,1,280,121000,0,1,0,0,0,0,-1,1,410,135000,0,1,0,0,0,0,-1,1,540,189000,0,1,0,0,0,0,-1,1,280,23500,0,1,0,0,0,0,-1,1,410,22650,0,1,0,0,0,0,-1,1,540,24800,0,1,0,0,0,0,-1,1,150,46200,0,1,0,0,0,0,-1,1,280,51300,0,1,0,0,0,0,-1,1,410,48700,0,1,0,0,0,0,-1,1,540,53910,0,1,0,0,0,0,-1,1,150,85100,0,1,0,0,0,0,-1,1,1820,14770,0,1,0,0,0,0,21,1,21450,45910,0,1,0,0,0,0,22,1,19840,42120,0,1,0,0,0,0,23,1,2400,40680,0,1,0,0,0,0,60,1,8000,12642,0,1,0,0,0,0,179,1,650,48500,0,1,0,0,0,0,42,1,1800,48400,0,1,0,0,0,0,61,1,1200,3560,0,1,0,0,0,0,97,1,8000,11461,0,1,0,0,0,0,176,1,5000,23820,0,1,0,0,0,0,24,1,650,37960,0,1,0,0,0,0,35,1,710,56160,0,1,0,0,0,0,57,1,850,39130,0,1,0,0,0,0,56,1,8000,7708,0,1,0,0,0,0,178,1,2329,1320,0,1,0,0,0,0,26,1,10500,10800,0,1,0,0,0,0,25,1,1200,3330,0,1,0,0,0,0,96,1,5400,33880,0,1,0,0,0,0,52,1,650,3000,0,1,0,0,0,0,39,1,4540,3910,0,1,0,0,0,0,27,1,2500,22960,0,1,0,0,0,0,98,1,18950,11910,0,1,0,0,0,0,28,1,5800,26230,0,1,0,0,0,0,29,1,1000,1000,0,1,0,0,0,0,0,1,1000,0,0,1,0,0,0,0,150,1,1150,0,0,1,0,0,0,0,154,1,1200,0,0,1,0,0,0,0,153,1,1300,0,0,1,0,0,0,0,155,1,950,0,0,1,0,0,0,0,156,1,1200,0,0,1,0,0,0,0,152,1,50,0,0,1,0,0,0,0,151,1,5897,20000,0,1,0,0,0,0,44,1,7130,5870,0,1,0,0,0,0,30,2,1200,62440,0,2,40,15,4,4,25,2,1000,685990,0,2,48,17,6,6,21,2,100,7810,0,1,0,0,13,5,1,2,1000,12480,0,2,0,2,4,4,14,2,200,28450,0,1,4,6,13,3,6,2,640,42480,0,2,16,9,6,6,18,2,600,0,0,2,0,0,4,4,29,2,200,26860,0,1,4,6,13,1,4,2,140,28630,0,1,20,10,1,1,31,2,140,27230,0,1,20,10,13,5,32,2,1712,10450,0,1,0,2,3,3,27,2,1478,11210,0,1,0,2,1,1,26,2,900,229060,0,3,72,23,9,9,22,2,1500,109000,0,3,80,25,4,4,42,2,1900,172120,0,6,100,30,4,4,51,2,3450,1564500,0,4,104,31,6,6,49,2,670,48080,0,2,28,12,6,6,20,2,1500,1012460,0,3,76,24,7,7,23,2,100,9010,0,1,0,0,13,3,3,2,500,140300,0,2,24,11,13,3,16,2,1340,16370,0,1,0,0,2,2,41,2,785,58190,0,3,76,24,9,1,9,2,140,29500,0,1,20,10,13,3,33,2,100,8190,0,1,0,0,13,1,0,2,100,0,0,1,0,0,13,3,30,2,200,24720,0,1,4,6,13,5,5,2,1300,2493050,0,3,115,40,2,2,24,2,1940,165500,0,3,92,28,9,1,10,2,1750,152350,0,5,100,30,4,4,50,2,2150,146990,0,3,84,26,9,3,11,2,1500,40000,0,1,0,0,0,0,43,2,1700,70000,0,2,0,0,0,0,44,2,1900,110000,0,3,0,0,0,0,45,2,2100,160000,0,3,0,0,0,0,46,2,100,0,0,1,0,0,13,1,28,2,1850,133880,0,2,60,20,2,9,12,2,900,975920,0,2,104,31,2,2,13,2,750,347750,0,4,104,31,5,5,48,2,350,107490,0,2,24,11,13,1,17,2,650,185430,0,2,40,15,7,7,52,2,320,23000,0,1,0,4,6,3,8,2,1200,281500,0,3,32,13,9,7,19,2,400,116830,0,2,24,11,5,5,7,2,520,216950,0,3,68,22,8,8,15,2,2410,519070,0,4,104,31,1,1,47,2,335,85610,0,2,16,9,13,5,2,3,140,6990,0,1,0,5,10,5,3,3,0,0,0,3,0,0,0,0,-1,3,225,22570,0,2,12,8,10,10,5,3,1392,18000,0,2,16,9,12,12,23,3,4100,110000,0,5,60,20,10,10,20,3,260,23760,0,2,60,20,10,5,16,3,590,41060,0,3,48,17,8,8,17,3,210,41490,0,3,84,26,10,10,15,3,720,33010,0,4,52,18,10,10,13,3,620,33240,0,4,28,12,3,3,10,3,500,29790,0,4,28,12,1,1,9,3,4100,110000,0,5,60,20,10,10,18,3,220,96270,0,6,96,29,10,10,12,3,205,19300,0,2,28,12,5,5,7,3,150,7080,0,1,0,5,10,1,2,3,4100,110000,0,5,60,20,10,10,19,3,220,27170,0,2,88,27,10,10,11,3,210,24290,0,2,12,8,10,5,6,3,220,19360,0,2,12,8,10,3,8,3,190,4680,0,1,0,2,10,3,1,3,180,4210,0,1,0,2,10,1,0,3,210,27230,0,2,72,23,10,10,14,3,165,7800,0,1,0,5,10,3,4,4,250,209380,0,3,0,0,11,11,4,4,30,127260,0,1,9,8,11,11,0,4,1750,924590,0,1,12,9,10,10,6,4,2195,311400,0,2,39,18,11,11,7,4,80,950900,0,1,75,30,11,11,3,4,50,316100,0,1,30,15,11,11,1,4,400,1007210,0,1,45,20,11,11,5,4,70,614140,0,1,45,20,11,11,2,5,4100,720560,0,3,84,26,1,1,6,5,2800,123980,0,2,12,8,6,5,4,5,2900,364200,0,3,52,18,1,1,16,5,3500,268700,0,2,32,13,6,3,18,5,1200,11690,0,1,0,1,6,3,2,5,1000,11180,0,1,0,1,6,1,0,5,20200,10000000,0,6,115,35,11,11,23,5,3400,314440,0,2,32,13,5,5,17,5,1700,69990,0,2,0,5,6,1,12,5,750,0,0,1,0,0,5,5,14,5,6200,475810,0,4,44,16,3,3,8,5,6500,577470,0,5,100,30,1,1,9,5,1200,0,0,1,0,0,6,3,15,5,2900,84000,5000000,1,0,0,0,0,-1,5,3740,0,50000000,2,0,0,0,0,-1,5,3980,1020800,30000000,3,0,0,0,0,-1,5,6340,627000,20000000,4,0,0,0,0,-1,5,750,11560,0,1,0,1,6,5,1,5,1430,50340,0,1,0,5,6,3,11,5,3000,137160,0,2,12,8,6,3,5,5,2400,153180,0,2,12,8,1,1,3,5,1000,0,0,1,0,0,6,1,13,5,920,59610,0,1,0,5,6,5,10,5,5000,444970,0,4,44,16,5,5,7,5,7500,995040,0,5,115,35,12,12,24,6,3600,1496680,0,4,100,30,11,11,19,6,3200,68810,0,3,32,13,7,3,5,6,3900,1207360,0,3,72,23,8,8,8,6,1600,29440,0,1,8,7,7,5,13,6,1000,14980,0,1,0,3,7,3,18,6,975,21300,0,1,8,7,7,3,14,6,3700,186970,0,4,64,21,7,5,11,6,1500,33810,0,2,20,10,7,1,3,6,1310,27030,0,1,8,7,7,1,12,6,1000,9670,0,1,0,2,7,1,0,6,2000,0,0,1,0,0,7,3,17,6,4500,463200,0,3,52,18,7,3,6,6,4000,173140,0,4,64,21,7,1,10,6,1000,0,0,1,0,0,1,1,15,6,800,10320,0,1,0,2,7,5,1,6,800,0,0,1,0,0,7,5,16,6,1800,51640,0,2,20,10,7,5,4,6,5500,229310,0,4,64,21,7,3,9,6,2000,13560,0,2,0,2,7,3,2,6,7200,840340,0,3,80,25,12,12,20,6,4100,424320,0,3,80,25,7,1,7,7,3900,227310,0,4,21,12,1,1,9,7,4250,263500,0,4,27,14,3,3,10,7,5200,428910,0,5,45,20,3,3,20,7,1250,54630,0,1,3,6,5,5,2,7,1600,75310,0,2,15,10,5,5,5,7,4750,786000,0,5,60,25,8,7,11,7,2500,121070,0,3,3,6,3,3,6,7,1810,121610,0,2,12,9,3,3,14,7,1000,9410,0,1,0,0,5,5,1,7,1160,16470,0,1,0,3,5,5,12,7,1000,0,0,1,0,0,5,5,16,7,1250,10000,0,1,0,0,1,1,0,7,1750,0,0,2,0,0,3,3,17,7,1450,125000,100000,1,0,0,0,0,-1,7,2130,425000,30000000,2,0,0,0,0,-1,7,2900,287000,50000000,3,0,0,0,0,-1,7,3750,650000,25000000,5,0,0,0,0,-1,7,2800,132200,0,4,6,7,3,3,19,7,1750,27030,0,2,0,0,3,3,3,7,2000,97280,0,2,9,8,1,1,4,7,4000,520140,0,4,36,17,8,7,8,7,1250,0,0,1,0,0,1,1,15,7,2000,175390,0,3,21,12,5,5,7,7,32500,1691010,0,7,78,31,11,11,25,7,1570,18970,0,2,0,3,1,1,13,7,2420,64980,0,3,3,4,1,1,18,7,24100,1210680,0,6,75,30,12,12,26,8,5000,1400700,0,3,33,16,11,11,24,8,1800,11570,0,1,0,0,3,3,2,8,2600,32590,0,2,0,4,3,3,15,8,3200,233840,0,2,6,7,3,3,5,8,6000,414470,0,4,18,11,3,3,12,8,7400,709180,0,5,54,23,3,3,23,8,5100,387280,0,3,12,9,6,5,8,8,1500,10330,0,1,0,0,6,1,0,8,1750,28840,0,1,0,4,6,1,3,8,1840,175520,0,1,6,7,6,1,13,8,1200,14880,0,1,0,0,6,5,1,8,3600,167230,0,2,6,7,6,5,4,8,5400,1680840,0,3,51,22,11,11,9,8,17250,5883040,0,5,78,31,11,11,25,8,1800,0,0,1,0,0,6,3,18,8,2000,265000,2000000,1,0,0,0,0,-1,8,4600,468000,7000000,2,0,0,0,0,-1,8,5230,5070000,50000000,3,0,0,0,0,-1,8,6700,2325000,40000000,4,0,0,0,0,-1,8,2000,39970,0,2,0,4,6,5,14,8,6500,497060,0,4,27,14,6,5,11,8,1500,0,0,1,0,0,6,1,16,8,4500,368230,0,3,15,10,1,1,7,8,4050,260500,0,2,18,11,1,1,6,8,7000,553520,0,4,33,16,1,1,10,8,1200,0,0,1,0,0,6,5,17,8,7500,2066360,0,5,63,26,12,12,26,9,280,36510,0,2,0,9,3,3,8,9,200,24600,0,1,0,5,1,1,12,9,360,48120,0,3,18,16,3,3,5,9,290,43860,0,3,18,16,5,5,4,9,180,8810,0,1,0,1,3,3,2,9,300,56530,0,3,18,16,1,1,3,9,340,71480,0,4,72,34,1,1,15,9,150,10170,0,1,0,1,1,1,0,9,354,73800,0,4,72,34,5,5,16,9,238,40420,0,2,0,9,1,1,6,9,180,21040,0,1,0,5,5,5,14,9,475,70790,0,5,72,34,12,12,19,9,320,150060,0,4,75,35,11,11,18,9,180,0,0,1,0,0,3,3,11,9,140,7430,0,1,0,1,5,5,1,9,150,0,0,1,0,0,1,1,9,9,366,91390,0,4,72,34,3,3,17,9,210,21810,0,1,0,5,3,3,13,9,175,21620,0,2,0,9,5,5,7,9,140,0,0,1,0,0,5,5,10,10,2500,21410,0,1,0,2,5,5,14,10,12500,25000000,0,4,28,12,12,12,61,10,54,9950,0,1,0,4,12,12,10,10,38,9950,0,1,0,4,12,12,9,10,43,9950,0,1,0,4,12,12,8,10,12000,10000000,0,4,28,12,12,12,65,10,24000,40000000,0,4,28,12,12,12,66,10,32000,90000000,0,4,28,12,12,12,67,10,117,73890,0,1,12,8,12,12,7,10,1870,125300,0,1,0,0,0,0,68,10,2175,0,0,1,0,21,4,4,63,10,1670,31260,0,1,0,0,11,11,52,10,500,5950,0,1,0,0,12,12,53,10,216,110430,0,1,28,12,3,3,15,10,950,8050,0,1,20,10,11,11,11,10,725,33100,0,1,0,12,4,4,13,10,1,0,0,1,0,0,0,0,-1,10,51,5500,0,1,0,1,3,6,5,10,15000,40000000,0,4,28,12,12,12,56,10,550,0,0,1,0,0,4,4,64,10,85,9030,0,1,0,2,1,10,0,10,50,5500,0,1,0,1,1,1,3,10,80,9030,0,1,0,2,5,10,1,10,25000,15000000,0,4,28,12,12,12,57,10,1162,85000,5000000,1,0,0,0,0,-1,10,1492,158000,25000000,1,0,0,0,0,-1,10,1812,320000,50000000,1,0,0,0,0,-1,10,2550,846000,150000000,1,0,0,0,0,-1,10,1090,75000,2500000,1,0,0,0,0,-1,10,1370,150600,6000000,1,0,0,0,0,-1,10,850,2800,500000,1,0,0,0,0,-1,10,745,7200,2000000,1,0,0,0,0,-1,10,575,24000,5000000,1,0,0,0,0,-1,10,100,8000,2500000,1,0,0,0,0,-1,10,100,16700,5000000,1,0,0,0,0,-1,10,150,40000,20000000,1,0,0,0,0,-1,10,150,106000,60000000,1,0,0,0,0,-1,10,720,4700,500000,1,0,0,0,0,-1,10,1560,9400,1000000,1,0,0,0,0,-1,10,2560,29000,2500000,1,0,0,0,0,-1,10,350,4500,2000000,1,0,0,0,0,-1,10,285,9200,10000000,1,0,0,0,0,-1,10,1220,43000,50000000,1,0,0,0,0,-1,10,550,5100,500000,1,0,0,0,0,-1,10,1100,10400,1000000,1,0,0,0,0,-1,10,2000,30200,5000000,1,0,0,0,0,-1,10,800,50000,5000000,1,0,0,0,0,-1,10,428,6100,1000000,1,0,0,0,0,-1,10,325,12800,2000000,1,0,0,0,0,-1,10,890,47000,7000000,1,0,0,0,0,-1,10,1200,64000,5000000,1,0,0,0,0,-1,10,650,5200,1000000,1,0,0,0,0,-1,10,780,11000,2500000,1,0,0,0,0,-1,10,1045,36500,5000000,1,0,0,0,0,-1,10,485,3200,500000,1,0,0,0,0,-1,10,980,6900,750000,1,0,0,0,0,-1,10,2300,21000,2000000,1,0,0,0,0,-1,10,685,3850,500000,1,0,0,0,0,-1,10,1400,14200,1000000,1,0,0,0,0,-1,10,1650,36000,2500000,1,0,0,0,0,-1,10,10000,25000000,0,4,28,12,12,12,62,10,17500,25000000,0,4,28,12,12,12,58,10,98,10800,0,1,0,3,11,11,12,10,90,9030,0,1,0,2,6,6,2,10,24000,75000000,0,4,28,12,12,12,59,10,15000,25000000,0,4,28,12,12,12,54,10,43,77940,0,1,8,7,12,12,6,10,52,5500,0,1,0,1,5,10,4,11,9500,135000,0,3,0,3,0,0,65,11,8500,0,0,1,0,0,0,0,60,11,36000,5500000,0,16,0,32,0,0,40,11,11000,524000,0,7,0,6,0,0,97,11,12400,420000,0,8,0,6,0,0,67,11,515000,9300000,0,735,0,38,0,0,104,11,18875,1680000,0,4,0,18,0,0,68,11,56000,4750000,0,500,0,26,0,0,62,11,14575,750000,0,5,0,9,0,0,93,11,50500,5950000,0,12,0,31,0,0,75,11,26100,2400000,0,10,0,34,0,0,71,11,9000,160000,0,1,0,3,0,0,95,11,44000,2800000,0,65,0,21,0,0,102,11,19950,1120000,0,12,0,12,0,0,69,11,42000,2500000,0,52,0,21,0,0,94,11,23000,2750000,0,24,0,26,0,0,31,11,17875,800000,0,6,0,9,0,0,33,11,38500,5800000,0,16,0,31,0,0,45,11,22550,1800000,0,5,0,18,0,0,38,11,41400,6500000,0,280,0,30,0,0,103,11,43875,7150000,0,265,0,30,0,0,43,11,53400,5650000,0,20,0,31,0,0,105,11,18000,1400000,0,1,0,15,0,0,66,11,21340,908000,0,15,0,12,0,0,39,11,21500,4000000,0,8,0,26,0,0,61,11,55000,3500000,0,500,0,26,0,0,32,11,9000,0,0,4,0,0,0,0,30,11,12500,490000,0,6,0,6,0,0,37,11,8000,145000,0,1,0,3,0,0,35,11,45000,3100000,0,62,0,21,0,0,42,11,17500,1200000,0,1,0,15,0,0,36,11,39000,7500000,0,12,0,32,0,0,70,11,16275,700000,0,3,0,9,0,0,63,11,495500,9100000,0,740,0,38,0,0,74,11,16100,1350000,0,1,0,15,0,0,96,11,46000,3180000,0,60,0,21,0,0,72,11,24500,2850000,0,11,0,34,0,0,101,11,8500,0,0,2,0,0,0,0,90,11,18875,1920000,0,6,0,18,0,0,98,11,53000,4000000,0,500,0,26,0,0,92,11,34000,6500000,0,10,0,32,0,0,100,11,45000,2250000,0,60,0,21,0,0,34,11,19560,3250000,0,16,0,26,0,0,91,11,26000,2500000,0,12,0,34,0,0,41,11,526000,9500000,0,750,0,38,0,0,44,11,44550,7400000,0,260,0,30,0,0,73,11,21800,1040000,0,14,0,12,0,0,99,11,48000,3250000,0,48,0,21,0,0,64);
  65.  
  66. var itemn0 = new Array ('','Aluminum','Ammunition','Antimony','Armor','Barium','Boron','Carbon','Cesium','Chemicals','Chromium','Cobalt','Common Metals','Composites','Conflux Biomass','Construction Materials','Copper','CPUs','Electronics','Erbium','Explosives','Fiber Optics','Fuel Cells','Gallium','Germanium','Gold','Grain','Gravitational Components','Helium','Ice','Indium','Iridium','Iron','Laser Components','Lithium','Lumber','Machined Parts','Magnesium','Magnetics','Manufactured Foods','Medical Supplies','Molybdenum','Nitrogen','Octavia Light','Optics','Organic Foods','Palladium','PC-DSS1','PC-DSS1 Perfect','PC-DSS1 Poor','PC-DSS1 Rare','PC-DSS2','PC-DSS2 Perfect','PC-DSS2 Poor','PC-DSS2 Rare','PC-DSS3','PC-DSS3 Perfect','PC-DSS3 Poor','PC-DSS3 Rare','PC-DSS4','PC-DSS4 Perfect','PC-DSS4 Poor','PC-DSS4 Rare','PC-UC1','PC-UC10','PC-UC11','PC-UC12','PC-UC13','PC-UC14','PC-UC15','PC-UC16','PC-UC2','PC-UC3','PC-UC4','PC-UC5','PC-UC6','PC-UC7','PC-UC8','PC-UC9','Phosphorous','Platinum','Plutonium','Power Converters','Precious Metals','Prosthetics','Proximity Fuses','Quanus Ice','Radioactive Metals','Radium','RAM','RF Transceivers','Rubber','Semifluxors','Silicon','Silver','Solrain Stout','Synthetics','Textiles','Titanium','Trap','Uranium','Vanadium','Water','X-0013-S','X-1901-L','X-3555-L','X-4533-L','X-7770-L','X-8821-L','X-9450-C','Xenon','Zinc','Banker','Barrak','Bender','Broker','Calefactor','Cobra','Cracker','Dealer','Deceptor','Distorter','Duster','Excavator','FeatherFire','Financier','Financier Mk.II','Flail','Hammer','Hitman','Illuminator','Injustice','InSight','Landlord','Lastlight','Liar','LightFire','Needle','Nova Mk.I','Peeler','Prospector','Rasp','RB-1','RB-2','RB-3','RB-4','S-W-28','Senator','Serializer','Shard','Shark','Spitfire','Straker','Thief','Thorn','V.A.P.O.R.','Vantage','Warper','Calypso','Cluker','Cutlass','Drop Tank','Glaive','Grave Robber','Hatchet','HellRazor','Kataka','Lance','Long Sword','Maul','Morning Star','Purgatory','Rapier','Sabre','ScrewDriver','Sirrus','Sledge','Smacker','Spear','Stiletto','Stinger','Antiflux','Ghost','Jammer','PWD100','Shade','Specter','Whistle','Wraith','Alpaa','Canopy','Cascade','Defier','Deflector','Flatiron','Guardian','Haven','Himelea','Kydango','Makk','Mortar','Omnus','PCS-1','PCS-2','PCS-3','PCS-4','Pod','Protector','Resistor','Rocky','S-S-13','Shelter','Shroud','Warden','Alembic','Carrier','Deepol','Germ','Jar','Jug','Keytso','Lifeline','Mana','Mantra','Outlet','Pint','Prayer','S-C-15','Seed','Sponge','Spore','Summoner','Tank','TRIC-1','Utterance','Adventa','Burn','Burn Mk.II','Cardoia','Caster','Dream','Guzzler','Impeler','Mitoria','Mitoria Plus','Mitoria-S','Money','Oteca','PCE-1','PCE-2','PCE-3','PCE-5','Propulser','Pusher','Respect','Rush','S-E-15','Shepherd','Tangent','Travant','Travant Plus','Vector','Antagonizer','Centerfuge Mk.I','Centerfuge Mk.II','Centerfuge Mk.III','Centerfuge Mk.IV','Centerfuge Mk.V','Collector','Contender','Contender XL','Contender XPR','Gatherer','Harvester','Instigator','Intimidator','Opal','PCP-1','PCP-2','PCP-3','PCP-4','Rake','Reaper','S-P-16','Sport','Sport LP','Sport Plus','Spud','TRIP-1','Beholder','Chime','Clarifier','Creeper','Cyclops','Doorbell','Echo','Hall Monitor','Ivy','Knocker','Liana','Night Watchman','Nubbler','Outlook','Root','S-R-9','Sentinel','Sentry','Vine','Wayfinder','Abattis','Ammunition Shop','BCU-OCT','BCU-QUAN','BCU-SOL','BuildKit -2','BuildKit -4','BuildKit -8','Bullseye','Burglar','DeepRadar','Displacer','Docking Computer','Duelist','FlashFire','FuelScoop','H.A.M. Sand','Hawkeye','Market Warehouse','ML Amplifier','NockNock','Optima','Oracle','Ore Silo','PCM-AB1','PCM-AB2','PCM-AB3','PCM-AB4','PCM-AE1','PCM-AE2','PCM-CB1','PCM-CB2','PCM-CB3','PCM-CM1','PCM-CM2','PCM-CM3','PCM-CM4','PCM-CS1','PCM-CS2','PCM-CS3','PCM-EB1','PCM-EB2','PCM-EB3','PCM-EE1','PCM-EE2','PCM-EE3','PCM-ESB','PCM-PB1','PCM-PB2','PCM-PB3','PCM-RCM','PCM-SB1','PCM-SB2','PCM-SB3','PCM-SE1','PCM-SE2','PCM-SE3','PCM-WE1','PCM-WE2','PCM-WE3','Refueling Tank','Repair Shop','Rotacol','SeaBear E','Ship Hangar','Storage Warehouse','VTC I','Witness','Albatross','Apteryx','Barracuda','Breeze','Buzzard','Chinook','Chiropteran','Condor','Cyclone','Dragon','Griffin','Gust','Harmattan','Hawk','Hurricane','Intensity','Interceptor','Intruder','Invader','Khamsin','Lodestar','Monsoon','Peregrine','Phaeton','Phoenix','Pioneer','Premia','Premia SC','Premia XL','Quarrier','Quicksilver','Raptor','Raven','Roc','Simoom','Simurgh','Squall','Storm','Tempest','Thunder','Tornado','Traveler','Typhoon','Vedette','Viceroy','Vulture','Whirlwind','Wyvern');
  67.  
  68. var itemn1 = new Array ('');
  69.  
  70. var nojossh = new Array (47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,159,202,203,204,205,248,249,250,251,277,278,279,280,325,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368);
  71.  
  72. var requires = new Array (2,1,13,1,15,1,18,1,117,1,122,1,134,1,141,1,152,1,161,1,165,1,167,1,169,1,176,1,177,1,179,1,180,1,189,1,191,1,192,1,193,1,194,1,197,1,199,1,200,1,201,1,207,1,208,1,209,1,210,1,213,1,221,1,222,1,223,1,226,1,227,1,233,1,234,1,263,1,264,1,265,1,266,1,267,1,276,1,289,1,290,1,293,1,294,1,295,1,296,1,298,1,300,1,302,1,304,1,305,1,306,1,327,1,369,1,374,1,0,2,40,3,91,3,182,3,185,3,186,3,188,3,0,4,20,5,91,5,233,5,13,6,153,6,187,6,189,6,190,6,191,6,192,6,193,6,194,6,196,6,197,6,198,6,199,6,200,6,201,6,206,6,207,6,208,6,209,6,210,6,211,6,212,6,213,6,9,7,13,7,84,7,96,7,112,7,113,7,115,7,118,7,121,7,125,7,147,7,158,7,162,7,163,7,164,7,170,7,171,7,174,7,175,7,27,8,323,8,14,9,20,9,40,9,91,9,96,9,132,9,215,9,216,9,217,9,218,9,219,9,220,9,221,9,222,9,223,9,224,9,225,9,226,9,227,9,228,9,229,9,230,9,231,9,232,9,233,9,234,9,323,9,4,10,36,10,127,10,133,10,149,10,22,11,38,11,113,11,124,11,127,11,236,11,237,11,241,11,242,11,247,11,253,11,261,11,4,13,131,13,139,13,141,13,150,13,154,13,155,13,156,13,161,13,190,13,191,13,192,13,195,13,196,13,198,13,206,13,211,13,212,13,213,13,214,13,217,13,220,13,228,13,229,13,230,13,262,13,268,13,269,13,270,13,271,13,274,13,275,13,281,13,282,13,283,13,284,13,285,13,286,13,288,13,319,13,324,13,327,13,369,13,374,13,162,14,169,14,173,14,181,14,310,15,314,15,315,15,316,15,327,15,332,15,369,15,370,15,373,15,374,15,2,16,18,16,36,16,82,16,89,16,124,16,138,16,148,16,151,16,236,16,237,16,238,16,239,16,241,16,242,16,243,16,244,16,245,16,247,16,252,16,253,16,257,16,272,16,273,16,287,16,292,16,297,16,299,16,303,16,307,16,308,16,163,17,165,17,170,17,171,17,174,17,175,17,176,17,179,17,182,17,185,17,186,17,188,17,262,17,268,17,274,17,275,17,281,17,282,17,288,17,317,17,318,17,319,17,320,17,321,17,322,17,371,17,375,17,82,18,90,18,99,18,113,18,124,18,127,18,129,18,132,18,151,18,153,18,158,18,160,18,162,18,164,18,166,18,167,18,168,18,169,18,172,18,173,18,180,18,181,18,183,18,187,18,195,18,214,18,263,18,264,18,265,18,266,18,267,18,269,18,270,18,271,18,272,18,273,18,276,18,283,18,284,18,285,18,286,18,287,18,288,18,309,18,310,18,311,18,312,18,313,18,314,18,315,18,316,18,326,18,329,18,330,18,331,18,369,18,370,18,372,18,373,18,376,18,44,19,262,19,274,19,275,19,2,20,99,20,158,20,160,20,163,20,164,20,165,20,166,20,167,20,168,20,170,20,171,20,172,20,174,20,175,20,176,20,177,20,178,20,179,20,180,20,120,21,121,21,134,21,189,21,190,21,191,21,192,21,193,21,196,21,198,21,199,21,201,21,206,21,207,21,208,21,211,21,212,21,328,21,158,22,160,22,162,22,163,22,164,22,165,22,166,22,167,22,168,22,169,22,170,22,171,22,172,22,173,22,174,22,175,22,176,22,177,22,178,22,179,22,180,22,240,22,255,22,272,22,273,22,287,22,314,22,315,22,316,22,22,23,27,23,33,23,17,24,40,24,89,24,90,24,289,24,290,24,291,24,291,24,292,24,293,24,294,24,295,24,296,24,297,24,298,24,299,24,300,24,301,24,302,24,303,24,304,24,305,24,306,24,307,24,308,24,18,25,89,25,138,25,305,25,306,25,0,26,39,26,43,26,86,26,95,26,125,27,126,27,138,27,140,27,153,27,181,27,187,27,214,27,216,27,235,27,236,27,237,27,238,27,239,27,240,27,241,27,242,27,243,27,244,27,245,27,246,27,247,27,252,27,253,27,254,27,255,27,256,27,257,27,258,27,259,27,260,27,261,27,301,27,318,27,319,27,0,28,33,28,161,28,262,28,268,28,274,28,275,28,281,28,282,28,319,28,14,29,17,30,27,30,40,31,126,31,140,31,184,31,189,31,196,31,200,31,211,31,213,31,13,32,15,32,36,32,38,32,99,32,112,32,113,32,115,32,118,32,121,32,125,32,147,32,158,32,162,32,163,32,164,32,170,32,171,32,174,32,175,32,195,32,215,32,216,32,218,32,219,32,224,32,225,32,231,32,232,32,235,32,240,32,246,32,254,32,255,32,256,32,259,32,260,32,112,33,114,33,115,33,116,33,118,33,119,33,120,33,121,33,122,33,123,33,124,33,125,33,126,33,130,33,131,33,134,33,135,33,136,33,137,33,140,33,146,33,148,33,149,33,150,33,151,33,154,33,155,33,157,33,184,33,262,33,268,33,274,33,275,33,281,33,282,33,307,33,319,33,328,33,9,34,138,34,148,34,184,34,215,34,216,34,217,34,218,34,219,34,220,34,221,34,222,34,223,34,224,34,225,34,226,34,227,34,228,34,229,34,230,34,231,34,232,34,234,34,0,35,15,36,27,36,33,36,38,36,44,36,82,36,85,36,114,36,116,36,117,36,119,36,128,36,130,36,133,36,135,36,137,36,139,36,141,36,147,36,149,36,152,36,156,36,157,36,189,36,193,36,194,36,197,36,199,36,200,36,201,36,207,36,208,36,209,36,210,36,238,36,257,36,258,36,262,36,263,36,264,36,265,36,266,36,267,36,268,36,269,36,270,36,271,36,272,36,273,36,274,36,275,36,276,36,281,36,282,36,283,36,284,36,285,36,286,36,287,36,288,36,310,36,319,36,324,36,328,36,332,36,370,36,373,36,20,37,22,37,96,37,122,37,215,37,216,37,217,37,218,37,219,37,220,37,221,37,222,37,223,37,224,37,225,37,226,37,227,37,228,37,229,37,230,37,231,37,232,37,234,37,90,38,112,38,113,38,115,38,118,38,122,38,123,38,125,38,126,38,127,38,129,38,140,38,142,38,143,38,144,38,145,38,182,38,185,38,186,38,187,38,188,38,189,38,190,38,191,38,192,38,193,38,194,38,195,38,196,38,197,38,198,38,199,38,200,38,201,38,206,38,207,38,208,38,209,38,210,38,211,38,212,38,213,38,214,38,216,38,262,38,268,38,272,38,273,38,274,38,275,38,281,38,282,38,287,38,309,38,318,38,319,38,320,38,324,38,371,38,373,38,0,39,0,40,84,40,13,41,113,41,147,41,151,41,164,41,170,41,174,41,183,41,184,41,195,41,9,42,20,42,33,42,96,42,118,42,136,42,146,42,0,43,114,44,116,44,119,44,120,44,121,44,124,44,130,44,131,44,132,44,134,44,135,44,136,44,137,44,138,44,146,44,149,44,150,44,151,44,153,44,154,44,155,44,157,44,317,44,321,44,322,44,326,44,330,44,375,44,376,44,0,45,39,45,18,46,90,46,290,46,294,46,295,46,145,66,309,71,142,73,143,77,144,78,9,79,22,79,138,79,148,79,323,79,125,80,126,80,140,80,297,80,299,80,300,80,307,80,169,81,258,81,263,81,264,81,265,81,266,81,267,81,276,81,142,82,143,82,144,82,145,82,184,82,214,82,262,82,263,82,264,82,265,82,266,82,267,82,268,82,269,82,270,82,271,82,272,82,273,82,274,82,275,82,276,82,281,82,282,82,283,82,284,82,285,82,286,82,287,82,288,82,309,82,318,82,324,82,328,82,0,84,160,85,0,86,40,88,138,88,148,88,17,89,165,89,170,89,174,89,179,89,182,89,185,89,186,89,188,89,317,89,318,89,320,89,321,89,322,89,326,89,329,89,330,89,331,89,371,89,372,89,375,89,376,89,85,90,132,90,181,90,183,90,289,90,290,90,291,90,292,90,293,90,294,90,295,90,296,90,297,90,298,90,299,90,300,90,301,90,302,90,303,90,304,90,305,90,306,90,308,90,311,90,312,90,313,90,318,90,320,90,329,90,331,90,372,90,22,91,82,91,215,91,217,91,218,91,219,91,220,91,221,91,222,91,223,91,224,91,225,91,226,91,227,91,228,91,229,91,230,91,231,91,232,91,234,91,17,93,18,93,21,93,22,93,27,93,44,93,89,93,96,93,272,93,273,93,287,93,17,94,90,94,289,94,290,94,291,94,292,94,293,94,294,94,295,94,296,94,297,94,298,94,299,94,300,94,302,94,303,94,304,94,305,94,306,94,307,94,308,94,0,95,4,96,15,96,18,96,21,96,81,96,91,96,233,96,263,96,264,96,265,96,266,96,267,96,269,96,270,96,271,96,276,96,283,96,284,96,285,96,286,96,288,96,0,97,40,97,13,98,15,98,120,98,123,98,127,98,128,98,129,98,133,98,139,98,156,98,160,98,166,98,168,98,172,98,173,98,178,98,233,98,235,98,236,98,237,98,240,98,241,98,242,98,246,98,247,98,252,98,253,98,254,98,255,98,256,98,259,98,260,98,261,98,268,98,281,98,282,98,301,98,310,98,319,98,332,98,370,98,2,100,81,100,138,100,148,100,162,100,173,100,269,100,270,100,271,100,283,100,284,100,285,100,286,100,288,100,4,101,36,101,123,101,127,101,129,101,156,101,0,102,9,102,39,102,43,102,84,102,86,102,95,102,272,102,273,102,287,102,33,110,124,110,148,110,151,110,2,111,9,111,36,111,292,111,297,111,299,111,303,111,307,111,308,111,396,112,406,112,412,112,397,123,389,125,406,125,412,125,396,126,397,126,384,132,387,132,402,132,413,132,416,132,420,132,422,140,382,181,396,181,397,181,410,181,421,181,422,181,391,186,399,186,407,186,411,186,416,186,424,186,386,187,394,187,398,187,382,188,410,188,421,188,392,189,394,189,398,189,418,189,403,190,404,190,395,191,418,191,377,194,378,194,388,194,403,194,405,194,414,194,382,195,410,195,421,195,379,196,380,196,383,196,385,196,389,196,390,196,391,196,393,196,400,196,401,196,406,196,407,196,408,196,409,196,411,196,412,196,415,196,417,196,419,196,423,196,424,196,377,197,380,197,381,197,403,197,404,197,405,197,384,199,386,199,396,199,416,199,422,199,402,200,378,211,387,211,388,211,399,211,413,211,414,211,420,211,397,213,379,214,386,214,402,214,392,216,389,217,406,217,412,217,377,218,388,218,390,218,414,218,377,219,378,219,380,219,381,219,385,219,388,219,399,219,400,219,403,219,404,219,405,219,407,219,409,219,410,219,411,219,423,219,384,220,408,220,417,220,394,223,400,223,402,223,403,223,405,223,418,223,421,223,392,225,401,225,419,225,422,225,380,228,382,228,391,228,409,228,416,228,383,230,385,230,387,230,393,230,395,230,396,230,397,230,398,230,413,230,415,230,420,230,378,232,383,232,384,232,424,232,407,235,399,236,414,238,403,239,384,240,398,240,401,240,402,240,408,240,416,240,424,240,377,241,378,241,379,241,381,241,389,241,390,241,391,241,392,241,400,241,406,241,411,241,412,241,417,241,418,241,419,241,423,241,383,242,385,242,393,242,395,242,409,242,415,242,414,246,380,254,388,254,404,254,405,254,386,255,387,255,394,255,396,255,397,255,399,255,413,255,420,255,422,255,410,258,388,259,403,259,405,259,403,260,382,261,421,261,377,265,378,265,380,265,381,265,388,265,404,265,405,265,401,267,408,267,377,269,414,269,403,270,403,271,391,274,395,274,407,274,411,274,418,274,419,274,424,274,382,275,410,275,421,275,388,281,405,281,414,281,399,282,383,284,385,284,389,284,390,284,391,284,393,284,395,284,400,284,406,284,407,284,409,284,411,284,412,284,415,284,418,284,419,284,423,284,424,284,380,285,388,285,404,285,379,286,384,286,387,286,392,286,394,286,396,286,397,286,398,286,399,286,402,286,413,286,416,286,417,286,420,286,422,286,386,288,377,290,378,290,380,290,381,290,383,290,385,290,388,290,393,290,395,290,400,290,403,290,404,290,405,290,409,290,415,290,423,290,389,294,398,294,406,294,412,294,377,296,378,296,388,296,403,296,405,296,414,296,379,298,380,298,386,298,390,298,391,298,392,298,394,298,399,298,401,298,404,298,407,298,408,298,411,298,417,298,418,298,419,298,424,298,387,300,413,300,420,300,382,301,396,301,397,301,410,301,421,301,422,301,384,305,402,305,416,305,384,320,387,320,402,320,413,320,416,320,420,320,379,322,380,322,382,322,383,322,384,322,385,322,386,322,387,322,388,322,390,322,391,322,392,322,393,322,394,322,395,322,398,322,399,322,400,322,401,322,402,322,407,322,408,322,409,322,410,322,411,322,413,322,415,322,416,322,417,322,418,322,419,322,420,322,421,322,422,322,424,322,379,323,380,323,382,323,383,323,384,323,385,323,386,323,387,323,388,323,389,323,390,323,391,323,392,323,393,323,394,323,395,323,396,323,397,323,398,323,399,323,400,323,401,323,402,323,403,323,404,323,406,323,407,323,408,323,409,323,410,323,411,323,412,323,413,323,415,323,416,323,417,323,418,323,419,323,420,323,421,323,422,323,423,323,424,323,384,326,387,326,399,326,410,326,412,326,422,326,424,326,397,330,400,330,402,330,406,330,407,330,418,330,420,330,421,330,384,371,387,371,389,371,396,371,397,371,402,371,406,371,412,371,413,371,416,371,420,371,422,371,380,376,382,376,389,376,391,376,396,376,411,376,413,376,414,376,416,376,423,376);
  73.  
  74. var shipper_0 = new Array (0,0,0,0);
  75.  
  76. var shipper_1 = new Array (17,1,1,0,17,2,1,0,17,3,1,0,17,4,1,0,17,5,1,0,17,6,1,0,17,7,1,0,17,9,1,0,17,11,1,0,17,37,1,0,17,41,1,0,17,47,1,0,17,55,1,0,22,1,1,0,22,2,1,0,22,3,1,0,22,4,1,0,22,5,1,0,22,6,1,0,22,7,1,0,22,9,1,0,22,11,1,0,22,37,1,0,22,41,1,0,22,47,1,0,22,55,1,0,4,1,2,1,4,2,2,1,4,3,2,1,4,6,2,1,4,7,2,1,4,8,2,1,4,9,2,1,4,10,2,1,4,11,2,1,4,12,2,1,4,13,2,1,4,14,2,1,4,15,2,1,4,32,2,1,4,33,2,1,4,34,2,1,5,1,2,1,5,2,2,1,5,3,2,1,5,6,2,1,5,7,2,1,5,8,2,1,5,9,2,1,5,10,2,1,5,11,2,1,5,12,2,1,5,13,2,1,5,14,2,1,5,15,2,1,5,32,2,1,5,33,2,1,5,34,2,1,21,1,3,0,21,4,3,0,21,7,3,0,21,8,3,0,21,9,3,0,21,11,3,0,22,1,3,0,22,4,3,0,22,7,3,0,22,8,3,0,22,9,3,0,22,11,3,0,4,1,4,1,4,2,4,1,4,3,4,1,4,5,4,1,4,7,4,1,4,8,4,1,4,9,4,1,4,10,4,1,4,11,4,1,4,12,4,1,4,13,4,1,4,14,4,1,4,15,4,1,4,32,4,1,4,33,4,1,4,34,4,1,6,1,4,1,6,2,4,1,6,3,4,1,6,5,4,1,6,7,4,1,6,8,4,1,6,9,4,1,6,10,4,1,6,11,4,1,6,12,4,1,6,13,4,1,6,14,4,1,6,15,4,1,6,32,4,1,6,33,4,1,6,34,4,1,17,1,5,0,17,5,5,0,17,6,5,0,17,8,5,0,17,9,5,0,22,1,5,0,22,5,5,0,22,6,5,0,22,8,5,0,22,9,5,0,18,1,6,0,18,2,6,0,18,3,6,0,18,4,6,0,18,5,6,0,18,6,6,0,18,7,6,0,18,8,6,0,18,9,6,0,18,11,6,0,22,1,6,0,22,2,6,0,22,3,6,0,22,4,6,0,22,5,6,0,22,6,6,0,22,7,6,0,22,8,6,0,22,9,6,0,22,11,6,0,18,2,7,0,18,3,7,0,18,4,7,0,18,5,7,0,18,6,7,0,18,7,7,0,18,8,7,0,18,9,7,0,18,10,7,0,18,42,7,0,21,2,7,0,21,3,7,0,21,4,7,0,21,5,7,0,21,6,7,0,21,7,7,0,21,8,7,0,21,9,7,0,21,10,7,0,21,42,7,0,22,2,7,0,22,3,7,0,22,4,7,0,22,5,7,0,22,6,7,0,22,7,7,0,22,8,7,0,22,9,7,0,22,10,7,0,22,42,7,0,19,7,8,0,19,9,8,0,19,11,8,0,22,7,8,0,22,9,8,0,22,11,8,0,56,7,8,0,56,9,8,0,56,11,8,0,3,1,9,0,3,2,9,0,3,4,9,0,3,6,9,0,3,7,9,0,3,8,9,0,3,10,9,0,3,11,9,0,3,38,9,0,3,44,9,0,5,1,9,0,5,2,9,0,5,4,9,0,5,6,9,0,5,7,9,0,5,8,9,0,5,10,9,0,5,11,9,0,5,38,9,0,5,44,9,0,9,1,9,0,9,2,9,0,9,4,9,0,9,6,9,0,9,7,9,0,9,8,9,0,9,10,9,0,9,11,9,0,9,38,9,0,9,44,9,0,17,1,10,0,17,2,10,0,17,3,10,0,17,4,10,0,17,5,10,0,17,6,10,0,17,7,10,0,22,1,10,0,22,2,10,0,22,3,10,0,22,4,10,0,22,5,10,0,22,6,10,0,22,7,10,0,19,1,11,0,19,3,11,0,19,4,11,0,19,5,11,0,19,6,11,0,19,7,11,0,19,8,11,0,19,9,11,0,19,10,11,0,19,43,11,0,22,1,11,0,22,3,11,0,22,4,11,0,22,5,11,0,22,6,11,0,22,7,11,0,22,8,11,0,22,9,11,0,22,10,11,0,22,43,11,0,2,1,13,0,2,4,13,0,2,5,13,0,2,6,13,0,2,7,13,0,2,8,13,0,2,10,13,0,2,11,13,0,2,64,13,0,3,1,13,0,3,4,13,0,3,5,13,0,3,6,13,0,3,7,13,0,3,8,13,0,3,10,13,0,3,11,13,0,3,64,13,0,9,1,13,0,9,4,13,0,9,5,13,0,9,6,13,0,9,7,13,0,9,8,13,0,9,10,13,0,9,11,13,0,9,64,13,0,25,11,14,0,25,35,14,0,25,42,14,0,25,47,14,0,25,54,14,0,38,11,14,0,38,35,14,0,38,42,14,0,38,47,14,0,38,54,14,0,17,1,16,0,17,3,16,0,17,4,16,0,17,5,16,0,17,6,16,0,17,7,16,0,17,8,16,0,17,9,16,0,17,10,16,0,17,11,16,0,17,43,16,0,17,45,16,0,20,1,16,0,20,3,16,0,20,4,16,0,20,5,16,0,20,6,16,0,20,7,16,0,20,8,16,0,20,9,16,0,20,10,16,0,20,11,16,0,20,43,16,0,20,45,16,0,22,1,16,0,22,3,16,0,22,4,16,0,22,5,16,0,22,6,16,0,22,7,16,0,22,8,16,0,22,9,16,0,22,10,16,0,22,11,16,0,22,43,16,0,22,45,16,0,11,1,17,0,11,2,17,0,11,3,17,0,11,4,17,0,11,5,17,0,11,6,17,0,11,7,17,0,11,8,17,0,11,9,17,0,11,10,17,0,11,36,17,0,11,39,17,0,11,40,17,0,11,61,17,0,1,2,18,0,1,3,18,0,1,4,18,0,1,5,18,0,1,6,18,0,1,7,18,0,1,8,18,0,1,9,18,0,1,10,18,0,1,35,18,0,1,37,18,0,1,42,18,0,1,44,18,0,1,47,18,0,1,54,18,0,1,60,18,0,11,2,18,0,11,3,18,0,11,4,18,0,11,5,18,0,11,6,18,0,11,7,18,0,11,8,18,0,11,9,18,0,11,10,18,0,11,35,18,0,11,37,18,0,11,42,18,0,11,44,18,0,11,47,18,0,11,54,18,0,11,60,18,0,21,5,19,0,21,7,19,0,21,8,19,0,21,11,19,0,22,5,19,0,22,7,19,0,22,8,19,0,22,11,19,0,5,1,20,0,5,2,20,0,5,3,20,0,5,4,20,0,5,7,20,0,5,8,20,0,5,9,20,0,5,10,20,0,6,1,20,0,6,2,20,0,6,3,20,0,6,4,20,0,6,7,20,0,6,8,20,0,6,9,20,0,6,10,20,0,2,1,21,0,2,3,21,0,2,4,21,0,2,5,21,0,2,6,21,0,2,7,21,0,2,9,21,0,8,1,21,0,8,3,21,0,8,4,21,0,8,5,21,0,8,6,21,0,8,7,21,0,8,9,21,0,11,1,21,0,11,3,21,0,11,4,21,0,11,5,21,0,11,6,21,0,11,7,21,0,11,9,21,0,57,1,21,0,57,3,21,0,57,4,21,0,57,5,21,0,57,6,21,0,57,7,21,0,57,9,21,0,8,1,22,0,8,2,22,0,8,3,22,0,8,4,22,0,8,5,22,0,8,6,22,0,8,7,22,0,8,10,22,0,8,42,22,0,8,47,22,0,8,54,22,0,9,1,22,0,9,2,22,0,9,3,22,0,9,4,22,0,9,5,22,0,9,6,22,0,9,7,22,0,9,10,22,0,9,42,22,0,9,47,22,0,9,54,22,0,17,7,23,0,17,8,23,0,17,9,23,0,17,46,23,0,22,7,23,0,22,8,23,0,22,9,23,0,22,46,23,0,21,1,24,0,21,2,24,0,21,3,24,0,21,4,24,0,21,5,24,0,21,6,24,0,21,7,24,0,21,8,24,0,21,9,24,0,21,11,24,0,21,41,24,0,21,45,24,0,21,55,24,0,22,1,24,0,22,2,24,0,22,3,24,0,22,4,24,0,22,5,24,0,22,6,24,0,22,7,24,0,22,8,24,0,22,9,24,0,22,11,24,0,22,41,24,0,22,45,24,0,22,55,24,0,20,1,25,0,20,4,25,0,20,5,25,0,20,6,25,0,20,10,25,0,20,11,25,0,20,55,25,0,22,1,25,0,22,4,25,0,22,5,25,0,22,6,25,0,22,10,25,0,22,11,25,0,22,55,25,0,1,3,26,1,1,4,26,0,1,5,26,1,1,9,26,1,1,10,26,1,1,11,26,1,1,12,26,1,1,13,26,1,1,14,26,1,1,15,26,1,1,32,26,1,1,33,26,1,1,34,26,1,1,48,26,0,2,3,26,1,2,4,26,0,2,5,26,1,2,9,26,1,2,10,26,1,2,11,26,1,2,12,26,1,2,13,26,1,2,14,26,1,2,15,26,1,2,32,26,1,2,33,26,1,2,34,26,1,2,48,26,0,6,3,26,1,6,4,26,0,6,5,26,1,6,9,26,1,6,10,26,1,6,11,26,1,6,12,26,1,6,13,26,1,6,14,26,1,6,15,26,1,6,32,26,1,6,33,26,1,6,34,26,1,6,48,26,0,7,3,26,1,7,4,26,0,7,5,26,1,7,9,26,1,7,10,26,1,7,11,26,1,7,12,26,1,7,13,26,1,7,14,26,1,7,15,26,1,7,32,26,1,7,33,26,1,7,34,26,1,7,48,26,0,8,3,26,1,8,4,26,0,8,5,26,1,8,9,26,1,8,10,26,1,8,11,26,1,8,12,26,1,8,13,26,1,8,14,26,1,8,15,26,1,8,32,26,1,8,33,26,1,8,34,26,1,8,48,26,0,7,1,27,0,7,2,27,0,7,3,27,0,7,4,27,0,7,5,27,0,7,6,27,0,7,8,27,0,7,10,27,0,7,11,27,0,7,35,27,0,7,36,27,0,7,43,27,0,9,1,27,0,9,2,27,0,9,3,27,0,9,4,27,0,9,5,27,0,9,6,27,0,9,8,27,0,9,10,27,0,9,11,27,0,9,35,27,0,9,36,27,0,9,43,27,0,58,1,27,0,58,2,27,0,58,3,27,0,58,4,27,0,58,5,27,0,58,6,27,0,58,8,27,0,58,10,27,0,58,11,27,0,58,35,27,0,58,36,27,0,58,43,27,0,19,1,28,1,19,2,28,1,19,3,28,1,19,4,28,1,19,5,28,1,19,6,28,1,19,7,28,0,19,8,28,0,19,9,28,0,19,10,28,1,19,11,28,0,19,12,28,1,19,13,28,1,19,14,28,1,19,15,28,1,19,32,28,1,19,33,28,1,19,34,28,1,19,46,28,0,26,1,28,1,26,2,28,1,26,3,28,1,26,4,28,1,26,5,28,1,26,6,28,1,26,7,28,0,26,8,28,0,26,9,28,0,26,10,28,1,26,11,28,0,26,12,28,1,26,13,28,1,26,14,28,1,26,15,28,1,26,32,28,1,26,33,28,1,26,34,28,1,26,46,28,0,18,38,29,0,21,7,30,0,21,9,30,0,21,11,30,0,22,7,30,0,22,9,30,0,22,11,30,0,20,1,31,0,20,2,31,0,20,3,31,0,20,4,31,0,20,7,31,0,20,8,31,0,20,9,31,0,20,11,31,0,22,1,31,0,22,2,31,0,22,3,31,0,22,4,31,0,22,7,31,0,22,8,31,0,22,9,31,0,22,11,31,0,17,1,32,0,17,2,32,0,17,3,32,0,17,4,32,0,17,5,32,0,17,6,32,0,17,7,32,0,17,8,32,0,17,9,32,0,17,10,32,0,17,11,32,0,17,42,32,0,19,1,32,0,19,2,32,0,19,3,32,0,19,4,32,0,19,5,32,0,19,6,32,0,19,7,32,0,19,8,32,0,19,9,32,0,19,10,32,0,19,11,32,0,19,42,32,0,20,1,32,0,20,2,32,0,20,3,32,0,20,4,32,0,20,5,32,0,20,6,32,0,20,7,32,0,20,8,32,0,20,9,32,0,20,10,32,0,20,11,32,0,20,42,32,0,21,1,32,0,21,2,32,0,21,3,32,0,21,4,32,0,21,5,32,0,21,6,32,0,21,7,32,0,21,8,32,0,21,9,32,0,21,10,32,0,21,11,32,0,21,42,32,0,22,1,32,0,22,2,32,0,22,3,32,0,22,4,32,0,22,5,32,0,22,6,32,0,22,7,32,0,22,8,32,0,22,9,32,0,22,10,32,0,22,11,32,0,22,42,32,0,7,1,33,0,7,2,33,0,7,3,33,0,7,4,33,0,7,5,33,0,7,6,33,0,7,9,33,0,7,10,33,0,7,11,33,0,8,1,33,0,8,2,33,0,8,3,33,0,8,4,33,0,8,5,33,0,8,6,33,0,8,9,33,0,8,10,33,0,8,11,33,0,46,1,33,0,46,2,33,0,46,3,33,0,46,4,33,0,46,5,33,0,46,6,33,0,46,9,33,0,46,10,33,0,46,11,33,0,59,1,33,0,59,2,33,0,59,3,33,0,59,4,33,0,59,5,33,0,59,6,33,0,59,9,33,0,59,10,33,0,59,11,33,0,18,1,34,0,18,2,34,0,18,3,34,0,18,4,34,0,18,5,34,0,18,6,34,0,18,7,34,0,18,8,34,0,18,9,34,0,18,10,34,0,18,11,34,0,22,1,34,0,22,2,34,0,22,3,34,0,22,4,34,0,22,5,34,0,22,6,34,0,22,7,34,0,22,8,34,0,22,9,34,0,22,10,34,0,22,11,34,0,4,1,35,1,4,7,35,1,4,8,35,1,4,9,35,1,6,1,35,1,6,7,35,1,6,8,35,1,6,9,35,1,1,2,36,0,1,3,36,0,1,6,36,0,1,8,36,0,1,9,36,0,1,10,36,0,1,11,36,0,1,37,36,0,1,46,36,0,1,63,36,0,1,64,36,0,4,2,36,0,4,3,36,0,4,6,36,0,4,8,36,0,4,9,36,0,4,10,36,0,4,11,36,0,4,37,36,0,4,46,36,0,4,63,36,0,4,64,36,0,5,2,36,0,5,3,36,0,5,6,36,0,5,8,36,0,5,9,36,0,5,10,36,0,5,11,36,0,5,37,36,0,5,46,36,0,5,63,36,0,5,64,36,0,7,2,36,0,7,3,36,0,7,6,36,0,7,8,36,0,7,9,36,0,7,10,36,0,7,11,36,0,7,37,36,0,7,46,36,0,7,63,36,0,7,64,36,0,18,1,37,0,18,2,37,0,18,3,37,0,18,4,37,0,18,5,37,0,18,6,37,0,18,7,37,0,18,8,37,0,18,9,37,0,18,10,37,0,22,1,37,0,22,2,37,0,22,3,37,0,22,4,37,0,22,5,37,0,22,6,37,0,22,7,37,0,22,8,37,0,22,9,37,0,22,10,37,0,26,1,37,0,26,2,37,0,26,3,37,0,26,4,37,0,26,5,37,0,26,6,37,0,26,7,37,0,26,8,37,0,26,9,37,0,26,10,37,0,3,1,38,0,3,2,38,0,3,4,38,0,3,5,38,0,3,6,38,0,3,7,38,0,3,8,38,0,3,10,38,0,3,11,38,0,3,36,38,0,3,49,38,0,3,50,38,0,3,51,38,0,3,52,38,0,3,53,38,0,3,60,38,0,9,1,38,0,9,2,38,0,9,4,38,0,9,5,38,0,9,6,38,0,9,7,38,0,9,8,38,0,9,10,38,0,9,11,38,0,9,36,38,0,9,49,38,0,9,50,38,0,9,51,38,0,9,52,38,0,9,53,38,0,9,60,38,0,1,3,39,1,1,5,39,1,1,9,39,1,1,10,39,1,1,11,39,1,1,12,39,1,1,13,39,1,1,14,39,1,1,15,39,1,1,32,39,1,1,33,39,1,1,34,39,1,2,3,39,1,2,5,39,1,2,9,39,1,2,10,39,1,2,11,39,1,2,12,39,1,2,13,39,1,2,14,39,1,2,15,39,1,2,32,39,1,2,33,39,1,2,34,39,1,4,3,39,1,4,5,39,1,4,9,39,1,4,10,39,1,4,11,39,1,4,12,39,1,4,13,39,1,4,14,39,1,4,15,39,1,4,32,39,1,4,33,39,1,4,34,39,1,6,3,39,1,6,5,39,1,6,9,39,1,6,10,39,1,6,11,39,1,6,12,39,1,6,13,39,1,6,14,39,1,6,15,39,1,6,32,39,1,6,33,39,1,6,34,39,1,7,3,39,1,7,5,39,1,7,9,39,1,7,10,39,1,7,11,39,1,7,12,39,1,7,13,39,1,7,14,39,1,7,15,39,1,7,32,39,1,7,33,39,1,7,34,39,1,8,3,39,1,8,5,39,1,8,9,39,1,8,10,39,1,8,11,39,1,8,12,39,1,8,13,39,1,8,14,39,1,8,15,39,1,8,32,39,1,8,33,39,1,8,34,39,1,1,2,40,1,1,3,40,1,1,5,40,1,1,6,40,1,1,8,40,1,1,9,40,1,1,10,40,0,1,11,40,1,1,12,40,1,1,13,40,1,1,14,40,1,1,15,40,1,1,32,40,1,1,33,40,1,1,34,40,1,4,2,40,1,4,3,40,1,4,5,40,1,4,6,40,1,4,8,40,1,4,9,40,1,4,10,40,0,4,11,40,1,4,12,40,1,4,13,40,1,4,14,40,1,4,15,40,1,4,32,40,1,4,33,40,1,4,34,40,1,7,2,40,1,7,3,40,1,7,5,40,1,7,6,40,1,7,8,40,1,7,9,40,1,7,10,40,0,7,11,40,1,7,12,40,1,7,13,40,1,7,14,40,1,7,15,40,1,7,32,40,1,7,33,40,1,7,34,40,1,17,2,41,0,17,3,41,0,17,6,41,0,17,7,41,0,17,8,41,0,17,9,41,0,17,10,41,0,17,11,41,0,22,2,41,0,22,3,41,0,22,6,41,0,22,7,41,0,22,8,41,0,22,9,41,0,22,10,41,0,22,11,41,0,18,3,42,0,18,4,42,0,18,5,42,0,18,6,42,0,18,7,42,0,18,8,42,0,18,9,42,0,18,46,42,0,48,1,43,1,48,2,43,1,48,3,43,1,48,4,43,1,48,5,43,1,48,6,43,1,48,7,43,1,48,8,43,1,48,9,43,1,48,12,43,1,48,13,43,1,48,14,43,1,48,15,43,1,48,32,43,1,48,33,43,1,48,34,43,1,5,1,44,0,5,2,44,0,5,3,44,0,5,4,44,0,5,6,44,0,5,7,44,0,5,9,44,0,5,10,44,0,5,39,44,0,5,40,44,0,5,44,44,0,5,61,44,0,8,1,44,0,8,2,44,0,8,3,44,0,8,4,44,0,8,6,44,0,8,7,44,0,8,9,44,0,8,10,44,0,8,39,44,0,8,40,44,0,8,44,44,0,8,61,44,0,1,2,45,0,1,3,45,1,1,5,45,1,1,6,45,0,1,8,45,0,1,9,45,1,1,10,45,1,1,11,45,1,1,12,45,1,1,13,45,1,1,14,45,1,1,15,45,1,1,32,45,1,1,33,45,1,1,34,45,1,4,2,45,0,4,3,45,1,4,5,45,1,4,6,45,0,4,8,45,0,4,9,45,1,4,10,45,1,4,11,45,1,4,12,45,1,4,13,45,1,4,14,45,1,4,15,45,1,4,32,45,1,4,33,45,1,4,34,45,1,7,2,45,0,7,3,45,1,7,5,45,1,7,6,45,0,7,8,45,0,7,9,45,1,7,10,45,1,7,11,45,1,7,12,45,1,7,13,45,1,7,14,45,1,7,15,45,1,7,32,45,1,7,33,45,1,7,34,45,1,20,1,46,0,20,2,46,0,20,3,46,0,20,5,46,0,20,9,46,0,20,11,46,0,20,41,46,0,22,1,46,0,22,2,46,0,22,3,46,0,22,5,46,0,22,9,46,0,22,11,46,0,22,41,46,0,23,52,66,0,23,53,66,0,23,60,71,0,23,49,73,0,23,50,77,0,23,51,78,0,21,3,79,0,21,5,79,0,21,8,79,0,21,9,79,0,21,10,79,0,21,11,79,0,22,3,79,0,22,5,79,0,22,8,79,0,22,9,79,0,22,10,79,0,22,11,79,0,26,3,79,0,26,5,79,0,26,8,79,0,26,9,79,0,26,10,79,0,26,11,79,0,20,1,80,0,20,7,80,0,20,8,80,0,20,9,80,0,20,45,80,0,22,1,80,0,22,7,80,0,22,8,80,0,22,9,80,0,22,45,80,0,19,4,81,0,19,5,81,0,19,6,81,0,19,11,81,0,19,37,81,0,19,47,81,0,62,4,81,0,62,5,81,0,62,6,81,0,62,11,81,0,62,37,81,0,62,47,81,0,3,1,82,0,3,2,82,0,3,4,82,0,3,5,82,0,3,6,82,0,3,7,82,0,3,8,82,0,3,36,82,0,3,37,82,0,3,49,82,0,3,50,82,0,3,51,82,0,3,52,82,0,3,53,82,0,3,60,82,0,9,1,82,0,9,2,82,0,9,4,82,0,9,5,82,0,9,6,82,0,9,7,82,0,9,8,82,0,9,36,82,0,9,37,82,0,9,49,82,0,9,50,82,0,9,51,82,0,9,52,82,0,9,53,82,0,9,60,82,0,11,1,82,0,11,2,82,0,11,4,82,0,11,5,82,0,11,6,82,0,11,7,82,0,11,8,82,0,11,36,82,0,11,37,82,0,11,49,82,0,11,50,82,0,11,51,82,0,11,52,82,0,11,53,82,0,11,60,82,0,10,1,84,1,10,2,84,1,10,3,84,1,10,4,84,1,10,5,84,1,10,6,84,1,10,7,84,1,10,8,84,1,10,9,84,1,10,12,84,1,10,13,84,1,10,14,84,1,10,15,84,1,10,32,84,1,10,33,84,1,10,34,84,1,63,1,85,0,63,2,85,0,63,3,85,0,19,1,88,0,19,4,88,0,19,7,88,0,19,10,88,0,22,1,88,0,22,4,88,0,22,7,88,0,22,10,88,0,11,1,89,0,11,2,89,0,11,3,89,0,11,4,89,0,11,5,89,0,11,6,89,0,11,7,89,0,11,8,89,0,11,9,89,0,11,10,89,0,11,36,89,0,11,39,89,0,11,40,89,0,11,61,89,0,2,1,90,0,2,3,90,0,2,4,90,0,2,6,90,0,2,7,90,0,2,8,90,0,2,10,90,0,2,11,90,0,2,35,90,0,2,36,90,0,2,41,90,0,2,44,90,0,2,45,90,0,2,55,90,0,2,63,90,0,5,1,90,0,5,3,90,0,5,4,90,0,5,6,90,0,5,7,90,0,5,8,90,0,5,10,90,0,5,11,90,0,5,35,90,0,5,36,90,0,5,41,90,0,5,44,90,0,5,45,90,0,5,55,90,0,5,63,90,0,9,1,90,0,9,3,90,0,9,4,90,0,9,6,90,0,9,7,90,0,9,8,90,0,9,10,90,0,9,11,90,0,9,35,90,0,9,36,90,0,9,41,90,0,9,44,90,0,9,45,90,0,9,55,90,0,9,63,90,0,8,1,91,0,8,2,91,0,8,3,91,0,8,4,91,0,8,5,91,0,8,6,91,0,8,7,91,0,8,11,91,0,9,1,91,0,9,2,91,0,9,3,91,0,9,4,91,0,9,5,91,0,9,6,91,0,9,7,91,0,9,11,91,0,17,1,93,0,17,2,93,0,17,4,93,0,17,5,93,0,17,7,93,0,17,8,93,0,17,9,93,0,17,11,93,0,19,1,93,0,19,2,93,0,19,4,93,0,19,5,93,0,19,7,93,0,19,8,93,0,19,9,93,0,19,11,93,0,20,1,93,0,20,2,93,0,20,4,93,0,20,5,93,0,20,7,93,0,20,8,93,0,20,9,93,0,20,11,93,0,21,1,93,0,21,2,93,0,21,4,93,0,21,5,93,0,21,7,93,0,21,8,93,0,21,9,93,0,21,11,93,0,22,1,93,0,22,2,93,0,22,4,93,0,22,5,93,0,22,7,93,0,22,8,93,0,22,9,93,0,22,11,93,0,20,1,94,0,20,2,94,0,20,3,94,0,20,4,94,0,20,5,94,0,20,6,94,0,20,7,94,0,20,8,94,0,20,9,94,0,20,11,94,0,20,41,94,0,20,45,94,0,20,55,94,0,22,1,94,0,22,2,94,0,22,3,94,0,22,4,94,0,22,5,94,0,22,6,94,0,22,7,94,0,22,8,94,0,22,9,94,0,22,11,94,0,22,41,94,0,22,45,94,0,22,55,94,0,4,1,96,0,4,2,96,0,4,3,96,0,4,5,96,0,4,6,96,0,4,7,96,0,4,8,96,0,4,11,96,0,4,37,96,0,4,62,96,0,9,1,96,0,9,2,96,0,9,3,96,0,9,5,96,0,9,6,96,0,9,7,96,0,9,8,96,0,9,11,96,0,9,37,96,0,9,62,96,0,10,1,97,0,10,2,97,1,10,3,97,1,10,4,97,0,10,5,97,1,10,6,97,1,10,7,97,0,10,8,97,1,10,9,97,1,10,11,97,1,10,12,97,1,10,13,97,1,10,14,97,1,10,15,97,1,10,32,97,1,10,33,97,1,10,34,97,1,17,1,98,0,17,2,98,0,17,3,98,0,17,4,98,0,17,5,98,0,17,6,98,0,17,7,98,0,17,8,98,0,17,9,98,0,17,10,98,0,17,11,98,0,17,43,98,0,17,54,98,0,17,64,98,0,22,1,98,0,22,2,98,0,22,3,98,0,22,4,98,0,22,5,98,0,22,6,98,0,22,7,98,0,22,8,98,0,22,9,98,0,22,10,98,0,22,11,98,0,22,43,98,0,22,54,98,0,22,64,98,0,19,1,100,0,19,2,100,0,19,3,100,0,19,4,100,0,19,5,100,0,19,7,100,0,19,10,100,0,19,42,100,0,19,54,100,0,19,62,100,0,22,1,100,0,22,2,100,0,22,3,100,0,22,4,100,0,22,5,100,0,22,7,100,0,22,10,100,0,22,42,100,0,22,54,100,0,22,62,100,0,20,1,101,0,20,2,101,0,20,3,101,0,20,4,101,0,20,5,101,0,20,6,101,0,20,7,101,0,20,8,101,0,20,64,101,0,22,1,101,0,22,2,101,0,22,3,101,0,22,4,101,0,22,5,101,0,22,6,101,0,22,7,101,0,22,8,101,0,22,64,101,0,18,1,102,0,18,2,102,0,18,3,102,0,18,4,102,0,18,5,102,0,18,6,102,0,18,7,102,0,18,8,102,0,18,9,102,0,18,10,102,0,18,11,102,1,18,12,102,1,18,13,102,1,18,14,102,1,18,15,102,1,18,32,102,1,18,33,102,1,18,34,102,1,18,48,102,0,26,1,102,0,26,2,102,0,26,3,102,0,26,4,102,0,26,5,102,0,26,6,102,0,26,7,102,0,26,8,102,0,26,9,102,0,26,10,102,0,26,11,102,1,26,12,102,1,26,13,102,1,26,14,102,1,26,15,102,1,26,32,102,1,26,33,102,1,26,34,102,1,26,48,102,0,18,4,110,0,18,5,110,0,18,6,110,0,18,7,110,0,18,8,110,0,18,10,110,0,18,46,110,0,26,4,110,0,26,5,110,0,26,6,110,0,26,7,110,0,26,8,110,0,26,10,110,0,26,46,110,0,17,1,111,0,17,3,111,0,17,4,111,0,17,5,111,0,17,7,111,0,17,8,111,0,17,9,111,0,17,45,111,0,22,1,111,0,22,3,111,0,22,4,111,0,22,5,111,0,22,7,111,0,22,8,111,0,22,9,111,0,22,45,111,0,7,1,112,0,7,4,112,0,8,1,112,0,8,4,112,0,9,1,112,0,9,4,112,0,7,1,125,0,7,4,125,0,9,2,126,0,10,1,132,0,10,2,132,0,10,3,132,0,10,4,132,0,10,5,132,0,10,6,132,0,10,7,132,0,10,8,132,0,10,9,132,0,44,1,132,0,44,2,132,0,44,3,132,0,44,4,132,0,44,5,132,0,44,6,132,0,44,7,132,0,44,8,132,0,44,9,132,0,7,6,140,0,8,6,140,0,9,6,140,0,11,1,181,0,11,2,181,0,11,4,181,0,11,6,181,0,11,7,181,0,11,9,181,0,35,1,181,0,35,2,181,0,35,4,181,0,35,6,181,0,35,7,181,0,35,9,181,0,11,3,186,0,11,4,186,0,11,5,186,0,11,6,186,0,11,7,186,0,11,8,186,0,11,9,186,0,11,3,187,0,11,5,187,0,11,8,187,0,11,1,188,0,11,4,188,0,11,7,188,0,1,8,189,0,2,8,189,0,3,8,189,0,7,1,190,0,7,2,190,0,7,3,190,0,8,1,190,0,8,2,190,0,8,3,190,0,9,1,190,0,9,2,190,0,9,3,190,0,1,4,194,0,1,5,194,0,1,6,194,0,1,7,194,0,1,8,194,0,1,9,194,0,2,4,194,0,2,5,194,0,2,6,194,0,2,7,194,0,2,8,194,0,2,9,194,0,3,4,194,0,3,5,194,0,3,6,194,0,3,7,194,0,3,8,194,0,3,9,194,0,11,1,195,0,11,4,195,0,11,7,195,0,7,1,196,0,7,2,196,0,7,3,196,0,7,4,196,0,7,5,196,0,7,6,196,0,8,1,196,0,8,2,196,0,8,3,196,0,8,4,196,0,8,5,196,0,8,6,196,0,9,1,196,0,9,2,196,0,9,3,196,0,9,4,196,0,9,5,196,0,9,6,196,0,1,4,197,0,1,5,197,0,1,6,197,0,1,7,197,0,1,8,197,0,1,9,197,0,2,4,197,0,2,5,197,0,2,6,197,0,2,7,197,0,2,8,197,0,2,9,197,0,3,4,197,0,3,5,197,0,3,6,197,0,3,7,197,0,3,8,197,0,3,9,197,0,4,7,199,0,4,8,199,0,4,9,199,0,5,7,199,0,5,8,199,0,5,9,199,0,6,7,199,0,6,8,199,0,6,9,199,0,8,1,211,0,8,2,211,0,8,4,211,0,8,5,211,0,8,6,211,0,8,7,211,0,9,1,211,0,9,2,211,0,9,4,211,0,9,5,211,0,9,6,211,0,9,7,211,0,1,2,213,0,7,2,213,0,11,1,214,0,11,2,214,0,11,3,214,0,11,5,214,0,10,1,216,0,10,2,216,0,10,3,216,0,7,1,217,0,7,4,217,0,8,1,217,0,8,4,217,0,9,1,217,0,9,4,217,0,4,7,218,0,4,8,218,0,4,9,218,0,5,7,218,0,5,8,218,0,5,9,218,0,6,7,218,0,6,8,218,0,6,9,218,0,4,1,219,0,4,2,219,0,4,3,219,0,4,7,219,0,4,8,219,0,4,9,219,0,5,1,219,0,5,2,219,0,5,3,219,0,5,7,219,0,5,8,219,0,5,9,219,0,6,1,219,0,6,2,219,0,6,3,219,0,6,7,219,0,6,8,219,0,6,9,219,0,7,4,220,0,7,5,220,0,7,6,220,0,8,4,220,0,8,5,220,0,8,6,220,0,9,4,220,0,9,5,220,0,9,6,220,0,5,1,225,0,5,2,225,0,5,3,225,0,5,4,225,0,5,7,225,0,5,8,225,0,5,9,225,0,6,1,225,0,6,2,225,0,6,3,225,0,6,4,225,0,6,7,225,0,6,8,225,0,6,9,225,0,7,4,228,0,7,5,228,0,7,6,228,0,8,4,228,0,8,5,228,0,8,6,228,0,9,4,228,0,9,5,228,0,9,6,228,0,7,1,230,0,7,2,230,0,7,3,230,0,7,4,230,0,7,6,230,0,8,1,230,0,8,2,230,0,8,3,230,0,8,4,230,0,8,6,230,0,9,1,230,0,9,2,230,0,9,3,230,0,9,4,230,0,9,6,230,0,7,1,239,0,7,2,239,0,7,3,239,0,8,1,239,0,8,2,239,0,8,3,239,0,9,1,239,0,9,2,239,0,9,3,239,0,10,1,240,0,10,2,240,0,10,3,240,0,10,4,240,0,10,5,240,0,10,6,240,0,10,7,240,0,10,8,240,0,10,9,240,0,4,1,241,0,4,2,241,0,4,3,241,0,4,7,241,0,4,8,241,0,4,9,241,0,5,1,241,0,5,2,241,0,5,3,241,0,5,7,241,0,5,8,241,0,5,9,241,0,6,1,241,0,6,2,241,0,6,3,241,0,6,7,241,0,6,8,241,0,6,9,241,0,43,1,241,0,43,2,241,0,43,3,241,0,43,7,241,0,43,8,241,0,43,9,241,0,4,1,242,0,4,2,242,0,4,3,242,0,4,7,242,0,4,8,242,0,4,9,242,0,5,1,242,0,5,2,242,0,5,3,242,0,5,7,242,0,5,8,242,0,5,9,242,0,6,1,242,0,6,2,242,0,6,3,242,0,6,7,242,0,6,8,242,0,6,9,242,0,1,7,246,0,1,8,246,0,1,9,246,0,2,7,246,0,2,8,246,0,2,9,246,0,3,7,246,0,3,8,246,0,3,9,246,0,1,7,254,0,1,8,254,0,1,9,254,0,2,7,254,0,2,8,254,0,2,9,254,0,3,7,254,0,3,8,254,0,3,9,254,0,10,1,255,0,10,2,255,0,10,3,255,0,10,4,255,0,10,5,255,0,10,6,255,0,10,7,255,0,10,9,255,0,11,4,258,0,1,7,259,0,1,8,259,0,1,9,259,0,2,7,259,0,2,8,259,0,2,9,259,0,3,7,259,0,3,8,259,0,3,9,259,0,4,1,265,0,4,2,265,0,4,3,265,0,4,7,265,0,4,8,265,0,4,9,265,0,5,1,265,0,5,2,265,0,5,3,265,0,5,7,265,0,5,8,265,0,5,9,265,0,6,1,265,0,6,2,265,0,6,3,265,0,6,7,265,0,6,8,265,0,6,9,265,0,4,5,267,0,4,6,267,0,37,5,267,0,37,6,267,0,1,4,269,0,1,5,269,0,1,6,269,0,1,7,269,0,1,8,269,0,1,9,269,0,2,4,269,0,2,5,269,0,2,6,269,0,2,7,269,0,2,8,269,0,2,9,269,0,3,4,269,0,3,5,269,0,3,6,269,0,3,7,269,0,3,8,269,0,3,9,269,0,11,1,274,0,11,2,274,0,11,3,274,0,11,4,274,0,11,5,274,0,11,6,274,0,11,7,274,0,11,8,274,0,11,9,274,0,11,1,275,0,11,4,275,0,11,7,275,0,7,1,281,0,7,2,281,0,7,3,281,0,8,1,281,0,8,2,281,0,8,3,281,0,9,1,281,0,9,2,281,0,9,3,281,0,7,5,282,0,8,5,282,0,9,5,282,0,1,4,284,0,1,5,284,0,1,6,284,0,1,7,284,0,1,8,284,0,1,9,284,0,2,4,284,0,2,5,284,0,2,6,284,0,2,7,284,0,2,8,284,0,2,9,284,0,3,4,284,0,3,5,284,0,3,6,284,0,3,7,284,0,3,8,284,0,3,9,284,0,1,7,285,0,1,8,285,0,1,9,285,0,2,7,285,0,2,8,285,0,2,9,285,0,3,7,285,0,3,8,285,0,3,9,285,0,2,1,286,0,2,4,286,0,2,5,286,0,2,6,286,0,2,7,286,0,2,8,286,0,2,9,286,0,3,1,286,0,3,4,286,0,3,5,286,0,3,6,286,0,3,7,286,0,3,8,286,0,3,9,286,0,3,5,288,0,4,5,288,0,7,5,288,0,1,4,290,0,1,5,290,0,1,6,290,0,1,7,290,0,1,8,290,0,1,9,290,0,2,4,290,0,2,5,290,0,2,6,290,0,2,7,290,0,2,8,290,0,2,9,290,0,3,4,290,0,3,5,290,0,3,6,290,0,3,7,290,0,3,8,290,0,3,9,290,0,1,4,294,0,1,7,294,0,1,8,294,0,2,4,294,0,2,7,294,0,2,8,294,0,3,4,294,0,3,7,294,0,3,8,294,0,1,4,296,0,1,5,296,0,1,6,296,0,1,7,296,0,1,8,296,0,1,9,296,0,2,4,296,0,2,5,296,0,2,6,296,0,2,7,296,0,2,8,296,0,2,9,296,0,3,4,296,0,3,5,296,0,3,6,296,0,3,7,296,0,3,8,296,0,3,9,296,0,1,4,298,0,1,5,298,0,1,6,298,0,1,7,298,0,1,8,298,0,1,9,298,0,2,4,298,0,2,5,298,0,2,6,298,0,2,7,298,0,2,8,298,0,2,9,298,0,3,4,298,0,3,5,298,0,3,6,298,0,3,7,298,0,3,8,298,0,3,9,298,0,1,2,300,0,1,4,300,0,1,6,300,0,7,2,300,0,7,4,300,0,7,6,300,0,11,1,301,0,11,2,301,0,11,4,301,0,11,6,301,0,11,7,301,0,11,9,301,0,4,1,305,0,4,2,305,0,4,3,305,0,4,7,305,0,4,8,305,0,4,9,305,0,5,1,305,0,5,2,305,0,5,3,305,0,5,7,305,0,5,8,305,0,5,9,305,0,6,1,305,0,6,2,305,0,6,3,305,0,6,7,305,0,6,8,305,0,6,9,305,0,55,1,305,0,55,2,305,0,55,3,305,0,55,7,305,0,55,8,305,0,55,9,305,0,11,1,320,0,11,2,320,0,11,3,320,0,11,4,320,0,11,5,320,0,11,6,320,0,11,7,320,0,11,8,320,0,11,9,320,0,5,1,322,0,5,2,322,0,5,3,322,0,5,4,322,0,5,6,322,0,5,7,322,0,5,8,322,0,5,9,322,0,40,1,322,0,40,2,322,0,40,3,322,0,40,4,322,0,40,6,322,0,40,7,322,0,40,8,322,0,40,9,322,0,61,1,322,0,61,2,322,0,61,3,322,0,61,4,322,0,61,6,322,0,61,7,322,0,61,8,322,0,61,9,322,0,11,1,323,0,11,2,323,0,11,3,323,0,11,4,323,0,11,5,323,0,11,6,323,0,11,7,323,0,11,8,323,0,11,9,323,0,2,1,330,0,3,1,330,0,11,1,371,0,11,2,371,0,11,3,371,0,11,4,371,0,11,5,371,0,11,6,371,0,11,7,371,0,11,8,371,0,11,9,371,0,8,7,376,0,8,9,376,0);
  77.  
  78. var station_0 = new Array ('');
  79.  
  80. var station_1 = new Array ('','Solrain Core','Solrain Wake','Solrain Cornea','Octavius Core','Octavius Great Pillars','Octavius Outpost','Quantar Core','Quantar TriPoint','Quantar Corridor','Hyperial','Amananth','Evenings End','GBS','Klatsches Hold','Lothars Landing','Classified','Common Asteroids','Ice Asteroids','Radioactive Asteroids','Precious Asteroids','Semifluxor Asteroids','Pure Asteroids','Wreckage','Newbies','Conflux','Scoop','','','','','','Solrain SDS','Octavius SDS','Quantar SDS','CP Antiflux Amananth','CP Burglar Hyperial','CP Centerfuge Mk.V Octavius Core','CP Conflux Biomass Dark','CP Docking Computer Ekoos Stop','CP Duelist Omni IV','CP Echo Solrain Core','CP Glaive Quantar Core','CP Guzzler Fields','CP Insight Hyperial','CP Ivy Quantar Core','CP Laser Components Solrain Wake','CP Maul Octavius Outpost','CP Octavia Light Octavius Outpost','CP RB-1 Solrain Core','CP RB-2 Solrain Core','CP RB-3 Solrain Core','CP RB-4 Quantar Core','CP RB-4 Solrain Wake','CP Sabre Solrain Wake','CP Sentinel Octavius Core','NA Cesium Amananth','NA Fiber Optics Quantar Tripoint','NA Grav Components Solrain Cornea','NA Laser Components Octavius Core','SF Abattis Quantar Corridor','SF Duelist Octavius Great Pillars','SF Plutonium Octavius Core','SF Proximity Fuses Solrain Cornea','SF Vantage Tictacs Hook');
  81.  
  82. var supply_0 = new Array (0,0,0);
  83.  
  84. var supply_1 = new Array (17,11,0,18,11,0,21,11,0,82,11,0,89,11,0,181,11,0,182,11,0,184,11,0,185,11,0,186,11,0,187,11,0,188,11,0,195,11,0,214,11,0,258,11,0,274,11,0,275,11,0,301,11,0,320,11,0,323,11,0,371,11,0,103,16,0,104,16,0,105,16,0,106,16,0,107,16,0,108,16,0,109,16,0,159,16,0,325,16,0,1,17,1,5,17,1,10,17,1,12,17,1,16,17,1,23,17,1,32,17,1,41,17,1,93,17,1,98,17,1,111,17,1,14,25,1,181,35,0,318,36,0,267,37,0,14,38,0,321,39,0,322,40,0,295,41,0,162,42,0,241,43,0,132,44,0,297,45,0,33,46,0,169,47,0,43,48,0,142,49,0,143,50,0,144,51,0,145,52,0,145,53,0,173,54,0,305,55,0,84,10,0,97,10,1,113,10,0,132,10,0,138,10,0,147,10,0,148,10,0,155,10,0,164,10,0,170,10,0,174,10,0,183,10,0,216,10,0,240,10,0,255,10,0,6,18,1,7,18,1,29,18,1,34,18,1,37,18,1,42,18,1,102,18,1,110,18,1,8,56,1,21,57,1,27,58,1,33,59,1,118,24,1,136,24,1,146,24,1,198,24,1,201,24,1,210,24,1,224,24,1,227,24,1,229,24,1,245,24,1,247,24,1,256,24,1,276,24,1,283,24,1,287,24,1,302,24,1,304,24,1,308,24,1,321,24,1,2,4,0,4,4,0,15,4,0,35,4,1,36,4,0,39,4,0,40,4,0,45,4,1,96,4,0,116,4,0,124,4,0,130,4,0,131,4,0,134,4,0,141,4,0,152,4,0,165,4,0,167,4,0,176,4,0,177,4,0,179,4,0,180,4,0,192,4,0,193,4,0,199,4,0,207,4,0,208,4,0,215,4,0,218,4,0,219,4,0,231,4,0,232,4,0,236,4,0,241,4,0,242,4,0,252,4,0,253,4,0,263,4,0,264,4,0,265,4,0,266,4,0,267,4,0,288,4,0,289,4,0,291,4,0,293,4,0,305,4,0,306,4,0,311,4,0,326,4,0,372,4,0,377,4,0,378,4,0,381,4,0,384,4,0,387,4,0,401,4,0,408,4,0,409,4,0,410,4,0,412,4,0,424,4,0,2,5,0,9,5,0,20,5,0,36,5,0,44,5,0,90,5,0,116,5,0,117,5,0,122,5,0,124,5,0,127,5,0,130,5,0,131,5,0,134,5,0,141,5,0,152,5,0,165,5,0,167,5,0,176,5,0,177,5,0,179,5,0,180,5,0,192,5,0,193,5,0,199,5,0,207,5,0,208,5,0,215,5,0,218,5,0,219,5,0,225,5,0,231,5,0,232,5,0,236,5,0,241,5,0,242,5,0,252,5,0,253,5,0,263,5,0,264,5,0,265,5,0,266,5,0,289,5,0,291,5,0,293,5,0,305,5,0,306,5,0,311,5,0,322,5,0,326,5,0,372,5,0,377,5,0,378,5,0,381,5,0,384,5,0,386,5,0,399,5,0,401,5,0,409,5,0,424,5,0,4,6,0,20,6,0,26,6,1,35,6,1,39,6,0,99,6,0,113,6,0,116,6,0,122,6,0,124,6,0,130,6,0,131,6,0,134,6,0,141,6,0,152,6,0,165,6,0,167,6,0,176,6,0,177,6,0,179,6,0,180,6,0,192,6,0,193,6,0,199,6,0,207,6,0,208,6,0,215,6,0,218,6,0,219,6,0,225,6,0,231,6,0,232,6,0,236,6,0,237,6,0,241,6,0,242,6,0,252,6,0,253,6,0,263,6,0,264,6,0,265,6,0,266,6,0,289,6,0,291,6,0,293,6,0,305,6,0,306,6,0,311,6,0,326,6,0,372,6,0,377,6,0,378,6,0,381,6,0,383,6,0,384,6,0,387,6,0,390,6,0,401,6,0,409,6,0,422,6,0,424,6,0,16,20,1,25,20,1,31,20,1,32,20,1,46,20,1,80,20,1,83,20,1,93,20,1,94,20,1,101,20,1,1,22,1,3,22,1,5,22,1,6,22,1,7,22,1,8,22,1,10,22,1,11,22,1,16,22,1,19,22,1,23,22,1,24,22,1,25,22,1,30,22,1,31,22,1,32,22,1,34,22,1,37,22,1,41,22,1,46,22,1,79,22,1,80,22,1,88,22,1,93,22,1,94,22,1,98,22,1,100,22,1,101,22,1,111,22,1,15,7,0,26,7,1,27,7,0,33,7,0,36,7,0,39,7,0,40,7,0,45,7,1,99,7,0,112,7,0,114,7,0,115,7,0,121,7,0,125,7,0,137,7,0,140,7,0,149,7,0,151,7,0,153,7,0,154,7,0,157,7,0,158,7,0,163,7,0,171,7,0,175,7,0,190,7,0,196,7,0,206,7,0,212,7,0,213,7,0,217,7,0,220,7,0,228,7,0,230,7,0,238,7,0,239,7,0,243,7,0,244,7,0,257,7,0,261,7,0,262,7,0,268,7,0,272,7,0,273,7,0,281,7,0,282,7,0,288,7,0,292,7,0,297,7,0,299,7,0,300,7,0,303,7,0,307,7,0,312,7,0,331,7,0,380,7,0,382,7,0,385,7,0,388,7,0,389,7,0,391,7,0,413,7,0,414,7,0,416,7,0,417,7,0,419,7,0,9,9,0,13,9,0,22,9,0,27,9,0,38,9,0,82,9,0,90,9,0,91,9,0,96,9,0,112,9,0,114,9,0,115,9,0,121,9,0,126,9,0,137,9,0,140,9,0,154,9,0,157,9,0,158,9,0,163,9,0,171,9,0,175,9,0,190,9,0,196,9,0,206,9,0,211,9,0,212,9,0,217,9,0,220,9,0,228,9,0,230,9,0,238,9,0,239,9,0,243,9,0,244,9,0,257,9,0,268,9,0,272,9,0,273,9,0,281,9,0,282,9,0,292,9,0,297,9,0,299,9,0,303,9,0,307,9,0,312,9,0,319,9,0,324,9,0,328,9,0,331,9,0,380,9,0,385,9,0,388,9,0,391,9,0,396,9,0,411,9,0,414,9,0,416,9,0,419,9,0,423,9,0,21,8,0,22,8,0,26,8,1,33,8,0,39,8,0,44,8,0,91,8,0,112,8,0,114,8,0,115,8,0,121,8,0,129,8,0,137,8,0,140,8,0,151,8,0,154,8,0,157,8,0,158,8,0,163,8,0,171,8,0,175,8,0,190,8,0,196,8,0,206,8,0,211,8,0,212,8,0,217,8,0,220,8,0,228,8,0,230,8,0,238,8,0,239,8,0,243,8,0,244,8,0,257,8,0,268,8,0,272,8,0,273,8,0,281,8,0,282,8,0,292,8,0,297,8,0,299,8,0,303,8,0,307,8,0,312,8,0,376,8,0,380,8,0,385,8,0,388,8,0,391,8,0,398,8,0,414,8,0,415,8,0,416,8,0,419,8,0,8,19,1,11,19,1,28,19,1,32,19,1,81,19,1,87,19,1,88,19,1,93,19,1,100,19,1,28,26,1,37,26,1,79,26,1,102,26,1,110,26,1,3,21,1,7,21,1,19,21,1,24,21,1,30,21,1,32,21,1,79,21,1,92,21,1,93,21,1,309,60,0,322,61,0,81,62,0,85,63,0,156,64,0,15,1,0,18,1,0,26,1,1,36,1,0,39,1,0,40,1,0,45,1,1,99,1,0,119,1,0,120,1,0,123,1,0,128,1,0,135,1,0,139,1,0,150,1,0,156,1,0,160,1,0,166,1,0,168,1,0,172,1,0,178,1,0,189,1,0,191,1,0,194,1,0,197,1,0,200,1,0,209,1,0,213,1,0,221,1,0,222,1,0,223,1,0,226,1,0,233,1,0,235,1,0,246,1,0,254,1,0,259,1,0,260,1,0,261,1,0,269,1,0,270,1,0,271,1,0,284,1,0,285,1,0,290,1,0,294,1,0,295,1,0,296,1,0,298,1,0,300,1,0,313,1,0,317,1,0,329,1,0,375,1,0,379,1,0,392,1,0,393,1,0,402,1,0,403,1,0,404,1,0,405,1,0,406,1,0,418,1,0,420,1,0,421,1,0,9,3,0,13,3,0,38,3,0,82,3,0,119,3,0,120,3,0,123,3,0,128,3,0,133,3,0,135,3,0,139,3,0,150,3,0,160,3,0,166,3,0,168,3,0,172,3,0,178,3,0,189,3,0,191,3,0,194,3,0,197,3,0,200,3,0,209,3,0,221,3,0,222,3,0,223,3,0,226,3,0,234,3,0,235,3,0,246,3,0,254,3,0,259,3,0,260,3,0,269,3,0,270,3,0,271,3,0,284,3,0,285,3,0,286,3,0,288,3,0,290,3,0,294,3,0,295,3,0,296,3,0,298,3,0,313,3,0,317,3,0,329,3,0,330,3,0,375,3,0,392,3,0,393,3,0,394,3,0,400,3,0,402,3,0,403,3,0,404,3,0,405,3,0,407,3,0,418,3,0,13,2,0,21,2,0,26,2,1,39,2,0,90,2,0,99,2,0,119,2,0,120,2,0,123,2,0,128,2,0,133,2,0,135,2,0,150,2,0,160,2,0,166,2,0,168,2,0,172,2,0,178,2,0,189,2,0,191,2,0,194,2,0,197,2,0,200,2,0,209,2,0,221,2,0,222,2,0,223,2,0,226,2,0,234,2,0,235,2,0,246,2,0,254,2,0,259,2,0,260,2,0,269,2,0,270,2,0,271,2,0,284,2,0,285,2,0,286,2,0,290,2,0,294,2,0,295,2,0,296,2,0,298,2,0,313,2,0,317,2,0,329,2,0,330,2,0,375,2,0,392,2,0,393,2,0,395,2,0,397,2,0,402,2,0,403,2,0,404,2,0,405,2,0,418,2,0,420,2,0,47,23,1,48,23,1,49,23,1,50,23,1,51,23,1,52,23,1,53,23,1,54,23,1,55,23,1,56,23,1,57,23,1,58,23,1,59,23,1,60,23,1,61,23,1,62,23,1,63,23,1,64,23,1,65,23,1,66,23,1,67,23,1,68,23,1,69,23,1,70,23,1,71,23,1,72,23,1,73,23,1,74,23,1,75,23,1,76,23,1,77,23,1,78,23,1,202,23,1,203,23,1,204,23,1,205,23,1,248,23,1,249,23,1,250,23,1,251,23,1,277,23,1,278,23,1,279,23,1,280,23,1,333,23,1,334,23,1,335,23,1,336,23,1,337,23,1,338,23,1,339,23,1,340,23,1,341,23,1,342,23,1,343,23,1,344,23,1,345,23,1,346,23,1,347,23,1,348,23,1,349,23,1,350,23,1,351,23,1,352,23,1,353,23,1,354,23,1,355,23,1,356,23,1,357,23,1,358,23,1,359,23,1,360,23,1,361,23,1,362,23,1,363,23,1,364,23,1,365,23,1,366,23,1,367,23,1,368,23,1);
  85.  
  86. var usage_0 = new Array (0,0,0);
  87.  
  88. var usage_1 = new Array (1,15,1,1,18,1,1,189,1,1,191,1,1,194,1,1,197,1,1,200,1,1,209,1,1,213,1,1,221,1,1,222,1,1,223,1,1,226,1,1,233,1,1,290,1,1,294,1,1,295,1,1,296,1,1,298,1,1,300,1,3,40,1,5,233,1,6,189,1,6,191,1,6,194,1,6,197,1,6,200,1,6,209,1,6,213,1,9,40,1,9,221,1,9,222,1,9,223,1,9,226,1,9,233,1,10,36,1,11,261,1,13,139,1,13,150,1,13,156,1,13,191,1,13,213,1,13,269,1,13,270,1,13,271,1,13,284,1,13,285,1,16,18,1,16,36,1,17,317,1,17,375,1,18,99,1,18,160,1,18,166,1,18,168,1,18,172,1,18,269,1,18,270,1,18,271,1,18,284,1,18,285,1,18,313,1,18,329,1,20,99,1,20,160,1,20,166,1,20,168,1,20,172,1,20,178,1,21,120,1,21,189,1,21,191,1,22,160,1,22,166,1,22,168,1,22,172,1,22,178,1,24,40,1,24,290,1,24,294,1,24,295,1,24,296,1,24,298,1,24,300,1,25,18,1,26,39,1,27,235,1,27,246,1,27,254,1,27,259,1,27,260,1,27,261,1,31,40,1,31,189,1,31,200,1,31,213,1,32,15,1,32,36,1,32,99,1,32,235,1,32,246,1,32,254,1,32,259,1,32,260,1,33,119,1,33,120,1,33,123,1,33,135,1,33,150,1,34,221,1,34,222,1,34,223,1,34,226,1,36,15,1,36,119,1,36,128,1,36,135,1,36,139,1,36,156,1,36,189,1,36,194,1,36,197,1,36,200,1,36,209,1,36,269,1,36,270,1,36,271,1,36,284,1,36,285,1,37,221,1,37,222,1,37,223,1,37,226,1,38,123,1,38,189,1,38,191,1,38,194,1,38,197,1,38,200,1,38,209,1,38,213,1,44,119,1,44,120,1,44,135,1,44,150,1,44,317,1,44,375,1,45,39,1,46,18,1,46,290,1,46,294,1,46,295,1,80,300,1,82,269,1,82,270,1,82,271,1,82,284,1,82,285,1,85,160,1,88,40,1,89,317,1,89,329,1,89,375,1,90,290,1,90,294,1,90,295,1,90,296,1,90,298,1,90,300,1,90,313,1,90,329,1,91,221,1,91,222,1,91,223,1,91,226,1,93,18,1,94,290,1,94,294,1,94,295,1,94,296,1,94,298,1,94,300,1,96,15,1,96,18,1,96,233,1,96,269,1,96,270,1,96,271,1,96,284,1,96,285,1,97,40,1,98,15,1,98,120,1,98,123,1,98,128,1,98,139,1,98,156,1,98,160,1,98,166,1,98,168,1,98,172,1,98,178,1,98,233,1,98,235,1,98,246,1,98,254,1,98,259,1,98,260,1,98,261,1,100,269,1,100,270,1,100,271,1,100,284,1,100,285,1,101,36,1,101,123,1,101,156,1,102,39,1,111,36,1,112,406,1,125,406,1,132,402,1,132,420,1,181,421,1,188,421,1,189,392,1,189,418,1,190,403,1,190,404,1,191,418,1,194,403,1,194,405,1,195,421,1,196,379,1,196,393,1,196,406,1,197,403,1,197,404,1,197,405,1,200,402,1,211,420,1,214,379,1,214,402,1,216,392,1,217,406,1,219,403,1,219,404,1,219,405,1,223,402,1,223,403,1,223,405,1,223,418,1,223,421,1,225,392,1,230,393,1,230,420,1,239,403,1,240,402,1,241,379,1,241,392,1,241,406,1,241,418,1,242,393,1,254,404,1,254,405,1,255,420,1,259,403,1,259,405,1,260,403,1,261,421,1,265,404,1,265,405,1,270,403,1,271,403,1,274,418,1,275,421,1,281,405,1,284,393,1,284,406,1,284,418,1,285,404,1,286,379,1,286,392,1,286,402,1,286,420,1,290,393,1,290,403,1,290,404,1,290,405,1,294,406,1,296,403,1,296,405,1,298,379,1,298,392,1,298,404,1,298,418,1,300,420,1,301,421,1,305,402,1,320,402,1,320,420,1,322,379,1,322,392,1,322,393,1,322,402,1,322,418,1,322,420,1,322,421,1,323,379,1,323,392,1,323,393,1,323,402,1,323,403,1,323,404,1,323,406,1,323,418,1,323,420,1,323,421,1,330,402,1,330,406,1,330,418,1,330,420,1,330,421,1,371,402,1,371,406,1,371,420,1,1,13,2,1,189,2,1,191,2,1,194,2,1,197,2,1,200,2,1,209,2,1,221,2,1,222,2,1,223,2,1,226,2,1,234,2,1,290,2,1,294,2,1,295,2,1,296,2,1,298,2,6,13,2,6,189,2,6,191,2,6,194,2,6,197,2,6,200,2,6,209,2,7,13,2,9,221,2,9,222,2,9,223,2,9,226,2,9,234,2,10,133,2,13,150,2,13,191,2,13,269,2,13,270,2,13,271,2,13,284,2,13,285,2,13,286,2,17,317,2,17,375,2,18,90,2,18,99,2,18,160,2,18,166,2,18,168,2,18,172,2,18,269,2,18,270,2,18,271,2,18,284,2,18,285,2,18,286,2,18,313,2,18,329,2,18,330,2,20,99,2,20,160,2,20,166,2,20,168,2,20,172,2,20,178,2,21,120,2,21,189,2,21,191,2,22,160,2,22,166,2,22,168,2,22,172,2,22,178,2,24,90,2,24,290,2,24,294,2,24,295,2,24,296,2,24,298,2,26,39,2,27,235,2,27,246,2,27,254,2,27,259,2,27,260,2,31,189,2,31,200,2,32,13,2,32,99,2,32,235,2,32,246,2,32,254,2,32,259,2,32,260,2,33,119,2,33,120,2,33,123,2,33,135,2,33,150,2,34,221,2,34,222,2,34,223,2,34,226,2,34,234,2,36,119,2,36,128,2,36,133,2,36,135,2,36,189,2,36,194,2,36,197,2,36,200,2,36,209,2,36,269,2,36,270,2,36,271,2,36,284,2,36,285,2,36,286,2,37,221,2,37,222,2,37,223,2,37,226,2,37,234,2,38,90,2,38,123,2,38,189,2,38,191,2,38,194,2,38,197,2,38,200,2,38,209,2,41,13,2,44,119,2,44,120,2,44,135,2,44,150,2,44,317,2,44,330,2,44,375,2,45,39,2,46,90,2,46,290,2,46,294,2,46,295,2,82,269,2,82,270,2,82,271,2,82,284,2,82,285,2,82,286,2,85,160,2,89,317,2,89,329,2,89,330,2,89,375,2,90,290,2,90,294,2,90,295,2,90,296,2,90,298,2,90,313,2,90,329,2,91,221,2,91,222,2,91,223,2,91,226,2,91,234,2,93,21,2,94,90,2,94,290,2,94,294,2,94,295,2,94,296,2,94,298,2,96,21,2,96,269,2,96,270,2,96,271,2,96,284,2,96,285,2,96,286,2,98,13,2,98,120,2,98,123,2,98,128,2,98,133,2,98,160,2,98,166,2,98,168,2,98,172,2,98,178,2,98,235,2,98,246,2,98,254,2,98,259,2,98,260,2,100,269,2,100,270,2,100,271,2,100,284,2,100,285,2,100,286,2,101,123,2,102,39,2,123,397,2,126,397,2,132,402,2,132,420,2,181,397,2,189,392,2,189,418,2,190,403,2,190,404,2,191,395,2,191,418,2,194,403,2,194,405,2,196,393,2,197,403,2,197,404,2,197,405,2,200,402,2,211,420,2,213,397,2,214,402,2,216,392,2,219,403,2,219,404,2,219,405,2,223,402,2,223,403,2,223,405,2,223,418,2,225,392,2,230,393,2,230,395,2,230,397,2,230,420,2,239,403,2,240,402,2,241,392,2,241,418,2,242,393,2,242,395,2,254,404,2,254,405,2,255,397,2,255,420,2,259,403,2,259,405,2,260,403,2,265,404,2,265,405,2,270,403,2,271,403,2,274,395,2,274,418,2,281,405,2,284,393,2,284,395,2,284,418,2,285,404,2,286,392,2,286,397,2,286,402,2,286,420,2,290,393,2,290,395,2,290,403,2,290,404,2,290,405,2,296,403,2,296,405,2,298,392,2,298,404,2,298,418,2,300,420,2,301,397,2,305,402,2,320,402,2,320,420,2,322,392,2,322,393,2,322,395,2,322,402,2,322,418,2,322,420,2,323,392,2,323,393,2,323,395,2,323,397,2,323,402,2,323,403,2,323,404,2,323,418,2,323,420,2,330,397,2,330,402,2,330,418,2,330,420,2,371,397,2,371,402,2,371,420,2,1,13,3,1,189,3,1,191,3,1,194,3,1,197,3,1,200,3,1,209,3,1,221,3,1,222,3,1,223,3,1,226,3,1,234,3,1,290,3,1,294,3,1,295,3,1,296,3,1,298,3,6,13,3,6,189,3,6,191,3,6,194,3,6,197,3,6,200,3,6,209,3,7,9,3,7,13,3,9,221,3,9,222,3,9,223,3,9,226,3,9,234,3,10,133,3,11,38,3,13,139,3,13,150,3,13,191,3,13,269,3,13,270,3,13,271,3,13,284,3,13,285,3,13,286,3,13,288,3,16,82,3,17,288,3,17,317,3,17,375,3,18,82,3,18,160,3,18,166,3,18,168,3,18,172,3,18,269,3,18,270,3,18,271,3,18,284,3,18,285,3,18,286,3,18,288,3,18,313,3,18,329,3,18,330,3,20,160,3,20,166,3,20,168,3,20,172,3,20,178,3,21,120,3,21,189,3,21,191,3,22,160,3,22,166,3,22,168,3,22,172,3,22,178,3,24,290,3,24,294,3,24,295,3,24,296,3,24,298,3,27,235,3,27,246,3,27,254,3,27,259,3,27,260,3,31,189,3,31,200,3,32,13,3,32,38,3,32,235,3,32,246,3,32,254,3,32,259,3,32,260,3,33,119,3,33,120,3,33,123,3,33,135,3,33,150,3,34,9,3,34,221,3,34,222,3,34,223,3,34,226,3,34,234,3,36,38,3,36,82,3,36,119,3,36,128,3,36,133,3,36,135,3,36,139,3,36,189,3,36,194,3,36,197,3,36,200,3,36,209,3,36,269,3,36,270,3,36,271,3,36,284,3,36,285,3,36,286,3,36,288,3,37,221,3,37,222,3,37,223,3,37,226,3,37,234,3,38,123,3,38,189,3,38,191,3,38,194,3,38,197,3,38,200,3,38,209,3,41,13,3,42,9,3,44,119,3,44,120,3,44,135,3,44,150,3,44,317,3,44,330,3,44,375,3,46,290,3,46,294,3,46,295,3,79,9,3,82,269,3,82,270,3,82,271,3,82,284,3,82,285,3,82,286,3,82,288,3,85,160,3,89,317,3,89,329,3,89,330,3,89,375,3,90,290,3,90,294,3,90,295,3,90,296,3,90,298,3,90,313,3,90,329,3,91,82,3,91,221,3,91,222,3,91,223,3,91,226,3,91,234,3,94,290,3,94,294,3,94,295,3,94,296,3,94,298,3,96,269,3,96,270,3,96,271,3,96,284,3,96,285,3,96,286,3,96,288,3,98,13,3,98,120,3,98,123,3,98,128,3,98,133,3,98,139,3,98,160,3,98,166,3,98,168,3,98,172,3,98,178,3,98,235,3,98,246,3,98,254,3,98,259,3,98,260,3,100,269,3,100,270,3,100,271,3,100,284,3,100,285,3,100,286,3,100,288,3,101,123,3,102,9,3,111,9,3,132,402,3,186,407,3,187,394,3,189,392,3,189,394,3,189,418,3,190,403,3,190,404,3,191,418,3,194,403,3,194,405,3,196,393,3,196,400,3,196,407,3,197,403,3,197,404,3,197,405,3,200,402,3,214,402,3,216,392,3,219,400,3,219,403,3,219,404,3,219,405,3,219,407,3,223,394,3,223,400,3,223,402,3,223,403,3,223,405,3,223,418,3,225,392,3,230,393,3,235,407,3,239,403,3,240,402,3,241,392,3,241,400,3,241,418,3,242,393,3,254,404,3,254,405,3,255,394,3,259,403,3,259,405,3,260,403,3,265,404,3,265,405,3,270,403,3,271,403,3,274,407,3,274,418,3,281,405,3,284,393,3,284,400,3,284,407,3,284,418,3,285,404,3,286,392,3,286,394,3,286,402,3,290,393,3,290,400,3,290,403,3,290,404,3,290,405,3,296,403,3,296,405,3,298,392,3,298,394,3,298,404,3,298,407,3,298,418,3,305,402,3,320,402,3,322,392,3,322,393,3,322,394,3,322,400,3,322,402,3,322,407,3,322,418,3,323,392,3,323,393,3,323,394,3,323,400,3,323,402,3,323,403,3,323,404,3,323,407,3,323,418,3,330,400,3,330,402,3,330,407,3,330,418,3,371,402,3,1,2,4,1,15,4,1,134,4,1,141,4,1,152,4,1,165,4,1,167,4,1,176,4,1,177,4,1,179,4,1,180,4,1,192,4,1,193,4,1,199,4,1,207,4,1,208,4,1,263,4,1,264,4,1,265,4,1,266,4,1,267,4,1,289,4,1,293,4,1,305,4,1,306,4,3,40,4,6,192,4,6,193,4,6,199,4,6,207,4,6,208,4,7,96,4,9,40,4,9,96,4,9,215,4,9,218,4,9,219,4,9,231,4,9,232,4,10,4,4,10,36,4,11,124,4,11,236,4,11,241,4,11,242,4,11,253,4,13,4,4,13,131,4,13,141,4,13,192,4,13,288,4,16,2,4,16,36,4,16,124,4,16,236,4,16,241,4,16,242,4,16,252,4,16,253,4,17,165,4,17,176,4,17,179,4,17,288,4,18,124,4,18,167,4,18,180,4,18,263,4,18,264,4,18,265,4,18,266,4,18,267,4,18,288,4,18,311,4,18,326,4,18,372,4,20,2,4,20,165,4,20,167,4,20,176,4,20,177,4,20,179,4,20,180,4,21,134,4,21,192,4,21,193,4,21,199,4,21,207,4,21,208,4,22,165,4,22,167,4,22,176,4,22,177,4,22,179,4,22,180,4,24,40,4,24,289,4,24,291,4,24,293,4,24,305,4,24,306,4,25,305,4,25,306,4,26,39,4,27,236,4,27,241,4,27,242,4,27,252,4,27,253,4,31,40,4,32,15,4,32,36,4,32,215,4,32,218,4,32,219,4,32,231,4,32,232,4,33,116,4,33,124,4,33,130,4,33,131,4,33,134,4,34,215,4,34,218,4,34,219,4,34,231,4,34,232,4,36,15,4,36,116,4,36,130,4,36,141,4,36,152,4,36,193,4,36,199,4,36,207,4,36,208,4,36,263,4,36,264,4,36,265,4,36,266,4,36,267,4,36,288,4,37,96,4,37,215,4,37,218,4,37,219,4,37,231,4,37,232,4,38,192,4,38,193,4,38,199,4,38,207,4,38,208,4,42,96,4,44,116,4,44,124,4,44,130,4,44,131,4,44,134,4,44,326,4,45,39,4,81,263,4,81,264,4,81,265,4,81,266,4,81,267,4,82,263,4,82,264,4,82,265,4,82,266,4,82,267,4,82,288,4,88,40,4,89,165,4,89,179,4,89,326,4,89,372,4,90,289,4,90,291,4,90,293,4,90,305,4,90,306,4,90,311,4,90,372,4,91,215,4,91,218,4,91,219,4,91,231,4,91,232,4,93,96,4,94,289,4,94,291,4,94,293,4,94,305,4,94,306,4,96,4,4,96,15,4,96,263,4,96,264,4,96,265,4,96,266,4,96,267,4,96,288,4,97,40,4,98,15,4,98,236,4,98,241,4,98,242,4,98,252,4,98,253,4,100,2,4,100,288,4,101,4,4,101,36,4,102,39,4,110,124,4,111,2,4,111,36,4,112,412,4,125,412,4,132,384,4,132,387,4,181,410,4,186,424,4,188,410,4,194,377,4,194,378,4,195,410,4,196,401,4,196,408,4,196,409,4,196,412,4,196,424,4,197,377,4,197,381,4,199,384,4,211,378,4,211,387,4,217,412,4,218,377,4,219,377,4,219,378,4,219,381,4,219,409,4,219,410,4,220,384,4,220,408,4,225,401,4,228,409,4,230,387,4,232,378,4,232,384,4,232,424,4,240,384,4,240,401,4,240,408,4,240,424,4,241,377,4,241,378,4,241,381,4,241,412,4,242,409,4,255,387,4,258,410,4,265,377,4,265,378,4,265,381,4,267,401,4,267,408,4,269,377,4,274,424,4,275,410,4,284,409,4,284,412,4,284,424,4,286,384,4,286,387,4,290,377,4,290,378,4,290,381,4,290,409,4,294,412,4,296,377,4,296,378,4,298,401,4,298,408,4,298,424,4,300,387,4,301,410,4,305,384,4,320,384,4,320,387,4,322,384,4,322,387,4,322,401,4,322,408,4,322,409,4,322,410,4,322,424,4,323,384,4,323,387,4,323,401,4,323,408,4,323,409,4,323,410,4,323,412,4,323,424,4,326,384,4,326,387,4,326,410,4,326,412,4,326,424,4,371,384,4,371,387,4,371,412,4,1,2,5,1,117,5,1,122,5,1,134,5,1,141,5,1,152,5,1,165,5,1,167,5,1,176,5,1,177,5,1,179,5,1,180,5,1,192,5,1,193,5,1,199,5,1,207,5,1,208,5,1,263,5,1,264,5,1,265,5,1,266,5,1,289,5,1,293,5,1,305,5,1,306,5,5,20,5,6,192,5,6,193,5,6,199,5,6,207,5,6,208,5,7,9,5,9,20,5,9,215,5,9,218,5,9,219,5,9,225,5,9,231,5,9,232,5,10,36,5,10,127,5,11,124,5,11,127,5,11,236,5,11,241,5,11,242,5,11,253,5,13,131,5,13,141,5,13,192,5,16,2,5,16,36,5,16,124,5,16,236,5,16,241,5,16,242,5,16,252,5,16,253,5,17,165,5,17,176,5,17,179,5,17,322,5,18,90,5,18,124,5,18,127,5,18,167,5,18,180,5,18,263,5,18,264,5,18,265,5,18,266,5,18,311,5,18,326,5,18,372,5,19,44,5,20,2,5,20,165,5,20,167,5,20,176,5,20,177,5,20,179,5,20,180,5,21,134,5,21,192,5,21,193,5,21,199,5,21,207,5,21,208,5,22,165,5,22,167,5,22,176,5,22,177,5,22,179,5,22,180,5,24,90,5,24,289,5,24,291,5,24,293,5,24,305,5,24,306,5,25,305,5,25,306,5,27,236,5,27,241,5,27,242,5,27,252,5,27,253,5,32,36,5,32,215,5,32,218,5,32,219,5,32,225,5,32,231,5,32,232,5,33,116,5,33,122,5,33,124,5,33,130,5,33,131,5,33,134,5,34,9,5,34,215,5,34,218,5,34,219,5,34,225,5,34,231,5,34,232,5,36,44,5,36,116,5,36,117,5,36,130,5,36,141,5,36,152,5,36,193,5,36,199,5,36,207,5,36,208,5,36,263,5,36,264,5,36,265,5,36,266,5,37,20,5,37,122,5,37,215,5,37,218,5,37,219,5,37,225,5,37,231,5,37,232,5,38,90,5,38,122,5,38,127,5,38,192,5,38,193,5,38,199,5,38,207,5,38,208,5,42,9,5,42,20,5,44,116,5,44,124,5,44,130,5,44,131,5,44,134,5,44,322,5,44,326,5,46,90,5,79,9,5,81,263,5,81,264,5,81,265,5,81,266,5,82,263,5,82,264,5,82,265,5,82,266,5,89,165,5,89,179,5,89,322,5,89,326,5,89,372,5,90,289,5,90,291,5,90,293,5,90,305,5,90,306,5,90,311,5,90,372,5,91,215,5,91,218,5,91,219,5,91,225,5,91,231,5,91,232,5,93,44,5,94,90,5,94,289,5,94,291,5,94,293,5,94,305,5,94,306,5,96,263,5,96,264,5,96,265,5,96,266,5,98,127,5,98,236,5,98,241,5,98,242,5,98,252,5,98,253,5,100,2,5,101,36,5,101,127,5,102,9,5,110,124,5,111,2,5,111,9,5,111,36,5,132,384,5,186,399,5,186,424,5,187,386,5,194,377,5,194,378,5,196,401,5,196,409,5,196,424,5,197,377,5,197,381,5,199,384,5,199,386,5,211,378,5,211,399,5,214,386,5,218,377,5,219,377,5,219,378,5,219,381,5,219,399,5,219,409,5,220,384,5,225,401,5,228,409,5,232,378,5,232,384,5,232,424,5,236,399,5,240,384,5,240,401,5,240,424,5,241,377,5,241,378,5,241,381,5,242,409,5,255,386,5,255,399,5,265,377,5,265,378,5,265,381,5,267,401,5,269,377,5,274,424,5,282,399,5,284,409,5,284,424,5,286,384,5,286,399,5,288,386,5,290,377,5,290,378,5,290,381,5,290,409,5,296,377,5,296,378,5,298,386,5,298,399,5,298,401,5,298,424,5,305,384,5,320,384,5,322,384,5,322,386,5,322,399,5,322,401,5,322,409,5,322,424,5,323,384,5,323,386,5,323,399,5,323,401,5,323,409,5,323,424,5,326,384,5,326,399,5,326,424,5,371,384,5,1,122,6,1,134,6,1,141,6,1,152,6,1,165,6,1,167,6,1,176,6,1,177,6,1,179,6,1,180,6,1,192,6,1,193,6,1,199,6,1,207,6,1,208,6,1,263,6,1,264,6,1,265,6,1,266,6,1,289,6,1,293,6,1,305,6,1,306,6,5,20,6,6,192,6,6,193,6,6,199,6,6,207,6,6,208,6,7,113,6,9,20,6,9,215,6,9,218,6,9,219,6,9,225,6,9,231,6,9,232,6,10,4,6,11,113,6,11,124,6,11,236,6,11,237,6,11,241,6,11,242,6,11,253,6,13,4,6,13,131,6,13,141,6,13,192,6,16,124,6,16,236,6,16,237,6,16,241,6,16,242,6,16,252,6,16,253,6,17,165,6,17,176,6,17,179,6,18,99,6,18,113,6,18,124,6,18,167,6,18,180,6,18,263,6,18,264,6,18,265,6,18,266,6,18,311,6,18,326,6,18,372,6,20,99,6,20,165,6,20,167,6,20,176,6,20,177,6,20,179,6,20,180,6,21,134,6,21,192,6,21,193,6,21,199,6,21,207,6,21,208,6,22,165,6,22,167,6,22,176,6,22,177,6,22,179,6,22,180,6,24,289,6,24,291,6,24,293,6,24,305,6,24,306,6,25,305,6,25,306,6,26,39,6,27,236,6,27,237,6,27,241,6,27,242,6,27,252,6,27,253,6,32,99,6,32,113,6,32,215,6,32,218,6,32,219,6,32,225,6,32,231,6,32,232,6,33,116,6,33,122,6,33,124,6,33,130,6,33,131,6,33,134,6,34,215,6,34,218,6,34,219,6,34,225,6,34,231,6,34,232,6,36,116,6,36,130,6,36,141,6,36,152,6,36,193,6,36,199,6,36,207,6,36,208,6,36,263,6,36,264,6,36,265,6,36,266,6,37,20,6,37,122,6,37,215,6,37,218,6,37,219,6,37,225,6,37,231,6,37,232,6,38,113,6,38,122,6,38,192,6,38,193,6,38,199,6,38,207,6,38,208,6,41,113,6,42,20,6,44,116,6,44,124,6,44,130,6,44,131,6,44,134,6,44,326,6,45,39,6,81,263,6,81,264,6,81,265,6,81,266,6,82,263,6,82,264,6,82,265,6,82,266,6,89,165,6,89,179,6,89,326,6,89,372,6,90,289,6,90,291,6,90,293,6,90,305,6,90,306,6,90,311,6,90,372,6,91,215,6,91,218,6,91,219,6,91,225,6,91,231,6,91,232,6,94,289,6,94,291,6,94,293,6,94,305,6,94,306,6,96,4,6,96,263,6,96,264,6,96,265,6,96,266,6,98,236,6,98,237,6,98,241,6,98,242,6,98,252,6,98,253,6,101,4,6,102,39,6,110,124,6,132,384,6,132,387,6,140,422,6,181,422,6,186,424,6,194,377,6,194,378,6,196,383,6,196,390,6,196,401,6,196,409,6,196,424,6,197,377,6,197,381,6,199,384,6,199,422,6,211,378,6,211,387,6,218,377,6,218,390,6,219,377,6,219,378,6,219,381,6,219,409,6,220,384,6,225,401,6,225,422,6,228,409,6,230,383,6,230,387,6,232,378,6,232,383,6,232,384,6,232,424,6,240,384,6,240,401,6,240,424,6,241,377,6,241,378,6,241,381,6,241,390,6,242,383,6,242,409,6,255,387,6,255,422,6,265,377,6,265,378,6,265,381,6,267,401,6,269,377,6,274,424,6,284,383,6,284,390,6,284,409,6,284,424,6,286,384,6,286,387,6,286,422,6,290,377,6,290,378,6,290,381,6,290,383,6,290,409,6,296,377,6,296,378,6,298,390,6,298,401,6,298,424,6,300,387,6,301,422,6,305,384,6,320,384,6,320,387,6,322,383,6,322,384,6,322,387,6,322,390,6,322,401,6,322,409,6,322,422,6,322,424,6,323,383,6,323,384,6,323,387,6,323,390,6,323,401,6,323,409,6,323,422,6,323,424,6,326,384,6,326,387,6,326,422,6,326,424,6,371,384,6,371,387,6,371,422,6,1,15,7,1,213,7,1,300,7,3,40,7,6,153,7,6,190,7,6,196,7,6,206,7,6,212,7,6,213,7,7,112,7,7,115,7,7,121,7,7,125,7,7,158,7,7,163,7,7,171,7,7,175,7,8,27,7,9,40,7,9,217,7,9,220,7,9,228,7,9,230,7,10,36,7,10,149,7,11,261,7,13,154,7,13,190,7,13,196,7,13,206,7,13,212,7,13,213,7,13,217,7,13,220,7,13,228,7,13,230,7,13,262,7,13,268,7,13,281,7,13,282,7,13,288,7,16,36,7,16,151,7,16,238,7,16,239,7,16,243,7,16,244,7,16,257,7,16,272,7,16,273,7,16,292,7,16,297,7,16,299,7,16,303,7,16,307,7,17,163,7,17,171,7,17,175,7,17,262,7,17,268,7,17,281,7,17,282,7,17,288,7,18,99,7,18,151,7,18,153,7,18,158,7,18,272,7,18,273,7,18,288,7,18,312,7,18,331,7,19,262,7,20,99,7,20,158,7,20,163,7,20,171,7,20,175,7,21,121,7,21,190,7,21,196,7,21,206,7,21,212,7,22,158,7,22,163,7,22,171,7,22,175,7,22,272,7,22,273,7,23,27,7,23,33,7,24,40,7,24,292,7,24,297,7,24,299,7,24,300,7,24,303,7,24,307,7,26,39,7,27,125,7,27,140,7,27,153,7,27,238,7,27,239,7,27,243,7,27,244,7,27,257,7,27,261,7,28,33,7,28,262,7,28,268,7,28,281,7,28,282,7,30,27,7,31,40,7,31,140,7,31,196,7,31,213,7,32,15,7,32,36,7,32,99,7,32,112,7,32,115,7,32,121,7,32,125,7,32,158,7,32,163,7,32,171,7,32,175,7,33,112,7,33,114,7,33,115,7,33,121,7,33,125,7,33,137,7,33,140,7,33,149,7,33,151,7,33,154,7,33,157,7,33,262,7,33,268,7,33,281,7,33,282,7,33,307,7,34,217,7,34,220,7,34,228,7,34,230,7,36,15,7,36,27,7,36,33,7,36,114,7,36,137,7,36,149,7,36,157,7,36,238,7,36,257,7,36,262,7,36,268,7,36,272,7,36,273,7,36,281,7,36,282,7,36,288,7,37,217,7,37,220,7,37,228,7,37,230,7,38,112,7,38,115,7,38,125,7,38,140,7,38,190,7,38,196,7,38,206,7,38,212,7,38,213,7,38,262,7,38,268,7,38,272,7,38,273,7,38,281,7,38,282,7,41,151,7,42,33,7,44,114,7,44,121,7,44,137,7,44,149,7,44,151,7,44,153,7,44,154,7,44,157,7,45,39,7,80,125,7,80,140,7,80,297,7,80,299,7,80,300,7,80,307,7,82,262,7,82,268,7,82,272,7,82,273,7,82,281,7,82,282,7,82,288,7,88,40,7,89,331,7,90,292,7,90,297,7,90,299,7,90,300,7,90,303,7,90,312,7,90,331,7,91,217,7,91,220,7,91,228,7,91,230,7,93,27,7,93,272,7,93,273,7,94,292,7,94,297,7,94,299,7,94,300,7,94,303,7,94,307,7,96,15,7,96,288,7,97,40,7,98,15,7,98,261,7,98,268,7,98,281,7,98,282,7,100,288,7,101,36,7,102,39,7,102,272,7,102,273,7,110,33,7,110,151,7,111,36,7,111,292,7,111,297,7,111,299,7,111,303,7,111,307,7,125,389,7,132,413,7,132,416,7,181,382,7,186,391,7,186,416,7,188,382,7,194,388,7,194,414,7,195,382,7,196,380,7,196,385,7,196,389,7,196,391,7,196,417,7,196,419,7,197,380,7,199,416,7,211,388,7,211,413,7,211,414,7,217,389,7,218,388,7,218,414,7,219,380,7,219,385,7,219,388,7,220,417,7,225,419,7,228,380,7,228,382,7,228,391,7,228,416,7,230,385,7,230,413,7,238,414,7,240,416,7,241,389,7,241,391,7,241,417,7,241,419,7,242,385,7,246,414,7,254,380,7,254,388,7,255,413,7,259,388,7,261,382,7,265,380,7,265,388,7,269,414,7,274,391,7,274,419,7,275,382,7,281,388,7,281,414,7,284,385,7,284,389,7,284,391,7,284,419,7,285,380,7,285,388,7,286,413,7,286,416,7,286,417,7,290,380,7,290,385,7,290,388,7,294,389,7,296,388,7,296,414,7,298,380,7,298,391,7,298,417,7,298,419,7,300,413,7,301,382,7,305,416,7,320,413,7,320,416,7,322,380,7,322,382,7,322,385,7,322,388,7,322,391,7,322,413,7,322,416,7,322,417,7,322,419,7,323,380,7,323,382,7,323,385,7,323,388,7,323,389,7,323,391,7,323,413,7,323,416,7,323,417,7,323,419,7,371,389,7,371,413,7,371,416,7,376,380,7,376,382,7,376,389,7,376,391,7,376,413,7,376,414,7,376,416,7,3,91,8,5,91,8,6,190,8,6,196,8,6,206,8,6,211,8,6,212,8,7,112,8,7,115,8,7,121,8,7,158,8,7,163,8,7,171,8,7,175,8,9,91,8,9,217,8,9,220,8,9,228,8,9,230,8,11,22,8,13,154,8,13,190,8,13,196,8,13,206,8,13,211,8,13,212,8,13,217,8,13,220,8,13,228,8,13,230,8,13,268,8,13,281,8,13,282,8,16,151,8,16,238,8,16,239,8,16,243,8,16,244,8,16,257,8,16,272,8,16,273,8,16,292,8,16,297,8,16,299,8,16,303,8,16,307,8,17,163,8,17,171,8,17,175,8,17,268,8,17,281,8,17,282,8,18,129,8,18,151,8,18,158,8,18,272,8,18,273,8,18,312,8,18,376,8,19,44,8,20,158,8,20,163,8,20,171,8,20,175,8,21,121,8,21,190,8,21,196,8,21,206,8,21,211,8,21,212,8,22,158,8,22,163,8,22,171,8,22,175,8,22,272,8,22,273,8,23,22,8,23,33,8,24,292,8,24,297,8,24,299,8,24,303,8,24,307,8,26,39,8,27,140,8,27,238,8,27,239,8,27,243,8,27,244,8,27,257,8,28,33,8,28,268,8,28,281,8,28,282,8,31,140,8,31,196,8,31,211,8,32,112,8,32,115,8,32,121,8,32,158,8,32,163,8,32,171,8,32,175,8,33,112,8,33,114,8,33,115,8,33,121,8,33,137,8,33,140,8,33,151,8,33,154,8,33,157,8,33,268,8,33,281,8,33,282,8,33,307,8,34,217,8,34,220,8,34,228,8,34,230,8,36,33,8,36,44,8,36,114,8,36,137,8,36,157,8,36,238,8,36,257,8,36,268,8,36,272,8,36,273,8,36,281,8,36,282,8,37,22,8,37,217,8,37,220,8,37,228,8,37,230,8,38,112,8,38,115,8,38,129,8,38,140,8,38,190,8,38,196,8,38,206,8,38,211,8,38,212,8,38,268,8,38,272,8,38,273,8,38,281,8,38,282,8,41,151,8,42,33,8,44,114,8,44,121,8,44,137,8,44,151,8,44,154,8,44,157,8,44,376,8,45,39,8,79,22,8,80,140,8,80,297,8,80,299,8,80,307,8,82,268,8,82,272,8,82,273,8,82,281,8,82,282,8,89,376,8,90,292,8,90,297,8,90,299,8,90,303,8,90,312,8,91,22,8,91,217,8,91,220,8,91,228,8,91,230,8,93,21,8,93,22,8,93,44,8,93,272,8,93,273,8,94,292,8,94,297,8,94,299,8,94,303,8,94,307,8,96,21,8,96,91,8,98,129,8,98,268,8,98,281,8,98,282,8,101,129,8,102,39,8,102,272,8,102,273,8,110,33,8,110,151,8,111,292,8,111,297,8,111,299,8,111,303,8,111,307,8,132,416,8,186,391,8,186,416,8,187,398,8,189,398,8,194,388,8,194,414,8,196,380,8,196,385,8,196,391,8,196,415,8,196,419,8,197,380,8,199,416,8,211,388,8,211,414,8,218,388,8,218,414,8,219,380,8,219,385,8,219,388,8,225,419,8,228,380,8,228,391,8,228,416,8,230,385,8,230,398,8,230,415,8,238,414,8,240,398,8,240,416,8,241,391,8,241,419,8,242,385,8,242,415,8,246,414,8,254,380,8,254,388,8,259,388,8,265,380,8,265,388,8,269,414,8,274,391,8,274,419,8,281,388,8,281,414,8,284,385,8,284,391,8,284,415,8,284,419,8,285,380,8,285,388,8,286,398,8,286,416,8,290,380,8,290,385,8,290,388,8,290,415,8,294,398,8,296,388,8,296,414,8,298,380,8,298,391,8,298,419,8,305,416,8,320,416,8,322,380,8,322,385,8,322,388,8,322,391,8,322,398,8,322,415,8,322,416,8,322,419,8,323,380,8,323,385,8,323,388,8,323,391,8,323,398,8,323,415,8,323,416,8,323,419,8,371,416,8,376,380,8,376,391,8,376,414,8,376,416,8,1,13,9,3,91,9,5,91,9,6,13,9,6,190,9,6,196,9,6,206,9,6,211,9,6,212,9,7,9,9,7,13,9,7,96,9,7,112,9,7,115,9,7,121,9,7,158,9,7,163,9,7,171,9,7,175,9,8,27,9,9,91,9,9,96,9,9,217,9,9,220,9,9,228,9,9,230,9,11,22,9,11,38,9,13,154,9,13,190,9,13,196,9,13,206,9,13,211,9,13,212,9,13,217,9,13,220,9,13,228,9,13,230,9,13,268,9,13,281,9,13,282,9,13,319,9,13,324,9,16,82,9,16,238,9,16,239,9,16,243,9,16,244,9,16,257,9,16,272,9,16,273,9,16,292,9,16,297,9,16,299,9,16,303,9,16,307,9,17,163,9,17,171,9,17,175,9,17,268,9,17,281,9,17,282,9,17,319,9,18,82,9,18,90,9,18,158,9,18,272,9,18,273,9,18,312,9,18,331,9,20,158,9,20,163,9,20,171,9,20,175,9,21,121,9,21,190,9,21,196,9,21,206,9,21,211,9,21,212,9,21,328,9,22,158,9,22,163,9,22,171,9,22,175,9,22,272,9,22,273,9,23,22,9,23,27,9,24,90,9,24,292,9,24,297,9,24,299,9,24,303,9,24,307,9,27,126,9,27,140,9,27,238,9,27,239,9,27,243,9,27,244,9,27,257,9,27,319,9,28,268,9,28,281,9,28,282,9,28,319,9,30,27,9,31,126,9,31,140,9,31,196,9,31,211,9,32,13,9,32,38,9,32,112,9,32,115,9,32,121,9,32,158,9,32,163,9,32,171,9,32,175,9,33,112,9,33,114,9,33,115,9,33,121,9,33,126,9,33,137,9,33,140,9,33,154,9,33,157,9,33,268,9,33,281,9,33,282,9,33,307,9,33,319,9,33,328,9,34,9,9,34,217,9,34,220,9,34,228,9,34,230,9,36,27,9,36,38,9,36,82,9,36,114,9,36,137,9,36,157,9,36,238,9,36,257,9,36,268,9,36,272,9,36,273,9,36,281,9,36,282,9,36,319,9,36,324,9,36,328,9,37,22,9,37,96,9,37,217,9,37,220,9,37,228,9,37,230,9,38,90,9,38,112,9,38,115,9,38,126,9,38,140,9,38,190,9,38,196,9,38,206,9,38,211,9,38,212,9,38,268,9,38,272,9,38,273,9,38,281,9,38,282,9,38,319,9,38,324,9,41,13,9,42,9,9,42,96,9,44,114,9,44,121,9,44,137,9,44,154,9,44,157,9,46,90,9,79,9,9,79,22,9,80,126,9,80,140,9,80,297,9,80,299,9,80,307,9,82,268,9,82,272,9,82,273,9,82,281,9,82,282,9,82,324,9,82,328,9,89,331,9,90,292,9,90,297,9,90,299,9,90,303,9,90,312,9,90,331,9,91,22,9,91,82,9,91,217,9,91,220,9,91,228,9,91,230,9,93,22,9,93,27,9,93,96,9,93,272,9,93,273,9,94,90,9,94,292,9,94,297,9,94,299,9,94,303,9,94,307,9,96,91,9,98,13,9,98,268,9,98,281,9,98,282,9,98,319,9,102,9,9,102,272,9,102,273,9,111,9,9,111,292,9,111,297,9,111,299,9,111,303,9,111,307,9,112,396,9,126,396,9,132,416,9,181,396,9,186,391,9,186,411,9,186,416,9,194,388,9,194,414,9,196,380,9,196,385,9,196,391,9,196,411,9,196,419,9,196,423,9,197,380,9,199,396,9,199,416,9,211,388,9,211,414,9,218,388,9,218,414,9,219,380,9,219,385,9,219,388,9,219,411,9,219,423,9,225,419,9,228,380,9,228,391,9,228,416,9,230,385,9,230,396,9,238,414,9,240,416,9,241,391,9,241,411,9,241,419,9,241,423,9,242,385,9,246,414,9,254,380,9,254,388,9,255,396,9,259,388,9,265,380,9,265,388,9,269,414,9,274,391,9,274,411,9,274,419,9,281,388,9,281,414,9,284,385,9,284,391,9,284,411,9,284,419,9,284,423,9,285,380,9,285,388,9,286,396,9,286,416,9,290,380,9,290,385,9,290,388,9,290,423,9,296,388,9,296,414,9,298,380,9,298,391,9,298,411,9,298,419,9,301,396,9,305,416,9,320,416,9,322,380,9,322,385,9,322,388,9,322,391,9,322,411,9,322,416,9,322,419,9,323,380,9,323,385,9,323,388,9,323,391,9,323,396,9,323,411,9,323,416,9,323,419,9,323,423,9,371,396,9,371,416,9,376,380,9,376,391,9,376,396,9,376,411,9,376,414,9,376,416,9,376,423,9,7,84,10,7,113,10,7,147,10,7,164,10,7,170,10,7,174,10,9,132,10,9,216,10,11,113,10,13,155,10,16,138,10,16,148,10,17,170,10,17,174,10,18,113,10,18,132,10,18,164,10,18,183,10,20,164,10,20,170,10,20,174,10,22,164,10,22,170,10,22,174,10,22,240,10,22,255,10,25,138,10,27,138,10,27,216,10,27,240,10,27,255,10,32,113,10,32,147,10,32,164,10,32,170,10,32,174,10,32,216,10,32,240,10,32,255,10,33,148,10,33,155,10,34,138,10,34,148,10,34,216,10,36,147,10,37,216,10,38,113,10,38,216,10,40,84,10,41,113,10,41,147,10,41,164,10,41,170,10,41,174,10,41,183,10,44,132,10,44,138,10,44,155,10,79,138,10,79,148,10,88,138,10,88,148,10,89,170,10,89,174,10,90,132,10,90,183,10,98,240,10,98,255,10,100,138,10,100,148,10,102,84,10,110,148,10,1,18,11,3,182,11,3,185,11,3,186,11,3,188,11,6,187,11,8,323,11,9,323,11,13,195,11,13,214,11,13,274,11,13,275,11,14,181,11,16,18,11,16,82,11,16,89,11,17,182,11,17,185,11,17,186,11,17,188,11,17,274,11,17,275,11,17,320,11,17,371,11,18,82,11,18,181,11,18,187,11,18,195,11,18,214,11,19,274,11,19,275,11,24,17,11,24,89,11,24,301,11,25,18,11,25,89,11,27,181,11,27,187,11,27,214,11,27,258,11,27,301,11,28,274,11,28,275,11,30,17,11,31,184,11,32,195,11,33,184,11,33,274,11,33,275,11,34,184,11,36,82,11,36,258,11,36,274,11,36,275,11,38,182,11,38,185,11,38,186,11,38,187,11,38,188,11,38,195,11,38,214,11,38,274,11,38,275,11,38,320,11,38,371,11,41,184,11,41,195,11,46,18,11,79,323,11,81,258,11,82,184,11,82,214,11,82,274,11,82,275,11,89,17,11,89,182,11,89,185,11,89,186,11,89,188,11,89,320,11,89,371,11,90,181,11,90,301,11,90,320,11,91,82,11,93,17,11,93,18,11,93,21,11,93,89,11,94,17,11,96,18,11,96,21,11,98,301,11,14,181,35,18,181,35,27,181,35,90,181,35,17,318,36,27,318,36,38,318,36,82,318,36,89,318,36,90,318,36,1,267,37,18,267,37,36,267,37,81,267,37,82,267,37,96,267,37,9,14,38,29,14,38,17,321,39,44,321,39,89,321,39,17,322,40,44,322,40,89,322,40,1,295,41,24,295,41,46,295,41,90,295,41,94,295,41,7,162,42,14,162,42,18,162,42,22,162,42,32,162,42,100,162,42,11,241,43,16,241,43,27,241,43,98,241,43,9,132,44,18,132,44,44,132,44,90,132,44,16,297,45,24,297,45,80,297,45,90,297,45,94,297,45,111,297,45,23,33,46,28,33,46,36,33,46,42,33,46,110,33,46,1,169,47,14,169,47,18,169,47,22,169,47,81,169,47,26,43,48,102,43,48,38,142,49,73,142,49,82,142,49,38,143,50,77,143,50,82,143,50,38,144,51,78,144,51,82,144,51,38,145,52,66,145,52,82,145,52,38,145,53,66,145,53,82,145,53,14,173,54,18,173,54,22,173,54,98,173,54,100,173,54,1,305,55,24,305,55,25,305,55,90,305,55,94,305,55,18,309,60,38,309,60,71,309,60,82,309,60,17,322,61,44,322,61,89,322,61,96,81,62,100,81,62,36,85,63,90,85,63,13,156,64,36,156,64,98,156,64,101,156,64);
  89.  
  90.  
  91.  
  92.  
  93. // ***** End Updatable ******
  94.  
  95.  
  96.  
  97. var t = new Array ('','','Welcome to the JumpGate Shipper Widget','','Newbie','','Read this','Bitte lesen','Use these options on future visits','','Click to Start','','Current station','','Destination','','Select category','','Select Station','','All Stations','','Select category','','Production','','Import Demand','','English','','German','','Select item','','Start','','Stop','','Reset','','cargo','','jgt','','score','','New game?','','Mine','','Re-roll','','Continue','','Include equipment on shipper screen','','Get jossh prices from shipper screen','','Automatically launch widget in future','','Display toolbar using','','Text only','','Text and icons','','Icons only','','Add to toolbar','','Apply','','This version is','','Stations','','Items','','Production requirements','','Supply nodes','','Demand nodes','','Transport links','','This widget was written and researched by <a href="http://tim.capsu.org/" target="_blank">Tim&#160;(timski)&#160;Howgego</a>, 2001-2005. The widget uses data extracted from <a href="http://www.netdevil.com/" target="_blank">Netdevil\'s</a>','','database, which supports their online computer game, Jumpgate. Artifact data taken from Lothar\'s list. Equipment requirements based on <a href="http://nohbody.com/jgships/" target="_blank">Nohbody\'s list</a>, slightly modified. Buildings list includes information from Cap-Leith, Nellie, Pt_Pete, GrimGriz, Duster and Grinder. EU manufacturers from Hollis. Thanks to Catomen, DSA and Miquant for German translations. The information contained in this widget remains the property of Netdevil. Jumpgate &#169; 1999-2005 Netdevil LTD. JumpGate is published by <a href="http://www.netdevil.com/" target="_blank">Netdevil</a>. Did I forget anything?','','Select your language','','Select your server','','Select your allegiance','','All','','to','','reverse','','get JOSSH prices','','Nothing to be transported','','Item','','Mass','','Price Range','','Pre-Tax Profit','','<i>Italicised</i> (or "<i>?</i>") items are not specifically required for production of other items, but are normally demanded for other reasons.','','Equipment excluded. It may be included by changing your','','Size','','Pol','','Rank','','German','','Manufacturer','','Produced at','','Common equipment','','which is produced at','','Requires','','Nothing','','Custom producer money transfer','','No components required for production at this station','','Full dependencies','','Items dependent on','','for production','','Uses for','','across','','All Stations','','at','','Commonly used to equip','','Item made','','which is made from','','Not commonly equipped','','No specific uses in production','','Used to make','','Raw material','','None','','Imported','','demanded by','','Used to make','','Dependencies for','','You will regret','','stripping','','Fly with no mission','','Deliver','','for','','and','','per unit','','Accept','','launch(es)','','death(s)','','shortage','','Inventory at','','Re-equipping','','You are re-equipping with newbie gear. Muhaha.','','Not much choice, huh?','','In flight','','dumping on this farm','','Pirates','','Pay','','Not enough credits','','dealing with','','Attacked by','','Assassins','','Griefer','','Flux swarm','','You have been killed','','You escape','','let\'s get farming','','wing','','wingoff','','Wingman hired. Wingmen are paid half of your credit bonus.','','home','','You will return to this station after death.','','Display items as','','Start in offline mode','','Text size','','Smaller','','Larger','','Select options and then press','','Select','','Price/Profit','','Components/CPs','','sort','','Base Price','','Lowest Buy Price','','Highest Sell Price','','Profit per Unit','','Profit per','','Lowest buy price assumes 0% tax.','','Components','','Total component base price','','Base price of product','','Highest sale price of product','','Difference','','Hide artifacts','','Debug information','');
  98.  
  99. // next t = 292
  100.  
  101. var screenname = new Array ('Server (removed)','','Tools','','Shipper','','Item','','Usage','','Station','','Translator (removed)','','Cycle Timer','','Usage Flowcharter','','Req Flowcharter','','Cargo Game','','Cargo JGT','','Lists','','','','','','','','Options','','About','','Welcome','','Version','','Credits','','Help','');
  102.  
  103. var screendesc = new Array ('Server','','Full list of tools','','Lists natural cargo links between stations','','Shipping and production information for all commodities and equipment','','What items commodities are used to produce at station(s)','','Lists production and import demands by station','','Feature removed','','Times production cycles','','Shows what items are dependent on one commodity for production','','Shows what commodities are required for the production of one item','','Mission that benefits the economy every time; almost','','Bhruic did it better','','Sort item statistics','','','','','','','','Change text colour, toolbars and other preferences','','Full list of widget related information','','Welcome message','','Version notes and history','','Copyright, credits and contact information','','Complete help FAQ (context sensitive)','');
  104.  
  105. var category0 = new Array ('','Commodities','Guns','Missiles','ECM','Shields','Capacitors','Engines','Powerplants','Radar','ModX','SpaceCraft');
  106.  
  107. var category1 = new Array ('');
  108.  
  109. var sta1 = new Array ('');
  110.  
  111. var staprice = new Array ('index','Solrain_Core','Solrain_Wake','Solrain_Cornea','Octavius_Core','Octavius_Great_Pillars','Octavius_Outpost','Quantar_Core','Quantar_TriPoint','Quantar_Corridor','Hyperial','Amananth','Evenings_End','GBS','Klatsches_Hold','Lothars_Landing','index','index','index','index','index','index','index','index','index','index','index','index','index','index','index','index','Solrain_SDS','Octavius_SDS','Quantar_SDS');
  112.  
  113. var manufacturer = new Array ('-','T&#38;P Systems','PSI','Octave Propulsion Labs','Venurian Prospecting','Cromforge Enterprises','Dorator','Aristio Conglomerate','Samsun','Annihilitech','Lexxor','Amananth','TRI','Infinite Heavy Lasers');
  114.  
  115. // Pref
  116. // 0 = Language FORCED 0
  117. // 1 = Server FORCED 1
  118. // 2 = Colour
  119. // 3 = Equipment on shipper screen
  120. // 4 = Jossh prices on shipper screen
  121. // 5 = Auto launch
  122. // 6 = Show icons (0 text, 1 text and icons, 2 icons)
  123. // 7 = Show item graphics (0 text, 1 text and icons, 2 icons)
  124. // 8 = Text Size
  125. // 9 = Debug
  126. // 10-13 = Blank
  127.  
  128. var pref = new Array (0,1,6,1,0,0,1,1,1,0,0,0,0,0);
  129.  
  130. var itemn = new Array (0);
  131. var category = new Array (0);
  132. var sta = new Array (0);
  133. var shipper = new Array (0);
  134. var supply = new Array (0);
  135. var usage = new Array (0);
  136.  
  137. var itemhistory = new Array (0);
  138. var itemhistorypos=0;
  139.  
  140. var itemdlen=itemd.length/itemn0.length;
  141. var itemnlength = itemn0.length;
  142.  
  143. var screenpref = new Array (0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1);
  144. var screenwatch = new Array (22,0,21,16,19); // length,server,help,options,version
  145. var screentools = new Array (2,3,4,5,7,8,9,10,12);
  146. var screenabout = new Array (18,19,20,16,21);
  147. var screenoptions = new Array (0,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21); // also manually edit under setoptions
  148. var screenicon = new Array (0,1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,1,0,0,0,1);
  149. var screenset = new Array (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
  150.  
  151. var textsize = new Array (60,75,100,125);
  152.  
  153. var screenhelp = new Array ('','','Ship','Item','Use','Sta','','Timer','UseFlow','ReqFlow','Game','Game','Lists','','','','Pref','','','','','');
  154.  
  155. var colourlist = new Array ('cccccc','00ff00','0000ff','ff0000','ff9900','990099','318eff');
  156. var colournames = new Array ('Neutral','Quantar','Solrain','Octavius','Hyperial','Amananth','TRI');
  157.  
  158. var servershort = new Array ('','Global');
  159. var servers = new Array ('http://www.jossh.com/','http://www.jossh.com/','http://www.jossh.com/');
  160.  
  161. function init() {
  162.     if(readcookie('jgs_options')) {
  163.         readoptions();
  164.         setitup(0);
  165.         if(pass) ls(0,18);
  166.         document.getElementById('screen_0').innerHTML="";
  167.         } else {
  168.         if(readcookie('jgspref')) {
  169.             pref[2]=Math.round(((readcookie('jgspref'))/2)- 0.00001);
  170.             setcolour();
  171.             }
  172.         if(readcookie('jgsequip')) {
  173.             if(Math.round(readcookie('jgsequip'))==0) pref[3]=1;
  174.             }
  175.         if(readcookie('jgslaunch')) {
  176.             pref[4]=Math.round(((readcookie('jgslaunch'))/2)- 0.00001);
  177.             pref[5]=Math.round(((readcookie('jgslaunch'))-(pref[4]*2))-0.00001);
  178.             }
  179.         if(document.URL.indexOf("file://")>=0) {
  180.             extra=" checked";
  181.             } else {
  182.             extra="";
  183.             }
  184.         document.getElementById('screen_0').innerHTML="<div class='title'>"+t[2+(pref[0])]+"</div><div class='text'>"+t[4+(pref[0])]+"? <a href='help.html' target='_blank'>"+t[6+(pref[0])]+"</a>.</div><form id='initform'><table>"+createstartupsettings()+"<tr><td class='tdd'>"+t[248+(pref[0])]+":</td><td class='tdd'><input type='checkbox' name='prefoffline'"+extra+" /></td></tr><tr><td class='tdd'>"+t[8+(pref[0])]+":</td><td class='tdd'><input type='checkbox' name='prefcookie' checked /></td></tr><tr><td></td><td><a href='javascript:initoptions();' class='tbc'>"+t[10+(pref[0])]+"</a></td></tr></table></form>";
  185.         fixatag();
  186.         }
  187. }
  188.  
  189. function initoptions() {
  190.     if(document.getElementById('initform').prefcookie) {
  191.         pref[2]=document.getElementById('initform').prefcolour.selectedIndex;
  192.         if(document.getElementById('initform').prefoffline.checked==true) pref[7]=0;
  193.         if(document.getElementById('initform').prefcookie.checked==true) writeoptions();
  194.         }
  195.     setitup(0);
  196.     if(pass) ls(0,18);
  197.     document.getElementById('screen_0').innerHTML="";
  198.     }
  199.  
  200. function setitup(regenerate) {
  201.     if(regenerate==1) {
  202.         // regen only
  203.         itemn = new Array (0);
  204.         category = new Array (0);
  205.         itemhistory = new Array (0);
  206.         itemhistorypos=0;
  207.         sta = new Array (0);
  208.         shipper = new Array (0);
  209.         supply = new Array (0);
  210.         usage = new Array (0);
  211.         }
  212.     // regen and startup
  213.     for(var i=0;i<station_1.length;i++) {
  214.         sta.push(station_1[i]);
  215.         }
  216.     for(var i=0;i<shipper_1.length;i++) {
  217.         shipper.push(shipper_1[i]);
  218.         }
  219.     for(var i=0;i<supply_1.length;i++) {
  220.         supply.push(supply_1[i]);
  221.         }
  222.     for(var i=0;i<usage_1.length;i++) {
  223.         usage.push(usage_1[i]);
  224.         }
  225.     for(var i=0;i<itemn0.length;i++) {
  226.         itemn.push(itemn0[i]);
  227.         }
  228.     for(var i=0;i<category0.length;i++) {
  229.         category.push(category0[i]);
  230.         }
  231.     setcolour();
  232.     }
  233.  
  234. function createtoolbar(screenid) {
  235.     a="<table class='toolbar'><tr>";
  236.     for(var i=0;i<screenpref.length;i++) {
  237.         if(screenpref[i]) {
  238.             b="";
  239.             if(pref[6]>0) {
  240.                 if(i==screenwatch[1]) {
  241.                     b=b+"<img src='icon_generic.gif' width='20' height='20' border='0' alt='"+servershort[(pref[1])]+"' />";
  242.                     } else if(screenicon[i]) {
  243.                     b=b+"<img src='icon_"+i+".gif' width='20' height='20' border='0' alt='"+screenname[(i*2)+(pref[0])]+"' />";
  244.                     } else {
  245.                     b=b+"<img src='icon_generic.gif' width='20' height='20' border='0' alt='"+screenname[(i*2)+(pref[0])]+"' />";
  246.                     }
  247.                 }
  248.             if(pref[6]==1) b=b+"<br />";
  249.             if(pref[6]<2) {
  250.                 if(i==screenwatch[1]) {
  251.                     b=b+servershort[(pref[1])];
  252.                     } else if(i==screenwatch[4]) {
  253.                     b=b+"v"+versionarray[0];
  254.                     } else {
  255.                     b=b+screenname[(i*2)+(pref[0])];
  256.                     }
  257.                 }
  258.             if(screenid==i) {
  259.                 b="<span class='tbb' title='"+screenname[(i*2)+(pref[0])]+" - "+screendesc[(i*2)+(pref[0])]+".'>"+b+"</span>";
  260.                 } else if(i==screenwatch[1]) {
  261.                 b="<span class='tbb' title='"+screenname[(i*2)+(pref[0])]+" - "+servershort[(pref[1])]+".'>"+b+"</span>";
  262.                 } else if(i==screenwatch[2]) {
  263.                 b="<a href='help.html#"+screenhelp[screenid]+"' target='_blank' class='tbb' title='"+screenname[(i*2)+(pref[0])]+" - "+screendesc[(i*2)+(pref[0])]+".'>"+b+"</a>";
  264.                 } else {               
  265.                 b="<a href='javascript:ls("+screenid+","+i+");' class='tbb' title='"+screenname[(i*2)+(pref[0])]+" - "+screendesc[(i*2)+(pref[0])]+".'>"+b+"</a>";
  266.                 }
  267.             a=a+"<td class='toolbartd'>"+b+"</td>";
  268.             }
  269.         }
  270.     a=a+"</tr></table>";
  271.     c="toolbar_"+screenid;
  272.     document.getElementById(c).innerHTML=a;
  273.     a=b=c="";
  274.     }
  275.  
  276. function ls(oldl,newl) {
  277.     document.getElementById("screen_"+oldl).style.visibility="hidden";
  278.     if(screenset[newl]==0 || newl==screenwatch[3]) {
  279.         a="<span id='toolbar_"+newl+"' class='toolbar'></span>";
  280.         if(newl==1) {
  281.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><div class='text'>"+screendesc[(newl*2)+(pref[0])]+":</div>"+createlocalmenu(screentools,newl);
  282.         } else if(newl==2) {
  283.             b="if(document.getElementById("+'"shipform"'+").from_sta && document.getElementById("+'"shipform"'+").to_sta) startshipper(document.getElementById("+'"shipform"'+").from_sta.selectedIndex,document.getElementById("+'"shipform"'+").to_sta.selectedIndex)";
  284.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><form id='shipform'><select name='from_sta' onChange='"+b+";' class='form'><option>"+t[12+(pref[0])]+" . . .</option>"+stationmenu()+"</select><select name='to_sta' onChange='"+b+";' class='form'><option>"+t[14+(pref[0])]+" . . .</option>"+stationmenu()+"</select></form><span id='shipanswerspan'></span>";
  285.         } else if(newl==3) {
  286.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><form id='itemform'><select name='itemselect' onChange='generateitemmenu();' class='form'><option>"+t[16+(pref[0])]+" . . .</option>"+itemmenu(0)+"</select> <span id='itemformvoid1'></span></form><span id='itemanswerspan'></span>";
  287.         } else if(newl==4) {
  288.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><form id='useform'><select name='stationselect' onChange='if(document.getElementById("+'"useform"'+").itemselect && document.getElementById("+'"useform"'+").stationselect && document.getElementById("+'"useform"'+").catselect) startusage(document.getElementById("+'"useform"'+").stationselect.selectedIndex,document.getElementById("+'"useform"'+").catselect.selectedIndex,document.getElementById("+'"useform"'+").itemselect.value);' class='form'><option>"+t[18+(pref[0])]+" . . .</option><option>"+t[20+(pref[0])]+"</option>"+stationmenu()+"</select><br /><select name='catselect' onChange='generateusemenu();' class='form'><option>"+t[22+(pref[0])]+" . . .</option>"+itemmenu(1)+"</select> <span id='useformvoid1'></span></form><span id='useanswerspan'></span>";
  289.         } else if(newl==5) {
  290.             b="if(document.getElementById("+'"staform"'+").staselect && document.getElementById("+'"staform"'+").switchselect && document.getElementById("+'"staform"'+").itemselect) startstation(document.getElementById("+'"staform"'+").staselect.selectedIndex,document.getElementById("+'"staform"'+").switchselect.selectedIndex,document.getElementById("+'"staform"'+").itemselect.selectedIndex)";
  291.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><form id='staform'><select name='staselect' onChange='"+b+";' class='form'><option>"+t[18+(pref[0])]+" . . .</option>"+stationmenu()+"</select><br /><select name='switchselect' onChange='"+b+";' class='form'><option>"+t[24+(pref[0])]+"</option><option>"+t[26+(pref[0])]+"</option></select><select name='itemselect' onChange='"+b+";' class='form'><option>"+t[16+(pref[0])]+" . . .</option>"+itemmenu(1)+"</select></form><span id='staanswerspan'></span>";
  292.         } else if(newl==6) {
  293.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><p>Feature removed.</p>";
  294.         } else if(newl==7) {
  295.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><div class='text'><a href='javascript:startclock()'>"+t[34+(pref[0])]+"</a> | <a href='javascript:stopclock()'>"+t[36+(pref[0])]+"</a> | <a href='javascript:resetclock()'>"+t[38+(pref[0])]+"</a> | <a href='javascript:adjusttimer(10)'>&#60;&#60;</a> | <a href='javascript:adjusttimer(5)'>&#60;</a> | <a href='javascript:adjusttimer(-5)'>&#62;</a> | <a href='javascript:adjusttimer(-10)'>&#62;&#62;</a><br /><br /><span id='timeranswerspan' style='font-size: 700%; font-family: ocr a extended, courier, monospace;'>0:00</span></div>";
  296.         } else if(newl==8) {
  297.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><form id='produseform'><select name='produseselect' onChange='if(document.getElementById(\"produseform\").produseselect) usedfor(document.getElementById(\"produseform\").produseselect.value);' class='form'><option>"+t[32+(pref[0])]+" . . .</option>"+subitemmenu(1,pref[0])+"</select></form><span id='produseanswerspan'> </span>";
  298.         } else if(newl==9) {
  299.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><form id='prodreqform'><select name='prodreqcatselect' onChange='generateprodreqmenu();' class='form'><option>"+t[22+(pref[0])]+" . . .</option>"+itemmenu(1)+"</select> <span id='prodreqformvoid1'></span></form><span id='prodreqanswerspan'></span>";
  300.         } else if(newl==10) {
  301.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><div class='text'>"+t[12+(pref[0])]+": <span id='gstationanswerspan'></span>. <span id='gcreditsanswerspan'></span>c. <span id='gspaceanswerspan'></span>&#160;"+t[40+(pref[0])]+".</div><div class='text'><span id='gwinganswerspan'></span><span id='ghomeanswerspan'></span><a href='javascript:ls(10,11);' class='tbc'>&#47;"+t[42+(pref[0])]+"</a> <a href='javascript:gscore();' class='tbc'>&#47;"+t[44+(pref[0])]+"</a> <a href='javascript:if(confirm(t[46+(pref[0])])) initgame();' class='tbc'>&#47;"+t[38+(pref[0])]+"</a></div><form id='missionform'>"+t[48+(pref[0])]+": <span id='missionminemenu'> </span> &#160;<a href='javascript:if(document.getElementById("+'"missionform"'+").mine_what) missionmine(document.getElementById("+'"missionform"'+").mine_what.selectedIndex);' class='tbc'>"+t[48+(pref[0])]+"</a><br />"+t[14+(pref[0])]+": <select name='to_sta' onChange='if(document.getElementById("+'"missionform"'+").to_sta) startmission(document.getElementById("+'"missionform"'+").to_sta.selectedIndex);' class='form'><option>"+t[14+(pref[0])]+" . . .</option>"+stationmenu()+"</select> &#160;<a href='javascript:if(document.getElementById("+'"missionform"'+").to_sta) startmission(document.getElementById("+'"missionform"'+").to_sta.selectedIndex);' class='tbc'>"+t[50+(pref[0])]+"</a></form><div class='text'><span id='missionanswerspan'></span></div><div class='text'><span id='gmarketanswerspan'></span></div>";
  302.         } else if(newl==11) {
  303.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><div class='text'><a href='javascript:ls(11,10);' class='tbc'>&#171; "+t[52+(pref[0])]+"</a></div><form id='jgtform'><select name='jgt_sta' onChange='if(document.getElementById("+'"jgtform"'+").jgt_sta) updatemarket(stationfix((document.getElementById("+'"jgtform"'+").jgt_sta.selectedIndex)+1),1,0,0);' class='form'>"+stationmenu()+"</select></form><span id='jgtanswerspan'></span>";
  304.         } else if(newl==12) {
  305.             b="if(document.getElementById("+'"listform"'+").listcategory && document.getElementById("+'"listform"'+").listtype && document.getElementById("+'"listform"'+").listarty) startlist(document.getElementById("+'"listform"'+").listcategory.selectedIndex,document.getElementById("+'"listform"'+").listtype.selectedIndex,0,document.getElementById("+'"listform"'+").listarty.checked)";
  306.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><form id='listform'><select name='listcategory' onChange='"+b+";' class='form'><option>"+t[96+(pref[0])]+"</option>"+itemmenu(0)+"</select> <select name='listtype' onChange='"+b+";' class='form'><option>"+t[258+(pref[0])]+" . . .</option><option>"+t[260+(pref[0])]+"</option><option>"+t[122+(pref[0])]+"/"+t[120+(pref[0])]+"/"+t[108+(pref[0])]+"/"+t[118+(pref[0])]+"</option><option>"+t[126+(pref[0])]+"</option><option>"+t[262+(pref[0])]+"</option></select> "+t[288+(pref[0])]+":<input type='checkbox' name='listarty' onChange='"+b+";' /></form><span id='listanswerspan'></span>";
  307.         } else if(newl==16) {
  308.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><div class='text'>"+t[256+(pref[0])]+" "+t[70+(pref[0])]+":</div><form id='prefform'><table>"+createstartupsettings()+"<tr><td class='tdd'>"+t[250+(pref[0])]+":</td><td class='tdd'>&#171; "+t[252+(pref[0])]+" ";
  309.             for(var i=0;i<textsize.length;i++) {
  310.                 a=a+"<input type='radio' name='preftextsize' value='"+i+"'";
  311.                 if(pref[8]==i) a=a+" checked";
  312.                 a=a+" />";
  313.                 }
  314.             a=a+" "+t[254+(pref[0])]+" &#187;</td></tr><tr><td class='tdd'>"+t[54+(pref[0])]+":</td><td class='tdd'><input type='checkbox' name='prefequipment'";
  315.             if(pref[3]==1) a=a+" checked";
  316.             a=a+" /></td></tr><tr><td class='tdd'>"+t[56+(pref[0])]+":</td><td class='tdd'><input type='checkbox' name='prefprices'";
  317.             if(pref[4]==1) a=a+" checked";
  318.             a=a+" /></td></tr><tr><td class='tdd'>"+t[58+(pref[0])]+":</td><td class='tdd'><input type='checkbox' name='preflaunch'";
  319.             if(pref[5]==1) a=a+" checked";
  320.             a=a+" /></td></tr><tr><td class='tdd'>"+t[246+(pref[0])]+":</td><td class='tdd'><select name='prefgraphic' class='form'>";
  321.             for(var i=0;i<3;i++) {
  322.                 a=a+"<option";
  323.                 if(pref[7]==i) a=a+" selected";
  324.                 a=a+">"+t[(62+(i*2)+(pref[0]))]+"</option>";
  325.                 }
  326.             a=a+"</select></td></tr><tr><td class='tdd'>"+t[290+(pref[0])]+":</td><td class='tdd'><input type='checkbox' name='prefdebug'";
  327.             if(pref[9]==1) a=a+" checked";
  328.             a=a+" /></td></tr><tr><td class='tdd'>"+t[60+(pref[0])]+":</td><td class='tdd'><select name='preficon' class='form'>";
  329.             for(var i=0;i<3;i++) {
  330.                 a=a+"<option";
  331.                 if(pref[6]==i) a=a+" selected";
  332.                 a=a+">"+t[(62+(i*2)+(pref[0]))]+"</option>";
  333.                 }
  334.             a=a+"</select></td></tr><tr><td rowspan='"+screenoptions.length+"' class='tdd'>"+t[68+(pref[0])]+":</td>";
  335.             for(var i=0;i<screenoptions.length;i++) {
  336.                 if(i>0) a=a+"<tr>";
  337.                 a=a+"<td class='tdd'><input type='checkbox' name='preftoolbar_"+screenoptions[i]+"'";
  338.                 if(screenpref[(screenoptions[i])]==1) a=a+" checked";
  339.                 a=a+" /> "+screenname[((screenoptions[i])*2)+(pref[0])]+"</td></tr>";
  340.                 }
  341.             a=a+"<tr><td class='tdd'>"+t[8+(pref[0])]+":</td><td class='tdd'><input type='checkbox' name='prefcookie' checked /></td></tr><tr><td></td><td><a href='javascript:setoptions(); ls(16,16);' class='tbc'>"+t[70+(pref[0])]+"</a> <a href='javascript:screenset[16]=0; ls(16,16);' class='tbc'>"+t[38+(pref[0])]+"</a></td></tr></table></form>";
  342.         } else if(newl==17) {
  343.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><div class='text'>"+screendesc[(newl*2)+(pref[0])]+":</div>"+createlocalmenu(screenabout,newl);
  344.         } else if(newl==18) {
  345.             a=a+"<div class='title'>"+t[2+(pref[0])]+"</div><div class='text'>"+t[72+(pref[0])]+" v"+versionarray[0]+": "+versionarray[1+(pref[0])]+"</div>";
  346.             var b = new Array (0);
  347.             for(var i=0;i<screenpref.length;i++) {
  348.                 if(screenpref[i]==1) b.push(i);
  349.                 }
  350.             a=a+createlocalmenu(b,newl)+"<div class='text'>"+t[74+(pref[0])]+": "+formatn(sta.length-7)+", "+t[76+(pref[0])]+": "+formatn(itemn.length-1)+", "+t[78+(pref[0])]+": "+formatn(requires.length/2)+", "+t[80+(pref[0])]+": "+formatn(supply.length/3)+", "+t[82+(pref[0])]+": "+formatn(usage.length/3)+", "+t[84+(pref[0])]+": "+formatn(shipper.length/4)+".</div>";
  351.         } else if(newl==19) {
  352.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div>";
  353.             for(var i=0;i<versionarray.length;i=i+3) {
  354.                 a=a+"<div class='text'><b>"+versionarray[i]+" &#187;</b> "+versionarray[i+1+(pref[0])]+"</div>";
  355.                 }
  356.         } else if(newl==20) {
  357.             a=a+"<div class='title'>"+screenname[(newl*2)+(pref[0])]+"</div><div class='text'>"+t[86+(pref[0])]+" <a href='"+servers[(pref[1])]+"' target='_blank'>JOSSH</a> "+t[88+(pref[0])]+"</div>";
  358.         }
  359.         document.getElementById('screen_'+newl).innerHTML=a;
  360.         a=b="";
  361.         if(newl==10) initgame();
  362.         createtoolbar(newl);
  363.         fixatag();
  364.         screenset[newl]=1;
  365.         }
  366.     if(newl==11 && document.getElementById('jgtform').jgt_sta) updatemarket(stationfix((document.getElementById('jgtform').jgt_sta.selectedIndex)+1),1,0,0);
  367.     document.getElementById("screen_"+newl).style.visibility="visible";
  368.     }
  369.  
  370. function createstartupsettings() {
  371.     c="<tr><td class='tdd'>"+t[94+(pref[0])]+":</td><td class='tdd'><select name='prefcolour' class='form'>";
  372.     for(var i=0;i<colourlist.length;i++) {
  373.         c=c+"<option style='color: #"+colourlist[i]+"'"
  374.         if(pref[2]==i) c=c+" selected";
  375.         c=c+">"+colournames[i]+"</option>";
  376.         }
  377.     c=c+"</select></td></tr>";
  378.     return c;
  379.     }
  380.  
  381. function createlocalmenu(what,newl) {
  382.     b="";
  383.     for(var i=0;i<what.length;i++) {
  384.         b=b+"<div class='text'><b>&#187;</b> ";
  385.         if(what[i]==screenwatch[1]) {
  386.             b=b+"<a href='javascript:ls("+newl+","+screenwatch[3]+");'>";
  387.             } else if(what[i]==screenwatch[2]) {
  388.             b=b+"<a href='help.html' target='_blank'>";
  389.             } else {               
  390.             b=b+"<a href='javascript:ls("+newl+","+what[i]+");'>";
  391.             }
  392.         if(what[i]==screenwatch[1]) {
  393.             b=b+servershort[(pref[1])];
  394.             } else if(what[i]==screenwatch[4]) {
  395.             b=b+"v"+versionarray[0];
  396.             } else {
  397.             b=b+screenname[((what[i])*2)+(pref[0])];
  398.             }
  399.         b=b+"</a> - "+screendesc[((what[i])*2)+(pref[0])]+".</div>";
  400.         }
  401.     return b;
  402.     }
  403.  
  404. function setoptions() {
  405.     b=pref[0];
  406.     c=pref[1];
  407.     if(document.getElementById('prefform').prefcolour) {
  408.         pref[2]=document.getElementById('prefform').prefcolour.selectedIndex;
  409.         }
  410.     if(document.getElementById('prefform').prefequipment) {
  411.         if(document.getElementById('prefform').prefequipment.checked==true) { pref[3]=1; } else { pref[3]=0; }
  412.         }
  413.     if(document.getElementById('prefform').prefprices) {
  414.         if(document.getElementById('prefform').prefprices.checked==true) { pref[4]=1; } else { pref[4]=0; }
  415.         }
  416.     if(document.getElementById('prefform').preflaunch) {
  417.         if(document.getElementById('prefform').preflaunch.checked==true) { pref[5]=1; } else { pref[5]=0; }
  418.         }
  419.     if(document.getElementById('prefform').prefdebug) {
  420.         if(document.getElementById('prefform').prefdebug.checked==true) { pref[9]=1; } else { pref[9]=0; }
  421.         }
  422.     if(document.getElementById('prefform').preftextsize) {
  423.         if(document.getElementById('prefform').preftextsize[0].checked==true) pref[8]=0;
  424.         if(document.getElementById('prefform').preftextsize[1].checked==true) pref[8]=1;
  425.         if(document.getElementById('prefform').preftextsize[2].checked==true) pref[8]=2;
  426.         if(document.getElementById('prefform').preftextsize[3].checked==true) pref[8]=3;
  427.         }
  428.     if(document.getElementById('prefform').preficon) {
  429.         pref[6]=document.getElementById('prefform').preficon.selectedIndex;
  430.         }
  431.     if(document.getElementById('prefform').prefgraphic) {
  432.         pref[7]=document.getElementById('prefform').prefgraphic.selectedIndex;
  433.         }
  434.     if(document.getElementById('prefform').preftoolbar_0) {
  435.         if(document.getElementById('prefform').preftoolbar_0.checked==true) { screenpref[0]=1; } else { screenpref[0]=0; }
  436.         }
  437.     if(document.getElementById('prefform').preftoolbar_2) {
  438.         if(document.getElementById('prefform').preftoolbar_2.checked==true) { screenpref[2]=1; } else { screenpref[2]=0; }
  439.         }
  440.     if(document.getElementById('prefform').preftoolbar_3) {
  441.         if(document.getElementById('prefform').preftoolbar_3.checked==true) { screenpref[3]=1; } else { screenpref[3]=0; }
  442.         }
  443.     if(document.getElementById('prefform').preftoolbar_4) {
  444.         if(document.getElementById('prefform').preftoolbar_4.checked==true) { screenpref[4]=1; } else { screenpref[4]=0; }
  445.         }
  446.     if(document.getElementById('prefform').preftoolbar_5) {
  447.         if(document.getElementById('prefform').preftoolbar_5.checked==true) { screenpref[5]=1; } else { screenpref[5]=0; }
  448.         }
  449.     if(document.getElementById('prefform').preftoolbar_6) {
  450.         if(document.getElementById('prefform').preftoolbar_6.checked==true) { screenpref[6]=1; } else { screenpref[6]=0; }
  451.         }
  452.     if(document.getElementById('prefform').preftoolbar_7) {
  453.         if(document.getElementById('prefform').preftoolbar_7.checked==true) { screenpref[7]=1; } else { screenpref[7]=0; }
  454.         }
  455.     if(document.getElementById('prefform').preftoolbar_8) {
  456.         if(document.getElementById('prefform').preftoolbar_8.checked==true) { screenpref[8]=1; } else { screenpref[8]=0; }
  457.         }
  458.     if(document.getElementById('prefform').preftoolbar_9) {
  459.         if(document.getElementById('prefform').preftoolbar_9.checked==true) { screenpref[9]=1; } else { screenpref[9]=0; }
  460.         }
  461.     if(document.getElementById('prefform').preftoolbar_10) {
  462.         if(document.getElementById('prefform').preftoolbar_10.checked==true) { screenpref[10]=1; } else { screenpref[10]=0; }
  463.         }
  464.     if(document.getElementById('prefform').preftoolbar_12) {
  465.         if(document.getElementById('prefform').preftoolbar_12.checked==true) { screenpref[12]=1; } else { screenpref[12]=0; }
  466.         }
  467.     if(document.getElementById('prefform').preftoolbar_16) {
  468.         if(document.getElementById('prefform').preftoolbar_16.checked==true) { screenpref[16]=1; } else { screenpref[16]=0; }
  469.         }
  470.     if(document.getElementById('prefform').preftoolbar_18) {
  471.         if(document.getElementById('prefform').preftoolbar_18.checked==true) { screenpref[18]=1; } else { screenpref[18]=0; }
  472.         }
  473.     if(document.getElementById('prefform').preftoolbar_19) {
  474.         if(document.getElementById('prefform').preftoolbar_19.checked==true) { screenpref[19]=1; } else { screenpref[19]=0; }
  475.         }
  476.     if(document.getElementById('prefform').preftoolbar_20) {
  477.         if(document.getElementById('prefform').preftoolbar_20.checked==true) { screenpref[20]=1; } else { screenpref[20]=0; }
  478.         }
  479.     if(document.getElementById('prefform').preftoolbar_21) {
  480.         if(document.getElementById('prefform').preftoolbar_21.checked==true) { screenpref[21]=1; } else { screenpref[21]=0; }
  481.         }
  482.     if(document.getElementById('prefform').prefcookie) {
  483.         if(document.getElementById('prefform').prefcookie.checked==true) writeoptions();
  484.         }
  485.     for(var i=0;i<screenset.length;i++) {
  486.         screenset[i]=0;
  487.         }
  488.     if(c!=pref[1] || b!=pref[0]) {
  489.         setitup(1);
  490.         } else {
  491.         setcolour();
  492.         }
  493.     }
  494.  
  495. function writeoptions() {
  496.     today=new Date();
  497.     expires=new Date(today.getTime()+(52*86400000)); // year
  498.     writecookie('jgs_options',pref.toString(),expires);
  499.     writecookie('jgs_toolbar',screenpref.toString(),expires);
  500.     }
  501.  
  502. function readoptions() {
  503.     var co=cleancookie(readcookie('jgs_options'),pref.length);
  504.     var ct=cleancookie(readcookie('jgs_toolbar'),screenpref.length);
  505.     if(co!="") {
  506.         for(i=0;i<pref.length;i++) {
  507.             pref[i]=co[i];
  508.             }
  509.         }
  510.     if(ct!="") {
  511.         for(i=0;i<screenpref.length;i++) {
  512.             screenpref[i]=ct[i];
  513.             }
  514.         }
  515.     }
  516.  
  517. function cleancookie(what,expected) {
  518.     h=what.split(",");
  519.     var n = new Array (0);
  520.     for(i=0;i<h.length;i++) {
  521.         y=parseFloat(h[i]);
  522.         if(y>=0 || y<=0) { // looks like a number
  523.             n.push(y);
  524.             } else {
  525.             n.push(h[i]);
  526.             }
  527.         }
  528.     if(n.length==expected) {
  529.         return n;
  530.         } else {
  531.         return "";
  532.         }
  533.     }
  534.  
  535. function writecookie(name,value,expires,path,domain,secure) {
  536.     document.cookie=name+'='+escape(value)+( (expires) ? ';expires=' + expires.toGMTString() : '')+( (path) ? ';path=' + path : '')+( (domain) ? ';domain=' + domain : '')+( (secure) ? ';secure' : '');
  537.     }
  538.  
  539. function readcookie(name) {
  540.     var start = document.cookie.indexOf(name + '=');
  541.     var len = start + name.length + 1;
  542.     if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
  543.     if (start == -1) return null;
  544.     var end = document.cookie.indexOf(';',len);
  545.     if (end == -1) end = document.cookie.length;
  546.     return unescape(document.cookie.substring(len,end));
  547.     }
  548.  
  549. var ns6 = (navigator.userAgent.toLowerCase().indexOf('netscape')!=-1) && (parseInt(navigator.appVersion)==5);
  550.  
  551. function setcolour() {
  552. if(ns6-=1) {
  553.     document.getElementById('body').style.color="#"+colourlist[(pref[2])];
  554.     } else {
  555.     ns6fix();
  556.     }
  557. document.getElementById('body').style.fontSize=textsize[(pref[8])]+"%";
  558. fixatag();
  559. }
  560.  
  561. function ns6fix() {
  562. var thisnode = document.getElementsByTagName('div');
  563. for(var i=0;i<thisnode.length;i++) {
  564.     var styleid=thisnode.item(i);
  565.     styleid.style.color="#"+colourlist[(pref[2])];
  566.     }
  567. }
  568.  
  569. function fixatag() {
  570. var anode = document.getElementsByTagName('a');
  571. for(var i=0;i<anode.length;i++) {
  572.     var styleid=anode.item(i);
  573.     styleid.style.color="#"+colourlist[(pref[2])];
  574.     }
  575. }
  576.  
  577. function josshprice(fromprice,toprice) {
  578. var url1=servers[(pref[1])]+"database/inventory/"+getstaprice(fromprice)+".html";
  579. var url2=servers[(pref[1])]+"database/inventory/"+getstaprice(toprice)+".html";
  580. window.open(url1,'jgsPriceBrowser1','status=yes,scrollbars=yes,resizable=yes,width=' + (screen.width - 500) + ',height=' + ((screen.height/2) - 90) + ',left=480,top=0');
  581. window.open(url2,'jgsPriceBrowser2','status=yes,scrollbars=yes,resizable=yes,width=' + (screen.width - 500) + ',height=' + ((screen.height/2) - 90) + ',left=480,top=' + ((screen.height/2) - 30) );
  582. }
  583.  
  584. function getstaprice(what) {
  585.     if(what>staprice.length) {
  586.         return "index";
  587.         } else {
  588.         return staprice[what];
  589.         }
  590.     }
  591.  
  592. function jossh(itemid) {
  593. var thislink=urlise(itemid);
  594. window.open(thislink,'jgsBrowser','menubar=yes,location=yes,toolbar=yes,status=yes,scrollbars=yes,resizable=yes,width=' + (screen.width - 500) + ',height=' + (screen.height - 180) + ',left=480,top=0');
  595. }
  596.  
  597. function urlise(itemno) {
  598. var urlflag=0;
  599. for(var n=0;n<nojossh.length;n++) {
  600.     if(itemno==nojossh[n]) urlflag=1;
  601.     }
  602. if(urlflag==1) {
  603.     var name="index";
  604.     } else {
  605.     name=itemn[itemno];
  606.     if(pref[0]==1 && (itemd[itemno*itemdlen])==1) name=itemn0[itemno];
  607.     name=name.replace(/\s/i, "_");
  608.     name=name.replace(/\s/i, "_");
  609.     }
  610. if(pref[0]==1) {
  611.     m=servers[2];
  612.     } else {
  613.     m=servers[(pref[1])];
  614.     }
  615. name=m+"database/"+category0[(itemd[itemno*itemdlen])]+"/"+name+".html";
  616. name=name.toLowerCase();
  617. return name;
  618. }
  619.  
  620. function getimage(itemid) {
  621.     img="";
  622.     if(itemd[(itemid*itemdlen)+9]>=0) {
  623.         ms=servers[(pref[1])];
  624.         if(itemd[(itemid*itemdlen)]==11) {
  625.             me="large";
  626.             } else {
  627.             me="small";
  628.             }
  629.         img="<img src='"+ms+"database/"+(category0[(itemd[(itemid*itemdlen)])]).toLowerCase()+"/media/"+me+"/item"+itemd[(itemid*itemdlen)+9]+".gif' title='"+itemn[itemid]+"' alt='"+itemn[itemid]+"' border='0' height='30' width='30' />";
  630.         }
  631.     return img;
  632.     }
  633.  
  634. function getitemname(itemid) {
  635.     g="";
  636.     if(pref[7]>0) {
  637.         gimg=getimage(itemid);
  638.         if(gimg=="" && pref[7]==2) {
  639.             g=g+"["+itemn[itemid]+"]";
  640.             } else {
  641.             g=g+gimg;
  642.             }
  643.         }
  644.     if(pref[7]<2) g=g+itemn[itemid];
  645.     if(pref[9]==1 && itemd[(itemid*itemdlen)+9]>=0) g=g+" ("+itemd[(itemid*itemdlen)+9]+")";
  646.     return g;
  647.     }
  648.  
  649. function formatn(tn) {
  650.     var sign = (tn < 0 ? '-' : '');
  651.     tn=(Math.abs(tn)).toString();
  652.     if (tn.length > 3) {
  653.         var mod = tn.length%3;
  654.         var output = (mod > 0 ? (tn.substring(0,mod)) : '');
  655.         for (tni=0;tni<Math.floor(tn.length/3);tni++) {
  656.             if ((mod==0) && (tni==0)) {
  657.                 output+=tn.substring(mod+3*tni,mod+3*tni+3);
  658.                 } else if(pref[0]==1) {
  659.                 output+='.'+tn.substring(mod+3*tni,mod+3*tni+3);
  660.                 } else {
  661.                 output+=','+tn.substring(mod+3*tni,mod+3*tni+3);
  662.                 }
  663.             }
  664.             return (sign+output);
  665.         } else {
  666.         return sign+tn;
  667.         }
  668.     }
  669.  
  670. function fixde(thetext) {
  671.     if(pref[0]==1) {
  672.         thetext=thetext.replace("&#228;","ä");
  673.         thetext=thetext.replace("&#196;","Ä");
  674.         thetext=thetext.replace("&#252;","ü");
  675.         thetext=thetext.replace("&#220;","Ü");
  676.         thetext=thetext.replace("&#246;","ö");
  677.         thetext=thetext.replace("&#214;","Ö");
  678.         return thetext;
  679.         } else {
  680.         return thetext;
  681.         }
  682.     }
  683.  
  684. function stationmenu() {
  685. var output="";
  686. for(var i=1;i<sta.length;i++) {
  687.     if((i<16) || (i>31)) {
  688.         output=output+"<option>"+sta[i]+"</option>";
  689.         }
  690.     }
  691. return output;
  692. }
  693.  
  694. function itemmenu(excludeship) { //no spacecraft=1
  695. var output="";
  696. for(var i=1;i<(category.length-excludeship);i++) {
  697.     output=output+"<option>"+category[i]+"</option>";
  698.     }
  699. return output;
  700. }
  701.  
  702. function subitemmenu(mycategory,mylanguage) {
  703. var output="";
  704. for(var i=0;i<itemd.length;i=i+itemdlen) {
  705.     if(itemd[i]==mycategory) {
  706.         output=output+"<option value="+i/itemdlen+">"+itemn0[i/itemdlen]+"</option>";
  707.         }
  708. }
  709. return output;
  710. }
  711.  
  712. function generateitemmenu() {
  713.     if(document.getElementById('itemform').itemselect) {
  714.         var myselection = document.getElementById('itemform').itemselect.selectedIndex;
  715.         if(myselection>0) {
  716.             document.getElementById('itemformvoid1').innerHTML="<select name='itemsubselect' onChange='if(document.getElementById(\"itemform\").itemsubselect) itemtoitem(document.getElementById(\"itemform\").itemsubselect.value);' class='form'><option value=0>"+t[32+(pref[0])]+" . . .</option>"+subitemmenu(myselection,pref[0])+"</select>";
  717.             } else {
  718.             document.getElementById('itemformvoid1').innerHTML="";
  719.             }
  720.         }
  721.     }
  722.  
  723. function generateusemenu() {
  724.     if(document.getElementById('useform').catselect) {
  725.         var myselection = document.getElementById('useform').catselect.selectedIndex;
  726.         if(myselection>0) {
  727.             document.getElementById('useformvoid1').innerHTML="<select name='itemselect' onChange='if(document.getElementById(\"useform\").stationselect && document.getElementById(\"useform\").catselect && document.getElementById(\"useform\").itemselect) startusage(document.getElementById(\"useform\").stationselect.selectedIndex,document.getElementById(\"useform\").catselect.selectedIndex,document.getElementById(\"useform\").itemselect.value);' class='form'><option value=0>"+t[32+(pref[0])]+" . . .</option><option value=-1>"+t[96+(pref[0])]+" "+category[myselection]+"</option>"+subitemmenu(myselection,pref[0])+"</select>";
  728.             } else {
  729.             document.getElementById('useformvoid1').innerHTML="";
  730.             }
  731.         }
  732.     }
  733.  
  734. function stationfix(stationtobefixed) {
  735.     if(stationtobefixed>15) stationtobefixed=stationtobefixed+16;
  736.     return stationtobefixed;
  737.     }
  738.  
  739. function startshipper(infromsta,intosta) {
  740. if((infromsta>0) && (intosta>0)) {
  741. document.getElementById('shipanswerspan').innerHTML="...";
  742. var fromsta=stationfix(infromsta);
  743. var tosta=stationfix(intosta);
  744. if((fromsta<35) && (tosta<35)) {
  745.     var showmission=1; 
  746.     } else {
  747.     var showmission=0;
  748.     }
  749. var aarray = new Array (0);
  750. var shipansweritem= new Array ();
  751. var shipansweritalicflag= new Array ();
  752. var flags= new Array (0,0,0);
  753. for(var i=0;i<shipper.length;i=i+4) {
  754.     if((shipper[i]==fromsta) && (shipper[i+1]==tosta)) {
  755.         if((pref[3]==0) && (itemd[((shipper[i+2])*itemdlen)]>1)) {
  756.             flags[2]=1;
  757.             } else {
  758.             flags[0]=1;
  759.             shipansweritem.push(shipper[i+2]);
  760.             if(shipper[i+3]==1) flags[1]=1;
  761.             shipansweritalicflag.push(shipper[i+3]);
  762.             }
  763.         }
  764.     }
  765. var a="<div class='text'>&#187; "+sta[fromsta]+" "+t[98+(pref[0])]+" "+sta[tosta]+" (<a href='javascript:startshipper("+intosta+","+infromsta+");'>"+t[100+(pref[0])]+"</a>) (<a href='javascript:josshprice("+fromsta+","+tosta+");'>"+t[102+(pref[0])]+"</a>)</div>";
  766. if(flags[0]==0) {
  767.     a=a+"<br />"+t[104+(pref[0])]+".";
  768.     } else {
  769.     a=a+"<table><tr><th>"+t[106+(pref[0])]+"</th><th>"+t[108+(pref[0])]+" (kg)</th><th>"+t[110+(pref[0])]+" (c)</th><th>"+t[112+(pref[0])]+"</th><th>Mission</th></tr>";
  770.     for(var i=0;i<shipansweritem.length;i++) {
  771.         if((shipansweritalicflag[i]==1) || (itemd[(shipansweritem[i]*itemdlen)]>1)) {
  772.             if(pref[7]==2) {
  773.                 var it = new Array ('<i>','?</i>');
  774.                 } else {
  775.                 var it = new Array ('<i>','</i>');
  776.                 }
  777.             } else {
  778.             var it = new Array ('','');
  779.             }
  780.         var nextanswer="<tr><td class='tdd'>"+it[0]+"<a title='"+itemn[(shipansweritem[i])]+"' href='javascript:elsetoitem("+shipansweritem[i]+",2);'>"+getitemname(shipansweritem[i])+"</a>"+it[1]+"</td> <td class='tdr'>"+formatn(itemd[(shipansweritem[i]*itemdlen)+1])+"</td><td class='tdr'>"+formatn(itemd[(shipansweritem[i]*itemdlen)+2])+"-"+formatn(itemd[(shipansweritem[i]*itemdlen)+3])+"</td><td class='tdr'>"+getprofit(shipansweritem[i])+"</td><td class='tdr'>";
  781.         if(showmission==1) {
  782.             nextanswer=nextanswer+getmission(shipansweritem[i]);
  783.             } else {
  784.             nextanswer=nextanswer+"-";
  785.             }
  786.         nextanswer=nextanswer+"</td></tr>";
  787.         aarray.push(nextanswer);
  788.         }
  789.     a=a+answersort(aarray)+"</table>";
  790.     if(flags[1]==1) a=a+"<div class='text'>"+t[114+(pref[0])]+"</div>";
  791.     }
  792. if(flags[2]==1) a=a+"<div class='text'>"+t[116+(pref[0])]+" <a href='javascript:ls(2,16);'>"+screenname[(screenwatch[3]*2)+(pref[0])]+"</a>.</div>";
  793. document.getElementById('shipanswerspan').innerHTML=a;
  794. fixatag();
  795. aarray=shipansweritem=shipansweritalicflag=flags=a=nextanswer=it="";
  796. if(pref[4]==1) josshprice(fromsta,tosta);
  797. }}
  798.  
  799. function getmission(itemid) {
  800. var m="-";
  801. var p=itemd[(itemid*itemdlen)+1];
  802. if(itemd[(itemid*itemdlen)]==1) {
  803.     if(p<1250) m=1;
  804.     if(p>=1250 && p<=5000) m=2;
  805.     if(p>5000) m=3;
  806.     }
  807. return m;
  808. }
  809.  
  810. function itemtoitem(itemid) {
  811. if(itemid>0) {
  812.     itemhistory[itemhistorypos]=itemid;
  813.     itemhistorypos++;
  814.     itemhistory[itemhistorypos]='';
  815.     startitem(itemid);
  816.     }
  817. }
  818.  
  819. function elsetoitem(itemid,elsescreen) {
  820. ls(elsescreen,3);
  821. itemhistory[itemhistorypos]=itemid;
  822. itemhistorypos++;
  823. itemhistory[itemhistorypos]='';
  824. startitem(itemid);
  825. }
  826.  
  827. function itemback() {
  828. itemhistorypos--;
  829. startitem(itemhistory[itemhistorypos-1]);
  830. }
  831.  
  832. function itemforward() {
  833. itemhistorypos++;
  834. startitem(itemhistory[itemhistorypos-1]);
  835. }
  836.  
  837. function startitem(itemid) {
  838. document.getElementById('itemanswerspan').innerHTML="...";
  839. var noproductionflag=0;
  840. var aarray = new Array (0);
  841. var itemprodplaceanswer=getproductionlocation(itemid);
  842. var itemprodreqanswer=getproductionrequirements(itemid);
  843. var thisinfo=0;
  844. for(var i=0;i<infolook.length;i=i+2) {
  845.     if(infolook[i]==itemid) thisinfo=infolook[i+1];
  846.     }
  847. var a="<div class='text'>&#187; "+getitemname(itemid)+" (<a href='javascript:jossh("+itemid+");'>JOSSH</a>)</div><table><tr><th>"+t[108+(pref[0])]+"&#160;(kg)</th><th>"+t[118+(pref[0])]+"</th><th>"+t[110+(pref[0])]+" (c)</th><th>"+t[112+(pref[0])]+"</th></tr><tr><td class='tdd'>"+formatn(itemd[(itemid*itemdlen)+1])+"</td><td class='tdd'>"+itemd[(itemid*itemdlen)+4]+"</td><td class='tdd'>"+formatn(itemd[(itemid*itemdlen)+2]);
  848. if((itemd[(itemid*itemdlen)+3])>0) {
  849.     a=a+"-"+formatn(itemd[(itemid*itemdlen)+3]);
  850.     }
  851. a=a+"</td><td class='tdd'>"+getprofit(itemid)+"</td></tr><tr><th class='tdd'>"+t[120+(pref[0])]+"</th><th class='tdd'>"+t[122+(pref[0])]+"</th><th colspan='2' class='tdd'>";
  852. if(itemd[itemid*itemdlen]==1) {
  853.     a=a+' '; // was German
  854.     } else {
  855.     a=a+t[126+(pref[0])];
  856.     }
  857. a=a+"</th></tr><tr><td class='tdd'>"+itemd[(itemid*itemdlen)+5]+"</td><td class='tdd'>"+itemd[(itemid*itemdlen)+6]+"</td><td colspan='2' class='tdd'>";
  858. if(itemd[itemid*itemdlen]==1) {
  859.     a=a+' '; // was German
  860.     } else {
  861.     if(pref[1]==0) {
  862.         a=a+manufacturer[(itemd[(itemid*itemdlen)+7])];
  863.         } else {
  864.         a=a+manufacturer[(itemd[(itemid*itemdlen)+8])];
  865.         }
  866.     }
  867. a=a+"</td></tr>";
  868. if(thisinfo>0) {
  869.     a=a+"<tr><td colspan='4' class='tdd'>"+infolist[(thisinfo*2)+(pref[0])]+"<td></tr>";
  870.     }
  871. a=a+"<tr><th colspan='4' class='tdd'>"+t[128+(pref[0])]+":</th></tr><tr><td colspan='4' class='tdd'>";
  872. for(var i=0;i<itemprodplaceanswer.length;i=i+2) {
  873.     a=a+sta[(itemprodplaceanswer[i])];
  874.     if((itemprodplaceanswer[i+1])==1) {
  875.         a=a+"*. ";
  876.         noproductionflag=1;
  877.         } else {
  878.         a=a+". ";
  879.         }
  880.     }
  881. a=a+"</td></tr>";
  882. if(itemprodreqanswer[0]>0) {
  883.     if(itemd[itemid*itemdlen]==11) {
  884.         a=a+"<tr><th colspan='2' class='tdd'>"+t[130+(pref[0])]+":</th><th colspan='2' class='tdd'>"+t[132+(pref[0])]+":</th></tr>";
  885.         } else {
  886.         a=a+"<tr><th colspan='2' class='tdd'>"+t[134+(pref[0])]+":</th><th colspan='2' class='tdd'>"+t[132+(pref[0])]+":</th></tr>";
  887.         }
  888.     for(var i=0;i<itemprodreqanswer.length;i++) {
  889.         var nextanswer="<tr><td colspan='2' class='tdd'><a title='"+itemn[(itemprodreqanswer[i])]+"' href='javascript:itemtoitem("+itemprodreqanswer[i]+");'>"+getitemname((itemprodreqanswer[i]))+"</a></td><td colspan='2' class='tdd'>";
  890.         var thisitemprodplace=getproductionlocation(itemprodreqanswer[i]);
  891.         for(var j=0;j<thisitemprodplace.length;j=j+2) {
  892.             nextanswer=nextanswer+sta[(thisitemprodplace[j])];
  893.             if(thisitemprodplace[j+1]==1) {
  894.                 nextanswer=nextanswer+"*. ";
  895.                 noproductionflag=1;
  896.                 } else {
  897.                 nextanswer=nextanswer+". ";
  898.                 }
  899.             }
  900.         nextanswer=nextanswer+"</td></tr>";
  901.         aarray.push(nextanswer);
  902.         }
  903.     a=a+answersort(aarray)+"</table>";
  904.     if(itemd[itemid*itemdlen]<11) {
  905.         thiscpcost=Math.round((cpcost(itemprodreqanswer))-(((itemd[(itemid*itemdlen)+2]))*1.05))
  906.         a=a+"<div class='text'>"+t[138+(pref[0])]+": "+formatn(thiscpcost)+"c.</div>";
  907.         }
  908.     } else {
  909.     a=a+"<tr><th colspan='4' class='tdd'>"+t[134+(pref[0])]+":</th></tr><tr><td colspan='4' class='tdd'>"+t[136+(pref[0])]+".</td></tr></table>";
  910.     }
  911. if(noproductionflag==1) a=a+"<div class='text'>* = "+t[140+(pref[0])]+".</div>";
  912. if(itemd[itemid*itemdlen]<11) a=a+"<div class='text'><a href='javascript:ls(3,9);reqfor("+itemid+");'>"+t[142+(pref[0])]+"</a></div>";
  913. if(itemd[itemid*itemdlen]==1) a=a+"<div class='text'><a href='javascript:ls(3,8);usedfor("+itemid+");'>"+t[144+(pref[0])]+" "+itemn[itemid]+" "+t[146+(pref[0])]+"</a></div>";
  914. a=a+"<div class='text'>";
  915. if(itemhistory[itemhistorypos-2]) a=a+"<a href='javascript:itemback();'>&#171; "+itemn[(itemhistory[itemhistorypos-2])]+"</a> ";
  916. if(itemhistory[itemhistorypos]) a=a+"<a href='javascript:itemforward();'>"+itemn[(itemhistory[itemhistorypos])]+" &#187;</a>";
  917. a=a+"</div>";
  918. document.getElementById('itemanswerspan').innerHTML=a;
  919. a=nextanswer=noproductionflag=aarray=itemprodplaceanswer=itemprodreqanswer=thisinfo="";
  920. fixatag();
  921. }
  922.  
  923. function cpcost(itemprodreqanswer) {
  924. theanswer=0;
  925. for(var z=0;z<itemprodreqanswer.length;z++) {
  926.     theanswer=theanswer+((itemd[((itemprodreqanswer[z])*itemdlen)+2]));
  927.     }
  928. return theanswer;
  929. }
  930.  
  931. function answersort(thatarray) {
  932. thatarray.sort();
  933. var arraystring=thatarray.join(" ");
  934. return arraystring;
  935. }
  936.  
  937. function getproductionlocation(itemid) {
  938. var itemprodplace = new Array(0);
  939. for(var i=0;i<supply.length;i=i+3) {
  940.     if(supply[i]==itemid) {
  941.         itemprodplace.push(supply[i+1]);
  942.         itemprodplace.push(supply[i+2]);
  943.         }
  944.     }
  945. if(itemprodplace.length==0) {
  946.         itemprodplace.push(16);
  947.         itemprodplace.push(0);
  948.         }
  949. return itemprodplace;
  950. }
  951.  
  952. function getproductionrequirements(itemid) {
  953. var itemprodreq = new Array(0);
  954. for(var i=0;i<requires.length;i=i+2) {
  955.     if(requires[i]==itemid) {
  956.         itemprodreq.push(requires[i+1]);
  957.         }
  958.     }
  959. if(itemprodreq=='') itemprodreq=0;
  960. return itemprodreq;
  961. }
  962.  
  963. function getprofit(itemid) {
  964. var low=itemd[(itemid*itemdlen)+2];
  965. var high=itemd[(itemid*itemdlen)+3];
  966. if(low>0 && high>0 && low!=high) {
  967.     var profit=formatn(Math.round((((high)-(low))/(low))*100))+"%";
  968.     } else {
  969.     var profit="-";
  970.     }
  971. return profit;
  972. }
  973.  
  974. function startusage(usestation,usecategory,useitem) {
  975. if((usestation>0) && (usecategory>0)) {
  976. document.getElementById('useanswerspan').innerHTML="...";
  977. usestation=stationfix(usestation-1);
  978. var thisarray = new Array (0);
  979. var thisaarray = new Array (0);
  980. var a="";
  981. if(useitem>0) {
  982.     a="<div class='text'>&#187; "+t[148+(pref[0])]+" <a href='javascript:elsetoitem("+useitem+",4);'>"+getitemname(useitem)+"</a> ";
  983.     if(usestation==0) {
  984.         a=a+t[150+(pref[0])]+" "+(t[152+(pref[0])]).toLowerCase()+".";
  985.         for(var u=0;u<requires.length;u=u+2) {
  986.             if(useitem==requires[u+1] && requires[u]>0) {  
  987.                 thisarray.push(requires[u]);
  988.                 }
  989.             }
  990.         } else {
  991.         a=a+t[154+(pref[0])]+" "+sta[usestation]+".";
  992.         for(var u=0;u<usage.length;u=u+3) {
  993.             if(usage[u+2]==usestation && usage[u]==useitem && usage[u+1]>0) {
  994.                 thisarray.push(usage[u+1]);
  995.                 }
  996.             }
  997.         }
  998.     a=a+"</div>";
  999.     if(thisarray[0]) {
  1000.         if(usecategory>1) {
  1001.             a=a+"<table><tr><th>"+t[156+(pref[0])]+":</th><th>"+t[130+(pref[0])]+":</th></tr>";
  1002.             } else {
  1003.             a=a+"<table><tr><th>"+t[158+(pref[0])]+":</th><th>"+t[160+(pref[0])]+":</th></tr>";
  1004.             }
  1005.         for(var u=0;u<thisarray.length;u++) {
  1006.             var thisa="<tr><td class='tdd'><a title='"+itemn[(thisarray[u])]+"' href='javascript:elsetoitem("+thisarray[u]+",4);'>"+getitemname((thisarray[u]))+"</a></td><td class='tdd'>";
  1007.             thisnextarray=getproductionrequirements(thisarray[u]);
  1008.             for(var v=0;v<thisnextarray.length;v++) {
  1009.                 thisa=thisa+getitemname((thisnextarray[v]));
  1010.                 if(v<(thisnextarray.length-1)) thisa=thisa+" + ";
  1011.                 }
  1012.             thisa=thisa+"</td></tr>";
  1013.             thisaarray.push(thisa);
  1014.             }
  1015.         a=a+answersort(thisaarray)+"</table>";
  1016.         } else {
  1017.         if(usecategory>1) {
  1018.             a=a+"<div class='text'>"+t[162+(pref[0])]+".</div>";
  1019.             } else {
  1020.             a=a+"<div class='text'>"+t[164+(pref[0])]+".</div>";
  1021.             }
  1022.         }
  1023.     }
  1024. if(useitem==-1) {
  1025.     var a2="<div class='text'>&#187; "+t[148+(pref[0])]+" "+(t[96+(pref[0])]).toLowerCase()+" "+(category[usecategory]).toLowerCase()+" ";
  1026.     var flag = new Array (0,0);
  1027.     if(usecategory>1) {
  1028.         var thisswitch=t[156+(pref[0])];
  1029.         } else {
  1030.         var thisswitch=t[166+(pref[0])];
  1031.         }
  1032.     if(usestation==0) {
  1033.         a2=a2+t[150+(pref[0])]+" "+(t[152+(pref[0])]).toLowerCase()+".</div>";
  1034.         a="<table><tr><th>"+t[106+(pref[0])]+":</th><th>"+thisswitch+":</th></tr>";
  1035.         for(var u=0;u<itemn0.length;u++) {
  1036.             if(itemd[(u*itemdlen)]==usecategory) {
  1037.                 flag[1]=0;
  1038.                 thisarray= new Array (0);
  1039.                 for(var v=0;v<requires.length;v=v+2) {
  1040.                     if(u==requires[v+1] && requires[v]>0) {
  1041.                         flag[1]=1;
  1042.                         flag[0]=1;
  1043.                         thisarray.push(requires[v]);
  1044.                         }
  1045.                     }
  1046.                 if(flag[1]==1) {
  1047.                     var thisa="<tr><td class='tdd'><a title='"+itemn[u]+"' href='javascript:elsetoitem("+u+",4);'>"+getitemname(u)+"</a></td><td class='tdd'>";
  1048.                     for(var v=0;v<thisarray.length;v++) {
  1049.                         thisa=thisa+getitemname((thisarray[v]));
  1050.                         if(pref[7]<2) thisa=thisa+". ";
  1051.                         }
  1052.                     thisa=thisa+"</td></tr>";
  1053.                     thisaarray.push(thisa);
  1054.                     }
  1055.                 }
  1056.             }
  1057.         a=a+answersort(thisaarray)+"</table>"
  1058.         } else {
  1059.         a2=a2+t[154+(pref[0])]+" "+sta[usestation]+".</div>";
  1060.         a="<table><tr><th>"+t[106+(pref[0])]+":</th><th>"+thisswitch+":</th></tr>";
  1061.         for(var u=0;u<itemn0.length;u++) {
  1062.             if(itemd[(u*itemdlen)]==usecategory) {
  1063.                 flag[1]=0;
  1064.                 thisarray= new Array (0);
  1065.                 for(var v=0;v<usage.length;v=v+3) {
  1066.                     if(usage[v+2]==usestation && usage[v]==u && usage[v+1]>0) {
  1067.                         flag[1]=1;
  1068.                         flag[0]=1;
  1069.                         thisarray.push(usage[v+1]);
  1070.                         }
  1071.                     }
  1072.                 if(flag[1]==1) {
  1073.                     var thisa="<tr><td class='tdd'><a title='"+itemn[u]+"' href='javascript:elsetoitem("+u+",4);'>"+getitemname(u)+"</a></td><td class='tdd'>";
  1074.                     for(var v=0;v<thisarray.length;v++) {
  1075.                         thisa=thisa+getitemname(thisarray[v]);
  1076.                         if(pref[7]<2) thisa=thisa+". ";
  1077.                         }
  1078.                     thisa=thisa+"</td></tr>";
  1079.                     thisaarray.push(thisa);
  1080.                     }
  1081.                 }
  1082.             }
  1083.         a=a+answersort(thisaarray)+"</table>";
  1084.         }
  1085.     if(flag[0]>0) {
  1086.         a=a2+a;
  1087.         } else {
  1088.         if(usecategory>1) {
  1089.             a=a2+"<div class='text'>"+t[162+(pref[0])]+".</div>";
  1090.             } else {
  1091.             a=a2+"<div class='text'>"+t[164+(pref[0])]+".</div>";
  1092.             }
  1093.         }
  1094.     }
  1095. document.getElementById('useanswerspan').innerHTML=a;
  1096. a=a2=thisa=thisarray=thisaarray=thisa=thisswitch=flag="";
  1097. fixatag();
  1098. }}
  1099.  
  1100. function startstation(stastation,staswitch,stacategory) {
  1101. if((stastation>0) && (stacategory>0)) {
  1102. document.getElementById('staanswerspan').innerHTML="...";
  1103. stastation=stationfix(stastation);
  1104. var thisarray = new Array (0);
  1105. var thisaarray = new Array (0);
  1106. var a="";
  1107. if(staswitch==0) {
  1108.     a="<div class='text'>&#187; "+category[stacategory]+" "+(t[128+(pref[0])]).toLowerCase()+" "+sta[stastation]+".</div>";
  1109.     for(var i=0;i<supply.length;i=i+3) {
  1110.         if(supply[i+1]==stastation && itemd[(supply[i])*itemdlen]==stacategory) {
  1111.             thisarray.push(supply[i]);
  1112.             thisarray.push(supply[i+2]);
  1113.             }
  1114.         }
  1115.     if(thisarray[0]>0) {
  1116.         a=a+"<table><tr><th>"+t[106+(pref[0])]+":</th><th>"+t[160+(pref[0])]+":</th></tr>";
  1117.         for(var i=0;i<thisarray.length;i=i+2) {
  1118.                 var thisa="<tr><td class='tdd'><a title='"+itemn[(thisarray[i])]+"' href='javascript:elsetoitem("+thisarray[i]+",5);'>"+getitemname(thisarray[i])+"</a></td><td class='tdd'>";
  1119.                 if((thisarray[i+1])==0) {
  1120.                     thisnextarray=getproductionrequirements(thisarray[i]);
  1121.                     if(thisnextarray[0]) {
  1122.                         for(var j=0;j<thisnextarray.length;j++) {
  1123.                             thisa=thisa+getitemname(thisnextarray[j]);
  1124.                             if(j<(thisnextarray.length-1)) thisa=thisa+" + ";
  1125.                             }
  1126.                         } else {
  1127.                         thisa=thisa+t[168+(pref[0])]+".";
  1128.                         }
  1129.                     } else {
  1130.                     thisa=thisa+t[168+(pref[0])]+".";
  1131.                     }
  1132.                 thisa=thisa+"</td></tr>";
  1133.                 thisaarray.push(thisa);
  1134.             }
  1135.         a=a+answersort(thisaarray)+"</table>";
  1136.         } else {
  1137.         a=a+"<div class='text'>"+t[170+(pref[0])]+".</div>";
  1138.         }
  1139.     }
  1140. if(staswitch==1) {
  1141.     a="<div class='text'>&#187; "+t[172+(pref[0])]+" "+(category[stacategory]).toLowerCase()+" "+t[174+(pref[0])]+" "+sta[stastation]+".</div>";
  1142.     for(var i=0;i<shipper.length;i=i+4) {
  1143.         if(shipper[i+1]==stastation && itemd[(shipper[i+2])*itemdlen]==stacategory && shipper[i+2]!=thisarray[thisarray.length-1]) {
  1144.             thisarray.push(shipper[i+2]);
  1145.             }
  1146.         }
  1147.     if(thisarray[0]>0) {
  1148.         if(stacategory>1) {
  1149.         var thisswitch=t[156+(pref[0])];
  1150.         } else {
  1151.         var thisswitch=t[176+(pref[0])];
  1152.         }
  1153.         a=a+"<table><tr><th>"+t[106+(pref[0])]+":</th><th>"+thisswitch+":</th></tr>";
  1154.         for(var i=0;i<thisarray.length;i++) {      
  1155.             var thisa="<tr><td class='tdd'><a title='"+itemn[(thisarray[i])]+"' href='javascript:elsetoitem("+thisarray[i]+",5);'>"+getitemname(thisarray[i])+"</a></td><td class='tdd'>";
  1156.             var flag=0;
  1157.             for(var j=0;j<usage.length;j=j+3) {
  1158.                 if(usage[j+2]==stastation && usage[j]==thisarray[i]) {
  1159.                     thisa=thisa+getitemname(usage[j+1]);
  1160.                     if(pref[7]<2) thisa=thisa+". ";
  1161.                     flag=1;
  1162.                     }
  1163.                 }
  1164.             if(flag==0) thisa=thisa+"-";
  1165.             thisa=thisa+"</td></tr>";
  1166.             thisaarray.push(thisa);
  1167.             }
  1168.         a=a+answersort(thisaarray);
  1169.         a=a+"</table>";
  1170.         } else {
  1171.         a=a+"<div class='text'>"+t[170+(pref[0])]+".</div>";
  1172.         }
  1173.     }
  1174. document.getElementById('staanswerspan').innerHTML=a;
  1175. a=thisa=thisaarray=thisswitch=flag=thisnextarray="";
  1176. fixatag();
  1177. }}
  1178.  
  1179. function startlist(scat,stype,ssort,sarty) {
  1180.     if(stype>0) {
  1181.         document.getElementById('listanswerspan').innerHTML="...";
  1182.         var aa = new Array (0);
  1183.         var header="";
  1184.         var footer="";
  1185.         var flag=0;
  1186.         var ta = new Array (0);
  1187.         if(stype==1) {
  1188.             ta.push(t[106+(pref[0])]);
  1189.             ta.push(t[266+(pref[0])]+" (c)");
  1190.             ta.push(t[268+(pref[0])]+" (c)");
  1191.             ta.push(t[270+(pref[0])]+" (c)");
  1192.             ta.push(t[108+(pref[0])]+" (kg)");
  1193.             ta.push(t[272+(pref[0])]+" (c)");
  1194.             ta.push(t[272+(pref[0])]+" (%)");
  1195.             ta.push(t[274+(pref[0])]+" 1000kg");
  1196.             footer="</table><div class='text'>"+t[276+(pref[0])]+"</div>";
  1197.             }
  1198.         if(stype==2) {
  1199.             ta.push(t[106+(pref[0])]);
  1200.             ta.push(t[122+(pref[0])]);
  1201.             ta.push(t[120+(pref[0])]);
  1202.             ta.push(t[108+(pref[0])]+" (kg)");
  1203.             ta.push(t[118+(pref[0])],"Mission");
  1204.             footer="</table>";
  1205.             }
  1206.         if(stype==3) {
  1207.             ta.push(t[106+(pref[0])]);
  1208.             ta.push(t[126+(pref[0])]);
  1209.             footer="</table>";
  1210.             }
  1211.         if(stype==4) {
  1212.             ta.push(t[106+(pref[0])]);
  1213.             ta.push(t[278+(pref[0])]);
  1214.             ta.push(t[280+(pref[0])]);
  1215.             ta.push(t[282+(pref[0])]);
  1216.             ta.push(t[284+(pref[0])]);
  1217.             ta.push(t[286+(pref[0])]);
  1218.             ta.push(t[138+(pref[0])]);
  1219.             footer="</table><div class='text'>"+t[138+(pref[0])]+" = "+t[280+(pref[0])]+" - ( "+t[282+(pref[0])]+" * 105% ).</div>";
  1220.             }
  1221.         header="<table><tr>";
  1222.         for(var i=0;i<ta.length;i++) {
  1223.             header=header+"<th>"+ta[i];
  1224.             if(i!=ssort) header=header+" <a href='javascript:startlist("+scat+","+stype+","+i+","+sarty+");'>("+t[264+(pref[0])]+")</a>";
  1225.             header=header+"</th>";
  1226.             }
  1227.         header=header+"</tr>";
  1228.         for(var i=1;i<itemnlength;i=i+1) {
  1229.             if((itemd[(i*itemdlen)])==(scat) || (scat==0)) {
  1230.                 itemid=i;
  1231.                 itemname=itemn[i];
  1232.                 if(sarty==true && itemd[(i*itemdlen)+9]==-1) {
  1233.                     hidearty=1;
  1234.                     } else {
  1235.                     hidearty=0;
  1236.                     }
  1237.                 if(stype==1 && hidearty==0) {
  1238.                     flag=1;
  1239.                     baseprice=itemd[(i*itemdlen)+2];
  1240.                     lowbuyprice=baseprice;
  1241.                     maxprice=itemd[(i*itemdlen)+3];
  1242.                     mass=itemd[(i*itemdlen)+1];
  1243.                     profitpunitc=maxprice-lowbuyprice;
  1244.                     if(lowbuyprice!=0) {
  1245.                         profitpunitperc=Math.round((profitpunitc/lowbuyprice)*100);
  1246.                         } else {
  1247.                         profitpunitperc=0;
  1248.                         }
  1249.                     profitpmass=Math.round(profitpunitc/(mass/1000));
  1250.                     if(ssort==0) aa.push(itemname);
  1251.                     if(ssort==1) aa.push(baseprice);
  1252.                     if(ssort==2) aa.push(lowbuyprice);
  1253.                     if(ssort==3) aa.push(maxprice);
  1254.                     if(ssort==4) aa.push(mass);
  1255.                     if(ssort==5) aa.push(profitpunitc);
  1256.                     if(ssort==6) aa.push(profitpunitperc);
  1257.                     if(ssort==7) aa.push(profitpmass);
  1258.                     aa.push("<tr><td class='tdd'><a title='"+itemn[itemid]+"' href='javascript:elsetoitem("+itemid+",12);'>"+getitemname(itemid)+"</a></td><td class='tdr'>"+formatn(baseprice)+"</td><td class='tdr'>"+formatn(lowbuyprice)+"</td><td class='tdr'>"+formatn(maxprice)+"</td><td class='tdr'>"+formatn(mass)+"</td><td class='tdr'>"+formatn(profitpunitc)+"</td><td class='tdr'>"+formatn(profitpunitperc)+"%</td><td class='tdr'>"+formatn(profitpmass)+"</td></tr>");
  1259.                     }
  1260.                 if(stype==2 && hidearty==0) {
  1261.                     flag=1;
  1262.                     rank=itemd[(i*itemdlen)+6];
  1263.                     pol=itemd[(i*itemdlen)+5];
  1264.                     mass=itemd[(i*itemdlen)+1];
  1265.                     size=itemd[(i*itemdlen)+4];
  1266.                     mission=getmission(itemid);
  1267.                     if(ssort==0) aa.push(itemname);
  1268.                     if(ssort==1) aa.push(rank);
  1269.                     if(ssort==2) aa.push(pol);
  1270.                     if(ssort==3) aa.push(mass);
  1271.                     if(ssort==4) aa.push(size);
  1272.                     if(ssort==5) aa.push(mission);
  1273.                     aa.push("<tr><td class='tdd'><a title='"+itemn[itemid]+"' href='javascript:elsetoitem("+itemid+",12);'>"+getitemname(itemid)+"</a></td><td class='tdr'>"+rank+"</td><td class='tdr'>"+pol+"</td><td class='tdr'>"+formatn(mass)+"</td><td class='tdr'>"+size+"</td><td class='tdr'>"+mission+"</td></tr>");
  1274.                     }
  1275.                 if(stype==3 && itemd[(i*itemdlen)]<11 && hidearty==0) {
  1276.                     flag=1;
  1277.                     if(pref[1]==0) {
  1278.                         man=manufacturer[(itemd[(i*itemdlen)+7])];
  1279.                         } else {
  1280.                         man=manufacturer[(itemd[(i*itemdlen)+8])];
  1281.                         }
  1282.                     if(ssort==0) aa.push(itemname);
  1283.                     if(ssort==1) aa.push(man);
  1284.                     aa.push("<tr><td class='tdd'><a title='"+itemn[itemid]+"' href='javascript:elsetoitem("+itemid+",12);'>"+getitemname(itemid)+"</a></td><td class='tdd'>"+man+"</td></tr>");
  1285.                     }
  1286.                 if(stype==4 && itemd[(i*itemdlen)]<11 && hidearty==0) {
  1287.                     flag=1;
  1288.                     itemprodreq=getproductionrequirements(itemid);
  1289.                     if(itemprodreq.length>0) {
  1290.                         components=itemprodreq.length;
  1291.                         } else {
  1292.                         components=0;
  1293.                         }
  1294.                     makecost=cpcost(itemprodreq);
  1295.                     baseprice=itemd[(i*itemdlen)+2];
  1296.                     if(itemd[(i*itemdlen)+3]>0) {
  1297.                         sellcost=itemd[(i*itemdlen)+3];
  1298.                         } else {
  1299.                         sellcost=itemd[(i*itemdlen)+2];
  1300.                         }
  1301.                     diff=makecost-sellcost;
  1302.                     if(components>0) {
  1303.                         cptransfer=Math.round(makecost-(baseprice*1.05));
  1304.                         } else {
  1305.                         cptransfer=0;
  1306.                         }
  1307.                     if(ssort==0) aa.push(itemname);
  1308.                     if(ssort==1) aa.push(components);
  1309.                     if(ssort==2) aa.push(makecost);
  1310.                     if(ssort==3) aa.push(baseprice);
  1311.                     if(ssort==4) aa.push(sellcost);
  1312.                     if(ssort==5) aa.push(diff);
  1313.                     if(ssort==6) aa.push(cptransfer);
  1314.                     aa.push("<tr><td class='tdd'><a title='"+itemn[itemid]+"' href='javascript:elsetoitem("+itemid+",12);'>"+getitemname(itemid)+"</a></td><td class='tdr'>"+components+"</td><td class='tdr'>"+formatn(makecost)+"</td><td class='tdr'>"+formatn(baseprice)+"</td><td class='tdr'>"+formatn(sellcost)+"</td><td class='tdr'>"+formatn(diff)+"</td><td class='tdr'>"+formatn(cptransfer)+"</td></tr>");
  1315.                     }
  1316.                 }
  1317.             }
  1318.         if(flag==1) {
  1319.             for(var i=0;i<(aa.length-1); i=i+2) {
  1320.                 for(var j=i+2; j<aa.length; j=j+2) {
  1321.                     if (aa[j] < aa[i]) {
  1322.                         var dummy1 = aa[i];
  1323.                         var dummy2 = aa[i+1];
  1324.                         aa[i] = aa[j];
  1325.                         aa[i+1] = aa[j+1];
  1326.                         aa[j] = dummy1;
  1327.                         aa[j+1] = dummy2;
  1328.                         }
  1329.                     }
  1330.                 }
  1331.             a=header;
  1332.             for(var i=0;i<aa.length;i=i+2) {
  1333.                 a=a+aa[i+1];
  1334.                 }
  1335.             document.getElementById('listanswerspan').innerHTML=a+footer;
  1336.             } else {
  1337.             document.getElementById('listanswerspan').innerHTML=t[136+(pref[0])]+".";
  1338.             }
  1339.         fixatag();
  1340.         }
  1341.     }
  1342.  
  1343. function usedfor(itemid) {
  1344. if(itemid>0) {
  1345. document.getElementById('produseanswerspan').innerHTML="...";
  1346. var a="<div class='text'>&#187; "+t[144+(pref[0])]+" <a title='"+itemn[itemid]+"' href='javascript:elsetoitem("+itemid+",8);'>"+getitemname(itemid)+"</a> "+t[146+(pref[0])]+".</div>";
  1347. var b0=new Array (0);
  1348. var tier=new Array (0);
  1349. b1=getusedin(itemid);
  1350. for(i=0;i<b1.length;i++) {
  1351.     b0.push(b1[i]);
  1352.     tier.push(1);
  1353.     b2=getusedin(b1[i]);
  1354.     if(b2.length>0) {
  1355.         for(j=0;j<b2.length;j++) {
  1356.             b0.push(b2[j]);
  1357.             tier.push(2);
  1358.             b3=getusedin(b2[j]);
  1359.             if(b3.length>0) {
  1360.                 for(k=0;k<b3.length;k++) {
  1361.                     b0.push(b3[k]);
  1362.                     tier.push(3);
  1363.                     b4=getusedin(b3[k]);
  1364.                     if(b4.length>0) {
  1365.                         for(l=0;l<b4.length;l++) {
  1366.                             b0.push(b4[l]);
  1367.                             tier.push(4);
  1368.                             b5=getusedin(b4[l]);
  1369.                             if(b5.length>0) {
  1370.                                 for(m=0;m<b5.length;m++) {
  1371.                                     b0.push(b5[m]);
  1372.                                     tier.push(5);
  1373.                                     b6=getusedin(b5[m]);
  1374.                                     if(b6.length>0) {
  1375.                                         for(n=0;n<b6.length;n++) {
  1376.                                             b0.push(b6[n]);
  1377.                                             tier.push(6);
  1378.                                             }
  1379.                                         }
  1380.                                     }
  1381.                                 }
  1382.                             }
  1383.                         }
  1384.                     }
  1385.                 }
  1386.             }
  1387.         }
  1388.     }
  1389. a=a+flowprint(b0,tier,itemid);
  1390. document.getElementById('produseanswerspan').innerHTML=a;
  1391. fixatag();
  1392. a=b0=b1=b2=b3=b4=b5=b6=c=0;
  1393. }}
  1394.  
  1395. function getusedin(itemid) {
  1396. var gotusedin = new Array ();
  1397. for(var z=0;z<requires.length;z=z+2) {
  1398.     if(requires[z+1]==itemid) {
  1399.         if(requires[z]>0 && (itemd[(requires[z])*itemdlen])<11 ) {
  1400.             gotusedin.push(requires[z]);
  1401.             }
  1402.         }
  1403.     }
  1404. return gotusedin;
  1405. }
  1406.  
  1407. function flowprint(b0,tier,itemid) {
  1408. b="";
  1409. if(b0.length==0) {
  1410.     b=b+"<div class='text'>"+t[170+(pref[0])]+".</div>";
  1411.     } else {
  1412.     var c=new Array (1,0,0,0,0,0,0); // max number used, then lowest line requiring a bypass line col 1-6
  1413.     tier.reverse();
  1414.     for(i=0;i<tier.length;i++) {
  1415.         if(c[(tier[i])]<(tier.length-i)) {
  1416.             c[(tier[i])]=(tier.length-i);
  1417.             }
  1418.         }
  1419.     tier.reverse();
  1420.     for(i=0;i<c.length;i++) {
  1421.         if(c[i]>0) c[0]=i;
  1422.         }
  1423.     b=b+"<table><tr><td class='tdw'>"+getitemname(itemid)+"</td><td class='flowline'>&#172;</td><td colspan='"+((c[0]*2)-1)+"'></td></tr>";
  1424.     for(i=0;i<b0.length;i++) {
  1425.         b=b+"<tr><td></td>";
  1426.         for(j=1;j<c.length;j++) {
  1427.             if(tier[i]==j) {
  1428.                 b=b+"<td class='flowline'>+</td><td";
  1429.                 if(i<b0.length) {
  1430.                     if(tier[i+1]>j) {
  1431.                         b=b+" class='tdw'>"+getitemname(b0[i])+"</td><td class='flowline'>&#172;</td><td colspan='"+(((c[0]-j)*2)-1)+"'></td>";
  1432.                         } else {
  1433.                         b=b+" colspan='"+(((c[0]-j)*2)+1)+"'>"+getitemname(b0[i])+"</td>";
  1434.                         }
  1435.                     } else {
  1436.                     b=b+" colspan='"+(((c[0]-j)*2)+1)+"'>"+getitemname(b0[i])+"</td>";
  1437.                     }
  1438.                 } else if(tier[i]>j) {
  1439.                     b=b+"<td class='flowline'>";
  1440.                     if(c[j]>i) b=b+"|";
  1441.                     b=b+"</td><td></td>";
  1442.                 }
  1443.             }
  1444.         b=b+"</tr>";
  1445.         }
  1446.     b=b+"</table>";
  1447.     }
  1448. return b;
  1449. }
  1450.  
  1451. function generateprodreqmenu() {
  1452.     if(document.getElementById('prodreqform').prodreqcatselect) {
  1453.         var myselection = document.getElementById('prodreqform').prodreqcatselect.selectedIndex;
  1454.         if(myselection>0) {
  1455.             document.getElementById('prodreqformvoid1').innerHTML="<select name='prodreqitemsubselect' onChange='if(document.getElementById(\"prodreqform\").prodreqitemsubselect) reqfor(document.getElementById(\"prodreqform\").prodreqitemsubselect.value);' class='form'><option value=0>"+t[32+(pref[0])]+" . . .</option>"+subitemmenu(myselection,pref[0])+"</select>";
  1456.             } else {
  1457.             document.getElementById('prodreqformvoid1').innerHTML="";
  1458.             }
  1459.         }
  1460.     }
  1461.  
  1462. function reqfor(itemid) {
  1463. if(itemid>0) {
  1464. var a="<div class='text'>&#187; "+t[178+(pref[0])]+" <a title='"+itemn[itemid]+"' href='javascript:elsetoitem("+itemid+",9);'>"+getitemname(itemid)+"</a> "+(t[24+(pref[0])]).toLowerCase()+".</div>";
  1465. var b0=new Array (0);
  1466. var tier=new Array (0);
  1467. b1=getproductionrequirements(itemid);
  1468. for(i=0;i<b1.length;i++) {
  1469.     b0.push(b1[i]);
  1470.     tier.push(1);
  1471.     b2=getproductionrequirements(b1[i]);
  1472.     if(b2.length>0) {
  1473.         for(j=0;j<b2.length;j++) {
  1474.             b0.push(b2[j]);
  1475.             tier.push(2);
  1476.             b3=getproductionrequirements(b2[j]);
  1477.             if(b3.length>0) {
  1478.                 for(k=0;k<b3.length;k++) {
  1479.                     b0.push(b3[k]);
  1480.                     tier.push(3);
  1481.                     b4=getproductionrequirements(b3[k]);
  1482.                     if(b4.length>0) {
  1483.                         for(l=0;l<b4.length;l++) {
  1484.                             b0.push(b4[l]);
  1485.                             tier.push(4);
  1486.                             b5=getproductionrequirements(b4[l]);
  1487.                             if(b5.length>0) {
  1488.                                 for(m=0;m<b5.length;m++) {
  1489.                                     b0.push(b5[m]);
  1490.                                     tier.push(5);
  1491.                                     b6=getproductionrequirements(b5[m]);
  1492.                                     if(b6.length>0) {
  1493.                                         for(n=0;n<b6.length;n++) {
  1494.                                             b0.push(b6[n]);
  1495.                                             tier.push(6);
  1496.                                             }
  1497.                                         }
  1498.                                     }
  1499.                                 }
  1500.                             }
  1501.                         }
  1502.                     }
  1503.                 }
  1504.             }
  1505.         }
  1506.     }
  1507. a=a+flowprint(b0,tier,itemid);
  1508. document.getElementById('prodreqanswerspan').innerHTML=a;
  1509. fixatag();
  1510. a=b0=b1=b2=b3=b4=b5=b6=c=0;
  1511. }}
  1512.  
  1513. var clocktimeout;
  1514. var baseclocktime=365;
  1515. var clocktime=baseclocktime;
  1516.  
  1517. function startclock() {
  1518. stopclock();
  1519. document.getElementById('minitimer').style.visibility = "visible";
  1520. runclock();
  1521. }
  1522.  
  1523. function runclock() {
  1524. var mytime="";
  1525. var myminutes=Math.floor(clocktime/60);
  1526. var myseconds=clocktime-(myminutes*60);
  1527. if(myseconds<10) myseconds="0"+myseconds;
  1528. mytime=myminutes+":"+myseconds;
  1529. document.getElementById('minitimeranswerspan').innerHTML=mytime;
  1530. document.getElementById('timeranswerspan').innerHTML=mytime;
  1531. if(clocktime==0) clocktime=baseclocktime;
  1532. clocktime-=1;
  1533. clocktimeout=setTimeout("runclock();", 1000);
  1534. }
  1535.  
  1536. function resetclock() {
  1537. stopclock();
  1538. clocktime=baseclocktime;
  1539. startclock();
  1540. }
  1541.  
  1542. function stopclock() {
  1543. document.getElementById('minitimer').style.visibility = "hidden";
  1544. clearTimeout(clocktimeout);
  1545. }
  1546.  
  1547. function adjusttimer(modification) {
  1548. var futuretime=clocktime+modification;
  1549. if(futuretime<0) {
  1550.     clocktime=baseclocktime+futuretime;
  1551.     } else {
  1552.     clocktime=futuretime;
  1553.     }
  1554. }
  1555.  
  1556. // start minigame
  1557.  
  1558. var gstartstation = new Array (0);
  1559. var ghomestation = new Array (0);
  1560. var gstock = new Array (0);
  1561. var gstats = new Array (0);
  1562. var gflags = new Array (0);
  1563. var gproductionflag = new Array (0);
  1564. var gspecials = new Array (0);
  1565. var gevents = new Array (0);
  1566. var gsminable = new Array (0);
  1567.  
  1568. function initgame() {
  1569. document.getElementById('gmarketanswerspan').innerHTML="";
  1570. document.getElementById('missionanswerspan').innerHTML="";
  1571. gstartstation = new Array (13,7,1,4,10,11,8);
  1572. ghomestation = new Array (13,7,1,4,10,11,8);
  1573. gstock = new Array (0);
  1574. gflags = new Array (0,0,0,0,0); //firststart,firstwing,firsthome,dead,supplyscorematrix
  1575. gproductionflag = new Array (0);
  1576. gspecials = new Array (1,2,102,40,11,29,32,7,8,9,88,4,5,6,31); //solcore,solwake,water(fixes sol stout),matter,aman,ice,iron,qc,corr,tp,radium,oc,gp,op,iridium
  1577. gevents = new Array (0.3,0.05,0.1,0.03,0.4,0.2,0.5,0.5); //unreg piracy,reg piracy,unreg grief,reg grief,gbskracken,stripper,assassin,farmer
  1578. gsminable = new Array (0);
  1579. gflags[1]=0;
  1580. gflags[2]=0;
  1581. gflags[4]=0;
  1582. gstock = startingstock();
  1583. //Sol Stout fix
  1584. gpreproduction(gspecials[0],gspecials[2]);
  1585. gpreproduction(gspecials[1],gspecials[2]);
  1586. //mining fix
  1587. missionminemenu();
  1588. missionminesetup();
  1589. gstats = new Array (1,0,0,0,0,0,0,750,0,0); //station,credits,exp,deaths,launches,wing,bountied,cargo space,home,maxitems
  1590. gstats[0] = gstartstation[(pref[2])];
  1591. gstats[8] = ghomestation[(pref[2])];
  1592. updatemarket(gstats[0],0,0,0);
  1593. cwing(0,1);
  1594. gupdatestats();
  1595. gflags[0] = 1;
  1596. }
  1597.  
  1598. function missionminemenu() {
  1599. a="<select name='mine_what' onChange='missionmine(document.getElementById("+'"missionform"'+").mine_what.selectedIndex);' class='form'><option>. . .</option>";
  1600. for(var i=0;i<sta.length;i=i+1) {
  1601.     if(i>=17 && i<=21) {
  1602.     a=a+"<option>"+sta[i]+"</option>";
  1603.     }
  1604. }
  1605. document.getElementById('missionminemenu').innerHTML=a+"</select>";
  1606. }
  1607.  
  1608. function missionminesetup() {
  1609. for(var i=0;i<supply.length;i=i+3) {
  1610.     if(supply[i+1]>=17 && supply[i+1]<=21) {
  1611.         gsminable.push(supply[i]);
  1612.         gsminable.push(supply[i+1]);
  1613.     }
  1614. }
  1615. }
  1616.  
  1617. function missionmine(roid) {
  1618. if(roid>0) {
  1619. roid=roid+16;
  1620. gflags[3]=0;
  1621. gstats[4]++;
  1622. itemid=12; //fudge for all minerals weigh almost the same
  1623. if(gstats[4]>3) {
  1624.     if((itemd[(itemid*itemdlen)])>1 && probtest(gevents[5])) {
  1625.         gstats[6]=1;
  1626.         alert(fixde(t[180+(pref[0])]+" "+t[182+(pref[0])]+" "+sta[(gstats[0])]+"."));
  1627.         }
  1628.     if(gflags[3]==0 && isureg(gstats[0]) && probtest(gevents[0])) gpiracy(itemid);
  1629.     if(gflags[3]==0 && isureg(gstats[0])==false && probtest(gevents[1])) gpiracy(itemid);
  1630.     if(gflags[3]==0 && probtest(gevents[2])) gattack(226,itemid);
  1631.     if(gflags[3]==0 && (gstats[0]==13 || gstats[0]==11) && probtest(gevents[4])) gattack(228,itemid);
  1632.     if(gstats[6]==1 && probtest(gevents[6])) gattack(224,itemid);
  1633.     }
  1634. if(gflags[3]>0) {
  1635.     gstats[3]++;
  1636.     gstats[0]=gstats[8];
  1637.     gstats[6]=0;
  1638.     } else {
  1639.     for(var i=0;i<gsminable.length;i=i+2) {
  1640.     if(gsminable[i+1]==roid) {
  1641.         gstock[(((gstats[0])*itemnlength)+(gsminable[i]))] = 1;
  1642.         gpreproduction(gstats[0],gsminable[i]);
  1643.     }}}
  1644. chome();
  1645. gupdatestats();
  1646. updatemarket(gstats[0],0,0,0);
  1647. if(gflags[3]==1) alert(fixde(updatemarket(gstats[8],2,1,1)));
  1648. }}
  1649.  
  1650. function startmission(tosta) {
  1651. if(tosta>0) {
  1652. document.getElementById('missionanswerspan').innerHTML="...";
  1653. tosta=stationfix(tosta);
  1654. var mission1 = new Array (0);
  1655. var mission2 = new Array (0);
  1656. var mission3 = new Array (0);
  1657. for(var i=0;i<shipper.length;i=i+4) {
  1658.     if((shipper[i]==gstats[0]) && (shipper[i+1]==tosta) && (checkmarket((shipper[i+2]),gstats[0])) && (checkmarket((shipper[i+2]),tosta)==false) ) {
  1659.         var p=itemd[((shipper[i+2])*itemdlen)+1];
  1660.         if(p<1250) mission1.push(shipper[i+2]);
  1661.         if(p>=1250 && p<=5000) mission2.push(shipper[i+2]);
  1662.         if(p>5000) mission3.push(shipper[i+2]);
  1663.         }
  1664.     }
  1665. var mymissions = new Array (0);
  1666. mymissions[0]=selectmission(mission1,tosta);
  1667. mymissions[1]=selectmission(mission2,tosta);
  1668. mymissions[2]=selectmission(mission3,tosta);
  1669. document.getElementById('missionanswerspan').innerHTML="<table><tr><td class='tdd'><b>Mission&#160;1:</b></td><td class='tdd'>"+mymissions[0]+"</td></tr> <tr><td class='tdd'><b>Mission&#160;2:</b></td><td class='tdd'>"+mymissions[1]+"</td></tr> <tr><td class='tdd'><b>Mission&#160;3:</b></td><td class='tdd'>"+mymissions[2]+"</td></tr></table><div class='text'><a href='javascript:ggomission("+gstats[0]+","+tosta+",0,0,0);' class='tbc'>"+t[184+(pref[0])]+"</a></div>";
  1670. fixatag();
  1671. mymissions=mission1=mission2=mission3="";
  1672. }}
  1673.  
  1674. function selectmission(level,tosta) {
  1675. var selecteditem="";
  1676. if(level.length==0) {
  1677.     selecteditem=t[170+(pref[0])]+".</td><td class='tdd'> ";
  1678.     } else {
  1679.     var thispick=level[(Math.floor(Math.random()*level.length))];
  1680.     var thiscredits=Math.round((((itemd[(thispick*itemdlen)+2]))*1.05)/2);
  1681.     if((itemd[(thispick*itemdlen)])>1) {
  1682.         var expfactor=2;
  1683.         } else {
  1684.         var expfactor=0.5;
  1685.         }
  1686.     var thisexp=Math.round(((itemd[(thispick*itemdlen)+1])/250)*expfactor)+1;
  1687.     selecteditem=t[186+(pref[0])]+" "+getitemname(thispick)+" "+t[98+(pref[0])]+" "+sta[tosta]+", "+t[188+(pref[0])]+" "+formatn(thiscredits)+"c "+t[190+(pref[0])]+" "+thisexp+"exp "+t[192+(pref[0])]+".</td><td class='tdd'><a href='javascript:ggomission("+gstats[0]+","+tosta+","+thispick+","+thiscredits+","+thisexp+");' class='tbc'>"+t[194+(pref[0])]+"</a>";
  1688.     }
  1689. return selecteditem;
  1690. }
  1691.  
  1692. function gscore() {
  1693. if(gflags[4]==0) {
  1694.     gstats[9] = gmaxuniqueitems();
  1695.     gflags[4]=1;
  1696.     }
  1697. alert(fixde(formatn(gstats[1])+" credits.\n"+formatn(gstats[2])+" exp.\n"+formatn(gstats[4])+" "+t[196+(pref[0])]+".\n"+formatn(gstats[3])+" "+t[198+(pref[0])]+".\n"+gsupplyscore()+"% "+t[200+(pref[0])]+".\n"));
  1698. }
  1699.  
  1700. function startingstock() {
  1701. var thisstock = new Array (0);
  1702. var norequirements = new Array (0);
  1703. for(var i=0;i<itemnlength;i++) {
  1704.     if(getproductionrequirements(i)==0) {
  1705.         norequirements.push(i);
  1706.         }
  1707.     }
  1708. for(var i=0;i<norequirements.length;i++) {
  1709.     for(var j=0;j<supply.length;j=j+3) {
  1710.         if((supply[j]==norequirements[i]) || (supply[j+2]==1)) {
  1711.             thisstock[(((supply[j+1])*itemnlength)+supply[j])]=1;
  1712.             }
  1713.         }
  1714.     }
  1715. norequirements="";
  1716. return thisstock;
  1717. }
  1718.  
  1719. function gmarket(thisgmarketsta) {
  1720. var thisgmarket = gstock.slice((thisgmarketsta*itemnlength),(thisgmarketsta*itemnlength)+itemnlength);
  1721. var thisfinalgmarket = new Array (0);
  1722. for(var i=0;i<thisgmarket.length;i++) {
  1723.     if(thisgmarket[i]==1) {
  1724.         thisfinalgmarket.push(i);
  1725.         }
  1726.     }
  1727. thisgmarket="";
  1728. return thisfinalgmarket;
  1729. }
  1730.  
  1731. function checkmarket(itemtocheck,stationtocheck) {
  1732. var markettocheck=gmarket(stationtocheck);
  1733. for(var i=0;i<markettocheck.length;i++) {
  1734.     if(markettocheck[i]==itemtocheck) {
  1735.         markettocheck="";
  1736.         return true;
  1737.         break;
  1738.         }
  1739.     }
  1740. markettocheck="";
  1741. return false;
  1742. }
  1743.  
  1744. function updatemarket(whichsta,whichscreen,whichhtml,excludecommods) {
  1745. excludecommods++;
  1746. var thisbr="\n";
  1747. var thisquote=":"
  1748. var thiscounter=0;
  1749. if(whichhtml==0) {
  1750.     thisbr="<br />";
  1751.     thisquote=" <b>&#187;</b>";
  1752.     }
  1753. var mymarket=gmarket(whichsta);
  1754. var updateanswertitle=t[202+(pref[0])]+" "+sta[whichsta]+":";
  1755. var updateanswer="";
  1756. for(var i=excludecommods;i<11;i++) {
  1757.     updateanswer=updateanswer+category[i]+thisquote;
  1758.     for(var j=0;j<mymarket.length;j++) {
  1759.         if((itemd[(mymarket[j]*itemdlen)])==i) {
  1760.             if(whichscreen==2) {
  1761.                 updateanswer=updateanswer+" "+itemn[mymarket[j]]+".";
  1762.                 } else {
  1763.                 updateanswer=updateanswer+" "+getitemname(mymarket[j]);
  1764.                 if(pref[7]<2) updateanswer=updateanswer+".";
  1765.                 }
  1766.             thiscounter++;
  1767.             }
  1768.         }
  1769.     updateanswer=updateanswer+thisbr;
  1770.     }
  1771. if(whichscreen==0) {
  1772.     document.getElementById('gmarketanswerspan').innerHTML="<div class='title'>"+updateanswertitle+"</div><div class='text'>"+updateanswer+"</div>";
  1773.     }
  1774. if(whichscreen==1) {
  1775.     document.getElementById('jgtanswerspan').innerHTML="<div class='title'>"+updateanswertitle+"</div><div class='text'>"+updateanswer+"</div>";
  1776.     }
  1777. if(whichscreen==2) {
  1778.     updateanswer=t[204+(pref[0])]+"...\n\n"+updateanswertitle+"\n"+updateanswer;
  1779.     if(thiscounter==0) updateanswer=updateanswer+"\n\n"+t[206+(pref[0])];
  1780.     if(thiscounter>0 && thiscounter<13) updateanswer=updateanswer+"\n\n"+t[208+(pref[0])];
  1781.     return fixde(updateanswer);
  1782.     }
  1783. }
  1784.  
  1785. function ggomission(fromstation,tostation,itemid,creditpay,exppay) {
  1786. document.getElementById('gmarketanswerspan').innerHTML="";
  1787. document.getElementById('missionanswerspan').innerHTML="";
  1788. document.getElementById('gstationanswerspan').innerHTML=t[210+(pref[0])];
  1789. gflags[3]=0;
  1790. gstats[4]++;
  1791. if(gstats[4]>3) {
  1792.     if((itemd[(itemid*itemdlen)])>1 && probtest(gevents[5])) {
  1793.         gstats[6]=1;
  1794.         alert(fixde(t[180+(pref[0])]+" "+t[182+(pref[0])]+" "+sta[fromstation]+"."));
  1795.         }
  1796.     if(gflags[3]==0 && isureg(fromstation) && probtest(gevents[0])) gpiracy(itemid);
  1797.     if(gflags[3]==0 && isureg(fromstation)==false && probtest(gevents[1])) gpiracy(itemid);
  1798.     if(gflags[3]==0 && isureg(fromstation) && probtest(gevents[2])) gattack(226,itemid);
  1799.     if(gflags[3]==0 && isureg(fromstation)==false && probtest(gevents[3])) gattack(226,itemid);
  1800.     if(gflags[3]==0 && (fromstation==11 || fromstation==13) && probtest(gevents[4])) gattack(228,itemid);
  1801.     if(gstats[6]==1 && probtest(gevents[6])) gattack(224,itemid);
  1802.     if(gflags[3]==0 && isureg(tostation) && probtest(gevents[0])) gpiracy(itemid);
  1803.     if(gflags[3]==0 && isureg(tostation)==false && probtest(gevents[1])) gpiracy(itemid);  
  1804.     if(gflags[3]==0 && isureg(tostation) && probtest(gevents[2])) gattack(226,itemid);
  1805.     if(gflags[3]==0 && isureg(tostation)==false && probtest(gevents[3])) gattack(226,itemid);
  1806.     if(gflags[3]==0 && (tostation==11 || tostation==13) && probtest(gevents[4])) gattack(228,itemid);
  1807.     }
  1808. if(gflags[3]==0) {
  1809.     gstats[0]=tostation;
  1810.     if(gstats[5]==1) {
  1811.         gstats[1]=gstats[1]+(creditpay*gstats[7])/2;
  1812.         } else {
  1813.         gstats[1]=gstats[1]+(creditpay*gstats[7]);
  1814.         }
  1815.     gstats[2]=gstats[2]+(exppay*gstats[7]);
  1816.     if(itemid>0) gpreproduction(tostation,itemid);
  1817.     } else {
  1818.     gstats[3]++;
  1819.     gstats[0]=gstats[8];
  1820.     gstats[6]=0;
  1821.     }
  1822. chome();
  1823. gupdatestats();
  1824. updatemarket(gstats[0],0,0,0);
  1825. if(gflags[3]==1) alert(fixde(updatemarket(gstats[8],2,1,1)));
  1826. if(gflags[3]==0 && itemid==gspecials[3] && probtest(gevents[7])) {
  1827.     gstats[6]=1;
  1828.     alert(fixde(t[180+(pref[0])]+" "+t[212+(pref[0])]+"."));
  1829.     }
  1830. }
  1831.  
  1832. function gpiracy(itemid) {
  1833. var pod=250000;
  1834. if(confirm(t[214+(pref[0])]+"! "+t[216+(pref[0])]+" "+pod+"c?")) {
  1835.     if(gstats[1]>=pod) {
  1836.         gstats[1]=gstats[1]-pod;
  1837.         } else {
  1838.         alert(fixde(t[218+(pref[0])]+"!"));
  1839.         gattack(214,itemid);
  1840.         }
  1841.     } else {
  1842.     gattack(214,itemid);
  1843.     }
  1844. }
  1845.  
  1846. function gattack(attackedby,itemid) {
  1847. var extratext="";
  1848. if(attackedby==224) extratext=t[180+(pref[0])]+" "+t[220+(pref[0])]+"... ";
  1849. if((((Math.sqrt(itemd[(itemid*itemdlen)+1]))/100)-gstats[5]+Math.random())>1) {
  1850.     gflags[3]=1;
  1851.     alert(fixde(extratext+t[222+(pref[0])]+" "+(t[attackedby+(pref[0])]).toLowerCase()+". "+t[230+(pref[0])]+"."));
  1852.     } else {
  1853.     alert(fixde(extratext+t[222+(pref[0])]+" "+(t[attackedby+(pref[0])]).toLowerCase()+". "+t[232+(pref[0])]+"."));
  1854.     }
  1855. }
  1856.  
  1857. function probtest(prob) {
  1858. var p=Math.random();
  1859. if(p<prob) {
  1860.     return true;
  1861.     } else {
  1862.     return false;
  1863.     }
  1864. }
  1865.  
  1866. function isureg(station) {
  1867. if(station>10 && station<16) {
  1868.     return true;
  1869.     } else {
  1870.     return false;
  1871.     }
  1872. }
  1873.  
  1874. function gupdatestats() {
  1875. document.getElementById('gstationanswerspan').innerHTML=sta[gstats[0]];
  1876. document.getElementById('gcreditsanswerspan').innerHTML=formatn(gstats[1]);
  1877. document.getElementById('gspaceanswerspan').innerHTML=gstats[7];
  1878. }
  1879.  
  1880. function gpreproduction(gcyclestation,firstgcycleitem) {
  1881. gproductionflag[0]=firstgcycleitem;
  1882. while(gproductionflag.length>0) {
  1883.     gproductioncycle(gcyclestation,gproductionflag[0]);
  1884.     }
  1885. }
  1886.  
  1887. function gproductioncycle(gcyclestation,gcycleitem) {
  1888. gstock[(gcyclestation*itemnlength)+gcycleitem]=1;
  1889. if((itemd[(gcycleitem*itemdlen)])==1) {
  1890.     for(var i=0;i<usage.length;i=i+3) {
  1891.         if((usage[i]==gcycleitem) && (usage[i+2]==gcyclestation)) {
  1892.             var gpossibleproduction=getproductionrequirements(usage[i+1]);
  1893.             var flagwithnoname=0;
  1894.             for(var j=0;j<gpossibleproduction.length;j++) {
  1895.                 if(checkmarket(gpossibleproduction[j],gcyclestation)) flagwithnoname++;
  1896.                 }
  1897.             if(flagwithnoname==gpossibleproduction.length) {
  1898.                 gproductionflag.push(usage[i+1]);
  1899.                 if(usage[i+1]==gspecials[3]) alert(fixde("("+t[234+(pref[0])]+"!)"));
  1900.                 }
  1901.             }
  1902.         }
  1903.     }
  1904. gproductionflag.splice(0,1);
  1905. }
  1906.  
  1907. function cwing(wingonoff,nocheck) {
  1908. if(wingonoff==0) {
  1909.     document.getElementById('gwinganswerspan').innerHTML="<a href='javascript:cwing(1,0);' class='tbc'>&#47;"+(t[236+(pref[0])])+"</a>&#160;";
  1910.     } else {
  1911.     document.getElementById('gwinganswerspan').innerHTML="<a href='javascript:cwing(0,0);' class='tbc'>&#47;"+(t[238+(pref[0])])+"</a>&#160;";
  1912.     }
  1913. fixatag();
  1914. gstats[5]=wingonoff;
  1915. if(nocheck==0 && gflags[1]==0) {
  1916.     gflags[1]=1;
  1917.     alert(fixde(t[240+(pref[0])]));
  1918.     }
  1919. }
  1920.  
  1921. function chome() {
  1922. if(gstats[8]==gstats[0]) {
  1923.     document.getElementById('ghomeanswerspan').innerHTML="";
  1924.     } else {
  1925.     document.getElementById('ghomeanswerspan').innerHTML="<a href='javascript:sethome();' class='tbc'>&#47;"+(t[242+(pref[0])])+"</a>&#160;";
  1926.     }
  1927. fixatag();
  1928. }
  1929.  
  1930. function sethome() {
  1931. gstats[8]=gstats[0];chome();
  1932. if(gflags[2]==0) {
  1933.     gflags[2]=1;
  1934.     alert(fixde(t[244+(pref[0])]));
  1935.     }
  1936. }
  1937.  
  1938. function countones(arraytocount) {
  1939. var j=0;
  1940. for(var i=0;i<arraytocount.length;i++) {
  1941.     if(arraytocount[i]>0) j++;
  1942.     }
  1943. return j;
  1944. }
  1945.  
  1946. function gsupplyscore() {
  1947. var scoreline = new Array (0);
  1948. for(var i=0;i<itemnlength;i++) {
  1949.     if(itemd[(i*itemdlen)]<11) {
  1950.         for(var j=0;j<sta.length;j++) {
  1951.             if((j<16 || j>31) && gstock[(j*itemnlength)+i]==1) scoreline[i]=1;
  1952.             }
  1953.         }
  1954.     }
  1955. return ((Math.round(((gstats[9]-countones(scoreline))/gstats[9])*1000))/10);
  1956. }
  1957.  
  1958. function gmaxuniqueitems() {
  1959. var i=0;
  1960. for(var j=0;j<itemnlength;j++) {
  1961.     var k=getproductionlocation(j);
  1962.     if(itemd[(i*itemdlen)]<11 && k.length>2) i++;
  1963.     }
  1964. return i;
  1965. }
  1966.  
  1967. </script>
  1968.  
  1969. </head>
  1970.  
  1971. <body onload="init();" id="body">
  1972.  
  1973. <div id="screen_0" class="intro">
  1974. Checking for browser support...
  1975. <noscript><br />Please enable JavaScript and reload.</noscript>
  1976. <span id="introtext"> :-(</span>
  1977. <script language="JavaScript" type="text/javascript">if(document.getElementById('introtext').innerHTML) { var pass=1; document.getElementById('introtext').innerHTML=" ok.<br />Loading..."; } else { alert("Sorry, your browser is not supported. Please use Internet Explorer 5+, Mozilla (Firefox/Netscape 6+), or Opera 7+."); } </script>
  1978. </div>
  1979.  
  1980. <div id="screen_1" class="main"></div>
  1981. <div id="screen_2" class="main"></div>
  1982. <div id="screen_3" class="main"></div>
  1983. <div id="screen_4" class="main"></div>
  1984. <div id="screen_5" class="main"></div>
  1985. <div id="screen_6" class="main"></div>
  1986. <div id="screen_7" class="main"></div>
  1987. <div id="screen_8" class="main"></div>
  1988. <div id="screen_9" class="main"></div>
  1989. <div id="screen_10" class="main"></div>
  1990. <div id="screen_11" class="main"></div>
  1991. <div id="screen_12" class="main"></div>
  1992. <div id="screen_13" class="main"></div>
  1993. <div id="screen_14" class="main"></div>
  1994. <div id="screen_15" class="main"></div>
  1995. <div id="screen_16" class="main"></div>
  1996. <div id="screen_17" class="main"></div>
  1997. <div id="screen_18" class="main"></div>
  1998. <div id="screen_19" class="main"></div>
  1999. <div id="screen_20" class="main"></div>
  2000. <div id="screen_21" class="main"></div>
  2001.  
  2002. <div id="minitimer" class="minitimer"><span style="color: #ffff00;" id="minitimeranswerspan"></span></div>
  2003.  
  2004. <script language="JavaScript" type="text/javascript">document.getElementById('introtext').innerHTML=" ok.<br />Loading... ok.<br />Pre-processing... please wait.<br />If nothing happens after a few seconds, click <a href='javascript:init();'>retry</a>.";</script>
  2005.  
  2006. </body>
  2007. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top