1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
|
// Census Assistant module for webtrees
//
// Chapman Code information
//
// webtrees: Web based Family History software
// Copyright (C) 2013 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2010 PGV Development Team. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
function getChapmanCode(location) {
// Countries
if (location == 'All') { var ChapmanCode = 'ALL';
} else if (location == 'Anywhere') { var ChapmanCode = 'ANY';
} else if (location == 'At Sea') { var ChapmanCode = 'SEA';
} else if (location == 'Unknown') { var ChapmanCode = 'UNK';
} else if (location == 'UNK') { var ChapmanCode = '-';
} else if (location == '') { var ChapmanCode = '-';
} else if (location == 'Afghanistan') { var ChapmanCode = 'AFG';
} else if (location == 'Albania') { var ChapmanCode = 'ALB';
} else if (location == 'Algeria') { var ChapmanCode = 'DZA';
} else if (location == 'American Samoa') { var ChapmanCode = 'ASM';
} else if (location == 'Andorra') { var ChapmanCode = 'AND';
} else if (location == 'Angola') { var ChapmanCode = 'AGO';
} else if (location == 'Anguilla') { var ChapmanCode = 'AIA';
} else if (location == 'Antarctica') { var ChapmanCode = 'ATA';
} else if (location == 'Antigua and Barbuda') { var ChapmanCode = 'ATG';
} else if (location == 'Argentina') { var ChapmanCode = 'ARG';
} else if (location == 'Armenia') { var ChapmanCode = 'ARM';
} else if (location == 'Aruba') { var ChapmanCode = 'ABW';
} else if (location == 'Australia') { var ChapmanCode = 'AUS';
} else if (location == 'Austria') { var ChapmanCode = 'AUT';
} else if (location == 'Azerbaijan') { var ChapmanCode = 'AZE';
} else if (location == 'Bahamas') { var ChapmanCode = 'BHS';
} else if (location == 'Bahrain') { var ChapmanCode = 'BHR';
} else if (location == 'Bangladesh') { var ChapmanCode = 'BGD';
} else if (location == 'Barbados') { var ChapmanCode = 'BRB';
} else if (location == 'Belarus') { var ChapmanCode = 'BLR';
} else if (location == 'Belgium') { var ChapmanCode = 'BEL';
} else if (location == 'Belize') { var ChapmanCode = 'BLZ';
} else if (location == 'Benin') { var ChapmanCode = 'BEN';
} else if (location == 'Bermuda') { var ChapmanCode = 'BMU';
} else if (location == 'Bhutan') { var ChapmanCode = 'BTN';
} else if (location == 'Bolivia') { var ChapmanCode = 'BOL';
} else if (location == 'Bosnia and Herzegovina') { var ChapmanCode = 'BIH';
} else if (location == 'Botswana') { var ChapmanCode = 'BWA';
} else if (location == 'Bouvet Island') { var ChapmanCode = 'BVT';
} else if (location == 'Brazil') { var ChapmanCode = 'BRA';
} else if (location == 'British Indian Ocean Territory') { var ChapmanCode = 'IOT';
} else if (location == 'British West Indies') { var ChapmanCode = 'BWI';
} else if (location == 'Brunei Darussalam') { var ChapmanCode = 'BRN';
} else if (location == 'Bulgaria') { var ChapmanCode = 'BGR';
} else if (location == 'Burkina Faso') { var ChapmanCode = 'BFA';
} else if (location == 'Burma') { var ChapmanCode = 'MMR';
} else if (location == 'Burundi') { var ChapmanCode = 'BDI';
} else if (location == 'Cambodia') { var ChapmanCode = 'KHM';
} else if (location == 'Cameroon') { var ChapmanCode = 'CMR';
} else if (location == 'Canada') { var ChapmanCode = 'CAN';
} else if (location == 'Cape Verde') { var ChapmanCode = 'CPV';
} else if (location == 'Cayman Islands') { var ChapmanCode = 'CYM';
} else if (location == 'Central African Republic') { var ChapmanCode = 'CAF';
} else if (location == 'Central America') { var ChapmanCode = 'CAM';
} else if (location == 'Chad') { var ChapmanCode = 'TCD';
} else if (location == 'Channel Islands') { var ChapmanCode = 'CHI';
} else if (location == 'Chile') { var ChapmanCode = 'CHL';
} else if (location == 'China') { var ChapmanCode = 'CHN';
} else if (location == 'Christmas Island') { var ChapmanCode = 'CXR';
} else if (location == 'Cocos (Keeling) Islands') { var ChapmanCode = 'CCK';
} else if (location == 'Colombia') { var ChapmanCode = 'COL';
} else if (location == 'Comoros') { var ChapmanCode = 'COM';
} else if (location == 'Congo') { var ChapmanCode = 'COG';
} else if (location == 'Cook Islands') { var ChapmanCode = 'COK';
} else if (location == 'Costa Rica') { var ChapmanCode = 'CRI';
} else if (location == 'Cote D\'ivoire') { var ChapmanCode = 'CIV';
} else if (location == 'Croatia') { var ChapmanCode = 'HRV';
} else if (location == 'Hrvatska)') { var ChapmanCode = 'HRV';
} else if (location == 'Cuba') { var ChapmanCode = 'CUB';
} else if (location == 'Cyprus') { var ChapmanCode = 'CYP';
} else if (location == 'Czechoslovakia') { var ChapmanCode = 'CSK';
} else if (location == 'Czech Republic') { var ChapmanCode = 'CZE';
} else if (location == 'Denmark') { var ChapmanCode = 'DNK';
} else if (location == 'Deutschland') { var ChapmanCode = 'DEU';
} else if (location == 'Djibouti') { var ChapmanCode = 'DJI';
} else if (location == 'Dominica') { var ChapmanCode = 'DMA';
} else if (location == 'Dominican Republic') { var ChapmanCode = 'DOM';
} else if (location == 'Dutch New Guinea') { var ChapmanCode = 'DNG';
} else if (location == 'East Indies') { var ChapmanCode = 'IDN';
} else if (location == 'East Timor') { var ChapmanCode = 'TLS';
} else if (location == 'Ecuador') { var ChapmanCode = 'ECU';
} else if (location == 'Egypt') { var ChapmanCode = 'EGY';
} else if (location == 'Eire') { var ChapmanCode = 'EIR';
} else if (location == 'El Salvador') { var ChapmanCode = 'SLV';
} else if (location == 'England') { var ChapmanCode = 'ENG';
} else if (location == 'Equatorial Guinea') { var ChapmanCode = 'GNQ';
} else if (location == 'Eritrea') { var ChapmanCode = 'ERI';
} else if (location == 'Estonia') { var ChapmanCode = 'EST';
} else if (location == 'Ethiopia') { var ChapmanCode = 'ETH';
} else if (location == 'Falkland Islands') { var ChapmanCode = 'FLK';
} else if (location == 'Malvinas') { var ChapmanCode = 'FLK';
} else if (location == 'Faroe Islands') { var ChapmanCode = 'FRO';
} else if (location == 'Fiji') { var ChapmanCode = 'FJI';
} else if (location == 'Finland') { var ChapmanCode = 'FIN';
} else if (location == 'France') { var ChapmanCode = 'FRA';
} else if (location == 'France, Metropolitan') { var ChapmanCode = 'FXX';
} else if (location == 'French Guiana') { var ChapmanCode = 'GUF';
} else if (location == 'French Polynesia') { var ChapmanCode = 'PYF';
} else if (location == 'French Southern Territories') { var ChapmanCode = 'ATF';
} else if (location == 'Gabon') { var ChapmanCode = 'GAB';
} else if (location == 'Gambia') { var ChapmanCode = 'GMB';
} else if (location == 'Georgia') { var ChapmanCode = 'GEO';
} else if (location == 'Germany') { var ChapmanCode = 'DEU';
} else if (location == 'Ghana') { var ChapmanCode = 'GHA';
} else if (location == 'Gibraltar') { var ChapmanCode = 'GIB';
} else if (location == 'Great Britain') { var ChapmanCode = 'GBR';
} else if (location == 'Greece') { var ChapmanCode = 'GRC';
} else if (location == 'Greenland') { var ChapmanCode = 'GRL';
} else if (location == 'Grenada') { var ChapmanCode = 'GRD';
} else if (location == 'Guadeloupe') { var ChapmanCode = 'GLP';
} else if (location == 'Guam') { var ChapmanCode = 'GUM';
} else if (location == 'Guatemala') { var ChapmanCode = 'GTM';
} else if (location == 'Guinea') { var ChapmanCode = 'GIN';
} else if (location == 'Guinea-Bissau') { var ChapmanCode = 'GNB';
} else if (location == 'Guyana') { var ChapmanCode = 'GUY';
} else if (location == 'Haiti') { var ChapmanCode = 'HTI';
} else if (location == 'Heard Island & McDonald Islands') { var ChapmanCode = 'HMD';
} else if (location == 'Holland') { var ChapmanCode = 'HOL';
} else if (location == 'Honduras') { var ChapmanCode = 'HND';
} else if (location == 'Hong Kong') { var ChapmanCode = 'HKG';
} else if (location == 'Hungary') { var ChapmanCode = 'HUN';
} else if (location == 'Iceland') { var ChapmanCode = 'ISL';
} else if (location == 'India') { var ChapmanCode = 'IND';
} else if (location == 'Indonesia') { var ChapmanCode = 'IDN';
} else if (location == 'Iran') { var ChapmanCode = 'IRN';
} else if (location == 'Islamic Republic of Iran') { var ChapmanCode = 'IRN';
} else if (location == 'Iraq') { var ChapmanCode = 'IRQ';
} else if (location == 'Ireland') { var ChapmanCode = 'IRL';
} else if (location == 'Israel') { var ChapmanCode = 'ISR';
} else if (location == 'Italy') { var ChapmanCode = 'ITA';
} else if (location == 'Jamaica') { var ChapmanCode = 'JAM';
} else if (location == 'Japan') { var ChapmanCode = 'JPN';
} else if (location == 'Jordan') { var ChapmanCode = 'JOR';
} else if (location == 'Kazakhstan') { var ChapmanCode = 'KAZ';
} else if (location == 'Kenya') { var ChapmanCode = 'KEN';
} else if (location == 'Kiribati') { var ChapmanCode = 'KIR';
} else if (location == 'North Korea') { var ChapmanCode = 'PRK';
} else if (location == 'Korea, Democratic People\'s Republic of') { var ChapmanCode = 'PRK';
} else if (location == 'South Korea') { var ChapmanCode = 'KOR';
} else if (location == 'Korea, Republic of') { var ChapmanCode = 'KOR';
} else if (location == 'Kuwait') { var ChapmanCode = 'KWT';
} else if (location == 'Kyrgyzstan') { var ChapmanCode = 'KGZ';
} else if (location == 'Laos') { var ChapmanCode = 'LAO';
} else if (location == 'Lao People\'s Democratic Republic') { var ChapmanCode = 'LAO';
} else if (location == 'Latvia') { var ChapmanCode = 'LVA';
} else if (location == 'Lebanon') { var ChapmanCode = 'LBN';
} else if (location == 'Lesotho') { var ChapmanCode = 'LSO';
} else if (location == 'Liberia') { var ChapmanCode = 'LBR';
} else if (location == 'Libya') { var ChapmanCode = 'LBY';
} else if (location == 'Libyan Arab Jamahiriya') { var ChapmanCode = 'LBY';
} else if (location == 'Liechtenstein') { var ChapmanCode = 'LIE';
} else if (location == 'Lithuania') { var ChapmanCode = 'LTU';
} else if (location == 'Luxembourg') { var ChapmanCode = 'LUX';
} else if (location == 'Macau') { var ChapmanCode = 'MAC';
} else if (location == 'Macedonia') { var ChapmanCode = 'MKD';
} else if (location == 'Madagascar') { var ChapmanCode = 'MDG';
} else if (location == 'Malawi') { var ChapmanCode = 'MWI';
} else if (location == 'Malaysia') { var ChapmanCode = 'MYS';
} else if (location == 'Maldives') { var ChapmanCode = 'MDV';
} else if (location == 'Mali') { var ChapmanCode = 'MLI';
} else if (location == 'Malta') { var ChapmanCode = 'MLT';
} else if (location == 'Marshall Islands') { var ChapmanCode = 'MHL';
} else if (location == 'Martinique') { var ChapmanCode = 'MTQ';
} else if (location == 'Mauritania') { var ChapmanCode = 'MRT';
} else if (location == 'Mauritius') { var ChapmanCode = 'MUS';
} else if (location == 'Mayotte') { var ChapmanCode = 'MYT';
} else if (location == 'Mexico') { var ChapmanCode = 'MEX';
} else if (location == 'Micronesia') { var ChapmanCode = 'FSM';
} else if (location == 'Micronesia, Federated States of') { var ChapmanCode = 'FSM';
} else if (location == 'Moldova') { var ChapmanCode = 'MDA';
} else if (location == 'Moldova, Republic of') { var ChapmanCode = 'MDA';
} else if (location == 'Monaco') { var ChapmanCode = 'MCO';
} else if (location == 'Mongolia') { var ChapmanCode = 'MNG';
} else if (location == 'Montserrat') { var ChapmanCode = 'MSR';
} else if (location == 'Morocco') { var ChapmanCode = 'MAR';
} else if (location == 'Mozambique') { var ChapmanCode = 'MOZ';
} else if (location == 'Myanmar') { var ChapmanCode = 'MMR';
} else if (location == 'Namibia') { var ChapmanCode = 'NAM';
} else if (location == 'Nauru') { var ChapmanCode = 'NRU';
} else if (location == 'Nepal') { var ChapmanCode = 'NPL';
} else if (location == 'Nederland') { var ChapmanCode = 'NLD';
} else if (location == 'Netherlands') { var ChapmanCode = 'NLD';
} else if (location == 'Netherlands Antilles') { var ChapmanCode = 'ANT';
} else if (location == 'New Caledonia') { var ChapmanCode = 'NCL';
} else if (location == 'New Zealand') { var ChapmanCode = 'NZL';
} else if (location == 'Nicaragua') { var ChapmanCode = 'NIC';
} else if (location == 'Niger') { var ChapmanCode = 'NER';
} else if (location == 'Nigeria') { var ChapmanCode = 'NGA';
} else if (location == 'Niue') { var ChapmanCode = 'NIU';
} else if (location == 'Norfolk Island') { var ChapmanCode = 'NFK';
} else if (location == 'Northern Ireland') { var ChapmanCode = 'NIR';
} else if (location == 'Northern Mariana Islands') { var ChapmanCode = 'MNP';
} else if (location == 'Norway') { var ChapmanCode = 'NOR';
} else if (location == 'Oman') { var ChapmanCode = 'OMN';
} else if (location == 'Pakistan') { var ChapmanCode = 'PAK';
} else if (location == 'Palau') { var ChapmanCode = 'PLW';
} else if (location == 'Panama') { var ChapmanCode = 'PAN';
} else if (location == 'Panama Canal Zone') { var ChapmanCode = 'PCZ';
} else if (location == 'Papua New Guinea') { var ChapmanCode = 'PNG';
} else if (location == 'Paraguay') { var ChapmanCode = 'PRY';
} else if (location == 'Peru') { var ChapmanCode = 'PER';
} else if (location == 'Philippines') { var ChapmanCode = 'PHL';
} else if (location == 'Pitcairn') { var ChapmanCode = 'PCN';
} else if (location == 'Poland') { var ChapmanCode = 'POL';
} else if (location == 'Portugal') { var ChapmanCode = 'PRT';
} else if (location == 'Puerto Rico') { var ChapmanCode = 'PRI';
} else if (location == 'Qatar') { var ChapmanCode = 'QAT';
} else if (location == 'Reunion') { var ChapmanCode = 'REU';
} else if (location == 'Romania') { var ChapmanCode = 'ROU';
} else if (location == 'Russia') { var ChapmanCode = 'RUS';
} else if (location == 'Russian Federation') { var ChapmanCode = 'RUS';
} else if (location == 'Rwanda') { var ChapmanCode = 'RWA';
} else if (location == 'Saint Kitts and Nevis') { var ChapmanCode = 'KNA';
} else if (location == 'Saint Lucia') { var ChapmanCode = 'LCA';
} else if (location == 'Saint Vincent and the Grenadines') { var ChapmanCode = 'VCT';
} else if (location == 'Samoa') { var ChapmanCode = 'WSM';
} else if (location == 'San Marino') { var ChapmanCode = 'SMR';
} else if (location == 'Sao Tome and Principe') { var ChapmanCode = 'STP';
} else if (location == 'Saudi Arabia') { var ChapmanCode = 'SAU';
} else if (location == 'Scotland') { var ChapmanCode = 'SCT';
} else if (location == 'Senegal') { var ChapmanCode = 'SEN';
} else if (location == 'Seychelles') { var ChapmanCode = 'SYC';
} else if (location == 'Sicily') { var ChapmanCode = 'SIC';
} else if (location == 'Sierra Leone') { var ChapmanCode = 'SLE';
} else if (location == 'Singapore') { var ChapmanCode = 'SGP';
} else if (location == 'Slovakia') { var ChapmanCode = 'SVK';
} else if (location == 'Slovak Republic') { var ChapmanCode = 'SVK';
} else if (location == 'Slovenia') { var ChapmanCode = 'SVN';
} else if (location == 'Solomon Islands') { var ChapmanCode = 'SLB';
} else if (location == 'Somalia') { var ChapmanCode = 'SOM';
} else if (location == 'South Africa') { var ChapmanCode = 'ZAF';
} else if (location == 'Zuid Afrika') { var ChapmanCode = 'ZAF';
} else if (location == 'South America') { var ChapmanCode = 'SAM';
} else if (location == 'Spain') { var ChapmanCode = 'ESP';
} else if (location == 'Espana') { var ChapmanCode = 'ESP';
} else if (location == 'Sri Lanka') { var ChapmanCode = 'LKA';
} else if (location == 'Saint Helena') { var ChapmanCode = 'SHN';
} else if (location == 'Saint Pierre and Miquelon') { var ChapmanCode = 'SPM';
} else if (location == 'Sudan') { var ChapmanCode = 'SDN';
} else if (location == 'Suriname') { var ChapmanCode = 'SUR';
} else if (location == 'Svalbard and Jan Mayen Islands') { var ChapmanCode = 'SJM';
} else if (location == 'Swaziland') { var ChapmanCode = 'SWZ';
} else if (location == 'Sweden') { var ChapmanCode = 'SWE';
} else if (location == 'Switzerland') { var ChapmanCode = 'CHE';
} else if (location == 'Syria') { var ChapmanCode = 'SYR';
} else if (location == 'Syrian Arab Republic') { var ChapmanCode = 'SYR';
} else if (location == 'Taiwan') { var ChapmanCode = 'TWN';
} else if (location == 'Taiwan, Province of China') { var ChapmanCode = 'TWN';
} else if (location == 'Tajikistan') { var ChapmanCode = 'TJK';
} else if (location == 'Tanzania') { var ChapmanCode = 'TZA';
} else if (location == 'Tanzania, United Republic of') { var ChapmanCode = 'TZA';
} else if (location == 'United Republic of Tanzania') { var ChapmanCode = 'TZA';
} else if (location == 'Thailand') { var ChapmanCode = 'THA';
} else if (location == 'Togo') { var ChapmanCode = 'TGO';
} else if (location == 'Tokelau') { var ChapmanCode = 'TKL';
} else if (location == 'Tonga') { var ChapmanCode = 'TON';
} else if (location == 'Trinidad and Tobago') { var ChapmanCode = 'TTO';
} else if (location == 'Tunisia') { var ChapmanCode = 'TUN';
} else if (location == 'Turkey') { var ChapmanCode = 'TUR';
} else if (location == 'Turkmenistan') { var ChapmanCode = 'TKM';
} else if (location == 'Turks and Caicos Islands') { var ChapmanCode = 'TCA';
} else if (location == 'Tuvalu') { var ChapmanCode = 'TUV';
} else if (location == 'Uganda') { var ChapmanCode = 'UGA';
} else if (location == 'Ukraine') { var ChapmanCode = 'UKR';
} else if (location == 'United Arab Emirates') { var ChapmanCode = 'ARE';
} else if (location == 'Arab Emirates') { var ChapmanCode = 'ARE';
} else if (location == 'United Kingdom') { var ChapmanCode = 'GBR';
} else if (location == 'United States Of America') { var ChapmanCode = 'USA';
} else if (location == 'United States') { var ChapmanCode = 'USA';
} else if (location == 'United States, Minor Outlying Islands') { var ChapmanCode = 'UMI';
} else if (location == 'Uruguay') { var ChapmanCode = 'URY';
} else if (location == 'Uzbekistan') { var ChapmanCode = 'UZB';
} else if (location == 'Vanuatu') { var ChapmanCode = 'VUT';
} else if (location == 'Vatican City State') { var ChapmanCode = 'VAT';
} else if (location == 'Venezuela') { var ChapmanCode = 'VEN';
} else if (location == 'Viet Nam') { var ChapmanCode = 'VNM';
} else if (location == 'Virgin Islands (British)') { var ChapmanCode = 'VGB';
} else if (location == 'Virgin Islands (U.S.)') { var ChapmanCode = 'VIR';
} else if (location == 'Wales') { var ChapmanCode = 'WLS';
} else if (location == 'Wallis and Futuna Islands') { var ChapmanCode = 'WLF';
} else if (location == 'West Africa') { var ChapmanCode = 'WAF';
} else if (location == 'West Indies') { var ChapmanCode = 'BWI';
} else if (location == 'West Indies, British') { var ChapmanCode = 'BWI';
} else if (location == 'Western Sahara') { var ChapmanCode = 'ESH';
} else if (location == 'Yemen') { var ChapmanCode = 'YEM';
} else if (location == 'Yugoslavia') { var ChapmanCode = 'YUG';
} else if (location == 'Zaire') { var ChapmanCode = 'ZAR';
} else if (location == 'Zambia') { var ChapmanCode = 'ZMB';
} else if (location == 'Zimbabwe') { var ChapmanCode = 'ZWE';
// USA States
} else if (location == 'AL' || location == 'Alabama') { var ChapmanCode = 'AL';
} else if (location == 'AK' || location == 'Alaska') { var ChapmanCode = 'AK';
} else if (location == 'AZ' || location == 'Arizona') { var ChapmanCode = 'AZ';
} else if (location == 'AR' || location == 'Arkansas') { var ChapmanCode = 'AR';
} else if (location == 'CA' || location == 'California') { var ChapmanCode = 'CA';
} else if (location == 'CO' || location == 'Colorado') { var ChapmanCode = 'CO';
} else if (location == 'CT' || location == 'Connecticut') { var ChapmanCode = 'CT';
} else if (location == 'DE' || location == 'Delaware') { var ChapmanCode = 'DE';
} else if (location == 'DC' || location == 'District of Columbia') { var ChapmanCode = 'DC';
} else if (location == 'FL' || location == 'Florida') { var ChapmanCode = 'FL';
} else if (location == 'GA' || location == 'Georgia') { var ChapmanCode = 'GA';
} else if (location == 'HI' || location == 'Hawaii') { var ChapmanCode = 'HI';
} else if (location == 'ID' || location == 'Idaho') { var ChapmanCode = 'ID';
} else if (location == 'IL' || location == 'Illinois') { var ChapmanCode = 'IL';
} else if (location == 'IN' || location == 'Indiana') { var ChapmanCode = 'IN';
} else if (location == 'IA' || location == 'Iowa') { var ChapmanCode = 'IA';
} else if (location == 'KS' || location == 'Kansas') { var ChapmanCode = 'KS';
} else if (location == 'KY' || location == 'Kentucky') { var ChapmanCode = 'KY';
} else if (location == 'LA' || location == 'Louisiana') { var ChapmanCode = 'LA';
} else if (location == 'ME' || location == 'Maine') { var ChapmanCode = 'ME';
} else if (location == 'MD' || location == 'Maryland') { var ChapmanCode = 'MD';
} else if (location == 'MA' || location == 'Massachusetts') { var ChapmanCode = 'MA';
} else if (location == 'MI' || location == 'Michigan') { var ChapmanCode = 'MI';
} else if (location == 'MN' || location == 'Minnesota') { var ChapmanCode = 'MN';
} else if (location == 'MS' || location == 'Mississippi') { var ChapmanCode = 'MS';
} else if (location == 'MO' || location == 'Missouri') { var ChapmanCode = 'MO';
} else if (location == 'MT' || location == 'Montana') { var ChapmanCode = 'MT';
} else if (location == 'NE' || location == 'Nebraska') { var ChapmanCode = 'NE';
} else if (location == 'NV' || location == 'Nevada') { var ChapmanCode = 'NV';
} else if (location == 'NH' || location == 'New Hampshire') { var ChapmanCode = 'NH';
} else if (location == 'NJ' || location == 'New Jersey') { var ChapmanCode = 'NJ';
} else if (location == 'NM' || location == 'New Mexico') { var ChapmanCode = 'NM';
} else if (location == 'NY' || location == 'New York') { var ChapmanCode = 'NY';
} else if (location == 'NC' || location == 'North Carolina') { var ChapmanCode = 'NC';
} else if (location == 'ND' || location == 'North Dakota') { var ChapmanCode = 'ND';
} else if (location == 'OH' || location == 'Ohio') { var ChapmanCode = 'OH';
} else if (location == 'OK' || location == 'Oklahoma') { var ChapmanCode = 'OK';
} else if (location == 'OR' || location == 'Oregon') { var ChapmanCode = 'OR';
} else if (location == 'PA' || location == 'Pennsylvania') { var ChapmanCode = 'PA';
} else if (location == 'PR' || location == '(Puerto Rico)') { var ChapmanCode = 'PR';
} else if (location == 'RI' || location == 'Rhode Island') { var ChapmanCode = 'RI';
} else if (location == 'SC' || location == 'South Carolina') { var ChapmanCode = 'SC';
} else if (location == 'SD' || location == 'South Dakota') { var ChapmanCode = 'SD';
} else if (location == 'TN' || location == 'Tennessee') { var ChapmanCode = 'TN';
} else if (location == 'TX' || location == 'Texas') { var ChapmanCode = 'TX';
} else if (location == 'UT' || location == 'Utah') { var ChapmanCode = 'UT';
} else if (location == 'VT' || location == 'Vermont') { var ChapmanCode = 'VT';
} else if (location == 'VA' || location == 'Virginia') { var ChapmanCode = 'VA';
} else if (location == 'VI' || location == '(Virgin Islands)') { var ChapmanCode = 'VI';
} else if (location == 'WA' || location == 'Washington') { var ChapmanCode = 'WA';
} else if (location == 'WV' || location == 'West Virginia') { var ChapmanCode = 'WV';
} else if (location == 'WI' || location == 'Wisconsin') { var ChapmanCode = 'WI';
} else if (location == 'WY' || location == 'Wyoming') { var ChapmanCode = 'WY';
// Canadian Provinces
} else if (location == 'AB' || location == 'Alberta') { var ChapmanCode = 'AB';
} else if (location == 'BC' || location == 'British Columbia') { var ChapmanCode = 'BC';
} else if (location == 'NL' || location == 'Labrador') { var ChapmanCode = 'NL';
} else if (location == 'MB' || location == 'Manitoba') { var ChapmanCode = 'MB';
} else if (location == 'NB' || location == 'New Brunswick') { var ChapmanCode = 'NB';
} else if (location == 'NL' || location == 'Newfoundland') { var ChapmanCode = 'NL';
} else if (location == 'NL' || location == 'Newfoundland and Labrador') { var ChapmanCode = 'NL';
} else if (location == 'NT' || location == 'Northwest Territories') { var ChapmanCode = 'NT';
} else if (location == 'NS' || location == 'Nova Scotia') { var ChapmanCode = 'NS';
} else if (location == 'NU' || location == 'Nunavut') { var ChapmanCode = 'NU';
} else if (location == 'ON' || location == 'Ontario') { var ChapmanCode = 'ON';
} else if (location == 'PE' || location == 'Prince Edward Island') { var ChapmanCode = 'PE';
} else if (location == 'QC' || location == 'Quebec') { var ChapmanCode = 'QC';
} else if (location == 'SK' || location == 'Saskatchewan') { var ChapmanCode = 'SK';
} else if (location == 'YT' || location == 'Yukon') { var ChapmanCode = 'YT';
// Default ChapmanCode
} else {
var ChapmanCode = '?NA';
}
return ChapmanCode;
}
|