wlRRSOADateArr = new Array(20020213,20020214,20020215,20020218,20020219,20020220,20020221,20020222,20020225,20020226,20020227,20020228,20020301,20020304,20020305,20020306,20020307,20020308,20020311,20020312,20020313,20020314,20020315,20020318,20020319,20020320,20020321,20020322,20020325,20020326,20020327,20020328,20020402,20020403,20020404,20020405,20020408,20020409,20020410,20020411,20020412,20020415,20020416,20020417,20020418,20020419,20020422,20020423,20020424,20020426,20020429,20020430,20020501,20020502,20020503,20020506,20020507,20020508,20020509,20020510,20020513,20020514,20020515,20020516,20020517,20020520,20020521,20020522,20020523,20020524,20020527,20020528,20020529,20020530,20020531,20020603,20020604,20020605,20020606,20020607,20020611,20020612,20020613,20020614,20020617,20020618,20020619,20020620,20020621,20020624,20020625,20020626,20020627,20020628,20020701,20020702,20020703,20020704,20020705,20020708,20020709,20020710,20020711,20020712,20020715,20020716,20020717,20020718,20020719,20020722,20020723,20020724,20020725,20020726,20020729,20020730,20020731,20020801,20020802,20020805,20020806,20020807,20020808,20020809,20020812,20020813,20020814,20020815,20020816,20020819,20020820,20020821,20020822,20020823,20020826,20020827,20020828,20020829,20020830,20020902,20020903,20020904,20020905,20020906,20020909,20020910,20020911,20020912,20020913,20020916,20020917,20020918,20020919,20020920,20020923,20020924,20020925,20020926,20020927,20020930,20021001,20021002,20021003,20021004,20021007,20021008,20021009,20021010,20021011,20021014,20021015,20021016,20021017,20021018,20021021,20021022,20021023,20021024,20021025,20021028,20021029,20021030,20021031,20021101,20021104,20021105,20021106,20021107,20021108,20021111,20021112,20021113,20021114,20021115,20021118,20021119,20021120,20021121,20021122,20021125,20021126,20021127,20021128,20021129,20021202,20021203,20021204,20021205,20021206,20021209,20021210,20021211,20021212,20021213,20021216,20021217,20021218,20021219,20021220,20021223,20021224,20021227,20021230,20021231,20030102,20030103,20030106,20030107,20030108,20030109,20030110,20030113,20030114,20030115,20030116,20030117,20030120,20030121,20030122,20030123,20030124,20030128,20030129,20030130,20030131,20030203,20030204,20030205,20030206,20030207,20030210,20030211,20030212,20030213,20030214,20030217,20030218,20030219,20030220,20030221,20030224,20030225,20030226,20030227,20030228,20030303,20030304,20030305,20030306,20030307,20030310,20030311,20030312,20030313,20030314,20030317,20030318,20030319,20030320,20030321,20030324,20030325,20030326,20030327,20030328,20030331,20030401,20030402,20030403,20030404,20030407,20030408,20030409,20030410,20030411,20030414,20030415,20030416,20030417,20030422,20030423,20030424,20030428,20030429,20030430,20030501,20030502,20030505,20030506,20030507,20030508,20030509,20030512,20030513,20030514,20030515,20030516,20030519,20030520,20030521,20030522,20030523,20030526,20030527,20030528,20030529,20030530,20030602,20030603,20030604,20030605,20030606,20030610,20030611,20030612,20030613,20030616,20030617,20030618,20030619,20030620,20030623,20030624,20030625,20030626,20030627,20030630,20040914,20040915,20040916,20040917,20040920,20040921,20040922,20040923,20040924,20040927,20040928,20040929,20040930,20041001,20041004,20041005,20041006,20041007,20041008,20041011,20041012,20041013,20041014,20041015,20041018,20041019,20041020,20041021,20041022,20041025,20041026,20041027,20041028,20041029,20041101,20041102,20041103,20041104,20041105,20041108,20041109,20041110,20041111,20041112,20041115,20041116,20041117,20041118,20041119,20041122,20041123,20041124,20041125,20041126,20041129,20041130,20041201,20041202,20041203,20041206,20041207,20041208,20041209,20041210,20041213,20041214,20041215,20041216,20041217,20041220,20041221,20041222,20041223,20041224,20041229,20041230,20041231,20050104,20050105,20050106,20050107,20050110,20050111,20050112,20050113,20050114,20050117,20050118,20050119,20050120,20050121,20050124,20050125,20050127,20050128,20050131,20050201,20050202,20050203,20050204,20050207,20050208,20050209,20050210,20050211,20050214,20050215,20050216,20050217,20050218,20050221,20050222,20050223,20050224,20050225,20050228,20050301,20050302,20050303,20050304,20050307,20050308,20050309,20050310,20050311,20050314,20050315,20050316,20050317,20050318,20050321,20050322,20050323,20050324,20050329,20050330,20050331,20050401,20050404,20050405,20050406,20050407,20050408,20050411,20050412,20050413,20050414,20050415,20050418,20050419,20050420,20050421,20050422,20050426,20050427,20050428,20050429,20050502,20050503,20050504,20050505,20050506,20050509,20050510,20050511,20050512,20050513,20050516,20050517,20050518,20050519,20050520,20050523,20050524,20050525,20050526,20050527,20050530,20050531,20050601,20050602,20050603,20050606,20050607,20050608,20050609,20050610,20050614,20050615,20050616,20050617,20050620,20050621,20050622,20050623,20050624,20050627,20050628,20050629,20050630,20050701,20050704,20050705,20050706,20050707,20050708,20050711,20050712,20050713,20050714,20050715,20050718,20050719,20050720,20050721,20050722,20050725,20050726,20050727,20050728,20050729,20050801,20050802,20050803,20050804,20050805,20050808,20050809,20050810,20050811,20050812,20050815,20050816,20050817,20050818,20050819,20050822,20050823,20050824,20050825,20050826,20050829,20050830,20050831,20050901,20050902,20050905,20050906,20050907,20050908,20050909,20050912,20050913,20050914,20050915,20050916,20050919,20050920,20050921,20050922,20050923,20050926,20050927,20050928,20050929,20050930,20051003,20051004,20051005,20051006,20051007,20051010,20051011,20051012,20051013,20051014,20051017,20051018,20051019,20051020,20051021,20051024,20051025,20051026,20051027,20051028,20051031,20051101,20051102,20051103,20051104,20051107,20051108,20051109,20051110,20051111,20051114,20051115,20051116,20051117,20051118,20051121,20051122,20051123,20051124,20051125,20051128,20051129,20051130,20051201,20051202,20051205,20051206,20051207,20051208,20051209,20051212,20051213,20051214,20051215,20051216,20051219,20051220,20051221,20051222,20051223,20051228,20051229,20051230,20060103,20060104,20060105,20060106,20060109,20060110,20060111,20060112,20060113,20060116,20060117,20060118,20060119,20060120,20060123,20060124,20060125,20060127,20060130,20060131,20060201,20060202,20060203,20060206,20060207,20060208,20060209,20060210,20060213,20060214,20060215,20060216,20060217,20060220,20060221,20060222,20060223,20060224,20060227,20060228,20060301,20060302,20060303,20060306,20060307,20060308,20060309,20060310,20060313,20060314,20060315,20060316,20060317,20060320,20060321,20060322,20060323,20060324,20060327,20060328,20060329,20060330,20060331,20060403,20060404,20060405,20060406,20060407,20060410,20060411,20060412,20060413,20060418,20060419,20060420,20060421,20060424,20060426,20060427,20060428,20060501,20060502,20060503,20060504,20060505,20060508,20060509,20060510,20060511,20060512,20060515,20060516,20060517,20060518,20060519,20060522,20060523,20060524,20060525,20060526,20060529,20060530,20060531,20060601,20060602,20060605,20060606,20060607,20060608,20060609,20060613,20060614,20060615,20060616,20060619,20060620,20060621,20060622,20060623,20060626,20060627,20060628,20060629,20060630,20060703,20060704,20060705,20060706,20060707,20060710,20060711,20060712,20060713,20060714,20060717,20060718,20060719,20060720,20060721,20060724,20060725,20060726,20060727,20060728,20060731,20060801,20060802,20060803,20060804,20060807,20060808,20060809,20060810,20060811,20060814,20060815,20060816,20060817,20060818,20060821,20060822,20060823,20060824,20060825,20060828,20060829,20060830,20060831,20060901,20060904,20060905,20060906,20060907,20060908,20060911,20060912,20060913,20060914,20060915,20060918,20060919,20060920,20060921,20060922,20060925,20060926,20060927,20060928,20060929,20061002,20061003,20061004,20061005,20061006,20061009,20061010,20061011,20061012,20061013,20061016,20061017,20061018,20061019,20061020,20061023,20061024,20061025,20061026,20061027,20061030,20061031,20061101,20061102,20061103,20061106,20061107,20061108,20061109,20061110,20061113,20061114,20061115,20061116,20061117,20061120,20061121,20061122,20061123,20061124,20061127,20061128,20061129,20061130,20061201,20061204,20061205,20061206,20061207,20061208,20061211,20061212,20061213,20061214,20061215,20061218,20061219,20061220,20061221,20061222,20061227,20061228,20061229,20070102,20070103,20070104,20070105,20070108,20070109,20070110,20070111,20070112,20070115,20070116,20070117,20070118,20070119,20070122,20070123,20070124,20070125,20070129,20070130,20070131,20070201,20070202,20070205,20070206,20070207,20070208,20070209,20070212,20070213,20070214,20070215,20070216,20070219,20070220,20070221,20070222,20070223,20070226,20070227,20070228,20070301,20070302,20070305,20070306,20070307,20070308,20070309,20070312,20070313,20070314,20070315,20070316,20070319,20070320,20070321,20070322,20070323,20070326,20070327,20070328,20070329,20070330,20070402,20070403,20070404,20070405,20070410,20070411,20070412,20070413,20070416,20070417,20070418,20070419,20070420,20070423,20070424,20070426,20070427,20070430,20070501,20070502,20070503,20070504,20070507,20070508,20070509,20070510,20070511,20070514,20070515,20070516,20070517,20070518,20070521,20070522,20070523,20070524,20070525,20070528,20070529,20070530,20070531,20070601,20070604,20070605,20070606,20070607,20070608,20070612,20070613,20070614,20070615,20070618,20070619,20070620,20070621,20070622,20070625,20070626,20070627,20070628,20070629,20070702,20070703,20070704,20070705,20070706,20070709,20070710,20070711,20070712,20070713,20070716,20070717,20070718,20070719,20070720,20070723,20070724,20070725,20070726,20070727,20070730,20070731,20070801,20070802,20070803,20070806,20070807,20070808,20070809,20070810,20070813,20070814,20070815,20070816,20070817,20070820,20070821,20070822,20070823,20070824,20070827,20070828,20070829,20070830,20070831,20070903,20070904,20070905,20070906,20070907,20070910,20070911,20070912,20070913,20070914,20070917,20070918,20070919,20070920,20070921,20070924,20070925,20070926,20070927,20070928,20071001,20071105,20071106,20071107,20071108,20071109,20071112,20071113,20071114,20071115,20071116,20071119,20071120,20071121,20071122,20071123,20071126,20071127,20071128,20071129,20071130,20071203,20071204,20071205,20071206,20071207,20071210,20071211,20071212,20071213,20071214,20071217,20071218,20071219,20071220,20071221,20071224,20071227,20071228,20071231,20080102,20080103,20080104,20080107,20080108,20080109,20080110,20080111,20080114,20080115,20080116,20080117,20080118,20080121,20080122,20080123,20080124,20080125,20080129,20080130,20080131,20080201,20080204,20080205,20080206,20080207,20080208,20080211,20080212,20080213,20080214,20080215,20080218,20080219,20080220,20080221,20080222,20080225,20080226,20080227,20080228,20080229,20080303,20080304,20080305,20080306,20080307,20080310,20080311,20080312,20080313,20080314,20080317,20080318,20080319,20080320,20080325,20080326,20080327,20080328,20080331,20080401,20080402,20080403,20080404,20080407,20080408,20080409,20080410,20080411,20080414,20080415,20080416,20080417,20080418,20080421,20080422,20080423,20080424,20080428,20080429,20080430,20080501,20080502,20080505,20080506,20080507,20080508,20080509,20080512,20080513,20080514,20080515,20080516,20080519,20080520,20080521,20080522,20080523,20080526,20080527,20080528,20080529,20080530,20080602,20080603,20080604,20080605,20080606,20080610,20080611,20080612,20080613,20080616,20080617,20080618,20080619,20080620,20080623,20080624,20080625,20080626,20080627,20080630,20080701,20080702,20080703,20080704,20080707,20080708,20080709,20080710,20080711,20080714,20080715,20080716,20080717,20080718,20080721,20080722,20080723,20080724,20080725,20080728,20080729,20080730,20080731,20080801,20080804,20080805,20080806,20080807,20080808,20080811,20080812,20080813,20080814,20080815,20080818,20080819,20080820,20080821,20080822,20080825,20080826,20080827,20080828,20080829,20080901,20080902,20080903,20080904,20080905); wlRRSOAPriceArr = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.1,0.1,0.1,0.1,0.15,0.15,0.17,0.3,0.32,0.32,0.24,0.24,0.285,0.28,0.28,0.28,0.24,0.24,0.32,0.26,0.26,0.3,0.32,0.26,0.26,0.26,0.22,0.22,0.26,0.26,0.2,0.225,0.225,0.26,0.26,0.175,0.19,0.24,0.235,0.26,0.235,0.3,0.27,0.27,0.27,0.27,0.21,0.21,0.21,0.21,0.28,0.2,0.225,0,0.215,0.215,0.225,0.195,0.2,0.23,0.205,0.205,0.2,0.175,0.175,0.16,0.16,0.16,0.16,0.125,0.12,0.12,0.12,0.2,0.16,0.185,0.185,0.185,0.15,0.145,0.18,0.15,0.15,0.15,0.145,0.14,0.14,0.14,0.13,0.125,0.125,0.125,0.11,0.11,0.11,0.1,0.1,0.095,0.1,0.095,0.085,0.085,0.09,0.06,0.061,0.059,0.059,0.059,0.075,0.075,0.08,0.065,0.065,0.065,0.075,0.08,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.105,0.13,0.13,0.13,0.14,0.09,0.12,0.12,0.12,0.12,0.12,0.1,0.09,0.09,0.08,0.08,0.08,0.07,0.07,0.07,0.08,0.07,0.07,0.07,0.07,0.07,0.065,0.055,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.055,0.055,0.055,0.055,0.055,0.055,0.055,0.055,0.055,0.055,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.1,0.044,0.044,0.044); wlRRSOALastPrice = 0.044; // asAtDate must be a string of type yyyymmdd // function returns price, or -1 if out of range function getHistoricalPriceRRSO(asAtDate) { var count = wlRRSOADateArr.length; var date = parseInt(asAtDate); if (date > wlRRSOADateArr[count-1] || date < wlRRSOADateArr[0]) return -1; var lower = 0; var upper = count-1; var index = parseInt(upper/2); var curDate; // binary search for date while(upper - lower > 1) { curDate = wlRRSOADateArr[index]; if (curDate == date) return wlRRSOAPriceArr[index]; if (curDate > date) upper = index; else lower = index; index = parseInt((upper+lower)/2); } // Make sure that what we've found is actually the right day. if (wlRRSOADateArr[upper] == date) { return wlRRSOAPriceArr[upper]; } else { return -1; } }