+/* Force a game ID into a canonical form as described above. */
+function lmno_canonize(id) {
+ /* Capitalize */
+ id = id.toUpperCase();
+
+ /* Replace unused letters with nearest phonetic match. */
+ id = id.replace(/N/g, 'M');
+ id = id.replace(/P/g, 'B');
+ id = id.replace(/S/g, 'F');
+
+ /* Replace unused numbers nearest visual match. */
+ id = id.replace(/0/g, 'O');
+ id = id.replace(/1/g, 'I');
+ id = id.replace(/5/g, 'S');
+
+ return id;
+}
+