var chapter_list = new Array(
  ["Ch.001: Back to Spring with You","c001"],
  ["Ch.001.2: Nice to Meet You","c001.2"],
  ["Ch.002","c002"],
  ["Ch.003: AGH-RMS Ai","c003"],
  ["Ch.004: Living with Ghosts","c004"],
  ["Ch.005: A Picnic of 1 Million Years","c005"],
  ["Ch.006: The Teacher and I","c006"],
  ["Ch.007: AI's Picture Diary~Happy Days","c007"],
  ["Ch.008: First Love","c008"],
  ["Ch.009: Returning to this Planet","c009"],
  ["Ch.010: Still Life [Peaceful Life]","c010"],
  ["Ch.011: Home Sweet Home ~Children~","c011"],
  ["Ch.012: Home Sweet Home II ~Blue Sky and Sunset~","c012"],
  ["Ch.013: Adolescence","c013"],
  ["Ch.014: Will","c014"],
  ["Ch.015: Weeping Woman","c015"],
  ["Ch.016: Secret","c016"],
  ["Ch.017: Watching the Blue Sky with You","c017"],
  ["Ch.018: Come On In","c018"],
  ["Ch.019: Boy's Morning","c019"],
  ["Ch.020: Moonlight","c020"],
  ["Ch.021: Let's Go Out","c021"],
  ["Ch.022: Phantom Light","c022"],
  ["Ch.023: Sunflower","c023"],
  ["Ch.024: Ai's Picture Diary II ~With Who She Loves~","c024"],
  ["Ch.025: Dreaming","c025"],
  ["Ch.026: Serenade of Love","c026"],
  ["Ch.027: Honeymoon","c027"],
  ["Ch.028: In This World","c028"],
  ["Ch.029: Murderer's Dream","c029"],
  ["Ch.030: Birth","c030"],
  ["Ch.031: Stand By Me","c031"],
  ["Ch.032: The Body's Song","c032"],
  ["Ch.033: This World and I, ~We Love You~","c033"],
  ["Ch.034: New World","c034"],
  ["Ch.035: I Am Alive","c035"],
  ["Ch.035.2: Snowy Landscape ~Humanity's Hometown~","c035.2"],
  ["Ch.036: Summer Lover","c036"],
  ["Ch.037: First Night","c037"],
  ["Ch.038: Night","c038"],
  ["Ch.039: Dreaming of the Ocean at Dawn","c039"],
  ["Ch.040: Returning Home","c040"],
  ["Ch.040.2: See You Tomorrow","c040.2"],
  ["Ch.041: Letter","c041"],
  ["Ch.042: Yoshizumi Ikuru","c042"],
  ["Ch.042.2: Ai's Picture Diary III ~From the possessions of the late Yoshizumi Ikuru~","c042.2"],
  ["Ch.043: Returning With You on that Spring Day","c043"]
);

var total_chapters = 47;

for (var i = 0; i < chapter_list.length; i++) {
  document.getElementById('top_chapter_list').options[i] = new Option(chapter_list[i][0], chapter_list[i][1]);
  document.getElementById('bottom_chapter_list').options[i] = new Option(chapter_list[i][0], chapter_list[i][1]);
}
document.getElementById('top_chapter_list').value=current_chapter;
document.getElementById('bottom_chapter_list').value=current_chapter;
var current_chapter_index = document.getElementById('top_chapter_list').selectedIndex;
