//
//  じょじょカウント用JavaScript
//

// アクセス解析用の日付文字列の作成
function analyze()
{
    var start = "";
    var end = "";
    var y1, m1, d1;
    var y2, m2, d2;

    y1 = document.forms[0].year1.selectedIndex
    m1 = document.forms[0].month1.selectedIndex
    d1 = document.forms[0].day1.selectedIndex
    y2 = document.forms[0].year2.selectedIndex
    m2 = document.forms[0].month2.selectedIndex
    d2 = document.forms[0].day2.selectedIndex
    if (y1 != 0 && m1 != 0 && d1 != 0) {
        start = document.forms[0].year1.options[y1].value +
                document.forms[0].month1.options[m1].value +
                document.forms[0].day1.options[d1].value;
    }
    if (y2 != 0 && m2 != 0 && d2 != 0) {
        end = document.forms[0].year2.options[y2].value +
              document.forms[0].month2.options[m2].value +
              document.forms[0].day2.options[d2].value;
    }
    document.forms[1].target.value = start + "-" + end;
    document.forms[1].submit();
}

// 必須パラメータの入力チェック（カウンタ修正フォーム）
function checkPara(obj)
{
    if (obj.counter.value == "" || obj.counter.value.search(/[^\d]/) >= 0) {
        alert("カウンタ値が不正です。");
        return false;
    } else {
        return true;
    }
}

// end_of_file
