Convention map script

From WikiFur
Jump to: navigation, search

// This powers the map of active conventions. Edit events in the "Add map points" section below.

// To get latitude and longitude, find the target on Google Maps, then click the cog and Share (or check the URL) and copy the first two numbers after the '@' (including the decimal bits).

// Reload the map to check it works after you edit! If there's an apostrophe in a name or location, put a backslash (\) in front of it.

var map = null;
var infoWindow = null;
var meets = [];

// number of conventions in different areas, displayed in drop down
var count = 0;
var count_na = 0;
var count_eu = 0; 
var count_oceania = 0;
var count_japan = 0;
var count_others = 0;

//constants specifying which region is selected in the drop down
var FILT_ALL = 0;
var FILT_NA = 1;
var FILT_EU = 2;
var FILT_OCEANIA = 3;
var FILT_JAPAN = 4;
var FILT_OTHERS = 5;

//These functions are used to classify conventions into regions
//They are hacks; function only be accurate for existing data
function is_in_na(lat, lng){
    return (lat > 14 && lat < 75 && 
                lng > -144 && lng < -48);
}
function is_in_eu(lat, lng){
    return (lat > 36 && lat < 75 && 
                lng > -13 && lng < 40);
}
function is_in_oceania(lat, lng){
    return (lat > -50 && lat < -5 && 
                lng > 110 && lng < 180);
}
function is_in_japan(lat, lng){
    return (lat > 30 && lat < 40 && 
                lng > 130 && lng < 145);
}

var is_phone = false;

function load() {
var useragent = navigator.userAgent;
is_phone = (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1) //TODO support other phones that support tel: protocol?
  
if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1) {
  //working around Android Browser having no scroll bar (Fennec/Firefox Mobile has no bar, but can scroll inside divs)
  //document.getElementById("map").style.position="fixed"; //Google Maps will undo this
  document.getElementById("side").style.height="auto";
  document.getElementById("side").style.overflow="auto";
}
var mapNode = document.getElementById("map");

markers = [];

// Set initial position
// These values are assuming a 1280x800 monitor with 96dpi.
// it would be nice to scale this according to client area size
var mapOpts = {
    zoom: 3,
    center: new google.maps.LatLng(40,-40),
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    streetViewControl: true
};
// creating map
map = new google.maps.Map(mapNode, mapOpts);
infoWindow = new google.maps.InfoWindow({});

// try to detect user location and recenter on them
var ipcheck = new XMLHttpRequest();
ipcheck.open("GET", "//ipapi.co/json/");
ipcheck.onload = function(){
	if (ipcheck.status >= 200 && ipcheck.status < 300) {
		var loc = JSON.parse(ipcheck.responseText);
		map.panTo({lat: loc.latitude, lng: loc.longitude});
		map.setZoom(5); // more local detail, more useful for them
	}
};
ipcheck.send();

// Add map points
// Format: addLocation(latitude, longitude, 'Name', 'website name [no http[s]://]', 'Place name<br>Street<br>City, State Code<br>Country', 'Phone Number', 'Mon[th] 1-3 20XX', attendance);
addLocation(29.4318682,-98.4907969, 'Alamo City Furry Invasion', 'furryinvasion.org', 'El Tropicano Riverwalk Hotel<br>110 Lexington Avenue<br>San Antonio, TX 78205<br>USA', '+1 (210) 223-9461', 'Oct 4-6 2019', 1006);
//addLocation(30.3709252, -81.4089605, 'Annual JaxFurs Spring Picnic', 'floridafurs.com', 'Kathryn Abbey Hanna Park<br>500 Wonderwood Dr<br>Jacksonville, FL 32233<br>USA', '+1 (904) 249-4700', 'Apr 22 2017', 127);
addLocation(35.833243, -78.771843, 'Anthro Crossroads East', 'www.anthrocrossroads.com', 'Embassy Suites, Raleigh-Durham-Research Triangle<br>201 Harrison Oaks Blvd<br>Cary, NC 27513<br>USA', '+1 (919) 677-1840', 'Jan 18-20 2019', 295);
addLocation(42.3507047,-71.0721189, 'Anthro New England', 'www.anthronewengland.com', 'Boston Park Plaza Hotel<br>50 Park Plaza<br>Boston, MA 02116-3912<br>USA', '+1 (617) 426-2000', 'Feb 21-24 2019', 2050);
addLocation(47.6145297,-122.3336784, 'Anthro Northwest', 'www.anthronw.com', 'Hyatt Regency Seattle<br>808 Howell Street<br>Seattle, WA 98101<br>USA', '+1 (206) 973-1234', 'Nov 21-24 2019', 1051);
addLocation(35.043670, -85.312226, 'Anthro SouthEast', 'anthrose.com', 'Chattanooga Marriott Downtown<br>Two Carter Plaza<br>Chattanooga, TN 37402<br>USA', '+1 (423) 756-0002', 'Oct 11-14 2018', 605);
addLocation(41.0849157,-111.9832517, 'Anthro Weekend Utah', 'www.anthroweekendutah.org', 'Davis Conference Center<br>1651 North 700 West<br>Layton, UT 84041<br>USA', '+1 (801) 416-8888', 'July 19-21 2019', 603);
addLocation(35.527932, -97.567312, 'AnthroExpo', 'anthroexpo.net', 'Wyndham Oklahoma City<br>2945 Northwest Expy<br>Oklahoma City, OK 73112<br>USA', '+1 (405) 848-4811', 'Oct 18-20 2019', null);
addLocation(40.0995858,-82.9886064, 'AnthrOhio', 'anthrohio.org', 'Crowne Plaza Columbus North - Worthington<br>6500 Doubletree Avenue<br>Columbus, Ohio 43229<br>USA', '+1 (614) 885-1885', 'May 24-26 2019', 862);
addLocation(40.444334,   -79.995532, 'Anthrocon', 'www.anthrocon.org', 'Westin Convention Center Pittsburgh<br>1000 Penn Avenue<br>Pittsburgh, Pennsylvania 15222<br>USA', '+1 (412) 281-3700', 'Jul 4-7 2019', 8407);
addLocation(43.6650078,-89.7873581, 'AquatiFur', 'aquatifur.com', 'Chula Vista Resort<br>2501 River Road<br>Wisconsin Dells, WI 53965<br>USA', '+1 (855) 388-4782', 'Oct 11-13 2019', 463);
addLocation(-34.609142, -58.382638, 'Argentina Fur Fiesta', 'furfiesta.com', 'Castelar Hotel<br>Av. de Mayo 1152<br>CABA, Buenos Aires<br>Argentina', '','Jun 2019', null);
addLocation(33.4199573,-111.8310621, 'Arizona Fur Con', 'Arizonafurcon.com', 'Delta Hotels Phoenix Mesa<br>200 North Centennial Way<br>Mesa, AZ 85201<br>USA', '+1 (480) 898-8300', 'Oct 25-27 2019', 1101);
addLocation(39.384661, -74.428310, 'Atlantic City Fur Con', 'www.acfurcon.com', 'Harrah\'s Resort Atlantic City<br>777 Harrah\'s Blvd<br>Atlantic City, NJ 08401<br>USA', '+1 (609) 441-5000', 'Apr 26-28 2019', null);
addLocation(46.589912,   -114.127239, 'Big Sky Paw Camp', 'www.camppaw.org', 'Larry Creek Group Campground<br>Florence, MT 59833<br>USA', '', 'June 21-24 2018', 56);
addLocation(39.523177,   -119.78106, 'Biggest Little Fur Con', 'www.goblfc.org', 'Grand Sierra Resort<br>2500 East 2nd Street<br>Reno, NV 89595<br>USA', '+1 (775) 789-2000', 'May 16-19 2019', 5435);
addLocation(-25.518127,  -49.255450, 'Boliche Furry Paraná', 'facebook.com/bolichefurryparana', 'Big Bowl Boliche<br>R. Francisco Derosso, 3480<br>Curitiba, PR<br>Brazil', '','Apr 28 2018', 45);
addLocation(-23.970691,  -46.329962, 'Brasil FurFest', 'brasilfurfest.com.br', 'Mercure Santos Hotel<br>Av. Washington Luiz, 565<br>Santos, SP<br>Brazil', '+55 (13) 3036-1013','Aug 23-25 2019', 431);
addLocation(-34.601148, -58.45338, 'Furry Night', 'furrynight.com', 'Teatro La Farfalla<br>Av. Juan B. Justo, 3436<br>CABA, Buenos Aires<br>Argentina', '','December 8 2018', 86);
//addLocation(34.080577,  -117.762728, 'Califur', 'califur.com', 'Sheraton Fairplex Hotel & Conference Center<br>601 W McKinley Ave<br>Pomona, CA 91768<br>USA', '', 'May 19-21 2017', 1393);
addLocation(43.721056,  -121.291552, 'Campfire Tails', 'campfiretails.org', 'Ogden Group Camp C<br>Paulina Lake<br>La Pine, OR<br>USA', '', 'Aug 2-6 2018', 143);
//addLocation(49.381977,   -121.446555, 'CampFur', 'campfur.ca', 'Near Hope<br>Hope, BC V0X 1L0<br>Canada', '', 'Jun 16-19 2017', null);
addLocation(19.503268, -99.391848, 'Camping Paws', 'facebook.com/CapitalFurCampingPaws/', 'Capoxi Water Dam<br>54570 Jilotzingo, Estado de Mexico<br>Mexico', '', 'Mar 31-Apr 1 2018', 25);
addLocation(45.3481137,-75.9201629, 'CanFURence', 'www.canfurence.ca', 'The Brookstreet Hotel<br>525 Legget Drive<br>Kanata, ON K2K 2W2<br>Canada', '+1 (613) 271-1800', 'Aug 2-4 2019', 457);
//addLocation(38.9439,     -95.3385, 'Central Midwest Furmeet', 'cmfurmeet.webs.com', ' Bloomington West Group Camp at Clinton Lake near Lawrence, Kansas', '', 'Sep 14-16 2012', 22);
//addLocation(37.686355,   -97.342702, 'Central Plains Furcon', 'cpfurcon.com', 'Drury Plaza Hotel Broadview<br>400 West Douglas Ave<br>Wichita, KS 67202<br>USA', '', 'Sep 1-4 2016', 100)
addLocation(37.611267, -97.631684, 'Central Plains Fur Meet', 'centralplainsfurmeet.com', 'near Lake Afton<br>Goddard, KS 67052<br>USA', '', 'May 17-20 2018', null);
addLocation(49.638649,    15.298977, 'ČeSFuR', 'www.cesfur.org', 'Hotel Skalský dvůr<br>Lísek 52<br>593 01 Bystřice nad Pernštejnem<br>Czech Republic', '+420 606 725 502', 'Jul 10-14 2019', 289);
//addLocation(-37.820007,  145.013429, 'ConFurgence', 'confurgence.com', 'Amora Hotel Riverwalk<br>649 Bridge Road<br>Richmond, Melbourne, Victoria, 3121<br>Australia', '+61-3-9027-2000', 'Feb 23-25 2018', 681);
addLocation(20.673552, -103.389225, 'Confuror', 'confuror.org', 'Fiesta Americana Guadalajara<br>Calle Aurelio Aceves 225<Br>Vallarta Poniente 44110<br>Guadalajara, Jalisco<br>Mexico', '+52 (33) 38 18 14 00', 'Oct 11-13 2019', 541);
addLocation(19.435967, -99.151094, 'ConFurtiva', 'web.facebook.com/groups/furrymx/', 'Ciudad de México<br> CDMX<br>Mexico', '', 'Aug 3-4 2019', 60);
addLocation(52.450713,    -1.715519, 'ConFuzzled', 'confuzzled.org.uk', 'Hilton Birmingham Metropole<br>National Exhibition Centre<br>Birmingham B40 1PP<br>United Kingdom', '+44 121 780 4242', 'May 24-28 2019', 1908);
addLocation(-15.653101, -56.122124, 'Cuiabark', 'www.facebook.com/cuiabark', 'Gran Boliche<br>Av. Presidente Artur Bernardes, s/n <br>Cuiabá, MT <br>Brazil', '','Feb 24 2018', 20);
addLocation(39.771895, -104.806944, 'DenFur', 'www.denfur.co', 'Crowne Plaza Denver Airport Convention Center<br>15500 E 40th Ave<br>Denver, CO 80239<br>USA', '+1 (303) 371-9494', 'Aug 2-4 2019', 2806);
addLocation(50.6166849,    10.7232134, 'EAST', 'sachsenfurs.de/en/east', 'Ringberg Hotel<br> Ringberg 10, 98527<br>Suhl<br>Germany', '+493681 3890', 'Jul 24-28 2019', 503);
addLocation(30.475459,-87.201477, 'Emerald\'s Fur Summit', 'emeraldfurcon.org', 'Homewood Suites by Hilton Pensacola-Arpt<br>5049 Corporate Woods Dr, Pensacola, FL 32504, USA', '+1 (850) 474-3777', 'Apr 29 2017', 126);
addLocation(52.474897,    13.459467, 'Eurofurence', 'eurofurence.org', 'Estrel Hotel Berlin<br>Sonnenallee 225<br>12057 Berlin<br>Germany', '+49 391 5949 0', 'Aug 14-18 2019', 3012);
addLocation(38.960831,   -77.423238, 'FA: United', 'faunited.org', 'Hyatt Regency Dulles<br>2300 Dulles Corner Blvd.<br>Herndon, Virginia 20171<br>USA', '+1 703 713 1234', 'Oct 4-6 2018', 528);
addLocation(33.43743,    -86.726235, 'Fangcon', 'fangcon.com', 'Doubletree by Hilton Perimeter Park<br>8 Perimeter Park S<br>Birmingham, AL 35243<br>USA', '+1 (205) 972-1141', 'Oct 9-13 2019', 155);
addLocation(45.827585,     5.419862, 'Fauntastic', 'fauntastic.eu', 'Hôtel Vallée Bleue<br>19 Rue des Carrières<br>Rive gauche<br>38390 Montalieu-Vercieu<br>France', '+33 4 74 88 69 20', 'May 30-Jun 2 2019', null);
addLocation(-12.970364,  -38.473011, 'Fera Bowl', 'facebook.com/ferabowlbahia', 'Bela Bowling<br>Al. Euvaldo Luz, 92<br>Salvador, BA<br>Brazil', '','May 19 2018', 23);
addLocation(45.880449,   -78.564606, 'Feral!', 'campferal.org', 'Camp Arowhon<br>Algonquin Park, Ontario P1H 2G6<br>Canada', '+1 (705) 633-5651', 'Aug 25-29 2016', 94);
addLocation(60.412912,    25.038261, 'FinFur Animus', 'animus.finfur.net', 'Kokoushotelli Gustavelund, Tuusula, Finland', '', 'Jun 16-19 2016', 124);
addLocation(43.027227,   -88.108102, 'Fur Squared', 'www.fursquared.com', 'Sheraton Milwaukee Brookfield Hotel<br>375 S Moorland Rd<br>Brookfield, WI 53005<br>USA', '+1 (262) 364-1100', 'Feb 22-24 2019', 1101);
addLocation(51.206489,  -4.044873, 'Furcation', 'furcation.org.uk', 'Sandaway Beach Holiday Park<br>Combe Martin, North Devon<br>United Kingdom', '', 'Oct 12-15 2018', 0);
addLocation(44.150581, -89.164606, 'FURconsin', 'www.furconsin.com', 'near Little Hills Lake<br>Wild Rose, WI 54984<br>USA', 'N/A', 'Oct 12-16 2017', 28);
addLocation(-41.239835,  174.980063, 'FurcoNZ', 'www.furconz.org.nz', 'Brookfield Outdoor Education Centre<br>Wainuiomata<br>Wellington<br>New Zealand', '', 'Feb 5-8 2016', 50);
addLocation(-23.668839,  -46.577533, 'Furboliche', 'furboliche.com.br', 'Bomboliche Extra Anchieta<br>R. García Lorca, 301<br>São Bernardo do Campo, SP<br>Brazil', '','Mar 9 2019', 203);
addLocation(-24.309323,  -48.273633, 'FurCamp', 'www.facebook.com/events/183414388930807', 'Intervales State Park<br>Estrada Municipal, km 25<br>Ribeirão Grande, SP<br>Brazil', '','Mar 2-5 2019', 0);
addLocation(19.0312898,-98.2056133, 'FurCan', 'facebook.com/FurCan-1838565646175492', 'Recepciones "Option"<br>Av 33 Ote 7, Carmen Huexotitla<br>Edificio Snte Seccion 23<br>72534 Puebla City, Puebla<br>Mexico', '+52 222 243 4828', 'Jul 20-21 2019', 85);
addLocation(-22.997039,  -43.358095, 'Furstrike', 'www.facebook.com/furstrike', 'Barra Shopping<br>Av. das Américas, 4666 <br>Rio de Janeiro, RJ <br>Brazil', '','Oct 13 2018', 107);
addLocation(-27.997818,  153.429297, 'FurDU', 'www.furdu.com', 'Outrigger Hotel Surfers Paradise<br>22 View Avenue,<br>Surfers Paradise, QLD 4217<br>Australia', '', 'May 27-29 2016', 490);
addLocation(53.5687483,-113.5238331, 'Fur-eh!', 'fureh.ca', 'Edmonton Inn & Conference Centre<br>11830 Kingsway Avenue<br>Edmonton, Alberta<br>Canada, T5G 3J5', '+1 (780) 454-5454', 'June 13-16 2019', 743);
addLocation(27.3354428,-82.575817, 'Furight Night', 'furightnight.weebly.com', 'Ken Thompson Park<br>1799 Ken Thompson Parkway<br>Sarasota, FL 34236<br>USA', '+1 (941) 735-4035', 'Oct 14 2017', null);
addLocation(46.183333, 11.266667, 'Furizon', 'www.furizon.net', 'Segonzano, TN 38047<br> Italy', '', 'June 1-4 2017', '')
addLocation(42.134573,   -72.6314187, 'Fur-Xoticon', 'www.fur-xoticon.org', 'Clarion Hotel & Aqua Lagoon Waterpark<br>1080 Riverdale St<br>West Springfield, MA 01089<br>USA', '+1 (413) 781-8750', 'May 26-28, 2017', null);
addLocation(-33.859972,  151.211111, 'FurJam', 'www.furjam.org', 'Forresters Hotel<br>336 Riley Street<br>Surry Hills NSW 2010<br>Australia', '(02) 9212 3035', 'Sep 16-18 2016', 227);
addLocation(45.582910,  -122.575732, 'Furlandia', 'furlandia.org', 'Sheraton Hotel at PDX Airport <br>8235 NE Airport Way<br>Portland, Oregon 97220<br>USA', '+1 (503) 281-2500', 'May 24-26 2019', 1133);
addLocation(28.542401, -81.347945, 'Furloween', 'www.furhold.org/furloween', 'Orlando Elks Lodge<br>12 North Primrose Dr.<br>Orlando, Florida 32803<br>USA', '+1 (407) 282-3900', 'Oct 22 2016', 188);
addLocation(43.6412114, -79.3757486, 'Furnal Equinox', 'furnalequinox.com', 'Westin Harbour Castle Hotel<br>1 Harbour Square<br>Toronto, ON M5J 1A6<br>Canada', '+1 (416) 869-1600', 'Mar 15-17 2019', 1830);
addLocation(41.6042521, -72.7027335, 'Furpocalypse', 'furpocalypse.org', 'Red Lion Hotel Cromwell<br>100 Berlin Road<br>Cromwell, CT 06416<br>USA', '+1 860-635-2000', 'Oct 26-28 2018', 1391);
addLocation(43.156351,   -77.610020, 'FurryCon', 'www.furrycon.com', 'Radisson Riverside Rochester<br>120 E Main st<br>Rochester, New York<br>USA', '+1 (585) 546-6400', 'Sep 15-18 2016', 294);
addLocation(40.091453,   -75.3716987, 'Furrydelphia', 'www.furrydelphia.com', 'DoubleTree by Hilton Hotel Philadelphia - Valley Forge<br>301 W Dekalb Pike, King of Prussia, PA 19406<br>USA', '+1 (610) 337-1200', 'Aug 16-18 2019', 903);
addLocation(32.324628,  -64.836331, 'Furry Cruise', 'www.furrycruise.com', '<i>Norweigan Escape</i><br>from New York City<br>to Royal Naval Dockyards<br>Bermuda', '+1 (734) 340-4553', 'Nov 3-10 2019', 27);
addLocation(32.775681, -96.8097294, 'Furry Fiesta', 'www.furryfiesta.org', 'Hyatt Regency Dallas<br>300 Reunion Blvd<br>Dallas, TX 75207<br>USA', '+1 (214) 651-1234', 'Mar 28-31 2019', 3866);
addLocation(1.2877475,  103.846800, 'Furry Lah', 'furrylah.com', 'Quarters Hostel<br>12 Circular Road<br>Singapore 049368', '+65 6438 5627', 'Nov 25-27 2016');
addLocation(44.971198,    -93.27774, 'Furry Migration', 'www.furrymigration.org', 'Hyatt Regency Minneapolis<br>1300 Nicollet Mall<br>Minneapolis, Minnesota,<br>USA, 55403', '+1 (612) 370-1234', 'Sep 6-8 2016', 1107);
addLocation(41.7838208,   -72.5803353, 'Furry Picnic', 'www.furrypicnic.com', 'Wickham Park<br>1329 Middle Turnpike W<br>Manchester, CT 06040<br>USA', '+1 (860) 528-0856', 'Jun 3 2017', null);
addLocation(35.642936, -96.419021, 'Furry Retreat', 'www.furryretreat.com', 'Knight\'s Rest Retreat<br>37701 W 361st St S<br>Bristow, OK 74010<br>USA', 'N/A', 'Oct 20-22 2017', null);
addLocation(39.502173, -106.151042, 'Furry Ski Weekend', 'furryskiweekend.com', 'Copper Mountain Resort<br>209 Ten Mile Cir<br>Frisco, CO 80443<br>USA', '+1 (866) 841-2481', 'Feb 21-24 2019', 65);
addLocation(32.976394, -96.7140306, 'Furry Siesta', 'furrysiesta.com', 'Hyatt Regency North Dallas<br>701 E Campbell Rd<br>Richardson, TX 75081<br>USA', '+1 (972) 619-1234', 'Jul 19-20 2019', 575);
addLocation(33.761999,   -84.383352, 'Furry Weekend Atlanta', 'furryweekend.com', 'Atlanta Marriott Marquis<br>265 Peachtree Center Ave NE<br>Atlanta, GA 30303<br>USA', '+1 (404) 521-0000', 'May 9-13 2019', 5193);
addLocation(52.775556,     6.801771, 'Furry Weekend Holland', 'furryweekend.nl', 'Het Labyrint<br>Brink 9 7841 CE<br>Sleen<br>Netherlands', '', 'Apr 5-8 2019', 57);
addLocation(36.8441109, -76.1808112, 'FursonaCon', 'fursonacon.com', 'Holiday Inn Virginia Beach - Norfolk<br>5655 Greenwich Rd<br>Virginia Beach, Virginia 23462<br>USA', '+1 (757) 499-4400', 'Sep 5-8 2019', 424);
addLocation(52.588333,        14.65, 'Furstock', 'www.polfurs.org', '', '', 'Jul 14-16 2016', 45);
addLocation(57.05,         9.916667, 'Furtastic', 'www.furtastic.dk', 'Sondrupvej 58<br>8350 Hundslund<br>Denmark', '', 'Jul 4-7 2016', 50);
addLocation(37.330294,  -121.888375, 'Further Confusion', 'furtherconfusion.org', 'San Jose Mariott<br>301 South Market Street<br>San Jose, CA 95113<br>USA', '+1 408-280-1300', 'Jan 16-20 2020', 3850);
addLocation(53.509966,  -118.006813, 'Furthest North', 'furthestnorth.ca', 'Wildhay Group Campground<br>north of Hinton<br>Canada', '+1 (403) 637-2229', 'Sep 2-5 2016', 63);
addLocation(3.104127, 101.640800, 'Furum', 'furum.org', 'Hotel Armada<br> Lot 6 <br> Lorong Utara C <br>Section 52<br> 46200 Petaling Jaya Selangor <br>Malaysia', '+60 3-7954 6888', 'Dec 8-9 2018', 287);
addLocation(47.0084856, -124.163382, 'Furvana', 'furvana.org', 'Ocean Shores Convention Center<br>120 W Chance a La Mer NW<br>Ocean Shores, WA 98569<br>USA', '+1 360-289-4411', 'Sep 27-29 2019', null);
addLocation(48.499678, 9.150536, 'Furvester', 'furvester.org', 'Hotel Fortuna Reutlingen/Tübingen<br>Carl-Zeiss-Straße 75<br>72770 Reutlingen<br>Germany', '+49 7121 5840', 'Dec 29 2018 - Jan 1 2019', null);
//addLocation(35.559328,   139.723602, 'Fur-st', 'fur-st.com', '志ら井<br>1 Chome-20-28 Minamikamata<br>Ota, Tokyo<br>Japan', '', 'Oct 18 2014', 144);
addLocation(39.0998623,  -84.275091, 'Fur Reality', 'www.furreality.org', 'Holiday Inn Eastgate<br>4501 Eastgate Blvd.<br>Cincinnati, Ohio 45245<br>USA', '+1 (513) 752-4400', 'Oct 31-Nov 3 2019', 538);
addLocation(38.930864,   -77.245601, 'Fur the \'More', 'furthemore.org', 'Sheraton Premiere at Tysons Corner<br>8661 Leesburg Pike<br>Vienna, VA<br>USA', '+1 (410) 785-7000', 'Mar 15-17 2019', 1256);
addLocation(40.4695949, -3.5822552, 'Furrnion', 'furrnion.org', 'Hotel Meliá Barajas<br>Av. de Logroño, 305<br>28042 Madrid<br>Spain', '+34 912 76 47 47', 'Oct 17-20 2019', 341);
addLocation(14.532669,  120.981588, 'FurryPinas', 'furrypinas.com', 'SMX Convention Center<br>Pasay City, MM<br>Philippines', '+63 2 556 8888', 'May 19-20, 2018', 1542);
addLocation(48.759439,    1.945574, 'Furry BlackLight', 'fblacklight.org', 'Mercure Maurepas Saint Quentin<br>Saint Quentin, France', '', 'Nov 1-4, 2018', 265);
addLocation(19.435967, -99.151094, 'Furry Summer Mexico', 'facebook.com/FurrySummer', 'Centro de Espectáculos Plaza<br>Avenida de la República 127-A<br>Cuauhtémoc, Tabacalera, 06030 Ciudad de México, CDMX<br>Mexico', '+52 55 5514 2565', 'Jul 28-29 2018', 290);
addLocation(-31.944444,  115.863842, 'FurWAG', 'furwag.com.au', 'Hotel Ibis Styles Perth<br>15 Robinson Avenue<br>Northbridge 6003<br>Western Australia', '+61 8 9328 0000', 'Sep 30-Oct 2 2016', 177);
addLocation(51.93180,        19.407, 'Futerkon', 'futerkon.pl', 'Municipal Cultural Center<br>95-001 Dzierżązna<br>Poland', '42 717 84 66', 'Aug 10-14 2016', 93);
addLocation(50.0448627,  4.7203594, 'Belgian Fuzzcon', 'fuzzcon.be', 'Ardennes, Belgium', '', 'Aug 8-12 2019', 14);
addLocation(38.6942416, -90.4492995, 'Gateway Furmeet', 'gatewayfurmeet.org', 'DoubleTree by Hilton Hotel St. Louis - Westport<br>1937 Craigshire Road<br>St. Louis, Missouri 63146<br>USA', '+1 (314) 434-0100', 'Mar 1-3 2019', 463);
addLocation(54.5725499,   18.3811955, 'Gdakon', 'gdakon.org', 'Hotel Faltom<br>Rumia<br>Gdańsk<br>Poland', '', 'Mar 6-10 2019', 311);
addLocation(46.733424, 8.204974, 'Golden Leaves Con', 'glc.furry.ch', 'Hostel C\'est la vie & Panorama Hotel<br>Hasliberg Engi<br>6086 Hasliberg<br>Switzerland', '0', 'Oct 24-28 2018');
addLocation(49.616848,     8.826463, 'H-Con', 'h-con.org', 'Petershof<br>Talweg 5<br>64711 Erbach/Erbuch<br>Germany', '+49 06 2 07/1 22-1', 'Oct 2-6 2019', 57);
addLocation(-33.8740819,151.2168275, 'Harbour City Fur Con', 'furcon.com.au/hcfc', 'The Sydney Boulevard Hotel<br>90 William Street<br>Sydney NSW 2011<br>Australia', '+61 2 9383 7222', 'Jul 26-28 2019', 200);
//addLocation(52.505369,  13.353882, 'Herbstcon', 'herbstcon.de', 'Sozialistische Jugend Deutschlands – Die Falken<br>Haus am Lützowplatz<br>Lützowplatz 9<br>10785 Berlin<br>Germany', '+49 030-261030-0', 'Oct 11-14 2012', 20);//Invite only
addLocation(49.26716,   -123.010021, 'Howloween', 'howloween.ca', 'Burnaby Executive Hotel<br>4201 Lougheed Highway<br>Burnaby, BC<br>Canada', '', '2016', 278);
addLocation(25.1819426,   121.4137286, 'Infurnity', 'infurnity.com', 'Fullon Hotel Tamsui<br>251 新北市淡水區觀海路83號<br>Taiwan', '02-2628-7777', 'Oct 26-27 2019', 807);
addLocation(39.797248,   -86.041109, 'IndyFurCon', 'indyfurcon.com', 'Indianapolis Marriott East<br>7202 E 21st St<br>Indianapolis, IN 46219<br>USA', '+1 (317) 352-1231', 'Aug 23-25 2019', 1412);
addLocation(33.4197565,-111.8287715, 'Itty Bitty Fur Con', 'ittybittyfurcon.com', 'Marriott Phoenix Mesa<br>200 N Centennial Way<br>Mesa Az 85201<br>USA', '+1 (480) 898-9300', 'Jul 21-22 2018', 613);
addLocation(34.743463,   137.370965, 'Japan Meeting of Furries', 'www.j-mof.org', 'Loisir Hotel Toyohashi<br>141 Fujisawacho<br>Toyohashi, Aichi<br>Japan', '', 'Jan 10-12 2020', 1332);
addLocation(51.505072,   -2.536662, 'Just Fur The Weekend', 'http://justfurtheweekend.org.uk/', 'Holiday Inn Filton <br> Filton Road<br> Winterbourne<br>Bristol', '', 'April 14-16 2017', 319);
addLocation(39.114216, -94.626925, 'KCFur Howl', 'www.kchowl.com', 'near Kansas City Metro Area<br>Kansas City, MO<br>USA', 'N/A', 'Oct 29 2016', null);
addLocation(35.453118, 139.6488943, 'Kemocon', 'www.kemocon.com', 'Osanbashi Hall<br>Osanbashi Yokohama International Passenger Terminal<br>1 Chome-1-4 Kaigandori<br>Naka Ward, Yokohama, Kanagawa Prefecture 〒231-0002<br>Japan', '', 'Nov 30-Dec 1 2019', 454);
addLocation(35.5791136, 139.7455147, 'Kemoket', 'kemoket.com', 'Tokyo Ryutsu Center<br>6 Chome-1-1 Heiwajima, Japan<br>Ōta, Tokyo 143-0006<br>Japan [note: number of <i>dealers</i>]', '', 'Apr 29 2019', 500); //Note that this means 500 *dealers* in 2018, it does not properly represent attendance
addLocation(25.00814,     121.53604, 'Kemono & Jingai Only 2', 'jk2016.furry.tw', 'Jhongjheng Hall<br>88 Tingzhou Road Section 4<br>Wenshan District<br>Taipei City 116<br>Taiwan<br>116台北市文山區汀州路四段88號', '', 'Jul 16 2016', 0); // The name of the hall at http://en.ntnu.edu.tw/gongguan-campus.php#tab-1 seems to be in Tongyong Pinyin, while the street address seems to be in Hanyu Pinyin?
addLocation(34.985692,   138.417148, 'Kemono Square', 'kemono-square.com', 'Shizuoka Convention & Arts Center "Granship" 7F<br>79-4 Ikeda, Suruga Ward, Shizuoka City<br>Japan', '', 'Jul 15 2017', 107);
//addLocation(35.1584991, 136.9298391, 'Kigukemo', 'kigukemo.jp', 'Nagoya Trade & Industry Center <br>2-6-3 Fukiage<br>Chikusa Ward, Nagoya, Aichi<br>Japan ', 'Phone Number', 'Aug 29, 2015', 141); //only attendees signed up from Twipla
addLocation(41.845931,   -87.942533, 'LAFF New Year\'s Eve', 'newyearsevecon.com', 'Residence Inn Oak Brook<br>790 Jorie Boulevard<br>Oak Brook, IL 60523<br>USA', '+1 (630) 571-1200', 'Dec 31 2019-Jan 1 2020', 77);
addLocation(47.336284,    12.855555, 'Lakeside Furs', 'lakesidefurs.at', 'Zell am See<br>Talstr. 159, 5700 Thumersbach<br>Austria', '+43 (0)6542/73734', 'Jul 9-16 2016', 40);
addLocation(28.418215,   -81.465091, 'Megaplex', 'megaplexcon.org', 'Caribe Royale<br>8101 World Center Dr<br>Orlando, Florida, 32821<br>USA', '+1 407-238-8000', 'Aug 9-11 2019', 2602);
addLocation(-37.7878125,144.9698994, 'Melbourne Fur Con', 'melbfurcon.com', 'Carlton Scout Hall<br>12 Shakespeare St<br>Carlton North<br>Victoria 3054<br>Australia', '', 'Feb 23-24 2019', null);
addLocation(38.219466, -85.575556, 'The Menagerie', 'kyanthros.org/menagerie', 'Triple Crown Pavilion<br>1776 Plantside Dr<br>Jeffersontown, KY, 40299<br>USA', '+1 (502) 491-4830', 'Jun 2-Jun 3 2018', 106);
addLocation(34.966572,   -89.791608, 'Mephit Furmeet', 'mephitfurmeet.org', 'Whispering Woods Hotel & Conference Center<br>11200 Goodman Rd<br>Olive Branch, MS 38654-4212<br>USA', '+1 (662) 895-2941', 'Aug 30-Sep 1 2016', 544);
addLocation(50.825484,     7.887068, 'Mephit Mini Con', 'mmc.furcon.eu', 'Freusburg, Seigen<br>Germany', '', 'June 6-10 2019', 200);
addLocation(42.322128, -71.646046, 'Micro Fur Con', 'microfurcon.com', 'First Parish Church Unitarian<br>40 Church St<br>Northborough, MA 01532<br>USA', '+1 (508) 393-6422', 'Apr 1 2017', 150);
addLocation(41.981284,   -87.859078, 'Midwest FurFest', 'furfest.org', 'Hyatt Regency O\'Hare<br>9300 Bryn Mawr Avenue<br>Rosemont, Illinois 60018<br>USA', '+1 (847) 696-1234', 'Dec 5-8 2019', 10989);
addLocation(45.017750, -93.143750, 'MNFurs Spring Picnic', 'mnfurs.org', 'Central Park - Lexington<br>2540 Lexington Avenue<br>Roseville, MN 55113<br>USA', '', 'May 20 2017', null);
//addLocation(35.754914,139.7366338, 'Mofukai', 'twipla.jp/events/84157', '北とぴあ 14F Sky Hall<br>1 Chome-11 Oji Kita Tokyo <br>Japan', '', 'May 2 2015', 66); //only attendees signed up from Twipla - 6 people over venue capacity
addLocation(13.705699,   100.604295, 'Morph Parade', 'fb.me/MOFU.PARADE', 'KV Mansion<br>90 สุขุมวิท 81 บางจาก<br>[Near BTS On-Nut station]<br>Bangkok 10260<br>Thailand', '+66 2-33 222 11', 'Oct 29 2016');
addLocation(42.475988, -83.244925, 'Motor City Furry Con', 'motorcityfurrycon.org', 'Westin Southfield Detroit<br>1500 Town Center<br>Southfield, MI 48075<br>USA', '+1 (248) 827-4000', 'Apr 12-14 2019', 1314);
addLocation(39.65924,   -75.75286, 'New Year\'s Furry Ball', 'www.ticketderby.com/innerindex.php?eventid=3505', 'Embassy Suites Newark-Wilmington/South<br>854 S College Ave<br>Newark, DE 19713<br>USA', '(302) 368-8000', 'Dec 31 2015-Jan 1 2016', 211) 
addLocation(59.499113,  17.928601, 'NordicFuzzCon', 'nordicfuzzcon.org', 'Scandic Infra City<br>Kanalvägen 10<br>194 61 Upplands Väsby<br>Sweden', '+46 8 517 344 00', 'Feb 27-Mar 3 2019', 918);
addLocation(18.454343, -66.090161, 'NorthAmeriCon', 'northamericon17.com', 'Sheraton Puerto Rico Hotel & Casino<br>200 Convention Blvd<br>San Juan, PR 00907<br>Puerto Rico', '+1 787-993-3500', 'Jul 6-9 2017', null);
addLocation(47.3680236,   -121.1057155, 'NorthWest CampCon', 'www.nwcampcon.com', 'Okanogan-Wenatchee National Forest<br>Wenatchee, WA 98807<br>USA', 'N/A', 'Jun 16-18 2017', null);
addLocation(37.3718553,-121.9248902, 'PAWCon', 'www.pacanthro.org', 'DoubleTree by Hilton Hotel San Jose<br>2050 Gateway Pl, San Jose, CA 95110<br>USA', '+1 (408) 453-4000', 'Nov 1-3 2019', 723);
addLocation(33.541358, -111.926566, 'Painted Desert Fur Con', 'painteddesertfc.com', 'The Scottsdale Plaza Resort<br>7200 N Scottsdale Rd<br>Paradise Valley, AZ 85253<br>USA', '+1 (480) 948-5000', '3-5 Jan 2020', 1135);
addLocation(43.635466, -70.338801, 'Pine Fur Con', 'www.pinefurcon.org', 'DoubleTree by Hilton Hotel Portland<br>363 Maine Mall Rd<br>Portland, ME 04106<br>USA', '+1 (207) 775-6161', 'Apr 5-7 2019', 406);
addLocation(-27.467778,  153.027778, 'RivFur', 'www.southbankfurmeet.com/home/m/36617225/article/3714600', 'Brisbane, Queensland, Australia', '', 'Jul 29-31, 2016', 200);
addLocation(32.3352503,  -95.3382379, 'Rose City Fursanity', 'rcfursanity.wixsite.com', 'Regal Cinemas Tyler Rose 14<br>1250 S SW Loop 323<br>Tyler, Texas 75701<br>USA', '+1 (844) 462-7432', 'Apr 20-22 2018', null);
addLocation(55.744872, 36.8525834, 'Rusfurence', 'rusfurence.ru', 'Hotel Heliopark Thalasso<Br>Ulitsa Lermontova 1<br>Zvenigorod, Moscow 143185<br>Russian Federation', '', 'Jan 31-Feb 4 2018', 404);
addLocation(55.886411,-3.5062347, 'ScotiaCon', 'scotiacon.org.uk', 'Mercure Livingston Hotel<br>Almondview<br>Livingston, EH54 6QB<br>United Kingdom', '+44 844 815 9102', 'Nov 2-4 2018', 290);
addLocation(31.279758,     121.4303036, 'Super Furry Fusion 2018', 'furrychina.com', 'Grand New Palace Banquet & Conbention Centre<br>88 Gaoping Rd<br>Shanghai, China<br>中国上海市闸北区高平路88号雅悦新天地婚宴展会中心', '', 'Jul 29 2018', null);
addLocation(23.1866733,     113.276755, 'Furry Summer Gathering 2018', 'shouxiaji.cn', 'Guangzhou Baiyun International Convention Center<br>1039-1045 Baiyun S Ave<br>Guangzhou, China<br>中国广东省广州市白云区白云饮食文化长廊白云大道南1039-1045号广州白云国际会议中心', '', 'Aug 4 2018', null);
addLocation(33.7963444,   -117.7547691, 'SoCal FurBQ', 'twitter.com/SoCalFurBQ', 'Irvine Regional Pk<br>1 Irvine Park Rd<br> Orange, CA 92869<br>USA', '+1 (714) 973-6835', 'Sep 17 2016', null);
addLocation(-25.957300, 27.439744, 'South Afrifur', 'south-afrifur.co.za', 'Magalies Retreat<br>RN20 New Thorndale Road<br>Krugersdorp, NorthWest Province, 1791<br>South Africa', '+27 82 377 0219', 'Jul 14-17 2017', null);
addLocation(47.6640566,-117.4094779, 'SpokAnthro', 'spokanthro.org', 'Ruby River Inn<br>700 N Division St<br>, Spokane, WA 99202<br>USA', '+1 509-326-5577', 'Aug 23-25 2019', null);
addLocation(49.278252, -125.041257, 'Surfur', 'surfur.ca', 'Taylor Arm Provincial Park<br>Pacific Rim Hwy<br>Alberni-Clayoquot D, BC V0R 1W0<br>Canada', '+1 250-474-1336', 'Jun 22-26, 2018', 81);
addLocation(36.059611, -95.961180, 'Tails and Tornadoes Furcon', 'tailsandtornadoes.org', 'Marriott Tulsa Hotel Southern Hills<br>1902 E 71st St<br>Tulsa, OK 74136<br>USA', '+1 (918) 493-7000', 'Aug 31-Sep 1 2019', null);
addLocation(13.746076,   100.562432, 'Thai Tails', 'www.thaitails.net', 'Asok Towers<br>BLDG 219, Soi Sukhumvit 21, Asok Road<br>Klongtoey Nua, Wattana<br>Bangkok, Thailand 10110', '+66 2 120 9600', 'Jan 30 2016', 0);
addLocation(41.388786, -73.515143, 'Tiny Paws Con', 'www.tinypawscon.org', 'Crowne Plaza Danbury<br>18 Old Ridgebury Rd, Danbury, CT 06810<br>USA', '+1 (203) 794-0600', 'Sep 8-10 2017', null); 
addLocation(49.1706707,-123.1444377, 'VancouFur', 'vancoufur.org', 'Sheraton Vancouver Airport Hotel<br>7551 Westminster Highway<br>Richmond, British Columbia, V6X 1A3<br>Canada', '+1 (604) 273-7878', 'Mar 7-10 2019', 1012);
addLocation(40.4612,       -79.7509, 'Western Pennsylvania Furry Weekend', 'wpafw.org', ' North Park Lodge, N Ridge Dr<br>Allison Park, PA 15101<br>USA', '+1 (724) 327-0338', 'Oct 7-9 2016', 133);
addLocation(43.327621, -88.950421, 'WI Wilderness Campout', 'wildernesscampout.org', 'Astico County Park<br>8943 County Road T<br>Columbus, WI 53925<br>USA', '+1 (920) 386-3700', 'Aug 4-6 2018', null);
addLocation(35.042611,   -95.317672, 'Wild Nights', 'wildnights.org', 'Robbers Cave State Park<br>Wilburton, Oklahoma 74578<br>USA', '+1 (918) 465-2565', 'Apr 25-30 2019', 292);
addLocation(54.9421823,  -2.5106227, 'Wild North', '', 'Featherstone Castle<br>Hall Bank, near Haltwhistle<br>Northumberland NE49 0JG<br>United Kingdom', '+44 1434 320 202', 'Sep 27-30 2019', 14);
addLocation(49.8936546,-97.1424676, 'Wild Prairie Fur Con', 'wpfcon.ca', 'Raddison Hotel Winnipeg Downtown<br>288 Portage Ave<br>Winnipeg, MB R3C 0B8<br>Canada', '+1 204-956-0410', 'Aug 9-11 2019', 181);
addLocation(37.783995, -122.410405, 'Wild Things', ' ', 'SF Citadel<br>181 Eddy St<br>San Francisco, CA 94102<br>USA', 'N/A', 'Feb 25 2017', null);
addLocation(50.532995,    30.36253, 'WUFF', 'wuff.org.ua', 'Konhes-Hotel «50.532995,30.36253»<br>Mykoly Yunkerova St, 20<br>Kiev, Ukraine', '+380 44 364 9000', 'May 8-12 2018', 209)
addLocation(47.503095,   12.190969, 'Zillercon', '', 'Wörgl, Tyrol<br>Austria', '', 'Jan 23-30 2016', 40);
addLocation(50.773040,   15.311701, 'ZodiaCon', 'zodiacon.org', 'Vršovská Brána<br>Vršov 19<br>539 53 Horní Bradlo<br>Czech Republic', '+420 483 300 335', 'May 19-23 2019', 119);

// convert textual dates to numbers for sorting.
for(var i = 0, meet; meet = meets[i]; i++){
	meet.datev=(v=getmonthvalue(meet.date))?v:3000;
}

// adds or rearranges meets in the side bar.
function refresh(f){
	for(var i = 0, meet; meet = meets[i]; i++){
		addLocation1(meet, f);
	}
}

// comparison functions, those decide the order meetups are listed
function compare_name(a, b){
	return a.name?(b.name?a.name.localeCompare(b.name):-1):1;
}
function compare_date(a,b){
	var d = a.datev - b.datev;
	return (d == 0)? compare_name(a, b) : d;
}
function compare_attendance(a,b){
	if (a.attendance){
		if (b.attendance){
			return b.attendance - a.attendance;
		} else {
			return -1;
		}
	} else {
		if (b.attendance){
			return 1;
		} else {
			return compare_name(a,b);
		}		
	}
}
// assigning functionality to sort buttons
document.getElementById("bydate").onclick=function(){
	meets.sort(compare_date);
	refresh(function(meet){return meet.date?(meet.date + " " + meet.name):meet.name;});
	}
document.getElementById("byname").onclick=function(){
	meets.sort(compare_name);
	refresh();
	}
document.getElementById("byattendance").onclick=function(){
	meets.sort(compare_attendance);
	refresh(function (meet){return meet.name + (meet.attendance?" ("+meet.attendance+")":"");});
	}

meets.sort(function (a,b){
	return a.datev - b.datev;
	})
refresh(function(meet){return meet.date?(meet.date + " " + meet.name):meet.name;});

// add drop-down options
opt = document.createElement("option");
opt.innerHTML = "Everywhere ("+count+")";
opt.value = FILT_ALL;
opt.selected=true;

document.getElementById("filter").appendChild(opt);

opt = document.createElement("option");
opt.innerHTML = "North America ("+count_na+")";
opt.value = FILT_NA;

document.getElementById("filter").appendChild(opt);

opt = document.createElement("option");
opt.innerHTML = "Europe ("+count_eu+")";
opt.value = FILT_EU;

document.getElementById("filter").appendChild(opt);

opt = document.createElement("option");
opt.innerHTML = "Oceania ("+count_oceania+")";
opt.value = FILT_OCEANIA;

document.getElementById("filter").appendChild(opt);

opt = document.createElement("option");
opt.innerHTML = "Japan ("+count_japan+")";
opt.value = FILT_JAPAN;

document.getElementById("filter").appendChild(opt);

opt = document.createElement("option");
opt.innerHTML = "Rest of the World ("+count_others+")";
opt.value = FILT_OTHERS;

document.getElementById("filter").appendChild(opt);

document.getElementById("filter").onchange = function(){
    opts = document.getElementById("filter").firstChild;
    selection = 0;
    while(opts != null){
        if (opts.selected) {
            selection = opts.value;
        }
        opts = opts.nextSibling;
    }

    filter_func = null;
    switch(Number(selection)){
        case FILT_NA:
            filter_func = is_in_na; break;
        case FILT_EU:
            filter_func = is_in_eu; break;
        case FILT_OCEANIA:
            filter_func = is_in_oceania; break;
        case FILT_JAPAN:
            filter_func = is_in_japan; break;            
        case FILT_OTHERS:
            filter_func = function(lat, lng){
                return !(is_in_na(lat, lng)) && 
                            !(is_in_eu(lat, lng)) && 
                            !(is_in_oceania(lat, lng)) && 
                            !(is_in_japan(lat, lng))
                ;
            }
            break;
        case FILT_ALL:
        default:
            filter_func = function(lat, lng){return true;}
            break;
    }

    bounds = null;
    for(var i = 0, meet; meet = meets[i]; i++){

        //only show those that pass filter_func
        visible = filter_func(meet.lat, meet.lng);
        meet.marker.setVisible(visible);
        meet.li.style.display = visible ? "": "none";

        if (visible) {
            if (bounds){
                bounds.extend(meet.marker.getPosition());
            } else {
            pos = meet.marker.getPosition();
            bounds = new google.maps.LatLngBounds(pos, pos);
            }
        }
    }
    if (bounds) {map.fitBounds(bounds);} //zoom to include in the viewport all markers if there are any
}

footnote = document.createElement("p");
footnote.innerHTML = '<a href="//pool.wikifur.com/w/index.php?title=Convention_map_script&action=edit">Edit data on WikiFur</a> or <a href="//pool.wikifur.com/wiki/Talk:Convention_map_script">discuss</a>';
document.getElementById("side").appendChild(footnote);
} //load()

// convert textual dates like "Jan 17 - Feb 2, 2014" into an integer like 20140117 for sorting
// should accept anything that looks like a date.
function getmonthvalue(s){
    "use strict";
    var x; 
    var v;
    var y;
    var day; 
    var month; 
    var year;
    
	if (!s) {return 200004001;}

	//automatically generate these for i18n and l10n extensibility?
	x = /(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[A-Za-z]*(?: )?([0-9]*)/.exec(s);
	if (x && x[1]) {
	    day = (v=parseInt(x[2]))?v:0;
	    if (day > 1980) {day = 40;}
	
	    switch (x[1]){
		    case "Jan": month = 1; break;
		    case "Feb": month = 2; break;
		    case "Mar": month = 3; break;
		    case "Apr": month = 4; break;
		    case "May": month = 5; break;
		    case "Jun": month = 6; break;
		    case "Jul": month = 7; break;
		    case "Aug": month = 8; break;
		    case "Sep": month = 9; break;
		    case "Oct": month = 10; break;
		    case "Nov": month = 11; break;
		    case "Dec": month = 12; break;
		    default:	month = 20;
	    }//switch
	} else {
	    month = 40;
	    day = 0;
	} 
	
	y = /[0-9]{4}$/.exec(s);
	if (y) {
		year = (v=parseInt(y[0]))?v:0;
    	if (year > 9999) {year = 10000;}
	}

	return year * 10000 + month * 100 + day;
}

//returns the text to be displayed in info window
function getLocationHTML(name, url, address, tel, date, attendance) {
  return '<p><b><a href="//en.wikifur.com/wiki/' + name + '">' + name + '</a></b>' + 
	(url?('<br><a href="http://' + url + '">' + url + '</a>'):'') + '</p><p class="smaller">' +
	address +
	 (tel?
		('<br>Phone: ' + 
			(is_phone? 
				('<a href="tel:' + tel.replace(/\s/g, "") + '">' + tel + '</a>')
				:tel))
		:'') + 

	(date?'<br>'+date:'') +
	(attendance? " Past atnd. "+ attendance:"") +
	"</p>";

}

function addLocation(lat, lng, name, url, address, tel, date, attendance){
meets.push({'lat':lat, 'lng': lng, 'name':name, 'url': url, 'address': address, 'tel': tel, 'date':date, 'attendance': attendance});
}

//this is called to add markers as well as to sort markers.
//this takes advantage of the fact that when adding a child to a DOM node, if the child is already in the document, it is removed from its original location first.
//lat, lng, name, url, address, tel, date, attendance
function addLocation1(a, f) {
    if (!f) {f = function(meet){return meet.date? (meet.name + " " + meet.date) : meet.name;}};
    if (!a.marker || !a.li){

        //make the marker -- defined colours are red, purple, blue, yellow, green, ltblue, pink, orange
        a.marker = new google.maps.Marker({
            position: new google.maps.LatLng(a.lat, a.lng),
            map: map,
            title: a.name,
            icon: {url: "//maps.gstatic.com/intl/en_us/mapfiles/ms/micons/"+(a.attendance >= 3000 ? "red" : (a.attendance >= 1250 ? "yellow" : (a.attendance >= 800 ? "green" : (a.attendance >= 400 ? "purple" : "blue" ) ) ) )+"-dot.png"},
            zIndex: (a.attendance || 0)
        });
        fn =  function() {
            //if we can't see the marker, show it in the center
            if (!map.getBounds().contains(a.marker.getPosition())){
                map.panTo(a.marker.getPosition());
            }
            infoWindow.setContent(getLocationHTML(a.name, a.url, a.address, a.tel, a.date, a.attendance));
            infoWindow.open(map, a.marker);
        }
        google.maps.event.addListener(a.marker, "click",fn);
        
        link = document.createElement("A");
        link.innerHTML = f(a);
	    link.href = "#";
        link.onclick = fn;
        
        //clean up this on unload!
        a.li = document.createElement("LI");
        a.li.appendChild(link);

        count++;
        if      (is_in_na(a.lat, a.lng)){
            count_na++;
        } else if (is_in_eu(a.lat, a.lng)) {
            count_eu++;
        } else if (is_in_oceania(a.lat, a.lng)){
            count_oceania ++; 
        } else if (is_in_japan(a.lat, a.lng)) {
	    count_japan ++; 
        } else {
            count_others ++;
        }
    } else {
        //only change the label text
        a.li.firstChild.innerHTML = f(a);
    }
          //(re)insert the item into list
          document.getElementById("list").appendChild(a.li);

}

function unload(){
    for(var i = 0, meet; meet = meets[i]; i++){
	    meet.marker=null;
	    meet.li=null;
    }

}
//