]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/js/dojo/MARC/FixedFields.js
Repaired merge conflicts resuling from ttopac-move-templates
[working/Evergreen.git] / Open-ILS / web / js / dojo / MARC / FixedFields.js
1 /* ---------------------------------------------------------------------------
2  * Copyright (C) 2011  Equinox Software, Inc.
3  * Mike Rylander <miker@esilibrary.com>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * ---------------------------------------------------------------------------
15  */
16
17 if(!dojo._hasResource["MARC.FixedFields"]) {
18
19     dojo.require('MARC.Record');
20
21     dojo._hasResource["MARC.FixedFields"] = true;
22     dojo.provide("MARC.FixedFields");
23
24     MARC.Record._recType = {
25         BKS : { Type : /[at]{1}/,    BLvl : /[acdm]{1}/ },
26         SER : { Type : /[a]{1}/,    BLvl : /[bsi]{1}/ },
27         VIS : { Type : /[gkro]{1}/,    BLvl : /[abcdmsi]{1}/ },
28         MIX : { Type : /[p]{1}/,    BLvl : /[cdi]{1}/ },
29         MAP : { Type : /[ef]{1}/,    BLvl : /[abcdmsi]{1}/ },
30         SCO : { Type : /[cd]{1}/,    BLvl : /[abcdmsi]{1}/ },
31         REC : { Type : /[ij]{1}/,    BLvl : /[abcdmsi]{1}/ },
32         COM : { Type : /[m]{1}/,    BLvl : /[abcdmsi]{1}/ },
33         AUT : { Type : /[z]{1}/,    BLvl : /.{1}/ },
34         MFHD : { Type : /[uvxy]{1}/,  BLvl : /.{1}/ }
35     };
36
37     MARC.Record._ff_pos = {
38         Ctry : {
39             _8 : {
40                 BKS : {start : 15, len : 3, def : ' ' },
41                 SER : {start : 15, len : 3, def : ' ' },
42                 VIS : {start : 15, len : 3, def : ' ' },
43                 MIX : {start : 15, len : 3, def : ' ' },
44                 MAP : {start : 15, len : 3, def : ' ' },
45                 SCO : {start : 15, len : 3, def : ' ' },
46                 REC : {start : 15, len : 3, def : ' ' },
47                 COM : {start : 15, len : 3, def : ' ' }
48             }
49         },
50         Lang : {
51             _8 : {
52                 BKS : {start : 35, len : 3, def : ' ' },
53                 SER : {start : 35, len : 3, def : ' ' },
54                 VIS : {start : 35, len : 3, def : ' ' },
55                 MIX : {start : 35, len : 3, def : ' ' },
56                 MAP : {start : 35, len : 3, def : ' ' },
57                 SCO : {start : 35, len : 3, def : ' ' },
58                 REC : {start : 35, len : 3, def : ' ' },
59                 COM : {start : 35, len : 3, def : ' ' }
60             }
61         },
62         MRec : {
63             _8 : {
64                 BKS : {start : 38, len : 1, def : ' ' },
65                 SER : {start : 38, len : 1, def : ' ' },
66                 VIS : {start : 38, len : 1, def : ' ' },
67                 MIX : {start : 38, len : 1, def : ' ' },
68                 MAP : {start : 38, len : 1, def : ' ' },
69                 SCO : {start : 38, len : 1, def : ' ' },
70                 REC : {start : 38, len : 1, def : ' ' },
71                 COM : {start : 38, len : 1, def : ' ' }
72             }
73         },
74         DtSt : {
75             _8 : {
76                 BKS : {start : 6, len : 1, def : ' ' },
77                 SER : {start : 6, len : 1, def : 'c' },
78                 VIS : {start : 6, len : 1, def : ' ' },
79                 MIX : {start : 6, len : 1, def : ' ' },
80                 MAP : {start : 6, len : 1, def : ' ' },
81                 SCO : {start : 6, len : 1, def : ' ' },
82                 REC : {start : 6, len : 1, def : ' ' },
83                 COM : {start : 6, len : 1, def : ' ' }
84             }
85         },
86         RecStat : {
87             ldr : {
88                 BKS : {start : 5, len : 1, def : 'n' },
89                 SER : {start : 5, len : 1, def : 'n' },
90                 VIS : {start : 5, len : 1, def : 'n' },
91                 MIX : {start : 5, len : 1, def : 'n' },
92                 MAP : {start : 5, len : 1, def : 'n' },
93                 SCO : {start : 5, len : 1, def : 'n' },
94                 REC : {start : 5, len : 1, def : 'n' },
95                 COM : {start : 5, len : 1, def : 'n' },
96                 MFHD: {start : 5, len : 1, def : 'n' },
97                 AUT : {start : 5, len : 1, def : 'n' }
98             }
99         },
100         Type : {
101             ldr : {
102                 BKS : {start : 6, len : 1, def : 'a' },
103                 SER : {start : 6, len : 1, def : 'a' },
104                 VIS : {start : 6, len : 1, def : 'g' },
105                 MIX : {start : 6, len : 1, def : 'p' },
106                 MAP : {start : 6, len : 1, def : 'e' },
107                 SCO : {start : 6, len : 1, def : 'c' },
108                 REC : {start : 6, len : 1, def : 'i' },
109                 COM : {start : 6, len : 1, def : 'm' },
110                 AUT : {start : 6, len : 1, def : 'z' },
111                 MFHD : {start : 6, len : 1, def : 'y' }
112     
113             }
114         },
115         Ctrl : {
116             ldr : {
117                 BKS : {start : 8, len : 1, def : ' ' },
118                 SER : {start : 8, len : 1, def : ' ' },
119                 VIS : {start : 8, len : 1, def : ' ' },
120                 MIX : {start : 8, len : 1, def : ' ' },
121                 MAP : {start : 8, len : 1, def : ' ' },
122                 SCO : {start : 8, len : 1, def : ' ' },
123                 REC : {start : 8, len : 1, def : ' ' },
124                 COM : {start : 8, len : 1, def : ' ' }
125             }
126         },
127         BLvl : {
128             ldr : {
129                 BKS : {start : 7, len : 1, def : 'm' },
130                 SER : {start : 7, len : 1, def : 's' },
131                 VIS : {start : 7, len : 1, def : 'm' },
132                 MIX : {start : 7, len : 1, def : 'c' },
133                 MAP : {start : 7, len : 1, def : 'm' },
134                 SCO : {start : 7, len : 1, def : 'm' },
135                 REC : {start : 7, len : 1, def : 'm' },
136                 COM : {start : 7, len : 1, def : 'm' }
137             }
138         },
139         Desc : {
140             ldr : {
141                 BKS : {start : 18, len : 1, def : ' ' },
142                 SER : {start : 18, len : 1, def : ' ' },
143                 VIS : {start : 18, len : 1, def : ' ' },
144                 MIX : {start : 18, len : 1, def : ' ' },
145                 MAP : {start : 18, len : 1, def : ' ' },
146                 SCO : {start : 18, len : 1, def : ' ' },
147                 REC : {start : 18, len : 1, def : ' ' },
148                 COM : {start : 18, len : 1, def : ' ' }
149             }
150         },
151         Item : {
152             ldr : {
153                 MFHD : {start : 18, len : 1, def : 'i' }
154             }
155         },
156         ELvl : {
157             ldr : {
158                 BKS : {start : 17, len : 1, def : ' ' },
159                 SER : {start : 17, len : 1, def : ' ' },
160                 VIS : {start : 17, len : 1, def : ' ' },
161                 MIX : {start : 17, len : 1, def : ' ' },
162                 MAP : {start : 17, len : 1, def : ' ' },
163                 SCO : {start : 17, len : 1, def : ' ' },
164                 REC : {start : 17, len : 1, def : ' ' },
165                 COM : {start : 17, len : 1, def : ' ' },
166                 AUT : {start : 17, len : 1, def : 'n' },
167                 MFHD : {start : 17, len : 1, def : 'u' }
168             }
169         },
170         TMat : {
171             _8 : {
172                 VIS : {start : 33, len : 1, def : ' ' }
173             },
174             _6 : {
175                 VIS : {start : 16, len : 1, def : ' ' }
176             }
177         },
178         TrAr : {
179             _8 : {
180                 SCO : {start : 33, len : 1, def : ' ' },
181                 REC : {start : 33, len : 1, def : 'n' }
182             },
183             _6 : {
184                 SCO : {start : 16, len : 1, def : ' ' },
185                 REC : {start : 16, len : 1, def : 'n' }
186             }
187         },
188         Indx : {
189             _8 : {
190                 BKS : {start : 31, len : 1, def : '0' },
191                 MAP : {start : 31, len : 1, def : '0' }
192             },
193             _6 : {
194                 BKS : {start : 14, len : 1, def : '0' },
195                 MAP : {start : 14, len : 1, def : '0' }
196             }
197         },
198         Date1 : {
199             _8 : {
200                 BKS : {start : 7, len : 4, def : ' ' },
201                 SER : {start : 7, len : 4, def : ' ' },
202                 VIS : {start : 7, len : 4, def : ' ' },
203                 MIX : {start : 7, len : 4, def : ' ' },
204                 MAP : {start : 7, len : 4, def : ' ' },
205                 SCO : {start : 7, len : 4, def : ' ' },
206                 REC : {start : 7, len : 4, def : ' ' },
207                 COM : {start : 7, len : 4, def : ' ' }
208             }
209         },
210         Date2 : {
211             _8 : {
212                 BKS : {start : 11, len : 4, def : ' ' },
213                 SER : {start : 11, len : 4, def : '9' },
214                 VIS : {start : 11, len : 4, def : ' ' },
215                 MIX : {start : 11, len : 4, def : ' ' },
216                 MAP : {start : 11, len : 4, def : ' ' },
217                 SCO : {start : 11, len : 4, def : ' ' },
218                 REC : {start : 11, len : 4, def : ' ' },
219                 COM : {start : 11, len : 4, def : ' ' }
220             }
221         },
222         LitF : {
223             _8 : {
224                 BKS : {start : 33, len : 1, def : '0' }
225             },
226             _6 : {
227                 BKS : {start : 16, len : 1, def : '0' }
228             }
229         },
230         Biog : {
231             _8 : {
232                 BKS : {start : 34, len : 1, def : ' ' }
233             },
234             _6 : {
235                 BKS : {start : 17, len : 1, def : ' ' }
236             }
237         },
238         Ills : {
239             _8 : {
240                 BKS : {start : 18, len : 4, def : ' ' }
241             },
242             _6 : {
243                 BKS : {start : 1, len : 4, def : ' ' }
244             }
245         },
246         Fest : {
247             _8 : {
248                 BKS : {start : 30, len : 1, def : '0' }
249             },
250             _6 : {
251                 BKS : {start : 13, len : 1, def : '0' }
252             }
253         },
254         Conf : {
255             _8 : {
256                 BKS : {start : 24, len : 4, def : ' ' },
257                 SER : {start : 25, len : 3, def : ' ' }
258             },
259             _6 : {
260                 BKS : {start : 7, len : 4, def : ' ' },
261                 SER : {start : 8, len : 3, def : ' ' }
262             }
263         },
264         GPub : {
265             _8 : {
266                 BKS : {start : 28, len : 1, def : ' ' },
267                 SER : {start : 28, len : 1, def : ' ' },
268                 VIS : {start : 28, len : 1, def : ' ' },
269                 MAP : {start : 28, len : 1, def : ' ' },
270                 COM : {start : 28, len : 1, def : ' ' }
271             },
272             _6 : {
273                 BKS : {start : 11, len : 1, def : ' ' },
274                 SER : {start : 11, len : 1, def : ' ' },
275                 VIS : {start : 11, len : 1, def : ' ' },
276                 MAP : {start : 11, len : 1, def : ' ' },
277                 COM : {start : 11, len : 1, def : ' ' }
278             }
279         },
280         Srce : {
281             _8 : {
282                 BKS : {start : 39, len : 1, def : 'd' },
283                 SER : {start : 39, len : 1, def : 'd' },
284                 VIS : {start : 39, len : 1, def : 'd' },
285                 SCO : {start : 39, len : 1, def : 'd' },
286                 REC : {start : 39, len : 1, def : 'd' },
287                 COM : {start : 39, len : 1, def : 'd' },
288                 MFHD : {start : 39, len : 1, def : 'd' },
289                 "AUT" : {"start" : 39, "len" : 1, "def" : 'd' }
290             }
291         },
292         Audn : {
293             _8 : {
294                 BKS : {start : 22, len : 1, def : ' ' },
295                 SER : {start : 22, len : 1, def : ' ' },
296                 VIS : {start : 22, len : 1, def : ' ' },
297                 SCO : {start : 22, len : 1, def : ' ' },
298                 REC : {start : 22, len : 1, def : ' ' },
299                 COM : {start : 22, len : 1, def : ' ' }
300             },
301             _6 : {
302                 BKS : {start : 5, len : 1, def : ' ' },
303                 SER : {start : 5, len : 1, def : ' ' },
304                 VIS : {start : 5, len : 1, def : ' ' },
305                 SCO : {start : 5, len : 1, def : ' ' },
306                 REC : {start : 5, len : 1, def : ' ' },
307                 COM : {start : 5, len : 1, def : ' ' }
308             }
309         },
310         Form : {
311             _8 : {
312                 BKS : {start : 23, len : 1, def : ' ' },
313                 SER : {start : 23, len : 1, def : ' ' },
314                 VIS : {start : 29, len : 1, def : ' ' },
315                 MIX : {start : 23, len : 1, def : ' ' },
316                 MAP : {start : 29, len : 1, def : ' ' },
317                 SCO : {start : 23, len : 1, def : ' ' },
318                 REC : {start : 23, len : 1, def : ' ' }
319             },
320             _6 : {
321                 BKS : {start : 6, len : 1, def : ' ' },
322                 SER : {start : 6, len : 1, def : ' ' },
323                 VIS : {start : 12, len : 1, def : ' ' },
324                 MIX : {start : 6, len : 1, def : ' ' },
325                 MAP : {start : 12, len : 1, def : ' ' },
326                 SCO : {start : 6, len : 1, def : ' ' },
327                 REC : {start : 6, len : 1, def : ' ' }
328             }
329         },
330         'S/L' : {
331             _8 : {
332                 SER : {start : 34, len : 1, def : '0' }
333             },
334             _6 : {
335                 SER : {start : 17, len : 1, def : '0' }
336             }
337         },
338         'Alph' : {
339             _8 : {
340                 SER : {start : 33, len : 1, def : ' ' }
341             },
342             _6 : {
343                 SER : {start : 16, len : 1, def : ' ' }
344             }
345         },
346         "GeoSubd" : {
347             "_8" : {
348                 "AUT" : {"start" : 6, "len" : 1, "def" : ' ' }
349             }
350         },
351         "Roman" : {
352             "_8" : {
353                 "AUT" : {"start" : 7, "len" : 1, "def" : ' ' }
354             }
355         },
356         "CatLang" : {
357             "_8" : {
358                 "AUT" : {"start" : 8, "len" : 1, "def" : ' ' }
359             }
360         },
361         "Auth/Ref" : {
362             "_8" : {
363                 "AUT" : {"start" : 9, "len" : 1, "def" : ' ' }
364             }
365         },
366         "Rules" : {
367             "_8" : {
368                 "AUT" : {"start" : 10, "len" : 1, "def" : ' ' }
369             }
370         },
371         "Subj" : {
372             "_8" : {
373                 "AUT" : {"start" : 11, "len" : 1, "def" : ' ' }
374             }
375         },
376         "Series" : {
377             "_8" : {
378                 "AUT" : {"start" : 12, "len" : 1, "def" : ' ' }
379             }
380         },
381         "SerNum" : {
382             "_8" : {
383                 "AUT" : {"start" : 13, "len" : 1, "def" : ' ' }
384             }
385         },
386         "NameUse" : {
387             "_8" : {
388                 "AUT" : {"start" : 14, "len" : 1, "def" : ' ' }
389             }
390         },
391         "SubjUse" : {
392             "_8" : {
393                 "AUT" : {"start" : 15, "len" : 1, "def" : ' ' }
394             }
395         },
396         "SerUse" : {
397             "_8" : {
398                 "AUT" : {"start" : 16, "len" : 1, "def" : ' ' }
399             }
400         },
401         "TypeSubd" : {
402             "_8" : {
403                 "AUT" : {"start" : 17, "len" : 1, "def" : ' ' }
404             }
405         },
406         "GovtAgn" : {
407             "_8" : {
408                 "AUT" : {"start" : 28, "len" : 1, "def" : ' ' }
409             }
410         },
411         "RefStatus" : {
412             "_8" : {
413                 "AUT" : {"start" : 29, "len" : 1, "def" : ' ' }
414             }
415         },
416         "UpdStatus" : {
417             "_8" : {
418                 "AUT" : {"start" : 31, "len" : 1, "def" : ' ' }
419             }
420         },
421         "Name" : {
422             "_8" : {
423                 "AUT" : {"start" : 32, "len" : 1, "def" : ' ' }
424             }
425         },
426         "Status" : {
427             "_8" : {
428                 "AUT" : {"start" : 33, "len" : 1, "def" : ' ' }
429             }
430         },
431         "ModRec" : {
432             "_8" : {
433                 "AUT" : {"start" : 38, "len" : 1, "def" : ' ' }
434             }
435         },
436         "Source" : {
437             "_8" : {
438                 "AUT" : {"start" : 39, "len" : 1, "def" : ' ' }
439             }
440         }
441     };
442     
443     MARC.Record._physical_characteristics = {
444         c : {
445                 label     : "Electronic Resource",
446                 subfields : {
447                         b : {   start : 1,
448                                 len   : 1,
449                                 label : "SMD",
450                                 values: {       a : "Tape Cartridge",
451                                                 b : "Chip cartridge",
452                                                 c : "Computer optical disk cartridge",
453                                                 f : "Tape cassette",
454                                                 h : "Tape reel",
455                                                 j : "Magnetic disk",
456                                                 m : "Magneto-optical disk",
457                                                 o : "Optical disk",
458                                                 r : "Remote",
459                                                 u : "Unspecified",
460                                                 z : "Other"
461                                 }
462                         },
463                         d : {   start : 3,
464                                 len   : 1,
465                                 label : "Color",
466                                 values: {       a : "One color",
467                                                 b : "Black-and-white",
468                                                 c : "Multicolored",
469                                                 g : "Gray scale",
470                                                 m : "Mixed",
471                                                 n : "Not applicable",
472                                                 u : "Unknown",
473                                                 z : "Other"
474                                 }
475                         },
476                         e : {   start : 4,
477                                 len   : 1,
478                                 label : "Dimensions",
479                                 values: {       a : "3 1/2 in.",
480                                                 e : "12 in.",
481                                                 g : "4 3/4 in. or 12 cm.",
482                                                 i : "1 1/8 x 2 3/8 in.",
483                                                 j : "3 7/8 x 2 1/2 in.",
484                                                 n : "Not applicable",
485                                                 o : "5 1/4 in.",
486                                                 u : "Unknown",
487                                                 v : "8 in.",
488                                                 z : "Other"
489                                 }
490                         },
491                         f : {   start : 5,
492                                 len   : 1,
493                                 label : "Sound",
494                                 values: {       ' ' : "No sound (Silent)",
495                                                 a   : "Sound",
496                                                 u   : "Unknown"
497                                 }
498                         },
499                         g : {   start : 6,
500                                 len   : 3,
501                                 label : "Image bit depth",
502                                 values: {       mmm   : "Multiple",
503                                                 nnn   : "Not applicable",
504                                                 '---' : "Unknown"
505                                 }
506                         },
507                         h : {   start : 9,
508                                 len   : 1,
509                                 label : "File formats",
510                                 values: {       a : "One file format",
511                                                 m : "Multiple file formats",
512                                                 u : "Unknown"
513                                 }
514                         },
515                         i : {   start : 10,
516                                 len   : 1,
517                                 label : "Quality assurance target(s)",
518                                 values: {       a : "Absent",
519                                                 n : "Not applicable",
520                                                 p : "Present",
521                                                 u : "Unknown"
522                                 }
523                         },
524                         j : {   start : 11,
525                                 len   : 1,
526                                 label : "Antecedent/Source",
527                                 values: {       a : "File reproduced from original",
528                                                 b : "File reproduced from microform",
529                                                 c : "File reproduced from electronic resource",
530                                                 d : "File reproduced from an intermediate (not microform)",
531                                                 m : "Mixed",
532                                                 n : "Not applicable",
533                                                 u : "Unknown"
534                                 }
535                         },
536                         k : {   start : 12,
537                                 len   : 1,
538                                 label : "Level of compression",
539                                 values: {       a : "Uncompressed",
540                                                 b : "Lossless",
541                                                 d : "Lossy",
542                                                 m : "Mixed",
543                                                 u : "Unknown"
544                                 }
545                         },
546                         l : {   start : 13,
547                                 len   : 1,
548                                 label : "Reformatting quality",
549                                 values: {       a : "Access",
550                                                 n : "Not applicable",
551                                                 p : "Preservation",
552                                                 r : "Replacement",
553                                                 u : "Unknown"
554                                 }
555                         }
556                 }
557         },
558         d : {
559                 label     : "Globe",
560                 subfields : {
561                         b : {   start : 1,
562                                 len   : 1,
563                                 label : "SMD",
564                                 values: {       a : "Celestial globe",
565                                                 b : "Planetary or lunar globe",
566                                                 c : "Terrestrial globe",
567                                                 e : "Earth moon globe",
568                                                 u : "Unspecified",
569                                                 z : "Other"
570                                 }
571                         },
572                         d : {   start : 3,
573                                 len   : 1,
574                                 label : "Color",
575                                 values: {       a : "One color",
576                                                 c : "Multicolored"
577                                 }
578                         },
579                         e : {   start : 4,
580                                 len   : 1,
581                                 label : "Physical medium",
582                                 values: {       a : "Paper",
583                                                 b : "Wood",
584                                                 c : "Stone",
585                                                 d : "Metal",
586                                                 e : "Synthetics",
587                                                 f : "Skins",
588                                                 g : "Textile",
589                                                 p : "Plaster",
590                                                 u : "Unknown",
591                                                 z : "Other"
592                                 }
593                         },
594                         f : {   start : 5,
595                                 len   : 1,
596                                 label : "Type of reproduction",
597                                 values: {       f : "Facsimile",
598                                                 n : "Not applicable",
599                                                 u : "Unknown",
600                                                 z : "Other"
601                                 }
602                         }
603                 }
604         },
605         a : {
606                 label     : "Map",
607                 subfields : {
608                         b : {   start : 1,
609                                 len   : 1,
610                                 label : "SMD",
611                                 values: {       d : "Atlas",
612                                                 g : "Diagram",
613                                                 j : "Map",
614                                                 k : "Profile",
615                                                 q : "Model",
616                                                 r : "Remote-sensing image",
617                                                 s : "Section",
618                                                 u : "Unspecified",
619                                                 y : "View",
620                                                 z : "Other"
621                                 }
622                         },
623                         d : {   start : 3,
624                                 len   : 1,
625                                 label : "Color",
626                                 values: {       a : "One color",
627                                                 c : "Multicolored"
628                                 }
629                         },
630                         e : {   start : 4,
631                                 len   : 1,
632                                 label : "Physical medium",
633                                 values: {       a : "Paper",
634                                                 b : "Wood",
635                                                 c : "Stone",
636                                                 d : "Metal",
637                                                 e : "Synthetics",
638                                                 f : "Skins",
639                                                 g : "Textile",
640                                                 p : "Plaster",
641                                                 q : "Flexible base photographic medium, positive",
642                                                 r : "Flexible base photographic medium, negative",
643                                                 s : "Non-flexible base photographic medium, positive",
644                                                 t : "Non-flexible base photographic medium, negative",
645                                                 u : "Unknown",
646                                                 y : "Other photographic medium",
647                                                 z : "Other"
648                                 }
649                         },
650                         f : {   start : 5,
651                                 len   : 1,
652                                 label : "Type of reproduction",
653                                 values: {       f : "Facsimile",
654                                                 n : "Not applicable",
655                                                 u : "Unknown",
656                                                 z : "Other"
657                                 }
658                         },
659                         g : {   start : 6,
660                                 len   : 1,
661                                 label : "Production/reproduction details",
662                                 values: {       a : "Photocopy, blueline print",
663                                                 b : "Photocopy",
664                                                 c : "Pre-production",
665                                                 d : "Film",
666                                                 u : "Unknown",
667                                                 z : "Other"
668                                 }
669                         },
670                         h : {   start : 7,
671                                 len   : 1,
672                                 label : "Positive/negative",
673                                 values: {       a : "Positive",
674                                                 b : "Negative",
675                                                 m : "Mixed",
676                                                 n : "Not applicable"
677                                 }
678                         }
679                 }
680         },
681         h : {
682                 label     : "Microform",
683                 subfields : {
684                         b : {   start : 1,
685                                 len   : 1,
686                                 label : "SMD",
687                                 values: {       a : "Aperture card",
688                                                 b : "Microfilm cartridge",
689                                                 c : "Microfilm cassette",
690                                                 d : "Microfilm reel",
691                                                 e : "Microfiche",
692                                                 f : "Microfiche cassette",
693                                                 g : "Microopaque",
694                                                 u : "Unspecified",
695                                                 z : "Other"
696                                 }
697                         },
698                         d : {   start : 3,
699                                 len   : 1,
700                                 label : "Positive/negative",
701                                 values: {       a : "Positive",
702                                                 b : "Negative",
703                                                 m : "Mixed",
704                                                 u : "Unknown"
705                                 }
706                         },
707                         e : {   start : 4,
708                                 len   : 1,
709                                 label : "Dimensions",
710                                 values: {       a : "8 mm.",
711                                                 e : "16 mm.",
712                                                 f : "35 mm.",
713                                                 g : "70mm.",
714                                                 h : "105 mm.",
715                                                 l : "3 x 5 in. (8 x 13 cm.)",
716                                                 m : "4 x 6 in. (11 x 15 cm.)",
717                                                 o : "6 x 9 in. (16 x 23 cm.)",
718                                                 p : "3 1/4 x 7 3/8 in. (9 x 19 cm.)",
719                                                 u : "Unknown",
720                                                 z : "Other"
721                                 }
722                         },
723                         f : {   start : 5,
724                                 len   : 4,
725                                 label : "Reduction ratio range/Reduction ratio",
726                                 values: {       a : "Low (1-16x)",
727                                                 b : "Normal (16-30x)",
728                                                 c : "High (31-60x)",
729                                                 d : "Very high (61-90x)",
730                                                 e : "Ultra (90x-)",
731                                                 u : "Unknown",
732                                                 v : "Reduction ratio varies"
733                                 }
734                         },
735                         g : {   start : 9,
736                                 len   : 1,
737                                 label : "Color",
738                                 values: {       b : "Black-and-white",
739                                                 c : "Multicolored",
740                                                 m : "Mixed",
741                                                 u : "Unknown",
742                                                 z : "Other"
743                                 }
744                         },
745                         h : {   start : 10,
746                                 len   : 1,
747                                 label : "Emulsion on film",
748                                 values: {       a : "Silver halide",
749                                                 b : "Diazo",
750                                                 c : "Vesicular",
751                                                 m : "Mixed",
752                                                 n : "Not applicable",
753                                                 u : "Unknown",
754                                                 z : "Other"
755                                 }
756                         },
757                         i : {   start : 11,
758                                 len   : 1,
759                                 label : "Quality assurance target(s)",
760                                 values: {       a : "1st gen. master",
761                                                 b : "Printing master",
762                                                 c : "Service copy",
763                                                 m : "Mixed generation",
764                                                 u : "Unknown"
765                                 }
766                         },
767                         j : {   start : 12,
768                                 len   : 1,
769                                 label : "Base of film",
770                                 values: {       a : "Safety base, undetermined",
771                                                 c : "Safety base, acetate undetermined",
772                                                 d : "Safety base, diacetate",
773                                                 l : "Nitrate base",
774                                                 m : "Mixed base",
775                                                 n : "Not applicable",
776                                                 p : "Safety base, polyester",
777                                                 r : "Safety base, mixed",
778                                                 t : "Safety base, triacetate",
779                                                 u : "Unknown",
780                                                 z : "Other"
781                                 }
782                         }
783                 }
784         },
785         m : {
786                 label     : "Motion Picture",
787                 subfields : {
788                         b : {   start : 1,
789                                 len   : 1,
790                                 label : "SMD",
791                                 values: {       a : "Film cartridge",
792                                                 f : "Film cassette",
793                                                 r : "Film reel",
794                                                 u : "Unspecified",
795                                                 z : "Other"
796                                 }
797                         },
798                         d : {   start : 3,
799                                 len   : 1,
800                                 label : "Color",
801                                 values: {       b : "Black-and-white",
802                                                 c : "Multicolored",
803                                                 h : "Hand-colored",
804                                                 m : "Mixed",
805                                                 u : "Unknown",
806                                                 z : "Other"
807                                 }
808                         },
809                         e : {   start : 4,
810                                 len   : 1,
811                                 label : "Motion picture presentation format",
812                                 values: {       a : "Standard sound aperture, reduced frame",
813                                                 b : "Nonanamorphic (wide-screen)",
814                                                 c : "3D",
815                                                 d : "Anamorphic (wide-screen)",
816                                                 e : "Other-wide screen format",
817                                                 f : "Standard. silent aperture, full frame",
818                                                 u : "Unknown",
819                                                 z : "Other"
820                                 }
821                         },
822                         f : {   start : 5,
823                                 len   : 1,
824                                 label : "Sound on medium or separate",
825                                 values: {       a : "Sound on medium",
826                                                 b : "Sound separate from medium",
827                                                 u : "Unknown"
828                                 }
829                         },
830                         g : {   start : 6,
831                                 len   : 1,
832                                 label : "Medium for sound",
833                                 values: {       a : "Optical sound track on motion picture film",
834                                                 b : "Magnetic sound track on motion picture film",
835                                                 c : "Magnetic audio tape in cartridge",
836                                                 d : "Sound disc",
837                                                 e : "Magnetic audio tape on reel",
838                                                 f : "Magnetic audio tape in cassette",
839                                                 g : "Optical and magnetic sound track on film",
840                                                 h : "Videotape",
841                                                 i : "Videodisc",
842                                                 u : "Unknown",
843                                                 z : "Other"
844                                 }
845                         },
846                         h : {   start : 7,
847                                 len   : 1,
848                                 label : "Dimensions",
849                                 values: {       a : "Standard 8 mm.",
850                                                 b : "Super 8 mm./single 8 mm.",
851                                                 c : "9.5 mm.",
852                                                 d : "16 mm.",
853                                                 e : "28 mm.",
854                                                 f : "35 mm.",
855                                                 g : "70 mm.",
856                                                 u : "Unknown",
857                                                 z : "Other"
858                                 }
859                         },
860                         i : {   start : 8,
861                                 len   : 1,
862                                 label : "Configuration of playback channels",
863                                 values: {       k : "Mixed",
864                                                 m : "Monaural",
865                                                 n : "Not applicable",
866                                                 q : "Multichannel, surround or quadraphonic",
867                                                 s : "Stereophonic",
868                                                 u : "Unknown",
869                                                 z : "Other"
870                                 }
871                         },
872                         j : {   start : 9,
873                                 len   : 1,
874                                 label : "Production elements",
875                                 values: {       a : "Work print",
876                                                 b : "Trims",
877                                                 c : "Outtakes",
878                                                 d : "Rushes",
879                                                 e : "Mixing tracks",
880                                                 f : "Title bands/inter-title rolls",
881                                                 g : "Production rolls",
882                                                 n : "Not applicable",
883                                                 z : "Other"
884                                 }
885                         }
886                 }
887         },
888         k : {
889                 label     : "Non-projected Graphic",
890                 subfields : {
891                         b : {   start : 1,
892                                 len   : 1,
893                                 label : "SMD",
894                                 values: {       c : "Collage",
895                                                 d : "Drawing",
896                                                 e : "Painting",
897                                                 f : "Photo-mechanical print",
898                                                 g : "Photonegative",
899                                                 h : "Photoprint",
900                                                 i : "Picture",
901                                                 j : "Print",
902                                                 l : "Technical drawing",
903                                                 n : "Chart",
904                                                 o : "Flash/activity card",
905                                                 u : "Unspecified",
906                                                 z : "Other"
907                                 }
908                         },
909                         d : {   start : 3,
910                                 len   : 1,
911                                 label : "Color",
912                                 values: {       a : "One color",
913                                                 b : "Black-and-white",
914                                                 c : "Multicolored",
915                                                 h : "Hand-colored",
916                                                 m : "Mixed",
917                                                 u : "Unknown",
918                                                 z : "Other"
919                                 }
920                         },
921                         e : {   start : 4,
922                                 len   : 1,
923                                 label : "Primary support material",
924                                 values: {       a : "Canvas",
925                                                 b : "Bristol board",
926                                                 c : "Cardboard/illustration board",
927                                                 d : "Glass",
928                                                 e : "Synthetics",
929                                                 f : "Skins",
930                                                 g : "Textile",
931                                                 h : "Metal",
932                                                 m : "Mixed collection",
933                                                 o : "Paper",
934                                                 p : "Plaster",
935                                                 q : "Hardboard",
936                                                 r : "Porcelain",
937                                                 s : "Stone",
938                                                 t : "Wood",
939                                                 u : "Unknown",
940                                                 z : "Other"
941                                 }
942                         },
943                         f : {   start : 5,
944                                 len   : 1,
945                                 label : "Secondary support material",
946                                 values: {       a : "Canvas",
947                                                 b : "Bristol board",
948                                                 c : "Cardboard/illustration board",
949                                                 d : "Glass",
950                                                 e : "Synthetics",
951                                                 f : "Skins",
952                                                 g : "Textile",
953                                                 h : "Metal",
954                                                 m : "Mixed collection",
955                                                 o : "Paper",
956                                                 p : "Plaster",
957                                                 q : "Hardboard",
958                                                 r : "Porcelain",
959                                                 s : "Stone",
960                                                 t : "Wood",
961                                                 u : "Unknown",
962                                                 z : "Other"
963                                 }
964                         }
965                 }
966         },
967         g : {
968                 label     : "Projected Graphic",
969                 subfields : {
970                         b : {   start : 1,
971                                 len   : 1,
972                                 label : "SMD",
973                                 values: {       c : "Film cartridge",
974                                                 d : "Filmstrip",
975                                                 f : "Film filmstrip type",
976                                                 o : "Filmstrip roll",
977                                                 s : "Slide",
978                                                 t : "Transparency",
979                                                 z : "Other"
980                                 }
981                         },
982                         d : {   start : 3,
983                                 len   : 1,
984                                 label : "Color",
985                                 values: {       b : "Black-and-white",
986                                                 c : "Multicolored",
987                                                 h : "Hand-colored",
988                                                 m : "Mixed",
989                                                 n : "Not applicable",
990                                                 u : "Unknown",
991                                                 z : "Other"
992                                 }
993                         },
994                         e : {   start : 4,
995                                 len   : 1,
996                                 label : "Base of emulsion",
997                                 values: {       d : "Glass",
998                                                 e : "Synthetics",
999                                                 j : "Safety film",
1000                                                 k : "Film base, other than safety film",
1001                                                 m : "Mixed collection",
1002                                                 o : "Paper",
1003                                                 u : "Unknown",
1004                                                 z : "Other"
1005                                 }
1006                         },
1007                         f : {   start : 5,
1008                                 len   : 1,
1009                                 label : "Sound on medium or separate",
1010                                 values: {       a : "Sound on medium",
1011                                                 b : "Sound separate from medium",
1012                                                 u : "Unknown"
1013                                 }
1014                         },
1015                         g : {   start : 6,
1016                                 len   : 1,
1017                                 label : "Medium for sound",
1018                                 values: {       a : "Optical sound track on motion picture film",
1019                                                 b : "Magnetic sound track on motion picture film",
1020                                                 c : "Magnetic audio tape in cartridge",
1021                                                 d : "Sound disc",
1022                                                 e : "Magnetic audio tape on reel",
1023                                                 f : "Magnetic audio tape in cassette",
1024                                                 g : "Optical and magnetic sound track on film",
1025                                                 h : "Videotape",
1026                                                 i : "Videodisc",
1027                                                 u : "Unknown",
1028                                                 z : "Other"
1029                                 }
1030                         },
1031                         h : {   start : 7,
1032                                 len   : 1,
1033                                 label : "Dimensions",
1034                                 values: {       a : "Standard 8 mm.",
1035                                                 b : "Super 8 mm./single 8 mm.",
1036                                                 c : "9.5 mm.",
1037                                                 d : "16 mm.",
1038                                                 e : "28 mm.",
1039                                                 f : "35 mm.",
1040                                                 g : "70 mm.",
1041                                                 j : "2 x 2 in. (5 x 5 cm.)",
1042                                                 k : "2 1/4 x 2 1/4 in. (6 x 6 cm.)",
1043                                                 s : "4 x 5 in. (10 x 13 cm.)",
1044                                                 t : "5 x 7 in. (13 x 18 cm.)",
1045                                                 v : "8 x 10 in. (21 x 26 cm.)",
1046                                                 w : "9 x 9 in. (23 x 23 cm.)",
1047                                                 x : "10 x 10 in. (26 x 26 cm.)",
1048                                                 y : "7 x 7 in. (18 x 18 cm.)",
1049                                                 u : "Unknown",
1050                                                 z : "Other"
1051                                 }
1052                         },
1053                         i : {   start : 8,
1054                                 len   : 1,
1055                                 label : "Secondary support material",
1056                                 values: {       c : "Cardboard",
1057                                                 d : "Glass",
1058                                                 e : "Synthetics",
1059                                                 h : "metal",
1060                                                 j : "Metal and glass",
1061                                                 k : "Synthetics and glass",
1062                                                 m : "Mixed collection",
1063                                                 u : "Unknown",
1064                                                 z : "Other"
1065                                 }
1066                         }
1067                 }
1068         },
1069         r : {
1070                 label     : "Remote-sensing Image",
1071                 subfields : {
1072                         b : {   start : 1,
1073                                 len   : 1,
1074                                 label : "SMD",
1075                                 values: { u : "Unspecified" }
1076                         },
1077                         d : {   start : 3,
1078                                 len   : 1,
1079                                 label : "Altitude of sensor",
1080                                 values: {       a : "Surface",
1081                                                 b : "Airborne",
1082                                                 c : "Spaceborne",
1083                                                 n : "Not applicable",
1084                                                 u : "Unknown",
1085                                                 z : "Other"
1086                                 }
1087                         },
1088                         e : {   start : 4,
1089                                 len   : 1,
1090                                 label : "Attitude of sensor",
1091                                 values: {       a : "Low oblique",
1092                                                 b : "High oblique",
1093                                                 c : "Vertical",
1094                                                 n : "Not applicable",
1095                                                 u : "Unknown"
1096                                 }
1097                         },
1098                         f : {   start : 5,
1099                                 len   : 1,
1100                                 label : "Cloud cover",
1101                                 values: {       0 : "0-09%",
1102                                                 1 : "10-19%",
1103                                                 2 : "20-29%",
1104                                                 3 : "30-39%",
1105                                                 4 : "40-49%",
1106                                                 5 : "50-59%",
1107                                                 6 : "60-69%",
1108                                                 7 : "70-79%",
1109                                                 8 : "80-89%",
1110                                                 9 : "90-100%",
1111                                                 n : "Not applicable",
1112                                                 u : "Unknown"
1113                                 }
1114                         },
1115                         g : {   start : 6,
1116                                 len   : 1,
1117                                 label : "Platform construction type",
1118                                 values: {       a : "Balloon",
1119                                                 b : "Aircraft-low altitude",
1120                                                 c : "Aircraft-medium altitude",
1121                                                 d : "Aircraft-high altitude",
1122                                                 e : "Manned spacecraft",
1123                                                 f : "Unmanned spacecraft",
1124                                                 g : "Land-based remote-sensing device",
1125                                                 h : "Water surface-based remote-sensing device",
1126                                                 i : "Submersible remote-sensing device",
1127                                                 n : "Not applicable",
1128                                                 u : "Unknown",
1129                                                 z : "Other"
1130                                 }
1131                         },
1132                         h : {   start : 7,
1133                                 len   : 1,
1134                                 label : "Platform use category",
1135                                 values: {       a : "Meteorological",
1136                                                 b : "Surface observing",
1137                                                 c : "Space observing",
1138                                                 m : "Mixed uses",
1139                                                 n : "Not applicable",
1140                                                 u : "Unknown",
1141                                                 z : "Other"
1142                                 }
1143                         },
1144                         i : {   start : 8,
1145                                 len   : 1,
1146                                 label : "Sensor type",
1147                                 values: {       a : "Active",
1148                                                 b : "Passive",
1149                                                 u : "Unknown",
1150                                                 z : "Other"
1151                                 }
1152                         },
1153                         j : {   start : 9,
1154                                 len   : 2,
1155                                 label : "Data type",
1156                                 values: {       nn : "Not applicable",
1157                                                 uu : "Unknown",
1158                                                 zz : "Other",
1159                                                 aa : "Visible light",
1160                                                 da : "Near infrared",
1161                                                 db : "Middle infrared",
1162                                                 dc : "Far infrared",
1163                                                 dd : "Thermal infrared",
1164                                                 de : "Shortwave infrared (SWIR)",
1165                                                 df : "Reflective infrared",
1166                                                 dv : "Combinations",
1167                                                 dz : "Other infrared data",
1168                                                 ga : "Sidelooking airborne radar (SLAR)",
1169                                                 gb : "Synthetic aperture radar (SAR-single frequency)",
1170                                                 gc : "SAR-multi-frequency (multichannel)",
1171                                                 gd : "SAR-like polarization",
1172                                                 ge : "SAR-cross polarization",
1173                                                 gf : "Infometric SAR",
1174                                                 gg : "Polarmetric SAR",
1175                                                 gu : "Passive microwave mapping",
1176                                                 gz : "Other microwave data",
1177                                                 ja : "Far ultraviolet",
1178                                                 jb : "Middle ultraviolet",
1179                                                 jc : "Near ultraviolet",
1180                                                 jv : "Ultraviolet combinations",
1181                                                 jz : "Other ultraviolet data",
1182                                                 ma : "Multi-spectral, multidata",
1183                                                 mb : "Multi-temporal",
1184                                                 mm : "Combination of various data types",
1185                                                 pa : "Sonar-water depth",
1186                                                 pb : "Sonar-bottom topography images, sidescan",
1187                                                 pc : "Sonar-bottom topography, near-surface",
1188                                                 pd : "Sonar-bottom topography, near-bottom",
1189                                                 pe : "Seismic surveys",
1190                                                 pz : "Other acoustical data",
1191                                                 ra : "Gravity anomales (general)",
1192                                                 rb : "Free-air",
1193                                                 rc : "Bouger",
1194                                                 rd : "Isostatic",
1195                                                 sa : "Magnetic field",
1196                                                 ta : "Radiometric surveys"
1197                                 }
1198                         }
1199                 }
1200         },
1201         s : {
1202                 label     : "Sound Recording",
1203                 subfields : {
1204                         b : {   start : 1,
1205                                 len   : 1,
1206                                 label : "SMD",
1207                                 values: {       d : "Sound disc",
1208                                                 e : "Cylinder",
1209                                                 g : "Sound cartridge",
1210                                                 i : "Sound-track film",
1211                                                 q : "Roll",
1212                                                 s : "Sound cassette",
1213                                                 t : "Sound-tape reel",
1214                                                 u : "Unspecified",
1215                                                 w : "Wire recording",
1216                                                 z : "Other"
1217                                 }
1218                         },
1219                         d : {   start : 3,
1220                                 len   : 1,
1221                                 label : "Speed",
1222                                 values: {       a : "16 rpm",
1223                                                 b : "33 1/3 rpm",
1224                                                 c : "45 rpm",
1225                                                 d : "78 rpm",
1226                                                 e : "8 rpm",
1227                                                 f : "1.4 mps",
1228                                                 h : "120 rpm",
1229                                                 i : "160 rpm",
1230                                                 k : "15/16 ips",
1231                                                 l : "1 7/8 ips",
1232                                                 m : "3 3/4 ips",
1233                                                 o : "7 1/2 ips",
1234                                                 p : "15 ips",
1235                                                 r : "30 ips",
1236                                                 u : "Unknown",
1237                                                 z : "Other"
1238                                 }
1239                         },
1240                         e : {   start : 4,
1241                                 len   : 1,
1242                                 label : "Configuration of playback channels",
1243                                 values: {       m : "Monaural",
1244                                                 q : "Quadraphonic",
1245                                                 s : "Stereophonic",
1246                                                 u : "Unknown",
1247                                                 z : "Other"
1248                                 }
1249                         },
1250                         f : {   start : 5,
1251                                 len   : 1,
1252                                 label : "Groove width or pitch",
1253                                 values: {       m : "Microgroove/fine",
1254                                                 n : "Not applicable",
1255                                                 s : "Coarse/standard",
1256                                                 u : "Unknown",
1257                                                 z : "Other"
1258                                 }
1259                         },
1260                         g : {   start : 6,
1261                                 len   : 1,
1262                                 label : "Dimensions",
1263                                 values: {       a : "3 in.",
1264                                                 b : "5 in.",
1265                                                 c : "7 in.",
1266                                                 d : "10 in.",
1267                                                 e : "12 in.",
1268                                                 f : "16 in.",
1269                                                 g : "4 3/4 in. (12 cm.)",
1270                                                 j : "3 7/8 x 2 1/2 in.",
1271                                                 o : "5 1/4 x 3 7/8 in.",
1272                                                 s : "2 3/4 x 4 in.",
1273                                                 n : "Not applicable",
1274                                                 u : "Unknown",
1275                                                 z : "Other"
1276                                 }
1277                         },
1278                         h : {   start : 7,
1279                                 len   : 1,
1280                                 label : "Tape width",
1281                                 values: {       l : "1/8 in.",
1282                                                 m : "1/4in.",
1283                                                 n : "Not applicable",
1284                                                 o : "1/2 in.",
1285                                                 p : "1 in.",
1286                                                 u : "Unknown",
1287                                                 z : "Other"
1288                                 }
1289                         },
1290                         i : {   start : 8,
1291                                 len   : 1,
1292                                 label : "Tape configuration ",
1293                                 values: {       a : "Full (1) track",
1294                                                 b : "Half (2) track",
1295                                                 c : "Quarter (4) track",
1296                                                 d : "8 track",
1297                                                 e : "12 track",
1298                                                 f : "16 track",
1299                                                 n : "Not applicable",
1300                                                 u : "Unknown",
1301                                                 z : "Other"
1302                                 }
1303                         },
1304                         m : {   start : 12,
1305                                 len   : 1,
1306                                 label : "Special playback",
1307                                 values: {       a : "NAB standard",
1308                                                 b : "CCIR standard",
1309                                                 c : "Dolby-B encoded, standard Dolby",
1310                                                 d : "dbx encoded",
1311                                                 e : "Digital recording",
1312                                                 f : "Dolby-A encoded",
1313                                                 g : "Dolby-C encoded",
1314                                                 h : "CX encoded",
1315                                                 n : "Not applicable",
1316                                                 u : "Unknown",
1317                                                 z : "Other"
1318                                 }
1319                         },
1320                         n : {   start : 13,
1321                                 len   : 1,
1322                                 label : "Capture and storage",
1323                                 values: {       a : "Acoustical capture, direct storage",
1324                                                 b : "Direct storage, not acoustical",
1325                                                 d : "Digital storage",
1326                                                 e : "Analog electrical storage",
1327                                                 u : "Unknown",
1328                                                 z : "Other"
1329                                 }
1330                         }
1331                 }
1332         },
1333         f : {
1334                 label     : "Tactile Material",
1335                 subfields : {
1336                         b : {   start : 1,
1337                                 len   : 1,
1338                                 label : "SMD",
1339                                 values: {       a : "Moon",
1340                                                 b : "Braille",
1341                                                 c : "Combination",
1342                                                 d : "Tactile, with no writing system",
1343                                                 u : "Unspecified",
1344                                                 z : "Other"
1345                                 }
1346                         },
1347                         d : {   start : 3,
1348                                 len   : 2,
1349                                 label : "Class of braille writing",
1350                                 values: {       a : "Literary braille",
1351                                                 b : "Format code braille",
1352                                                 c : "Mathematics and scientific braille",
1353                                                 d : "Computer braille",
1354                                                 e : "Music braille",
1355                                                 m : "Multiple braille types",
1356                                                 n : "Not applicable",
1357                                                 u : "Unknown",
1358                                                 z : "Other"
1359                                 }
1360                         },
1361                         e : {   start : 4,
1362                                 len   : 1,
1363                                 label : "Level of contraction",
1364                                 values: {       a : "Uncontracted",
1365                                                 b : "Contracted",
1366                                                 m : "Combination",
1367                                                 n : "Not applicable",
1368                                                 u : "Unknown",
1369                                                 z : "Other"
1370                                 }
1371                         },
1372                         f : {   start : 6,
1373                                 len   : 3,
1374                                 label : "Braille music format",
1375                                 values: {       a : "Bar over bar",
1376                                                 b : "Bar by bar",
1377                                                 c : "Line over line",
1378                                                 d : "Paragraph",
1379                                                 e : "Single line",
1380                                                 f : "Section by section",
1381                                                 g : "Line by line",
1382                                                 h : "Open score",
1383                                                 i : "Spanner short form scoring",
1384                                                 j : "Short form scoring",
1385                                                 k : "Outline",
1386                                                 l : "Vertical score",
1387                                                 n : "Not applicable",
1388                                                 u : "Unknown",
1389                                                 z : "Other"
1390                                 }
1391                         },
1392                         g : {   start : 9,
1393                                 len   : 1,
1394                                 label : "Special physical characteristics",
1395                                 values: {       a : "Print/braille",
1396                                                 b : "Jumbo or enlarged braille",
1397                                                 n : "Not applicable",
1398                                                 u : "Unknown",
1399                                                 z : "Other"
1400                                 }
1401                         }
1402                 }
1403         },
1404         v : {
1405                 label     : "Videorecording",
1406                 subfields : {
1407                         b : {   start : 1,
1408                                 len   : 1,
1409                                 label : "SMD",
1410                                 values: {       c : "Videocartridge",
1411                                                 d : "Videodisc",
1412                                                 f : "Videocassette",
1413                                                 r : "Videoreel",
1414                                                 u : "Unspecified",
1415                                                 z : "Other"
1416                                 }
1417                         },
1418                         d : {   start : 3,
1419                                 len   : 1,
1420                                 label : "Color",
1421                                 values: {       b : "Black-and-white",
1422                                                 c : "Multicolored",
1423                                                 m : "Mixed",
1424                                                 n : "Not applicable",
1425                                                 u : "Unknown",
1426                                                 z : "Other"
1427                                 }
1428                         },
1429                         e : {   start : 4,
1430                                 len   : 1,
1431                                 label : "Videorecording format",
1432                                 values: {       a : "Beta",
1433                                                 b : "VHS",
1434                                                 c : "U-matic",
1435                                                 d : "EIAJ",
1436                                                 e : "Type C",
1437                                                 f : "Quadruplex",
1438                                                 g : "Laserdisc",
1439                                                 h : "CED",
1440                                                 i : "Betacam",
1441                                                 j : "Betacam SP",
1442                                                 k : "Super-VHS",
1443                                                 m : "M-II",
1444                                                 o : "D-2",
1445                                                 p : "8 mm.",
1446                                                 q : "Hi-8 mm.",
1447                                                 u : "Unknown",
1448                                                 v : "DVD",
1449                                                 z : "Other"
1450                                 }
1451                         },
1452                         f : {   start : 5,
1453                                 len   : 1,
1454                                 label : "Sound on medium or separate",
1455                                 values: {       a : "Sound on medium",
1456                                                 b : "Sound separate from medium",
1457                                                 u : "Unknown"
1458                                 }
1459                         },
1460                         g : {   start : 6,
1461                                 len   : 1,
1462                                 label : "Medium for sound",
1463                                 values: {       a : "Optical sound track on motion picture film",
1464                                                 b : "Magnetic sound track on motion picture film",
1465                                                 c : "Magnetic audio tape in cartridge",
1466                                                 d : "Sound disc",
1467                                                 e : "Magnetic audio tape on reel",
1468                                                 f : "Magnetic audio tape in cassette",
1469                                                 g : "Optical and magnetic sound track on motion picture film",
1470                                                 h : "Videotape",
1471                                                 i : "Videodisc",
1472                                                 u : "Unknown",
1473                                                 z : "Other"
1474                                 }
1475                         },
1476                         h : {   start : 7,
1477                                 len   : 1,
1478                                 label : "Dimensions",
1479                                 values: {       a : "8 mm.",
1480                                                 m : "1/4 in.",
1481                                                 o : "1/2 in.",
1482                                                 p : "1 in.",
1483                                                 q : "2 in.",
1484                                                 r : "3/4 in.",
1485                                                 u : "Unknown",
1486                                                 z : "Other"
1487                                 }
1488                         },
1489                         i : {   start : 8,
1490                                 len   : 1,
1491                                 label : "Configuration of playback channel",
1492                                 values: {       k : "Mixed",
1493                                                 m : "Monaural",
1494                                                 n : "Not applicable",
1495                                                 q : "Multichannel, surround or quadraphonic",
1496                                                 s : "Stereophonic",
1497                                                 u : "Unknown",
1498                                                 z : "Other"
1499                                 }
1500                         }
1501                 }
1502         }
1503     };
1504     
1505     MARC.Record.prototype.recordType = function () {
1506     
1507         var _t = this.leader.substr(MARC.Record._ff_pos.Type.ldr.BKS.start, MARC.Record._ff_pos.Type.ldr.BKS.len);
1508         var _b = this.leader.substr(MARC.Record._ff_pos.BLvl.ldr.BKS.start, MARC.Record._ff_pos.BLvl.ldr.BKS.len);
1509     
1510         for (var t in MARC.Record._recType) {
1511                 if (_t.match(MARC.Record._recType[t].Type) && _b.match(MARC.Record._recType[t].BLvl)) {
1512                         return t;
1513                 }
1514         }
1515         return 'BKS'; // default
1516     }
1517     
1518     MARC.Record.prototype.videorecordingFormatName = function () {
1519         var _7 = this.field('007').data;
1520     
1521         if (_7 && _7.match(/^v/)) {
1522                 var _v_e = _7.substr(
1523                         MARC.Record._physical_characteristics.v.subfields.e.start,
1524                         MARC.Record._physical_characteristics.v.subfields.e.len
1525                 );
1526     
1527                 return MARC.Record._physical_characteristics.v.subfields.e.values[ _v_e ];
1528         }
1529     
1530         return null;
1531     }
1532     
1533     MARC.Record.prototype.videorecordingFormatCode = function () {
1534         var _7 = this.field('007').data;
1535     
1536         if (_7 && _7.match(/^v/)) {
1537                 return _7.substr(
1538                         MARC.Record._physical_characteristics.v.subfields.e.start,
1539                         MARC.Record._physical_characteristics.v.subfields.e.len
1540                 );
1541         }
1542     
1543         return null;
1544     }
1545     
1546     MARC.Record.prototype.extractFixedField = function (field, dflt) {
1547         if (!MARC.Record._ff_pos[field]) return null;
1548     
1549         var _l = this.leader;
1550         var _8 = this.field('008').data;
1551         var _6 = this.field('006').data;
1552     
1553         var rtype = this.recordType();
1554     
1555         var val;
1556     
1557         if (MARC.Record._ff_pos[field].ldr && _l) {
1558                 if (MARC.Record._ff_pos[field].ldr[rtype]) {
1559                         val = _l.substr(
1560                                 MARC.Record._ff_pos[field].ldr[rtype].start,
1561                                 MARC.Record._ff_pos[field].ldr[rtype].len
1562                         );
1563                 }
1564         } else if (MARC.Record._ff_pos[field]._8 && _8) {
1565                 if (MARC.Record._ff_pos[field]._8[rtype]) {
1566                         val = _8.substr(
1567                                 MARC.Record._ff_pos[field]._8[rtype].start,
1568                                 MARC.Record._ff_pos[field]._8[rtype].len
1569                         );
1570                 }
1571         }
1572     
1573         if (!val && MARC.Record._ff_pos[field]._6 && _6) {
1574                 if (MARC.Record._ff_pos[field]._6[rtype]) {
1575                         val = _6.substr(
1576                                 MARC.Record._ff_pos[field]._6[rtype].start,
1577                                 MARC.Record._ff_pos[field]._6[rtype].len
1578                         );
1579                 }
1580         }
1581
1582         if (!val && dflt) {
1583             val = '';
1584             var d;
1585             var p;
1586             if (MARC.Record._ff_pos[field].ldr && MARC.Record._ff_pos[field].ldr[rtype]) {
1587                 d = MARC.Record._ff_pos[field].ldr[rtype].def;
1588                 p = 'ldr';
1589             }
1590
1591             if (MARC.Record._ff_pos[field]._8 && MARC.Record._ff_pos[field]._8[rtype]) {
1592                 d = MARC.Record._ff_pos[field]._8[rtype].def;
1593                 p = '_8';
1594             }
1595
1596             if (!val && MARC.Record._ff_pos[field]._6 && MARC.Record._ff_pos[field]._6[rtype]) {
1597                 d = MARC.Record._ff_pos[field]._6[rtype].def;
1598                 p = '_6';
1599             }
1600
1601             if (p) {
1602                 for (var j = 0; j < MARC.Record._ff_pos[field][p][rtype].len; j++) {
1603                     val += d;
1604                 }
1605             } else {
1606                 val = null;
1607             }
1608         }
1609
1610         return val;
1611     }
1612
1613     MARC.Record.prototype.setFixedField = function (field, value) {
1614         if (!MARC.Record._ff_pos[field]) return null;
1615     
1616         var _l = this.leader;
1617         var _8 = this.field('008').data;
1618         var _6 = this.field('006').data;
1619     
1620         var rtype = this.recordType();
1621     
1622         var val;
1623     
1624         if (MARC.Record._ff_pos[field].ldr && _l) {
1625                 if (MARC.Record._ff_pos[field].ldr[rtype]) { // It's in the leader
1626                 val = value.substr(0, MARC.Record._ff_pos[field].ldr[rtype].len);
1627                 this.leader =
1628                     _l.substring(0, MARC.Record._ff_pos[field].ldr[rtype].start) +
1629                     val +
1630                     _l.substring(
1631                         MARC.Record._ff_pos[field].ldr[rtype].start
1632                         + MARC.Record._ff_pos[field].ldr[rtype].len
1633                     );
1634                 }
1635         } else if (MARC.Record._ff_pos[field]._8 && _8) {
1636                 if (MARC.Record._ff_pos[field]._8[rtype]) { // Nope, it's in the 008
1637                 val = value.substr(0, MARC.Record._ff_pos[field]._8[rtype].len);
1638                 this.field('008').update(
1639                     _8.substring(0, MARC.Record._ff_pos[field]._8[rtype].start) +
1640                     val +
1641                     _8.substring(
1642                         MARC.Record._ff_pos[field]._8[rtype].start
1643                         + MARC.Record._ff_pos[field]._8[rtype].len
1644                     )
1645                 );
1646                 }
1647         }
1648     
1649         if (!val && MARC.Record._ff_pos[field]._6 && _6) {
1650                 if (MARC.Record._ff_pos[field]._6[rtype]) { // ok, maybe the 006?
1651                 val = value.substr(0, MARC.Record._ff_pos[field]._6[rtype].len);
1652                 this.field('006').update(
1653                     _6.substring(0, MARC.Record._ff_pos[field]._6[rtype].start) +
1654                     val +
1655                     _6.substring(
1656                         MARC.Record._ff_pos[field]._6[rtype].start
1657                         + MARC.Record._ff_pos[field]._6[rtype].len
1658                     )
1659                 );
1660                 }
1661         }
1662
1663         return val;
1664     }
1665