Separate complete element IDs and ordinal numbers.

Refactor and rename the JS functions for reckoning available element IDs
(by type), and provide separate methods to work with just the ordinal
number. For example, 'edge214' vs 214. This was needed for compatibility
with NCLconverter.