function UCD() {
var UCDlist=['UCD!!!',['arith!0!2148!Arithmetic quantities','diff!16!941!Difference between two quantities described by the same UCD','factor!8!128!Numerical factor','grad!8!45!Gradient','rate!8!69!Rate (per time unit)','ratio!16!1143!Ratio between two quantities described by the same UCD','zp!0!66!Zero point'],['em!16!6644!Electromagnetic spectrum',['IR!16!1566!Infrared part of the spectrum','15-30um!16!329!Infrared between 15 and 30 micron','3-4um!16!303!Infrared between 3 and 4 micron','30-60um!16!202!Infrared between 30 and 60 micron','4-8um!16!310!Infrared between 4 and 8 micron','60-100um!16!143!Infrared between 60 and 100 micron','8-15um!16!405!Infrared between 8 and 15 micron','FIR!16!1!Far-Infrared, 30-100 microns','H!16!795!Infrared between 1.5 and 2 micron','J!16!885!Infrared between 1.0 and 1.5 micron','K!16!1084!Infrared between 2 and 3 micron','MIR!16!!Medium-Infrared, 5-30 microns','NIR!16!!Near-Infrared, 1-5 microns'],['UV!16!182!Ultraviolet part of the spectrum','10-50nm!16!!Ultraviolet between 10 and 50 nm','100-200nm!16!63!Ultraviolet between 100 and 200 nm','200-300nm!16!37!Ultraviolet between 200 and 300 nm','50-100nm!16!1!Ultraviolet between 50 and 100 nm','FUV!16!11!Far-Ultraviolet'],['X-ray!16!630!X-ray part of the spectrum','hard!16!4!Hard X-ray (12-120keV, 0.1-1{AA})','medium!16!27!Medium X-ray (2-12keV, 1-6{AA})','soft!16!24!Soft X-ray (0.12-2keV, 6-100{AA})'],'bin!0!!Channel / instrumental spectral bin coordinate (bin number)','energy!0!45!Energy value in the em frame','freq!0!173!Frequency value in the em frame',['gamma!16!55!Gamma rays part of the spectrum','hard!16!38!Soft gamma ray (>500keV)','soft!16!15!Hard gamma ray (120-500keV)'],['line!16!414!Designation of major atomic lines','Brgamma!16!1!Bracket gamma line','CO!16!12!CO radio line, e.g. 12CO(1-0) rest wl 115GHz','HI!16!25!21cm hydrogen line','Halpha!16!243!H-alpha line','Hbeta!16!138!H-beta line','Hdelta!16!12!H-delta line','Hgamma!16!22!H-gamma line','Lyalpha!16!1!H-Lyalpha line','OIII!16!54![OIII] line'],['mm!16!185!Millimetric part of the spectrum','100-200GHz!16!14!Millimetric between 100 and 200 GHz (1.5-3mm)','1500-3000GHz!16!35!Millimetric between 1500 and 3000 GHz (100-200um)','200-400GHz!16!93!Millimetric between 200 and 400 GHz (750-1500um)','30-50GHz!16!39!Millimetric between 30 and 50 GHz (6-10mm)','400-750GHz!16!31!Millimetric between 400 and 750 GHz (400-750um)','50-100GHz!16!24!Millimetric between 50 and 100 GHz (3-6mm)','750-1500GHz!16!18!Millimetric between 750 and 1500 GHz (200-400um)'],['opt!16!4492!Optical part of the spectrum','B!16!2676!Optical B band between 400 and 500 nm','I!16!1646!Optical I band between 750 and 1000 nm','R!16!1537!Optical R band between 600 and 750 nm','U!16!966!Optical U band between 300 and 400 nm','V!16!2896!Optical V band between 500 and 600 nm'],['radio!16!785!Radio part of the spectrum','100-200MHz!16!45!Radio between 100 and 200 MHz','12-30GHz!16!73!Radio between 12 and 30 GHz','1500-3000MHz!16!110!Radio between 1500 and 3000 MHz','20-100MHz!16!22!Radio between 20 and 100 MHz','200-400MHz!16!85!Radio between 200 and 400 MHz','3-6GHz!16!227!Radio between 3 and 6 GHz','400-750MHz!16!30!Radio between 400 and 750 MHz','6-12GHz!16!107!Radio between 6 and 12 GHz','750-1500MHz!16!389!Radio between 750 and 1500 MHz'],'wavenumber!0!10!Wavenumber value in the em frame',['wl!0!741!Wavelength value in the em frame','central!0!74!Central wavelength','effective!0!31!Effective wavelength']],['instr!0!2160!Instrument','area!128!!Collecting area of detector [==> phys.area;instr] [unused]','background!1!63!Instrumental background','bandpass!0!198!Bandpass (e.g.: band name) of instrument','bandwidth!0!103!Bandwidth of the instrument','baseline!0!25!Baseline for interferometry','beam!16!49!Beam','calib!0!11!Calibration parameter',['det!16!751!Detector','noise!0!143!Instrument noise','psf!0!40!Point Spread Function','qe!0!11!Quantum efficiency'],'dispersion!0!38!Dispersion of a spectrograph','filter!16!254!Filter','fov!16!108!Field of view',['obsty!16!216!Observatory, satellite, mission','seeing!0!93!Seeing','site!128!!Observatory location [==> pos.earth;instr.obsty]'],'offset!0!100!Offset angle respect to main direction of observation','order!0!4!Spectral order in a spectrograph','param!0!95!Various instrumental parameters','pixel!16!35!Pixel (default size: angular)',['plate!16!76!Photographic plate','emulsion!0!10!Plate emulsion'],'precision!0!3!Instrument precision','saturation!0!36!Instrument saturation threshold','scale!0!43!Instrument scale (for CCD, plate, image)','sensitivity!0!49!Instrument sensitivity, detection threshold','setup!0!258!Instrument configuration or setup','skyLevel!0!12!Sky level','skyTemp!0!6!Sky temperature','spect!144!4!Spectrograph [unused]',['tel!0!160!Telescope','focalLength!0!5!Telescope focal length']],['meta!8!9147!Metadata','abstract!8!!Abstract (of paper, proposal,etc.)',['bib!8!734!Bibliographic reference','author!8!424!Author name','bibcode!8!483!Bibcode','fig!8!44!Figure in a paper','journal!8!5!Journal name','page!8!7!Page number','volume!8!14!Volume number'],['code!8!4279!Code or flag','class!8!273!Classification code','error!8!2158!limit uncertainty error flag','member!8!259!Membership code','mime!8!!MIME type','multip!8!676!Multiplicity or binarity flag','qual!8!529!Quality, precision, reliability flag or code','status!8!!Status code (e.g.: status of a proposal/observation)'],'cryptic!8!8!Unknown or impossible to understand quantity','curation!8!!Identity of man/organization responsible for the data','dataset!0!211!Dataset','email!0!!Curation/contact e-mail','file!16!300!File',['fits!16!67!FITS standard','software!128!!Software used in generating FITS file [==> meta.software;meta.fits]'],['id!8!7358!Identifier, name or designation','CoI!8!!Name of Co-Investigator','PI!8!!Name of Principal Investigator','assoc!8!220!Identifier of associated counterpart','cross!8!346!Cross identification','parent!8!398!Identification of parent source','part!8!155!Part of identifier, suffix or sub-component'],'main!16!7278!Main value','modelled!16!253!Quantity was produced by a model','note!8!4238!Note or remark (longer than a code or flag)','number!8!1690!Number (of things; e.g. nb of object in an image)','record!8!9086!Record number',['ref!8!3263!Reference, or origin','ivorn!0!!IVORN, Int. VO Resource Name (ivo://)','uri!0!!URI, universal resource identifier','url!8!1698!URL, web address'],'software!16!10!Software used in generating data',['table!16!36!Table or catalogue','axis!128!!Table axis  [unused]'],'title!8!3!Title or explanation','ucd!0!!UCD','unit!8!43!Unit','version!8!1!Version'],['obs!16!1663!Observation','airMass!0!63!Airmass',['atmos!16!17!Atmosphere, atmospheric phenomena affecting an observation','extinction!0!15!Atmospheric extinction','refractAngle!0!2!Atmospheric refraction angle'],['calib!16!!Calibration observation','flat!16!!Related to flat-field calibration observation (dome, sky, ..)'],'exposure!16!496!Exposure','field!16!658!Region covered by the observation','image!16!52!Image','observer!0!90!Observer, discoverer','param!0!95!Various observation or reduction parameter',['proposal!16!5!Observation proposal','cycle!0!5!Proposal cycle'],'sequence!16!4!Sequence of observations, exposures or events'],['phot!1!6617!Photometry','antennaTemp!1!50!Antenna temperature','calib!0!4!Photometric calibration',['color!2!2290!Color index or magnitude difference','excess!0!408!color excess','reddFree!0!44!Dereddened color'],'count!1!445!Flux expressed in counts','fluence!1!22!fluence',['flux!1!2284!Photon flux','bol!0!15!Bolometric flux',['density!1!1428!Flux density (per wl/freq/energy interval)','sb!1!16!Flux density surface brightness'],'sb!1!31!Flux surface brightness'],'limbDark!1!14!Limb-darkening coefficients',['mag!1!5111!Photometric magnitude','bc!1!37!Bolometric correction','bol!0!40!Bolometric magnitude','distMod!0!88!Distance modulus','reddFree!1!20!Dereddened magnitude','sb!1!216!Surface brightness in magnitude units'],'sb!129!phot.flux.sb]]!Surface brightness [==> [phot.mag.sb'],['phys!0!4742!Physical quantities','SFR!0!72!Star formation rate',['absorption!1!468!Extinction or absorption along the line of sight','coeff!0!30!Absorption coefficient (e.g. in a spectral line)','gal!0!33!Galactic extinction','opticalDepth!0!66!Optical depth'],['abund!0!728!Abundance','Fe!0!278!Fe/H abundance','X!0!17!Hydrogen abundance','Y!0!48!Helium abundance','Z!0!273!Metallicity abundance'],'acceleration!0!4!Acceleration','albedo!0!7!Albedo or reflectance','angArea!0!!Angular area','angMomentum!0!24!Angular momentum',['angSize!1!1267!Angular size width diameter dimension extension major minor axis extraction radius','smajAxis!1!81!angular size extent or extension of semi-major axis','sminAxis!1!32!angular size extent or extension of semi-minor axis'],'area!0!61!Area (in linear units)','at!!!',['atmol!16!798!Atomic and molecular physics (shared properties)','branchingRatio!0!8!Branching ratio','collStrength!0!56!Collisional strength','collisional!0!9!Related to collisions','configuration!0!149!Configuration','crossSection!0!10!Atomic / molecular cross-section','damping!128!2!Atomic damping quantities (van der Waals) [==> phys.damping;phys.atmol]','element!0!232!Element','excitation!0!169!Atomic molecular excitation parameter','final!0!16!Quantity refers to atomic/molecular final/ground state, level, ecc.','initial!0!5!Quantity refers to atomic/molecular initial state, level, ecc.','ionStage!0!113!Ion, ionization stage','ionization!16!126!Related to ionization','lande!0!2!Lande factor','level!16!228!Atomic level','lifetime!0!1!Lifetime of a level','lineShift!0!3!Line shifting coefficient','number!0!36!Atomic number Z','oscStrength!0!142!Oscillator strength','parity!0!24!Parity',['qn!0!158!Quantum number','F!128!!Coupling of J and I quantum numbers [unused]','I!128!!Nuclear spin quantum number [unused]','J!128!!Coupling of S and L quantum numbers [unused]','L!128!!Electronic L quantum number [unused]','S!128!!Electronic spin quantum number [unused]'],'radiationType!0!!Type of radiation characterizing atomic lines (electric dipole/quadrupole, magnetic dipole)',['sWeight!0!2!Statistical weight','nuclear!0!!Statistical weight for nuclear spin states'],'sweight!128!!Statistical weight [unused]','symmetry!0!!Type of nuclear spin symmetry','term!0!15!Atomic term','transProb!0!110!Transition probability, Einstein A coefficient','transition!16!242!Transition between states','wOscStrength!0!107!Weighted oscillator strength','weight!0!28!Atomic weight'],'atom!128!!Atomic and molecular physics (duplicates phys.atmol)','columnDensity!0!280!Column density',['composition!16!55!Quantities related to composition of objects','massLightRatio!0!44!Mass to light ratio','yield!0!8!Mass yield'],'cosmology!16!!Related to cosmology','damping!0!10!Generic damping quantities','density!0!163!Density (of mass, electron, ...)','dielectric!0!1!Complex dielectric function','dispMeasure!0!12!Dispersion measure','electField!64!5!Electric field',['electron!16!50!Electron','degen!0!8!Electron degeneracy parameter'],'emissMeasure!0!29!Emission measure','emissivity!0!9!Emissivity',['energy!0!313!Energy','density!0!!Energy-density'],'entropy!0!!Entropy','eos!0!5!Equation of state','excitParam!0!5!Excitation parameter U','gauntFactor!0!3!Gaunt factor/correction','gravity!0!314!Gravity',['ionizParam!0!8!Ionization parameter','coll!0!1!Collisional ionization','rad!0!6!Radiative ionization'],['luminosity!1!931!Luminosity','fun!0!14!Luminosity function'],['magAbs!1!654!Absolute magnitude','bol!0!44!Bolometric absolute magnitude'],'magField!64!36!Magnetic field',['mass!0!682!Mass','loss!0!56!Mass loss'],['mol!0!54!Molecular data',['dipole!0!5!Molecular dipole','electric!0!!Molecular electric dipole moment','magnetic!0!!Molecular magnetic dipole moment'],'dissociation!0!2!Molecular dissociation','formationHeat!0!1!Formation heat for molecules','qn!128!8!Molecular quantum numbers [==> phys.atmol.qn]',['quadrupole!0!!Molecular quadrupole','electric!0!!Molecular electric quadrupole moment','magnetic!128!!Molecular magnetic quadrupole moment [unused]'],'rotation!16!12!Molecular rotation','vibration!16!13!Molecular vibration'],'particle!!1!',['polarization!1!139!Polarization degree (or percentage)','circular!0!5!Circular polarization','linear!0!17!Linear polarization','posAng!128!!Polarization angle [==> pos.posAng;phys.polarization]','rotMeasure!0!14!Rotation measure polarization','stokes!0!33!Stokes polarization'],'pressure!0!14!Pressure','recombination!!3!','refractIndex!0!3!Refraction index',['size!0!617!Linear size, length (not angular)','axisRatio!0!34!Axis ratio (a/b) or (b/a)','diameter!0!74!Diameter','radius!0!349!Radius','smajAxis!0!31!Linear semi major axis','sminAxis!0!1!Linear semi minor axis'],['temperature!0!806!Temperature','effective!0!530!Effective temperature','electron!0!16!Electron temperature'],'transmission!0!12!Transmission (of filter, instrument, ...)',['veloc!64!1542!Space velocity','ang!0!14!Angular velocity','dispersion!0!214!Velocity dispersion','escape!0!6!Escape velocity','expansion!0!28!Expansion velocity','microTurb!0!60!Microturbulence velocity','orbital!0!9!Orbital velocity','pulsat!0!1!Pulsational velocity','rotat!0!230!Rotational velocity','transverse!0!26!Transverse / tangential velocity'],'virial!0!!Related to virial quantities (mass, radius, ..)'],['pos!0!7193!Position and coordinates','HTM!0!!Hierarchical Triangular Mesh','angDistance!0!794!Angular distance, elongation','angResolution!0!21!Angular resolution',['az!0!17!Position in alt-azimutal frame','alt!0!7!Alt-azimutal altitude','azi!0!!Alt-azimutal azimut','zd!0!11!Alt-azimutal zenith distance'],'barycenter!16!22!Barycenter',['bodyrc!16!2!Body related coordinates','alt!0!!Body related coordinate (altitude on the body)','lat!0!1!Body related coordinate (latitude on the body)','long!0!1!Body related coordinate (longitude on the body)'],['cartesian!16!748!Cartesian (rectangular) coordinates','x!0!670!Cartesian coordinate along the x-axis','y!0!683!Cartesian coordinate along the y-axis','z!0!97!Cartesian coordinate along the z-axis'],'cmb!16!20!Cosmic Microwave Background reference frame','det!128!!Position on instrument detector [==> pos.cartesian;instr.det]','dirCos!0!6!Direction cosine',['distance!64!871!Linear distance','component!128!!Projected distance on a generic frame [unused]'],['earth!16!18!Coordinates related to Earth','altitude!0!2!Altitude, height on Earth  above sea level','lat!0!6!Latitude on Earth','lon!0!15!Longitude on Earth'],['ecliptic!16!18!Ecliptic coordinates','lat!0!18!Ecliptic latitude','lon!0!13!Ecliptic longitude'],['eop!16!1!Earth orientation parameters','nutation!0!1!Earth nutation'],'ephem!0!2!Ephemeris',['eq!16!6314!Equatorial coordinates','dec!0!6292!Declination in equatorial coordinates','ha!0!13!Hour-angle','ra!0!6296!Right ascension in equatorial coordinates','spd!0!!South polar distance in equatorial coordinates'],'errorEllipse!16!12!Positional error ellipse','frame!0!722!Reference frame used for positions','gal!!!',['galactic!16!590!Galactic coordinates','lat!0!521!Latitude in galactic coordinates','lon!0!499!Longitude in galactic coordinates'],'galactocentric!16!90!Galactocentric coordinate system','geocentric!16!9!Geocentric coordinate system','healpix!0!!Hierarchical Equal Area IsoLatitude Pixelization','heliocentric!16!1440!Heliocentric position coordinate (solar system bodies)','lambert!16!!Lambert projection','lg!16!51!Local Group reference frame','lsr!16!175!Local Standard of Rest reference frame',['lunar!0!8!Lunar coordinates','occult!0!8!Occultation by lunar limb'],['parallax!0!210!Parallax','dyn!0!6!Dynamical parallax','phot!0!10!Photometric parallaxes','spect!0!15!Spectroscopic parallax','trig!0!157!Trigonometric parallax'],'phaseAng!0!8!Phase angle, e.g. elongation of earth from sun as seen from a third cel. object',['pm!64!466!Proper motion','dec!128!!Proper motion in declination [==> pos.pm;pos.eq.dec]','ra!128!!Proper motion in right ascension [==> pos.pm;pos.eq.ra]'],'posAng!0!835!Position angle of a given vector',['precess!64!6!Precession','dec!128!!Precession in declination [==> pos.precess;pos.eq.dec]','ra!128!!Precession in right ascension [==> pos.precess;pos.eq.ra]'],'proj!128!56!Projected coordinates [***Essentially position on tagential frame***]','satellite!128!!Position coordinates of satellite or planet [1 catalog]','sg!!!',['supergalactic!16!15!Supergalactic coordinates','lat!0!12!Latitude in supergalactic coordinates','lon!0!12!Longitude in supergalactic coordinates'],['wcs!8!!WCS keywords','cdmatrix!8!!WCS CDMATRIX','crpix!8!!WCS CRPIX','crval!8!!WCS CRVAL','ctype!8!!WCS CTYPE','naxes!8!!WCS NAXES','naxis!8!!WCS NAXIS','scale!8!!WCS scale or scale of an image']],['spect!0!2284!Spectroscopy','binSize!0!!Spectral bin size','continuum!16!11!Continuum spectrum','dopplerParam!0!23!Doppler parameter b',['dopplerVeloc!1!686!Radial velocity, derived from the shift of some spectral feature','opt!1!18!Radial velocity derived from a wavelength shift using the optical convention','radio!1!7!Radial velocity derived from a frequency shift using the radio convention'],'index!1!643!Spectral index',['line!16!1296!Spectral line','asymmetry!1!3!Line asymmetry',['broad!1!42!Spectral line broadening','Stark!0!34!Stark line broadening coefficient','Zeeman!1!1!Zeeman broadening'],'eqWidth!1!704!Line equivalent width','intensity!1!290!Line intensity','profile!1!6!Line profile','strength!0!24!Spectral line strength S','veloc!128!!Spectral line radial velocity [==> spect.dopplerVeloc;spect.line]','width!1!412!Spectral line fwhm'],'resolution!0!38!Spectral (or velocity) resolution'],['src!16!4232!Observed source viewed on the sky',['calib!16!!Calibration source','guideStar!16!!Guide star'],['class!0!1260!Source classification (star, galaxy, cluster...)','color!0!32!Color classification','distance!0!21!Distance class e.g. Abell','luminosity!0!62!Luminosity class','richness!0!54!Richness class e.g. Abell','starGalaxy!0!156!Star/galaxy discriminator, stellarity index','struct!0!39!Structure classification e.g. Bautz-Morgan'],'density!0!35!Density of sources','ellipticity!0!140!Source ellipticity','fwhm!128!!Source FWHM angular size [==> phys.angSize]','impactParam!0!14!Impact parameter',['morph!0!674!Morphology structure','param!0!77!Morphological parameter','scLength!0!36!Scale length for a galactic component (disc or bulge)','type!0!509!Hubble morphological type (galaxies)'],'net!16!5!Qualifier indicating that a quantity (e.g. flux) is background subtracted rather than total',['orbital!0!323!Orbital parameters','eccentricity!0!119!Orbit eccentricity','inclination!0!166!Orbit inclination','meanAnomaly!0!5!Orbit mean anomaly','meanMotion!0!4!Mean motion','node!0!24!Ascending node','periastron!0!51!Periastron'],['redshift!0!1223!Redshift','phot!0!42!Photometric redshift'],'sample!0!28!Sample','spType!0!1327!Spectral type MK',['var!0!571!Variability of source','amplitude!1!214!Amplitude of variation','index!0!63!Variability index','pulse!0!15!Pulse'],['veloc!!!','cmb!128!!CMB velocity [==> phys.veloc;pos.cmb]','component!128!!Component velocity [==> phys.veloc]','gc!128!!Galactocentric radial velocity [==> phys.veloc;pos.galactocentric]','hc!128!!Heliocentric radial velocity [==> phys.veloc;pos.heliocentric]','lg!128!!Local Group radial velocity [==> phys.veloc;pos.log]','lsr!128!!Local Standard of Rest radial velocity [==> phys.veloc;pos.lsr]']],['stat!0!5417!Statistical parameters',['Fourier!0!13!Fourier coefficient','amplitude!0!2!Amplitude Fourier coefficient'],'correlation!8!72!Correlation between two parameters','covariance!8!6!Covariance between two parameters',['error!8!4601!Statistical error','sys!8!1!Systematic error'],'filling!0!1!Filling factor (volume, time, ..)',['fit!0!1271!Fit','chi2!8!202!Chi2','dof!8!56!Degrees of freedom','goodness!8!295!Goodness or significance of fit','omc!16!74!Observed minus computed','param!0!644!Parameter of fit','residual!8!180!Residual fit'],'likelihood!8!127!Likelihood','max!16!442!Maximum or upper limit','mean!16!225!Mean, average value','median!16!18!Median value','min!16!111!Minimum or lowest limit','param!0!212!Parameter','probability!0!97!Probability','snr!8!391!Signal to noise ratio','stdev!8!154!Standard deviation','uncalib!16!2!Qualifier of a generic incalibrated quantity','value!0!78!Miscellaneous value','variance!8!25!Variance','weight!8!141!Statistical weight'],['time!0!3157!Time, generic quantity in units of time or date','age!0!310!Age','creation!0!!Creation time/date (of dataset, file, catalogue,...)','crossing!0!12!Crossing time','duration!0!498!Interval of time describing the duration of a generic event or phenomenon','end!0!13!End time/date of a generic event','epoch!0!2251!Instant of time related to a generic event (epoch, date, Julian date, time stamp/tag,...)','equinox!0!4!Equinox',['expo!128!14!Exposure on-time, duration [==> time.duration;obs.exposure]','end!128!!End time of exposure [==> time.end;obs.exposure] [unused]','start!128!!Start time of exposure [==> time.start;obs.exposure]'],'interval!0!152!Time interval, time-bin, time elapsed between two events, not the duration of an event','lifetime!0!16!Lifetime',['obs!128!1!Observation on-time, duration [==> time.duration;obs]','end!128!!End time of observation [==> time.end;obs]','start!128!!Start time of observation [==> time.start;obs]'],'period!0!618!Period, interval of time between the recurrence of phases in a periodic phenomenon','phase!0!215!Phase, position within a period','processing!0!1!A time/date associated with the processing of data','publiYear!0!!Publication year','relax!0!9!Relaxation time','release!0!!The time/date data is available to the public','resolution!0!5!Time resolution','scale!0!24!Timescale','start!0!29!Start time/date of generic event']];

var html;
var img=[
'<img src="/vizier/lib/explorer//0000000.gif" class="imgexp">',
'<img src="/vizier/lib/explorer//0011000.gif" class="imgexp">',
'<img src="/vizier/lib/explorer//0010001.gif" class="imgexp">',
'<img src="/vizier/lib/explorer//0011001.gif" class="imgexp">',
'<img src="/vizier/lib/explorer//1100000.gif" class="imgexp">',
'<img src="/vizier/lib/explorer//1101100.gif" class="imgexp">'];
var current=null;
var divID,tabID,Opt;
var clickfn='__display_ucd';
var  actionfn='__action_ucd';

function alertmsg(txt) {html+='<div style="color:red;">'+txt+'</div>';}
this.alert=alertmsg;

function setUCDlist(list){UCDlist=list;}
this.setUCDlist=setUCDlist;
function setClickFn(fn){clickfn=fn;}
this.setClickFn=setClickFn;
function setActionFn(fn){actionfn=fn;}
this.setActionFn=setActionFn;

function display_td(str,d){
  var opt='',cl='',ucd=str;
  if(!d[2]) d[2]=0;
  if (d[1]&1) cl+=' require (em)';
  if (d[1]&2) cl+=' require 2x(em)';
  if (d[1]&8) cl+=' primary ucd element';
  if (d[1]&16) cl+=' secondary ucd element';
  if (d[1]&64) cl+=' vector';
  if (d[1]&128) cl+=' obsolete';
  if (d[4]){
    if (d[4]==0) opt='pert0';
    else if (d[4]==1) opt='pert1';
    else opt='pert2';
    if (str.length>8) ucd='['+str.substr(0,8)+'..]';
    else ucd='['+str.substr(0,8)+']';
  }

  html+='&nbsp;<span class="ucdid" title="'+str+'" onClick="'+ actionfn + '(\''+str+'\',\''+d[3]+'\','+d[1]+')">'+ucd+'</span>';
  html+=' <span class="ucd_str '+opt+'" title="'+cl+'" id="'+str+':'+d[1]+'">'+d[3]+'</span>';
  html+=' <span class="note">('+d[2]+' catalogs)</span>';
}

function displaySubUCD(dat,opt,str) {
  var i,d0,d,go,cl,images='';
  if (opt.length>10){ 
    alertmsg('too much recursions'); 
    return;}

  for (i=0;i<opt.length-1;i++){
    if (opt[i]==0)images+=img[0];
    else images+=img[1];
  }

  go=0;
  if (opt.length>0) {
    d0=dat[0].split('!');
    if (str.length>0) str+='.'
    str+=d0[0];
    if (!current) go=0;
    else if(current.search(str)==0) go=1

    html+='<tr><td>'+images;
    if (opt[opt.length-1]==0) html+=img[2];
    else html+=img[3];

    html+='<a href="javascript:void(0)" onClick="'+clickfn+'(\''+divID.id+'\',\'';
    if (go==0) html+=str+'\');">'+img[4];
    else{
      var str2=str.replace(/.[^.]*$/,'');
      html+=str2+'\');">'+img[5];
    }
    html+='</a></td><td NOWRAP>';
    display_td(str,d0);
    html+='</td></tr>';
  }
  else{
    str='';
    if (!current) go=1;
    else if(current.search(str)!=-1) go=1;}

  if (opt.length>0){
  if (opt[opt.length-1]==0) images+=img[0];
  else images+=img[1];}

  if (go==1){
    for(i=1;i<dat.length;i++){
      if (typeof(dat[i])=='string'){
        d=dat[i].split('!');
        html+='<tr><td>'+images;
        if (i==dat.length-1) html+=img[2];
        else html+=img[3];
        html+='</td><td NOWRAP>';
        if (Opt==0)display_td(str+'.'+d[0],d);
        else display_td(d[0],d);
        html+='</td></tr>';
      }
      else{
        if (i==dat.length-1) opt.push(0);
        else opt.push(1);
        if (Opt==0)displaySubUCD(dat[i],opt,str);
        else displaySubUCD(dat[i],opt,'');
        opt.pop();
      }
    }
  }
}
this.displaySubUCD=displaySubUCD;

function display(id,crt,idtree,opt) {
  var e=document.getElementById(id);
  current=crt;divID=e;
  if (!opt) opt=0;
  Opt=opt;
  if (!e){alert('error: '+id+' is not found'); return;}

  if (!idtree) idtree='ucdtree';
  var t=document.getElementById(idtree);
  if (!t){
    var d=document.createElement('div');
    d.id=idtree;
    d.className='ucd__tree';
    e.appendChild(d);
    tabID=d;
  }
  else tabID=t;
  html='<table border=0 cellspacing=0 cellpadding=0><tbody>';
  html+='<tr><td class="treeon">'+img[5]+'</td></tr>'; 
  displaySubUCD(UCDlist,new Array(),'');
  html+='</tbody></table>';
  tabID.innerHTML=html;
}
this.display=display;
}

/*
function __display_ucd(id,crt){}
function __action_ucd(val,str){}
function __action_clearucd(){}
*/
ucd=new UCD();

