// 検索エリアの月を変更する。（一般ユーザ用）
function pullDownChange(target) {
    var selectYear = target.value;
    var optionList = null;
    if (target.name == 'year_from') {
        optionList = document.forms[0].month_from.options;
    } else if (target.name == 'year_to') {
        optionList = document.forms[0].month_to.options;
    }
    val = optionList.length;
    while (val > 0) {
       optionList[val - 1] = null;
       val--;
    }
    
    date = new Date();
    thisYear = date.getFullYear();
    thisMonth = date.getMonth() + 1;
    if (selectYear == (thisYear - 1)) {
        index = 0;
        for (i = thisMonth; i <= 12; i++) {
            key = null;
            if (i < 10) {
                key = '0' + i;
            } else {
                key = '' + i;
            }
            optionList[index] = new Option(i + '月', key);
            if (i == thisMonth) {
                optionList[index].selected = true;
            }
            index++;
        }
    } else if (selectYear == thisYear) {
        index = 0;
        for (i = 1; i <= thisMonth; i++) {
            key = null;
            if (i < 10) {
                key = '0' + i;
            } else {
                key = '' + i;
            }
            optionList[index] = new Option(i + '月', key);
            if (i == 1) {
                optionList[index].selected = true;
            }
            index++;
        }
    }
}