The Ultimate Home Jukebox by Charlie Munro and Mark Nelson Figure 3: Contents of "Radiohead - The Bends.m3u" \\mark\d\My Music\Radiohead\The Bends\1_Planet Telex.mp3 \\mark\d\My Music\Radiohead\The Bends\2_The Bends.mp3 \\mark\d\My Music\Radiohead\The Bends\3_High And Dry.mp3 \\mark\d\My Music\Radiohead\The Bends\4_Fake Plastic Trees.mp3 \\mark\d\My Music\Radiohead\The Bends\5_Bones.mp3 \\mark\d\My Music\Radiohead\The Bends\6_(Nice Dream).mp3 \\mark\d\My Music\Radiohead\The Bends\7_Just.mp3 \\mark\d\My Music\Radiohead\The Bends\8_My Iron Lung.mp3 \\mark\d\My Music\Radiohead\The Bends\9_Bullet Proof..I Wish I Was.mp3 \\mark\d\My Music\Radiohead\The Bends\10_Black Star.mp3 \\mark\d\My Music\Radiohead\The Bends\11_Sulk.mp3 \\mark\d\My Music\Radiohead\The Bends\12_Street Spirit (Fade Out).mp3 Example 1: idx = fileName.indexOf(" - "); // find the delimiter separating artist title = fileName.substring(idx + 3, fileName.length - 4); title = jTrim(title); href = rootPath + pathSeparator + Server.URLPathEncode(fileName); Response.Write("
"); // loop through files to get a list of first characters, and generate // links to headings for (var i = 0; i < fileList.length; i++) { fileName = fileList[i]; if (fileName.charAt(0) != thisLetter) { thisLetter = fileName.charAt(0); Response.Write("" + thisLetter + "\n"); } } Response.Write("
\n") for (i = 0; i < fileList.length; i++) { fileName = fileList[i]; // find the delimiter separating artist and album title idx = fileName.indexOf(" - "); if (idx != -1) { // get the artist name with leading and trailing spaces removed artist = jTrim(fileName.substring(0, idx)); if (artist != lastArtist) { // for each new artist, check to see if a new first character // is present, and start a new section if needed. if (artist.charAt(0) != lastArtist.charAt(0)) doNextLetter(artist.charAt(0)); Response.Write("