var plan_key = ''; var meet_loc_url = '/chicago/meet-location'; // handy images var img_zipmarker, img_youarehere, img_nomatch, img_expanded, img_unknown; img_youarehere = "/images/zipmarker-youarehere.png"; img_nomatch = "/images/zipmarker-reserved.png"; img_expanded = "/images/zipmarker-viewing.png"; img_zipmarker = "/images/zipmarker.png"; img_unknown = "/images/zipmarker-unknown.png"; img_shadow = "/images/zipshadow.png"; // create a data structure for all the locations var locs = [ [39511586,'1+E+Delaware',41.89917,-87.627576],[189667267,'10+E+Grand',41.891671,-87.627391],[53188440,'100+W+Chestnut',41.89833217508443,-87.63165235519409],[96286233,'1030+N+State',41.90160627124951,-87.62864828109741],[175541188,'111+E+Wacker',41.88777406808544,-87.62360572814941],[32133560,'1120+N+La+Salle',41.902545,-87.632958],[164426568,'1130+S+Michigan',41.86860209156889,-87.62457132339478],[45108433,'1155+W+Dickens',41.919726554888776,-87.65767514705658],[235677633,'1215+W+Albion+-+Loyola',42.002544,-87.661471],[116008324,'1221+N+State',41.904354,-87.628703],[143698469,'1235+N+Damen',41.904385128477536,-87.67690658569336],[43809862,'1236+Chicago+%28Evanston%29',42.039891,-87.680397],[40922660,'1250+N+Dearborn',41.904082,-87.629999],[60401595,'1338+W+Winnemac',41.97399671814796,-87.66366720199585],[135636997,'1340+W+Morse',42.008441183614416,-87.66549110412598],[164428088,'1350+N+Lake+Shore+Drive',41.90719580355985,-87.6263952255249],[111503842,'13th%2fState',41.86606137315266,-87.62688875198364],[120156746,'13th%2fWabash+-+Under+the+El',41.8655500213915,-87.62648105621338],[126352668,'1414+W+School',41.941903824228,-87.6643967628479],[163119506,'14th%2fMichigan',41.864407,-87.624095],[28859352,'1511+N+Artesian+St',41.908940435934326,-87.68823087215424],[32541486,'1537+N+Damen',41.9094,-87.677399],[178092507,'1560+N+Sandburg+Terrace',41.910150072954515,-87.63248920440674],[45134328,'1635+W+Melrose',41.9406,-87.669935],[53862812,'171+S+Peoria',41.879569,-87.649599],[69043939,'1730+N+Clark',41.91359920908398,-87.63364791870117],[32921847,'1732+N+Dayton',41.913052,-87.649558],[168673156,'175+N+Harbor+Drive',41.88543,-87.615747],[197148385,'1800+Maple+-+Evanston',42.05000965562472,-87.68523216247559],[194377127,'1806+W+Greenleaf',42.010549748291,-87.6760858297348],[60878590,'181+N+Clark',41.885441784933164,-87.63060092926025],[178099481,'1822+S+Bishop',41.85676052376362,-87.66315221786499],[29155409,'1907+N+Milwaukee',41.916165,-87.686404],[178096403,'191+N+Wacker',41.88555360867139,-87.63639450073242],[175713812,'1926+W+Superior',41.895425275863545,-87.67589807510376],[138747967,'1953+W+Leland',41.96649453206122,-87.67821550369263],[31045721,'20+E+Randolph+Garage',41.8845,-87.627226],[95352626,'203+N+La+Salle',41.88601687635893,-87.63169527053833],[42138238,'2036+N+Clark',41.919301,-87.636651],[27212271,'2126+N+Sheffield',41.920374,-87.653326],[56304895,'217+N+Jefferson',41.886623911692304,-87.64238119125366],[93757057,'2216+W+Hirsch',41.90765891428465,-87.68263578414917],[32096676,'2237+N+Halsted',41.922474,-87.648699],[137298102,'225+W+Wacker',41.88619259770647,-87.63525724411011],[105355983,'240+E+Illinois',41.891192466241066,-87.62115955352783],[185539672,'2476+N+Lincoln',41.92689899334202,-87.65132904052734],[39511904,'275+E+Chestnut',41.8985,-87.619072],[105353650,'2930+N+Sheridan',41.935359598009676,-87.6398491859436],[164424542,'2960+N+Lake+Shore+Drive',41.936141748185,-87.63716697692871],[63030393,'300+N+Canal',41.887119120455544,-87.64034271240234],[105355287,'3033+N+Sheridan',41.93717927953419,-87.63911962509155],[100837641,'311+S+Wacker',41.877834,-87.636655],[33583964,'3134+N+Clark',41.938638,-87.649616],[54926817,'315+S+Jefferson',41.877529758690066,-87.64234900474548],[65352908,'3157+N+Broadway',41.939328,-87.644297],[88090986,'3170+N+Sheridan',41.93954159563563,-87.63976335525513],[105509539,'320+S+Clinton',41.87734203087486,-87.64070749282837],[42137625,'321+E+Erie',41.89401969472014,-87.61952877044678],[179187617,'33+W+Ontario',41.89306132620525,-87.62929201126099],[99598059,'345+E+Ohio',41.89227864791766,-87.61905670166016],[163123087,'3450+N+Lake+Shore+Drive',41.945394,-87.641587],[39976900,'3660+Lake+Shore+Drive',41.949792,-87.644126],[143703137,'3731+N+Clark',41.950107100568886,-87.65836715698242],[30444534,'3900+N+Sheridan',41.952704,-87.654399],[150802982,'401+N+State',41.88954718528966,-87.62736082077026],[51573469,'4100+N+Marine+Dr',41.956071368758266,-87.64591097831726],[45130451,'4250+N+Lincoln',41.95937840468787,-87.68262505531311],[103478213,'4250+N+Marine+Drive',41.959856,-87.646646],[187774778,'44+E+Superior',41.895711,-87.626619],[179189982,'441+E+Erie',41.89408358544318,-87.61626720428467],[43811346,'4456+N+Beacon',41.96301235602682,-87.66469180583954],[126351276,'4501+N+Damen',41.96370242435911,-87.6787519454956],[51572494,'4543+N+Dover',41.96483723146334,-87.66472399234772],[135640223,'4943+N+Claremont',41.97150406427502,-87.6874852180481],[180812120,'500+W+Monroe',41.880576,-87.640425],[163109470,'50th%2fS+East+End+Ave',41.804206105436926,-87.58521795272827],[91281005,'510+W+Wellington',41.936497,-87.642615],[69041636,'520+N+Kingsbury',41.89104870551747,-87.63987064361572],[175724934,'525+S+Wabash',41.874929479660025,-87.62570858001709],[143710856,'525+W+Monroe',41.88024975302528,-87.64047145843506],[51574181,'5333+N+Sheridan',41.978603,-87.654999],[159976193,'53rd%2fSouth+Lake+Park',41.79983928625847,-87.58770704269409],[63083259,'5450+N+Winthrop',41.981515965301014,-87.65863537788391],[25616542,'55th+and+Greenwood%2fUniversity+of+Chicago',41.79470429401854,-87.59935855865479],[51576914,'58th+and+Drexel%2fUniversity+of+Chicago',41.78975687577227,-87.6037734746933],[33340145,'58th+and+Kimbark%2fUniversity+of+Chicago',41.78962,-87.594472],[32661042,'600+W+Diversey',41.93296520111223,-87.64416217803955],[114091809,'6007+N+Sheridan',41.991586098378676,-87.65499830245972],[63295293,'60th+and+Kenwood%2fUniversity+of+Chicago',41.78478507570912,-87.59270668029785],[192564455,'6151+N+Winthrop',41.993535744074904,-87.65801310539246],[93754849,'616+W+Arlington',41.92712249544233,-87.64502048492432],[62684162,'6401+N+Sheridan',41.99869862772376,-87.659912109375],[134158326,'671+N+Clark',41.894315,-87.631182],[117445335,'711+S+Plymouth+Ct',41.873296,-87.628669],[29156951,'736+N+Milwaukee',41.895246,-87.653829],[54458402,'777+N+Michigan',41.896563294752674,-87.62378811836243],[169748457,'805+N+Milwaukee',41.896411,-87.655665],[198705705,'811+Main+St+-+Evanston',42.034137787922454,-87.68261432647705],[32097240,'820+N+Clark',41.897118,-87.631241],[126192350,'835+S+Wabash',41.870887053963976,-87.62570858001709],[30132687,'851+N+Hermitage',41.897492,-87.670999],[90401037,'900+N+Michigan+at+Four+Seasons',41.89965780497552,-87.62658834457397],[30444855,'924+W+George',41.934475,-87.651982],[198706816,'925+Sherman+-+Evanston',42.034552164183175,-87.68164873123169],[179192154,'970+S+Michigan',41.869912359714654,-87.6244854927063],[59674367,'Adams%2fWabash',41.87951,-87.626617],[27214317,'Asbury+Plaza',41.896031,-87.629732],[38621716,'Ashland%2fWabansia',41.911922,-87.667683],[164428880,'Banks%2fLake+Shore+Drive',41.90655702463376,-87.62577295303345],[29256837,'Barry%2fAshland',41.937897,-87.668649],[168670379,'Belle+Plain%2fClarendon',41.957064694324885,-87.64954805374146],[45134541,'Belmont%2fGreenview',41.93891910191132,-87.66664981842041],[45128453,'Belmont%2fSheffield',41.9391904460767,-87.65439748764038],[35281880,'Broadway%2fClarendon',41.953757,-87.649622],[26715436,'Broadway%2fMid-City+Garage',41.944344,-87.645338],[187779448,'Campbell%2fMcLean',41.918788530313705,-87.68887996673584],[25287587,'Century+Centre+Garage',41.933685,-87.645626],[138143882,'Chicago%2fWood',41.89617597130184,-87.67171382904053],[99397580,'Children%27s+Memorial+-+Chicago',41.92435,-87.647231],[38624948,'Church%2fChicago+%28Evanston%29',42.04781077803489,-87.67817258834839],[123187119,'Clarendon%2fJunior',41.96025599698873,-87.64961242675781],[35742141,'Clark%2fBelden',41.923713,-87.63913],[95221733,'Clark%2fElm',41.903144,-87.630889],[187783000,'Clark%2fHarrison',41.87432233322323,-87.63092279434204],[175793318,'Clark%2fMaple',41.90146253396543,-87.63167381286621],[135639448,'Clark%2fPolk',41.87248488123671,-87.63094425201416],[119304028,'Clark%2fRoscoe+-+Under+the+El',41.943723319020705,-87.6534104347229],[25286972,'Clark%2fSuperior',41.895713,-87.631199],[185537816,'Clinton%2fHarrison',41.874881547256294,-87.64066457748413],[26145460,'Cobbler+Square',41.9076,-87.6366],[164429917,'Columbus%2fE+S+Water',41.88619259770647,-87.62143850326538],[187781804,'Congress%2fWells',41.87553,-87.633629],[42322131,'Dakin%2fSheridan+-+Under+the+El',41.9539689780455,-87.65379667282104],[104147457,'Dearborn%2fLake',41.885505684236115,-87.62905597686768],[37613811,'Dearborn%2fOhio',41.891857,-87.629648],[163111975,'Dickens%2fOakley',41.91891626213061,-87.68467426300049],[50965793,'E+Monroe+Garage',41.884291586551846,-87.61752247810364],[61840852,'Federal%2fVan+Buren',41.877118354460166,-87.63000011444092],[126376288,'Franklin+Center+Garage',41.880169872316046,-87.63487100601196],[28251870,'Franklin%2fRandolph',41.8845,-87.635941],[49566963,'Franklin%2fVan+Buren',41.87732605401404,-87.63484954833984],[169431326,'Fullerton%2fSacramento+-+Under+the+El',41.92499919387561,-87.70186185836792],[189640598,'Fullerton%2fSawyer',41.92410515102226,-87.70943641662598],[164617464,'Fulton%2fGreen',41.88630442013054,-87.64841079711914],[211479493,'Glenwood%2fArthur',42.000653,-87.6656],[56409963,'Grand%2fMcClurg',41.891639719756526,-87.61804819107056],[117443300,'Grand%2fSt%2e+Clair',41.89214,-87.622684],[50963801,'Grant+Park+North',41.882384,-87.624185],[26716641,'Halsted+North%2fFabulous+Parking',41.945728,-87.649432],[25505932,'Halsted%2fNewport',41.944554,-87.649399],[179190980,'Halsted%2fWashington',41.8829177113481,-87.6468014717102],[72233083,'Honore%2fMilwaukee',41.90820186740787,-87.67561912536621],[39961476,'Hoyne%2fCornelia',41.94544700303534,-87.68184185028076],[95379970,'Hubbard%2fWabash',41.89026600256849,-87.62637376785278],[169447267,'Huron%2fSedgwick',41.89454679127386,-87.63817548751831],[26715872,'Irving+Park%2fJanssen',41.9543,-87.665944],[169746467,'Irving+Park%2fSouthport',41.954339,-87.664441],[27547816,'Jackson%2fGreen+St',41.878807,-87.648399],[95348905,'Jefferson%2fLake',41.88540983525773,-87.64328241348267],[178136808,'Jewel+on+DesPlaines',41.88838108672255,-87.64463424682617],[143704491,'Kedzie%2fGeorge',41.93464128837872,-87.70782709121704],[123187605,'Lake%2fFranklin',41.88548970941635,-87.63572931289673],[53866750,'Lawrence+El%2fUptown',41.969041,-87.658881],[42584087,'Lawrence%2fMagnolia',41.96919079421467,-87.66167163848877],[183522477,'Leavitt%2fAugusta',41.89980154632204,-87.6824426651001],[123185969,'Leavitt%2fWabansia+-+Under+the+El',41.912417581583355,-87.68151998519897],[33924212,'Lexington+Lot%2fUniversity+of+Chicago',41.788638,-87.597999],[25287725,'Lincoln+Park+Market',41.927929,-87.641875],[119309084,'Lincoln+Square+-+Under+the+El',41.966287122553474,-87.68945932388306],[45133875,'Lincoln%2fWestern',41.967073,-87.688814],[120161283,'Lincoln%2fWrightwood+-+Under+the+El',41.92865506017972,-87.65300273895264],[28255602,'Little+Italy%2fFillmore',41.868532,-87.662433],[45135243,'Logan+Square+El',41.930489,-87.707803],[169429660,'Lyndale%2fCalifornia+-+Under+the+El',41.92278002874872,-87.69795656204224],[29256019,'Madison%2fWells',41.88215088443533,-87.63343334197998],[56550003,'Margate%2fMcCutcheon',41.97231767722285,-87.6538610458374],[37879903,'Marina+Towers',41.88804163622188,-87.62872070074081],[137289703,'Mart+Parc+Wells',41.88938744701814,-87.63373374938965],[26716981,'Merchandise+Mart',41.889987,-87.634209],[93752924,'Midwest+Buddhist+Temple',41.914190014631124,-87.63974189758301],[169432601,'Milwaukee%2fMedill+-+Under+the+El',41.924073220688676,-87.70042419433594],[25975921,'Navy+Pier',41.8911,-87.614225],[119287122,'North%2fDamen+-+Under+the+El',41.91064509931676,-87.67890214920044],[137287649,'Orchard%2fWrightwood',41.929724640838245,-87.64572858810425],[180036007,'Piper%27s+Alley+Garage',41.91114,-87.636303],[175543131,'Pratt%2fBosworth',42.004550718283525,-87.66905307769775],[102532751,'Presidential+Towers',41.88140002416609,-87.64296054840088],[164615476,'Rice%2fWestern',41.89730998384814,-87.68774271011353],[189671200,'Sheraton+at+Columbus%2f+E+N+Water',41.88914783886193,-87.61918544769287],[38622993,'Sherman+Plaza+%28Evanston%29',42.04723714527636,-87.68257141113281],[175540226,'Sherman%2fFoster+%28Evanston%29',42.05349902251761,-87.68227100372314],[168662280,'Southport+Brown+Line+-+Under+the+El',41.94375523951854,-87.66424655914307],[28792551,'State%2fBalbo',41.873383,-87.62747],[95226992,'State%2fRoosevelt',41.86828250989843,-87.6270604133606],[61838040,'State%2fSuperior',41.89531346940502,-87.62858390808105],[120163539,'Thorndale+Station+-+Under+the+El',41.98960848263659,-87.65892505645752],[113031839,'Trump+Tower',41.888748489937704,-87.62663125991821],[66877120,'Wabash%2fChicago',41.89641555309493,-87.62658834457397],[88093633,'Wabash%2fVan+Buren',41.8767508843651,-87.62575149536133],[175547005,'Washington%2fFranklin',41.88358867734762,-87.6350212097168],[33340750,'Webster%2fClybourn',41.9216,-87.665871],[163117377,'Webster%2fLincoln',41.921726297418545,-87.64285326004028],[90605073,'Wells%2fMonroe',41.880425490234074,-87.63347625732422],[89070278,'Western%2fWinnebago',41.91503629413068,-87.68656253814697]]; // create a data structure for all the location groups var loc_grps = [ [43226156, 41.97399671814796, -87.66366720199585, 15],[25318771, 41.91554094469305833333333333333333333333, -87.68262062551371166666666666666666666667, 15],[25318779, 41.95831201501797025, -87.6479293647041325, 15],[43226212, 41.977478880841288, -87.65583180790710333333333333333333333333, 15],[38790618, 42.04387679336560128571428571428571428571, -87.68184388905552428571428571428571428571, 15],[238889608, 41.908940435934326, -87.68823087215424, 15],[25621043, 41.79307851959933228571428571428571428571, -87.59446210129547142857142857142857142857, 15],[25318773, 41.9391715117233831875, -87.64548507772636375, 15],[25318774, 41.940615033131572, -87.666775428082276, 15],[25318775, 41.92156196885583854545454545454545454545, -87.64273964994118454545454545454545454545, 15],[25318776, 41.9234509216821032, -87.656240785307312, 15],[43226048, 41.9670122286497648, -87.684545198223878, 15],[43226254, 41.926847980452331, -87.70421818709818666666666666666666666667, 15],[25318777, 41.87839918985135072222222222222222222222, -87.62922592114300222222222222222222222222, 15],[25318778, 41.952412703861605, -87.682233452796935, 15],[25318780, 41.90405090552056805263157894736842105263, -87.63019679533386210526315789473684210526, 15],[178100859, 41.85676052376362, -87.66315221786499, 15],[25318781, 41.89229054237891624, -87.6266186224961848, 15],[25318782, 41.8844593149574015, -87.64450742646408, 15],[43226084, 42.00001862255587455555555555555555555556, -87.66328328724924777777777777777777777778, 15],[30593866, 41.897240955467113, -87.677759255871584, 15],[25318783, 41.868532, -87.662433, 15],[43226118, 41.9665203454262075, -87.6624921091690075, 15],[59222152, 41.88156014004351333333333333333333333333, -87.64880293237304666666666666666666666667, 15],[25318785, 41.9080582018973632, -87.678292528881836, 15],[25318786, 41.95270972551634085714285714285714285714, -87.65581368997192285714285714285714285714, 15]]; // even though we have vehicle_id, it is not relevant at this stage since it will just be used for // counting up how many vehicles match said criteria. we will leave it out of the array. // make, model, location, amenity list var vehicles = [ [94562,5107542,33583964,['']],[94562,5107542,39976900,['']],[4264850,4264865,51574181,[49167247,'']],[4264850,4264865,42137625,[49167247,'']],[4264850,4264865,51572494,[49167247,'']],[94564,742432,54458402,['']],[94564,742432,194377127,['']],[94564,2870368,45134328,['']],[94564,742432,93754849,['']],[94564,742432,72233083,['']],[2190563,18381550,189671200,['']],[94563,33798998,63295293,['']],[94563,33798998,25287587,['']],[4264850,4264865,38624948,[49167247,'']],[94564,2870368,123185969,['']],[2968515,1014543,135639448,[485650,'']],[5240856,5240857,26715436,[485650,'']],[5240856,5240857,32096676,[485650,'']],[5240856,5240857,51573469,[485650,'']],[94564,742432,25287587,['']],[4264850,4264866,56550003,[49167247,'']],[4264850,4264866,169748457,[49167247,'']],[4264850,4264866,63083259,[49167247,'']],[4264850,4264866,96286233,[49167247,'']],[94563,33798998,26715436,['']],[94564,742432,30132687,['']],[94562,5107542,175540226,['']],[94562,5107542,32921847,['']],[2968515,9878842,25287587,[485650,'']],[94564,742432,163111975,['']],[94564,742432,38622993,['']],[94564,742432,37613811,['']],[94564,742432,89070278,['']],[3140121,22855272,123187605,[485650,49167247,'']],[94564,742432,32661042,['']],[5240856,5240857,25286972,[485650,'']],[94562,5107542,26716641,['']],[94562,5107542,30444534,['']],[94563,33798998,51576914,['']],[94563,33798998,39511904,[485650,'']],[94563,33798998,169431326,['']],[4264850,4264865,25287725,[49167247,'']],[4264850,4264865,33340750,[49167247,'']],[2190563,6869299,45135243,[49167247,'']],[2968515,1014543,95226992,[485650,'']],[2968515,1014543,30444534,['']],[2968515,1014543,114091809,['']],[94563,94567,138747967,['']],[2968515,1014543,150802982,[485650,'']],[2968515,1014543,111503842,[485650,'']],[2968515,1014543,102532751,[485650,'']],[5240856,5240857,40922660,[485650,'']],[5240856,5240857,37879903,[485650,'']],[2190563,6869299,175713812,[49167247,'']],[2190563,6869299,164615476,[49167247,'']],[29744489,29744656,26716641,['']],[2190563,6869299,43811346,[49167247,'']],[2190563,6869299,91281005,[49167247,'']],[94563,23642479,126351276,['']],[2190563,6869299,164429917,[49167247,'']],[2190563,6869299,169746467,[49167247,'']],[29744489,29744656,138143882,['']],[29744489,29744656,33924212,['']],[29744489,29744656,111503842,['']],[2190563,6869299,69041636,[49167247,'']],[2190563,6869299,66877120,[49167247,'']],[2190563,6869299,138143882,[49167247,'']],[29744489,29744656,164617464,['']],[29744489,29744656,187779448,['']],[94563,94567,45130451,['']],[2190563,6869299,38621716,[49167247,'']],[2190563,6869299,28859352,[49167247,'']],[29744489,29744656,137287649,['']],[29744489,29744656,26715872,['']],[94563,94567,104147457,[49167247,'']],[94564,742432,25616542,['']],[2190563,6869299,179190980,[49167247,'']],[2190563,6869299,39511904,[49167247,'']],[2190563,6869299,164426568,[49167247,'']],[2190563,6869299,119309084,[49167247,'']],[2190563,6869299,60401595,[49167247,'']],[2190563,6869299,39961476,[49167247,'']],[2190563,6869299,32661042,[49167247,'']],[2190563,6869299,168662280,[49167247,'']],[2190563,6869299,25505932,[49167247,'']],[2190563,6869299,116008324,[49167247,'']],[94565,18942988,42322131,[485650,'']],[94565,18942988,28251870,[485650,'']],[94565,18942988,35281880,[485650,'']],[94565,18942988,62684162,[485650,'']],[94565,18942988,32661042,[485650,'']],[94565,18942988,37879903,[485650,'']],[94565,18942988,53866750,[485650,'']],[94565,18942988,43809862,[485650,'']],[94565,18942988,50963801,[485650,'']],[94565,18942988,143698469,[485650,'']],[94565,18942988,90401037,[485650,'']],[94565,18942988,175541188,[485650,'']],[94565,18942988,29155409,[485650,'']],[94565,18942988,137289703,[485650,'']],[94565,18942988,56550003,[485650,'']],[94564,742432,120163539,['']],[94564,742432,185539672,['']],[2190563,9876627,126192350,[49167247,'']],[2190563,9876627,26715436,[49167247,'']],[3140121,32144640,102532751,[485650,49167247,'']],[3140121,32144640,189671200,[485650,49167247,'']],[94564,742432,164615476,['']],[94564,742432,53188440,['']],[94564,742432,42138238,['']],[94564,742432,120161283,['']],[94564,742432,27547816,['']],[94564,742432,65352908,['']],[94564,742432,137298102,['']],[29744489,29744656,120156746,['']],[29744489,29744656,28255602,['']],[29744489,29744656,51573469,['']],[29744489,29744656,32133560,['']],[29744489,29744656,123187119,['']],[29744489,29744656,27212271,['']],[29744489,29744656,26715436,['']],[29744489,29744656,163117377,['']],[29744489,29744656,53866750,['']],[32061749,32062060,53862812,[49167247,'']],[32061749,32062060,168662280,[49167247,'']],[2190563,6869299,54926817,[49167247,'']],[2190563,9876627,135636997,[49167247,'']],[2190563,9876627,63030393,[49167247,'']],[2190563,9876627,59674367,[49167247,'']],[2190563,9876627,45128453,['']],[2190563,6869299,29256019,[49167247,'']],[2190563,6869299,42137625,[49167247,'']],[2190563,9876627,32096676,[49167247,'']],[2190563,9876627,169447267,['']],[2190563,9876627,90605073,[49167247,'']],[2190563,9876627,27214317,['']],[2190563,9876627,42322131,[49167247,'']],[3140121,32144640,26716641,[485650,49167247,'']],[29744489,29744656,53862812,['']],[29744489,29744656,39976900,['']],[29744489,29744656,105509539,['']],[4264850,4264865,33583964,[49167247,'']],[4264850,4264865,102532751,['']],[4264850,4264865,175724934,[49167247,'']],[2190563,9876627,56409963,[49167247,'']],[2190563,9876627,39511586,[49167247,'']],[2190563,9876627,137289703,[49167247,'']],[2190563,6869299,235677633,[49167247,'']],[2190563,6869299,35281880,[49167247,'']],[4264850,4264865,69041636,[49167247,'']],[4264850,4264865,69043939,[49167247,'']],[2968515,1014543,95379970,['']],[2968515,1014543,95352626,['']],[4264850,4264865,135640223,[49167247,'']],[4264850,4264865,39961476,[49167247,'']],[4264850,4264865,143704491,[49167247,'']],[4264850,4264865,90605073,[49167247,'']],[3140121,32144640,26716981,[485650,49167247,'']],[32061749,32062060,99598059,[49167247,'']],[32061749,32062060,61838040,[49167247,'']],[32061749,32062060,169432601,[49167247,'']],[32061749,32062060,102532751,[49167247,'']],[5240856,5240857,28792551,[49167247,'']],[5240856,5240857,32133560,[49167247,'']],[5240856,5240857,163119506,[49167247,'']],[5240856,5240857,27214317,[49167247,'']],[4264850,4264865,134158326,[49167247,'']],[3140121,32144640,95348905,[485650,49167247,'']],[3140121,32144640,60878590,[485650,49167247,'']],[3140121,32144640,105355983,[485650,49167247,'']],[3140121,32144640,180812120,[485650,49167247,'']],[3140121,32144640,61838040,[485650,49167247,'']],[94564,742432,168670379,[49167247,'']],[94564,742432,35281880,['']],[94564,742432,45135243,[49167247,'']],[94564,742432,95348905,['']],[94565,24497839,45130451,['']],[94565,24497839,93754849,['']],[94565,24497839,126352668,['']],[94565,24497839,43811346,['']],[94565,24497839,45134541,['']],[94565,24497839,37879903,['']],[94565,24497839,93757057,['']],[94565,24497839,31045721,['']],[94565,24497839,60401595,['']],[2190563,9876627,105355983,[49167247,'']],[2190563,9876627,32097240,[49167247,'']],[2190563,6869299,197148385,[49167247,'']],[2190563,6869299,45108433,[49167247,'']],[2968515,1014543,91281005,[485650,'']],[2968515,1014543,31045721,[485650,'']],[2968515,1014543,28792551,[485650,'']],[2968515,1014543,120161283,[485650,'']],[2968515,1014543,51574181,[485650,'']],[3140121,32144640,39976900,[485650,49167247,'']],[3140121,32144640,99397580,[485650,49167247,'']],[3140121,32144640,88093633,[485650,49167247,'']],[3140121,32144640,113031839,[49167247,'']],[3140121,32144640,90605073,[49167247,'']],[94564,3398752,126376288,['']],[94564,3398752,143710856,[49167247,'']],[94564,3398752,99397580,[49167247,'']],[5240856,5240857,96286233,[485650,49167247,'']],[5240856,5240857,100837641,[485650,49167247,'']],[5240856,5240857,95379970,[485650,49167247,'']],[5240856,5240857,90605073,[49167247,'']],[5240856,5240857,27547816,[485650,49167247,'']],[5240856,5240857,169447267,[485650,49167247,'']],[2968515,1014543,65352908,[485650,'']],[2968515,1014543,88090986,[485650,'']],[2968515,1014543,95221733,[485650,'']],[2968515,1014543,105353650,[485650,'']],[2968515,1014543,164428088,[485650,'']],[2968515,1014543,25287725,[485650,'']],[3140121,32144640,29256837,[485650,49167247,'']],[3140121,32144640,99598059,[485650,49167247,'']],[3140121,32144640,49566963,[485650,49167247,'']],[3140121,32144640,116008324,[485650,49167247,'']],[32061749,68438186,88093633,['']],[32061749,68438186,39511586,['']],[32061749,68438186,93752924,['']],[32061749,32062060,104147457,[49167247,'']],[32061749,32062060,103478213,[49167247,'']],[5240856,5240857,63030393,[49167247,'']],[5240856,5240857,56304895,[49167247,'']],[5240856,5240857,137287649,[485650,49167247,'']],[5240856,5240857,25616542,[485650,49167247,'']],[94563,64790058,35281880,[49167247,'']],[94563,64790058,187783000,[49167247,'']],[94563,64790058,95352626,[49167247,'']],[94563,64790058,59674367,[49167247,'']],[94563,64790058,25505932,[49167247,'']],[4264850,4264865,32541486,[49167247,'']],[2968515,1014543,32541486,[485650,'']],[2968515,1014543,29256019,[485650,'']],[4264850,4264865,33340145,[49167247,'']],[32061749,68438186,198706816,['']],[32061749,68438186,50963801,['']],[4264850,4264865,113031839,[49167247,'']],[4264850,4264865,45134328,[49167247,'']],[4264850,4264865,88090986,[49167247,'']],[94563,94567,117445335,['']],[94563,94567,120163539,[49167247,'']],[94563,94567,105509539,[49167247,'']],[94563,94567,25616542,['']],[94563,94567,32921847,['']],[94563,94567,95226992,['']],[4264850,4264865,143703137,[49167247,'']],[94563,45910234,197148385,[49167247,'']],[94563,45910234,50965793,[49167247,'']],[94563,45910234,178096403,[49167247,'']],[94563,45910234,105355287,[49167247,'']],[94563,45910234,163123087,[49167247,'']],[94563,45910234,189640598,[49167247,'']],[94563,45910234,29156951,[49167247,'']],[94563,45910234,30444534,[49167247,'']],[94563,45910234,40922660,[49167247,'']],[94564,3398752,164428880,[49167247,'']],[94564,3398752,164426568,[49167247,'']],[94564,3398752,60401595,[49167247,'']],[94564,3398752,164424542,[49167247,'']],[94564,3398752,25975921,[49167247,'']],[94564,3398752,168673156,[49167247,'']],[94564,3398752,119287122,[49167247,'']],[94564,3398752,51572494,[49167247,'']],[94564,3398752,42584087,[49167247,'']],[2190563,9876627,43809862,[49167247,'']],[2190563,9876627,168673156,[49167247,'']],[2190563,9876627,175540226,[49167247,'']],[2190563,9876627,169429660,[49167247,'']],[2190563,9876627,175724934,[49167247,'']],[2190563,9876627,163119506,[49167247,'']],[2190563,9876627,135640223,[49167247,'']],[2190563,9876627,194377127,[49167247,'']],[2190563,9876627,32921847,[49167247,'']],[2190563,9876627,198705705,[49167247,'']],[2190563,6869299,175543131,[49167247,'']],[2190563,6869299,211479493,[49167247,'']],[2190563,6869299,179192154,[49167247,'']],[2190563,6869299,185539672,[49167247,'']],[2190563,9876627,90401037,[49167247,'']],[2190563,6869299,169429660,[49167247,'']],[2190563,9876627,175793318,[49167247,'']],[2190563,9876627,117443300,[49167247,'']],[2190563,9876627,62684162,[49167247,'']],[2190563,9876627,51576914,[49167247,'']],[2190563,9876627,163123087,[49167247,'']],[2190563,9876627,175547005,[49167247,'']],[2190563,9876627,175541188,[49167247,'']],[2190563,9876627,119304028,[49167247,'']],[2190563,9876627,45134541,[49167247,'']],[2190563,6869299,29256837,[49167247,'']],[2190563,6869299,169432601,[49167247,'']],[2190563,6869299,63083259,[49167247,'']],[2190563,6869299,42138238,[49167247,'']],[2190563,6869299,25286972,[49167247,'']],[4264850,55604681,95221733,[49167247,'']],[4264850,55604681,93757057,[49167247,'']],[4264850,4264865,178099481,[49167247,'']],[4264850,4264865,178092507,[49167247,'']],[4264850,4264865,179190980,[49167247,'']],[94564,742432,175543131,[49167247,'']],[94564,742432,180036007,[49167247,'']],[94564,742432,164429917,[49167247,'']],[94564,742432,178099481,[49167247,'']],[94563,163026706,180812120,[49167247,'']],[94563,163026706,180036007,[49167247,'']],[94563,163026706,25287725,[49167247,'']],[94563,163026706,179192154,[49167247,'']],[94563,163026706,178092507,[49167247,'']],[94563,163026706,45128453,[49167247,'']],[94563,163026706,175547005,[49167247,'']],[94563,163026706,192564455,[49167247,'']],[94563,163026706,178136808,[49167247,'']],[94563,163026706,175793318,[49167247,'']],[94563,94567,28255602,[49167247,'']],[94563,94567,26715436,[49167247,'']],[94563,94567,179187617,[49167247,'']],[94563,94567,179189982,[49167247,'']],[94564,742432,29155409,[49167247,'']],[94564,742432,189667267,[49167247,'']],[94564,742432,179189982,[49167247,'']],[94564,742432,179187617,[49167247,'']],[94564,742432,45133875,[49167247,'']],[94564,3398752,31045721,[49167247,'']],[94563,45910234,56409963,[49167247,'']],[94563,45910234,159976193,[49167247,'']],[94563,45910234,163117377,[49167247,'']],[94563,45910234,117443300,[49167247,'']],[94563,45910234,163109470,[49167247,'']],[94563,45910234,123187119,[49167247,'']],[94563,45910234,123187605,[49167247,'']],[94563,45910234,164617464,[49167247,'']],[94564,742432,26145460,[49167247,'']],[94564,742432,27212271,[49167247,'']],[94564,742432,185537816,[49167247,'']],[94564,742432,183522477,[49167247,'']],[94564,742432,105355287,[49167247,'']],[94564,742432,61840852,[49167247,'']],[4264850,4264865,30444855,[49167247,'']],[94563,94567,183522477,[49167247,'']],[94563,94567,56304895,[49167247,'']],[94563,94567,32541486,[49167247,'']],[94564,742432,187783000,[49167247,'']],[94564,742432,33340750,[458515,49167247,'']],[94564,742432,26715436,[49167247,'']],[94564,742432,187774778,[49167247,'']],[94564,742432,135636997,[49167247,'']],[94564,742432,26716981,[49167247,'']],[4264850,4264865,42138238,[49167247,'']],[4264850,4264865,189640598,[49167247,'']],[4264850,4264865,187781804,[49167247,'']],[4264850,4264865,189667267,[49167247,'']],[4264850,4264865,65352908,[49167247,'']],[4264850,4264865,159976193,[49167247,'']],[4264850,4264865,35742141,[49167247,'']],[4264850,4264865,187779448,[49167247,'']],[4264850,4264865,25505932,[49167247,'']],[94563,163026706,26716641,[49167247,'']],[94563,163026706,168670379,[49167247,'']],[94563,163026706,117445335,[49167247,'']],[94563,163026706,211479493,[49167247,'']] ]; // local array of makes and models so we can tell which is which var mks_mos = [[3140121,1],[22855272,0],[32144640,0],[2968515,1],[1014543,0],[9878842,0],[94562,1],[5107542,0],[94563,1],[94567,0],[45910234,0],[64790058,0],[33798998,0],[23642479,0],[163026706,0],[2190563,1],[6869299,0],[9876627,0],[18381550,0],[29744489,1],[29744656,0],[4264850,1],[4264866,0],[4264865,0],[55604681,0],[32061749,1],[68438186,0],[32062060,0],[94564,1],[742432,0],[3398752,0],[2870368,0],[94565,1],[18942988,0],[24497839,0],[5240856,1],[5240857,0]]; // get a local set of ids for the amenities (we dont really need the description, unless // we want to get really fancy and have the form adjust itself based on selections made // (only show relevant body styles / amenities / neighborhoods based on the chosen make/model) var amenities = [458515,49167247,485650]; // get a local set of ids for the styles so we can easily figure out what styles are needed var styles = [8577467,8577468,142802904,8586495,8577469,8577471,8577470,8577472,8577473]; // get a local mapping of locations to location groups. this allows us to trim accordion // results by neighborhood. var lgmap = [[28255602,25318783],[32541486,25318785],[72233083,25318785],[93757057,25318785],[119287122,25318785],[143698469,25318785],[26715872,25318786],[30444534,25318786],[35281880,25318786],[39976900,25318786],[42322131,25318786],[143703137,25318786],[169746467,25318786],[25616542,25621043],[33340145,25621043],[33924212,25621043],[51576914,25621043],[63295293,25621043],[159976193,25621043],[163109470,25621043],[30132687,30593866],[138143882,30593866],[164615476,30593866],[175713812,30593866],[183522477,30593866],[45133875,43226048],[119309084,43226048],[126351276,43226048],[135640223,43226048],[138747967,43226048],[62684162,43226084],[114091809,43226084],[120163539,43226084],[135636997,43226084],[175543131,43226084],[192564455,43226084],[194377127,43226084],[211479493,43226084],[235677633,43226084],[42584087,43226118],[43811346,43226118],[51572494,43226118],[53866750,43226118],[60401595,43226156],[51574181,43226212],[56550003,43226212],[63083259,43226212],[45135243,43226254],[143704491,43226254],[169429660,43226254],[169431326,43226254],[169432601,43226254],[189640598,43226254],[27547816,59222152],[53862812,59222152],[164617464,59222152],[178099481,178100859],[28859352,238889608],[38622993,38790618],[38624948,38790618],[43809862,38790618],[175540226,38790618],[197148385,38790618],[198705705,38790618],[198706816,38790618],[29155409,25318771],[38621716,25318771],[89070278,25318771],[123185969,25318771],[163111975,25318771],[187779448,25318771],[25287587,25318773],[25505932,25318773],[26715436,25318773],[26716641,25318773],[30444855,25318773],[32661042,25318773],[33583964,25318773],[45128453,25318773],[65352908,25318773],[88090986,25318773],[91281005,25318773],[105353650,25318773],[105355287,25318773],[119304028,25318773],[163123087,25318773],[164424542,25318773],[29256837,25318774],[45134328,25318774],[45134541,25318774],[126352668,25318774],[168662280,25318774],[25287725,25318775],[32096676,25318775],[32921847,25318775],[35742141,25318775],[42138238,25318775],[69043939,25318775],[93752924,25318775],[93754849,25318775],[99397580,25318775],[137287649,25318775],[163117377,25318775],[27212271,25318776],[33340750,25318776],[45108433,25318776],[120161283,25318776],[185539672,25318776],[28251870,25318777],[28792551,25318777],[29256019,25318777],[31045721,25318777],[49566963,25318777],[50963801,25318777],[50965793,25318777],[59674367,25318777],[60878590,25318777],[61840852,25318777],[88093633,25318777],[90605073,25318777],[95226992,25318777],[95352626,25318777],[100837641,25318777],[104147457,25318777],[111503842,25318777],[117445335,25318777],[120156746,25318777],[123187605,25318777],[126192350,25318777],[126376288,25318777],[135639448,25318777],[137298102,25318777],[163119506,25318777],[164426568,25318777],[164429917,25318777],[168673156,25318777],[175541188,25318777],[175547005,25318777],[175724934,25318777],[178096403,25318777],[179192154,25318777],[180812120,25318777],[187781804,25318777],[187783000,25318777],[39961476,25318778],[45130451,25318778],[51573469,25318779],[103478213,25318779],[123187119,25318779],[168670379,25318779],[26145460,25318780],[32097240,25318780],[32133560,25318780],[39511586,25318780],[39511904,25318780],[40922660,25318780],[53188440,25318780],[54458402,25318780],[69043939,25318780],[90401037,25318780],[93752924,25318780],[95221733,25318780],[96286233,25318780],[116008324,25318780],[164428088,25318780],[164428880,25318780],[175793318,25318780],[178092507,25318780],[180036007,25318780],[25286972,25318781],[25975921,25318781],[26716981,25318781],[27214317,25318781],[37613811,25318781],[37879903,25318781],[42137625,25318781],[56409963,25318781],[61838040,25318781],[66877120,25318781],[69041636,25318781],[95379970,25318781],[99598059,25318781],[105355983,25318781],[113031839,25318781],[117443300,25318781],[134158326,25318781],[137289703,25318781],[150802982,25318781],[169447267,25318781],[179187617,25318781],[179189982,25318781],[187774778,25318781],[189667267,25318781],[189671200,25318781],[29156951,25318782],[54926817,25318782],[56304895,25318782],[63030393,25318782],[95348905,25318782],[102532751,25318782],[105509539,25318782],[143710856,25318782],[169748457,25318782],[178136808,25318782],[179190980,25318782],[185537816,25318782]]; // get a local mapping of models to styles. this allows us to trim accordion results by style var stylemap = [[94567,8577471],[742432,8577473],[1014543,8577468],[2870368,8577472],[3398752,8586495],[4264865,8577473],[4264866,142802904],[5107542,8577470],[5240857,8577471],[6869299,8577471],[9876627,142802904],[9878842,8577467],[9878842,8577468],[18381550,8577469],[18942988,8577471],[22855272,8577471],[24497839,142802904],[32062060,8577470],[32062060,8577473],[32144640,8577471],[33798998,8577470],[45910234,8577471],[45910234,8586495],[64790058,8577470],[163026706,8586495],[163026706,142802904]]; // globals for finding your local address in the search box var closestaddr = new Object(); var firstaddr = new Object(); var addrstr; // TODO: right now, this just returns the coords for one address, // we should expand this to support multiple address geocoding function refreshCarsByAddress() { var addr = document.getElementById('gmaps-address').value; addrstr = addr; var new_addr; if (addr.match(/[ ]*/) != null && addr != "enter some or all of an address") { geocode(addrstr, function (p) { // see if this address is closer to the current fleet of a modified address is closer if (p) { firstaddr.lat = p.lat(); firstaddr.lng = p.lng(); } else { // this is kinda lame, but at least it is in the ocean firstaddr.lat = 0; firstaddr.lng = 0; } geocode(addrstr + ', Illinois', function (s) { var old_dist, new_dist, e; if (!s && (firstaddr.lat == 0 && firstaddr.lng == 0)) { closestaddr.lat = 0; closestaddr.lng = 0; } else if (!s) { closestaddr.lat = firstaddr.lat; closestaddr.lng = firstaddr.lng; } else if (firstaddr.lat == 0 && firstaddr.lng == 0) { closestaddr.lat = s.lat(); closestaddr.lng = s.lng(); } else { old_dist = Math.sqrt(Math.pow(firstaddr.lat - 41.9147539, 2) + Math.pow(firstaddr.lng - -87.6469655, 2)); new_dist = Math.sqrt(Math.pow(s.lat() - 41.9147539, 2) + Math.pow(s.lng() - -87.6469655, 2)); if (old_dist >= new_dist) { closestaddr.lat = s.lat(); closestaddr.lng = s.lng(); } else { closestaddr.lat = firstaddr.lat; closestaddr.lng = firstaddr.lng; } } if (!(closestaddr.lat == 0 && closestaddr.lng == 0)) { find_loc.in_progress = 1; find_loc.retry = 1; place_home(closestaddr.lat, closestaddr.lng); recenter(eval(find_loc.map), closestaddr.lat, closestaddr.lng, 16, 0); e = document.getElementById('location_group_id'); if (e) { e.selectedIndex = 0; } $('#new-type-filter').hide(); find_loc.in_progress = 0; refreshAccordion(find_loc); } else { alert("sorry, we couldn't find that address"); } }); }); } }