ata.elems;i++) {
      var is_checked = d3.select('#ch'+i)[0][0].checked;
      box_state += is_checked === checkboxData.toclick[i] ? 1.0 : -1.0;
    }
    if (cGenre.toLowerCase().trim() == eGenre &&
        cName.toLowerCase().trim() == eName.toLowerCase() &&
        ('' + cYear) == ('' + eYear)) {
      if (box_state == -1.0) {
        core.endEpisode(-1.0, false);
      }
    } else {
      core.endEpisode(-1.0, false);
    }
    $('#main').removeClass('hide');
    $('#form').addClass('hide');
    $('#b