function getSeirekiBox(menu){
  switch (menu) {
    case "kansou":
    document.write('<select name="selectyear" onChange="kansou_select_year(\'parent\',this,0)">');
    break;
    case "timetravel":
    document.write('<select name="selectyear" onChange="timetravel_select_year(\'parent\',this,0)">');
    break;
    case "wineguide":
    document.write('<select name="selectyear" onChange="select_wineguide(\'parent\',this,0)">');
    break;
  }
  document.write("<option selected>年号を選択してください</option>");
  currentNen = new Date();
  currentNen = currentNen.getFullYear();
  botomNen = 1900;
  //nen = currentNen;
  nen = 2004;
  while(nen >= botomNen){
    if (nen < 1912) Gengou ="(明治"+String(nen-1900+34)+"年)";
    if (nen > 1912 && nen < 1926) Gengou ="(大正"+String(nen-1900-11)+"年)";
    if (nen > 1926 && nen < 1989) Gengou ="(昭和"+String(nen-1900-25)+"年)";
    if (nen > 1989) Gengou ="(平成"+String(nen-1900-88)+"年)";

    switch (nen) {
      case 1912:
      document.write("<option value=\""+nen+"\">"+nen+"年(大正元年/明治46年)</option>\n");
      break;
      case 1926:
      document.write("<option value=\""+nen+"\">"+nen+"年(昭和元年/大正15年)</option>\n");
      break;
      case 1989:
      document.write("<option value=\""+nen+"\">"+nen+"年(平成元年/昭和64年)</option>\n");
      break;
      default:
      document.write("<option value=\""+nen+"\">"+nen+"年"+Gengou+"</option>\n");
      break;
    }
    nen--;
  }
  document.write("</select>");
}

function timetravel_select_year(targ,selObj,restore){ //v3.0
  eval(targ+".location='http://www.nengou-wine.com/donnatosi/select_year.php?select_year="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function kansou_select_year(targ,selObj,restore){ //v3.0
  eval(targ+".location='http://www.nengou-wine.com/donnatosi/"+selObj.options[selObj.selectedIndex].value+".htm#kansou'");
  if (restore) selObj.selectedIndex=0;
}

function search_vtg(targ,selObj,restore){ //v3.0
  eval(targ+".location='http://www.nengou-wine.com/collection/img_output.php?select_vtg="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function search_ch(targ,selObj,restore){ //v3.0
  eval(targ+".location='http://www.nengou-wine.com/collection/img_output.php?select_ch="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function search_dmn(targ,selObj,restore){ //v3.0
  eval(targ+".location='http://www.nengou-wine.com/collection/img_output.php?select_dmn="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function search_cde(targ,selObj,restore){ //v3.0
  eval(targ+".location='http://www.nengou-wine.com/collection/img_output.php?select_cde="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function select_wineguide(targ,selObj,restore){ //v3.0
  eval(targ+".location='http://www.nengou-wine.com/guide/select.php?sVintage="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function GetFileName(file_url){
  file_url = file_url.substring(file_url.lastIndexOf("/")+1,file_url.length);
  file_url = file_url.substring(0,file_url.indexOf("."));
  return file_url;
}
