/* 年月アーカイブのセレクトフォーム
  新しい月になるたびに手動で追加するタイプ
  */

function ChangeMonth()
{
    var selectYear = document.forms.SelectArchive.Year;
    var selectMonth = document.forms.SelectArchive.Month;

    selectMonth.options.length = 0;

    if(selectYear.options[selectYear.selectedIndex].value == "")
      {
          selectMonth.options[0] = new Option("条件なし","");
      }

    if(selectYear.options[selectYear.selectedIndex].value == "2010")
      {
          selectMonth.options[0] = new Option("条件なし","");
          selectMonth.options[1] = new Option("08");
          selectMonth.options[2] = new Option("07");
          selectMonth.options[3] = new Option("06");
          selectMonth.options[4] = new Option("05");
          selectMonth.options[5] = new Option("04");
          selectMonth.options[6] = new Option("03");
          selectMonth.options[7] = new Option("02");
      }
    
    if(selectYear.options[selectYear.selectedIndex].value == "2009")
      {
          selectMonth.options[0] = new Option("条件なし","");
          selectMonth.options[1] = new Option("12");
          selectMonth.options[2] = new Option("11");
          selectMonth.options[3] = new Option("10");
          selectMonth.options[4] = new Option("09");
          selectMonth.options[5] = new Option("07");
          selectMonth.options[6] = new Option("06");
          selectMonth.options[7] = new Option("04");
          selectMonth.options[8] = new Option("02");
          selectMonth.options[9] = new Option("01");
      }

    if(selectYear.options[selectYear.selectedIndex].value == "2008")
      {
          selectMonth.options[0] = new Option("条件なし","");
          selectMonth.options[1] = new Option("12");
          selectMonth.options[2] = new Option("11");
          selectMonth.options[3] = new Option("10");
          selectMonth.options[4] = new Option("09");
          selectMonth.options[5] = new Option("08");
          selectMonth.options[6] = new Option("07");
          selectMonth.options[7] = new Option("06");
          selectMonth.options[8] = new Option("05");
          selectMonth.options[9] = new Option("01");
      }
    
    if(selectYear.options[selectYear.selectedIndex].value == "2007")
      {
          selectMonth.options[0] = new Option("条件なし","");
          selectMonth.options[1] = new Option("12");
          selectMonth.options[2] = new Option("11");
          selectMonth.options[3] = new Option("10");
          selectMonth.options[4] = new Option("09");
          selectMonth.options[5] = new Option("08");
          selectMonth.options[6] = new Option("07");
          selectMonth.options[7] = new Option("06");
          selectMonth.options[8] = new Option("05");
          selectMonth.options[9] = new Option("04");
          selectMonth.options[10] = new Option("03");
          selectMonth.options[11] = new Option("02");
          selectMonth.options[12] = new Option("01");
      }

    if(selectYear.options[selectYear.selectedIndex].value == "2006")
      {
          selectMonth.options[0] = new Option("条件なし","");
          selectMonth.options[1] = new Option("12");
          selectMonth.options[2] = new Option("11");
          selectMonth.options[3] = new Option("10");
          selectMonth.options[4] = new Option("09");
          selectMonth.options[5] = new Option("08");
          selectMonth.options[6] = new Option("07");
          selectMonth.options[7] = new Option("06");
          selectMonth.options[8] = new Option("05");
          selectMonth.options[9] = new Option("04");
      }

    if(selectYear.options[selectYear.selectedIndex].value == "2005")
      {
          selectMonth.options[0] = new Option("条件なし","");
          selectMonth.options[1] = new Option("12");
          selectMonth.options[2] = new Option("11");
          selectMonth.options[3] = new Option("10");
          selectMonth.options[4] = new Option("09");
          selectMonth.options[5] = new Option("08");
          selectMonth.options[6] = new Option("07");
          selectMonth.options[7] = new Option("05");
          selectMonth.options[8] = new Option("04");
          selectMonth.options[9] = new Option("03");
          selectMonth.options[10] = new Option("02");
          selectMonth.options[11] = new Option("01");
      }

    if(selectYear.options[selectYear.selectedIndex].value == "2004")
      {
          selectMonth.options[0] = new Option("条件なし","");
          selectMonth.options[1] = new Option("12");
      }

}