//
//サイドメニュー
//
function Sidemenu_Write(addPath,L,M,S){ //引数（パス、大項目、中項目、小項目）
  document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"Menu_Tbl\">");

  //------------------------------------------概要------------------------------------------
  document.write("<tr><td width=\"160\">");
  document.write("<a href=\"JavaScript:dispChange(menu1)\"><img src=\"" + addPath + "basicimage/menu1/menu1.gif\" width=\"150\" height=\"35\" border=\"0\" class=\"Menu_Hed\" alt=\"About WERC\" name=\"_HPB_ROLLOVER1\"></a>");
    document.write("<div id=\"menu1\" style=\"display:none\">");
      if( L==1 && M==1){ //あいさつ
        document.write("<a href=\"" + addPath + "aboutwerc/greetings/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu1/menu1_1_d.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Greetings from the Chairman\"></a><br>");
      } else {
        document.write("<a href=\"" + addPath + "aboutwerc/greetings/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu1/menu1_1.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Greetings from the Chairman\"></a><br>");
      }
      document.write("<div id=\"menu1_1\"></div>");
      if( L==1 && M==2){ //設立
        document.write("<a href=\"" + addPath + "aboutwerc/establishment/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu1/menu1_2_d.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Establishment\"></a>");
      } else {
        document.write("<a href=\"" + addPath + "aboutwerc/establishment/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu1/menu1_2.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Establishment\"></a>");
      }
      document.write("<div id=\"menu1_2\"></div>");
      if( L==1 && M==3){ //組織
        document.write("<a href=\"" + addPath + "aboutwerc/organization/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu1/menu1_3_d.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Organization\"></a>");
      } else {
        document.write("<a href=\"" + addPath + "aboutwerc/organization/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu1/menu1_3.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Organization\"></a>");
      }
      document.write("<div id=\"menu1_3\"></div>");
      if( L==1 && M==4){ //施設
        document.write("<a href=\"JavaScript:dispChange(menu1_4)\"><img src=\"" + addPath + "basicimage/menu1/menu1_4_d.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Facility\"></a>");
      } else {
        document.write("<a href=\"JavaScript:dispChange(menu1_4)\"><img src=\"" + addPath + "basicimage/menu1/menu1_4.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Facility\"></a>");
      }
      document.write("<div id=\"menu1_4\" style=\"display:none\">");
        document.write("<ul type=\"circle\" class=\"Menu_Item2\">");
         if( L==1 && M==4 && S==1 ){ //施設概要
           document.write("<li type=\"square\"><a href=\"" + addPath + "aboutwerc/facility/facility/index.htm\" target=\"_top\" class=\"Menu_Item4\">Facility Description</a>");
         } else {
           document.write("<li><a href=\"" + addPath + "aboutwerc/facility/facility/index.htm\" target=\"_top\">Facility Description</a>");
         }
         if( L==1 && M==4 && S==2 ){ //加速器
           document.write("<li type=\"square\"><a href=\"" + addPath + "aboutwerc/facility/accelerator/index.htm\" target=\"_top\" class=\"Menu_Item4\">Accelerator</a>");
         } else {
           document.write("<li><a href=\"" + addPath + "aboutwerc/facility/accelerator/index.htm\" target=\"_top\">Accelerator</a>");
         }
         if( L==1 && M==4 && S==3 ){ //科学機器   
           document.write("<li type=\"square\"><a href=\"" + addPath + "aboutwerc/facility/scientific/index.htm\" target=\"_top\" class=\"Menu_Item4\">Scientific Instrument</a>");
         } else {
           document.write("<li><a href=\"" + addPath + "aboutwerc/facility/scientific/index.htm\" target=\"_top\">Scientific Instrument</a>");
         }
         if( L==1 && M==4 && S==4 ){ //その他
           document.write("<li type=\"square\"><a href=\"" + addPath + "aboutwerc/facility/others/index.htm\" target=\"_top\" class=\"Menu_Item4\">Others</a>");
         } else {
           document.write("<li><a href=\"" + addPath + "aboutwerc/facility/others/index.htm\" target=\"_top\">Others</a>");
         }
        document.write("</ul>");
      document.write("</div>");
    document.write("</div>");
  document.write("</td>");
  document.write("</tr>");

  //------------------------------------------研究・開発------------------------------------------
  document.write("<tr><td width=\"160\">");
  document.write("<a href=\"JavaScript:dispChange(menu2)\"><img src=\"" + addPath + "basicimage/menu2/menu2.gif\" width=\"150\" height=\"35\" border=\"0\" class=\"Menu_Hed\" alt=\"Research and Development\"></a>");
    document.write("<div id=\"menu2\" style=\"display:none\">");
    if( L==2 && M==1){ //研究開発部門概要
      document.write("<a href=\"" + addPath + "reseadeve/summary/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu2/menu2_1_d.gif\" width=\"137\" height=\"41\" border=\"0\" class=\"Menu_Item1\" alt=\"Research & Development Department\"></a>");
    } else {
      document.write("<a href=\"" + addPath + "reseadeve/summary/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu2/menu2_1.gif\" width=\"137\" height=\"41\" border=\"0\" class=\"Menu_Item1\" alt=\"Research & Development Department\"></a>");
    }
      document.write("<div id=\"menu2_1\" style=\"display:none\"></div>");
    document.write("<a href=\"JavaScript:dispChange(menu2_2)\">");
    if( L==2 && M==2){ //研究内容
      document.write("<img src=\"" + addPath + "basicimage/menu2/menu2_2_d.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Activities at R & D Department\"></a>");
    } else {
      document.write("<img src=\"" + addPath + "basicimage/menu2/menu2_2.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Activities at R & D Department\"></a>");
    }
      document.write("<div id=\"menu2_2\" style=\"display:none\">");
        document.write("<ul type=\"circle\" class=\"Menu_Item2\">");
          if( L==2 && M==2 && S==1){ //粒子線医療
            document.write("<li type=\"square\"><a href=\"" + addPath + "reseadeve/activities/therapy/index.htm\" target=\"_top\" class=\"Menu_Item4\">Particle Beam Therapy</a>");
          } else {
            document.write("<li><a href=\"" + addPath + "reseadeve/activities/therapy/index.htm\" target=\"_top\">Particle Beam Therapy</a>");
          }
            document.write("<div id=\"menu2_2_1\" style=\"display:none\">");
              document.write("<ul type=\"disc\" class=\"Menu_Item3\">");
                document.write("<li><a href=\"" + addPath + "kenkyukaihatsu/naiyo/iryo/yoshisenchiryo/index.htm\" target=\"_top\">陽子線がん治療</a>");
              document.write("</ul>");
            document.write("</div>");
          if( L==2 && M==2 && S==2){ //エネルギー材料
            document.write("<li type=\"square\"><a href=\"" + addPath + "reseadeve/activities/energymate/index.htm\" target=\"_top\" class=\"Menu_Item4\">Energy Materials</a>");
          } else {
            document.write("<li><a href=\"" + addPath + "reseadeve/activities/energymate/index.htm\" target=\"_top\">Energy Materials</a>");
          }
          if( L==2 && M==2 && S==3){ //生物資源
            document.write("<li type=\"square\"><a href=\"" + addPath + "reseadeve/activities/biology/index.htm\" target=\"_top\" class=\"Menu_Item4\">Biological Resources</a>");
          } else {
            document.write("<li><a href=\"" + addPath + "reseadeve/activities/biology/index.htm\" target=\"_top\">Biological Resources</a>");
          }
          if( L==2 && M==2 && S==4){ //エネルギー開発
            document.write("<li type=\"square\"><a href=\"" + addPath + "reseadeve/activities/energydeve/index.htm\" target=\"_top\" class=\"Menu_Item4\">Energy Development</a>");
          } else {
            document.write("<li><a href=\"" + addPath + "reseadeve/activities/energydeve/index.htm\" target=\"_top\">Energy Development</a>");
          }
          if( L==2 && M==2 && S==5){ //加速器

            document.write("<li type=\"square\"><a href=\"" + addPath + "reseadeve/activities/accelerator/index.htm\" target=\"_top\" class=\"Menu_Item4\">Accelerator</a>");
          } else {
            document.write("<li><a href=\"" + addPath + "reseadeve/activities/accelerator/index.htm\" target=\"_top\">Accelerator</a>");
          }
            document.write("<div id=\"menu2_2_5\" style=\"display:none\">");
              document.write("<ul type=\"disc\" class=\"Menu_Item3\">");
                document.write("<li><a href=\"" + addPath + "kenkyukaihatsu/naiyo/iryo/kasokuki/kasokuki/index.htm\" target=\"_top\">加速器とは</a>");
              document.write("</ul>");
            document.write("</div>");
        document.write("</ul>");
      document.write("</div>");
    document.write("</div>");
  document.write("</td>");
  document.write("</tr>");

  //------------------------------------------拠点化計画------------------------------------------
  //拠点化計画とは
  document.write("<tr><td width=\"160\">");
  document.write("<a href=\"JavaScript:dispChange(menu3)\"><img src=\"" + addPath + "basicimage/menu3/menu3.gif\" width=\"150\" height=\"35\" border=\"0\" class=\"Menu_Hed\" alt=\"Centralization Plan\"></a>");
    document.write("<div id=\"menu3\" style=\"display:none\">");
    if( L==3 && M==1){ //拠点化計画とは
      document.write("<a href=\"" + addPath + "centralization/plan/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu3/menu3_1_d.gif\" width=\"137\" height=\"41\" border=\"0\" class=\"Menu_Item1\" alt=\"Energy Research and Development Centralization Plan\"></a>");
    } else {
      document.write("<a href=\"" + addPath + "centralization/plan/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu3/menu3_1.gif\" width=\"137\" height=\"41\" border=\"0\" class=\"Menu_Item1\" alt=\"Energy Research and Development Centralization Plan\"></a>");
    }
      document.write("<div id=\"menu3_1\" style=\"display:none\">");
      document.write("</div>");
  //拠点化推進組織
    if( L==3 && M==2){ //拠点化推進組織
      document.write("<a href=\"" + addPath + "centralization/projectoffice/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu3/menu3_2_d.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Centralization Project Office\"></a>");
    } else {
      document.write("<a href=\"" + addPath + "centralization/projectoffice/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu3/menu3_2.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Centralization Project Office\"></a>");
    }
    document.write("<div id=\"menu3_2\" style=\"display:none\">");
    document.write("</div>");
    document.write("</div>");
  document.write("</td>");
  document.write("</tr>");
 
  //------------------------------------------施設利用のご案内------------------------------------------
  document.write("<tr><td width=\"160\">");
  document.write("<a href=\"JavaScript:dispChange(menu4)\"><img src=\"" + addPath + "basicimage/menu4/menu4.gif\" width=\"150\" height=\"35\" border=\"0\" class=\"Menu_Hed\" alt=\"Facility Usage Guide\"></a>");
    document.write("<div id=\"menu4\" style=\"display:none\">");
    if( L==4 && M==2){ //会議室・ホールのご利用
      document.write("<a href=\"" + addPath + "fusageguide/meetinghall/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu4/menu4_2_d.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Use of Meeting Rooms and Hall\"></a>");
    } else {
      document.write("<a href=\"" + addPath + "fusageguide/meetinghall/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu4/menu4_2.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Use of Meeting Rooms and Hall\"></a>");
    }
      document.write("<div id=\"menu4_2\" style=\"display:none\"></div>");
    document.write("</div>");
  document.write("</td>");
  document.write("</tr>");

  //------------------------------------------研修のご案内------------------------------------------
  //------------------------------------------企業の方への支援制度------------------------------------------
  document.write("<tr><td width=\"160\">");
  document.write("<a href=\"JavaScript:dispChange(menu6)\"><img src=\"" + addPath + "basicimage/menu6/menu6.gif\" width=\"150\" height=\"35\" border=\"0\" class=\"Menu_Hed\" alt=\"Company Supporting System\"></a>");
    document.write("<div id=\"menu6\" style=\"display:none\">");
    if( L==6 && M==2){ //技術相談
      document.write("<a href=\"" + addPath + "support/technical/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu6/menu6_2_d.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Technical Support\"></a>");
    } else {
      document.write("<a href=\"" + addPath + "support/technical/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu6/menu6_2.gif\" width=\"137\" height=\"16\" border=\"0\" class=\"Menu_Item1\" alt=\"Technical Support\"></a>");
    }
      document.write("<div id=\"menu6_2\"></div>");
  document.write("</td>");
  document.write("</tr>");

  //------------------------------------------会員の募集------------------------------------------
  document.write("<tr><td width=\"160\">");
  document.write("<a href=\"JavaScript:dispChange(menu7)\"><img src=\"" + addPath + "basicimage/menu7/menu7.gif\" width=\"150\" height=\"35\" border=\"0\" class=\"Menu_Hed\" alt=\"Membership Recruitment\"></a>");
    document.write("<div id=\"menu7\" style=\"display:none\">");
    if( L==7 && M==1){ //賛助会員
      document.write("<a href=\"" + addPath + "membership/membership/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu7/menu7_1_d.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Supporting Membership\"></a>");
    } else {
      document.write("<a href=\"" + addPath + "membership/membership/index.htm\" target=\"_top\"><img src=\"" + addPath + "basicimage/menu7/menu7_1.gif\" width=\"137\" height=\"28\" border=\"0\" class=\"Menu_Item1\" alt=\"Supporting Membership\"></a>");
    }
      document.write("<div id=\"menu7_1\" style=\"display:none\"></div>");
    document.write("</div>");
  document.write("</td>");
  document.write("</tr>");
  document.write("</table>");
  //------------------------------------------------------------------------------------
}

//
//メニューの表示・非表示
//
function dispChange(id) {
								
  if(id.style.display=="none"){
    id.style.display="block";	
  }
  else{
   id.style.display="none";
  }	
}									

//
//サブメニュー
//
function BasicSubMenu_Write(addpath,key1){
    document.write("<img name=\"submenu0\" src=\"" + addpath + "basicimage/submenu/submenu0.gif\" width=\"5\" height=\"25\" border=\"0\" alt=\"\">");
    if(key1==1){ //ＨＯＭＥ
      document.write("<img name=\"submenu1\" src=\"" + addpath + "basicimage/submenu/submenu1_d.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Home\">");
    }else{
      document.write("<a href=\"" + addpath + "index.htm\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"MM_swapImage('submenu1','','" + addpath + "basicimage/submenu/submenu1_r.gif',1);\"><img name=\"submenu1\" src=\"" + addpath + "basicimage/submenu/submenu1.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Home\"></a>");
    }
    if(key1==2){ //サイトマップ
      document.write("<img name=\"submenu2\" src=\"" + addpath + "basicimage/submenu/submenu2_d.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Site map\">");
    }else{
      document.write("<a href=\"" + addpath + "subpage/sitemap/index.htm\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"MM_swapImage('submenu2','','" + addpath + "basicimage/submenu/submenu2_r.gif',1);\"><img name=\"submenu2\" src=\"" + addpath + "basicimage/submenu/submenu2.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Site map\"></a>");
    }
    if(key1==3){ //関連機関リンク
      document.write("<img name=\"submenu3\" src=\"" + addpath + "basicimage/submenu/submenu3_d.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Links\">");
    }else{
      document.write("<a href=\"" + addpath + "subpage/link/index.htm\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"MM_swapImage('submenu3','','" + addpath + "basicimage/submenu/submenu3_r.gif',1);\"><img name=\"submenu3\" src=\"" + addpath + "basicimage/submenu/submenu3.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Links\"></a>");
    }
    if(key1==4){ //パンフレット・刊行物
      document.write("<img name=\"submenu4\" src=\"" + addpath + "basicimage/submenu/submenu4_d.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Pamphlet\">");
    }else{
      document.write("<a href=\"" + addpath + "subpage/pamphpub/index.htm\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"MM_swapImage('submenu4','','" + addpath + "basicimage/submenu/submenu4_r.gif',1);\"><img name=\"submenu4\" src=\"" + addpath + "basicimage/submenu/submenu4.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Pamphlet\"></a>");
    }
    if(key1==5){ //お問い合わせ
      document.write("<img name=\"submenu5\" src=\"" + addpath + "basicimage/submenu/submenu5_d.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Contact us\">");
    }else{
      document.write("<a href=\"" + addpath + "subpage/inquiry/index.htm\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"MM_swapImage('submenu5','','" + addpath + "basicimage/submenu/submenu5_r.gif',1);\"><img name=\"submenu5\" src=\"" + addpath + "basicimage/submenu/submenu5.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Contact us\"></a>");
    }
    if(key1==6){ //Japanese
      document.write("<img name=\"submenu6\" src=\"" + addpath + "basicimage/submenu/submenu6_d.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Japanese\">");
    }else{
      document.write("<a href=\"" + addpath + "../index.html\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"MM_swapImage('submenu6','','" + addpath + "basicimage/submenu/submenu6_r.gif',1);\" target=\"_top\"><img name=\"submenu6\" src=\"" + addpath + "basicimage/submenu/submenu6.gif\" width=\"95\" height=\"25\" border=\"0\" alt=\"Japanese\"></a>");
    }
    document.write("<img name=\"submenu0\" src=\"" + addpath + "basicimage/submenu/submenu0.gif\" width=\"5\" height=\"25\" border=\"0\" alt=\"\">");
}

//
//基本ページのサイト内検索
//
function Sitesearch_Write(){
  document.write("<FORM method=\"get\" action=\"http://www.google.com/search\" target=\"_blank\"><INPUT type=\"submit\" name=\"btnG\" value=\"Search\" class=\"Siteserch_Bt\"><BR>");
  document.write("<INPUT type=\"text\" name=\"q\" size=\"25\" maxlength=\"255\" value=\"\" class=\"Sitesearch_Text\"><INPUT type=\"hidden\" name=\"ie\" value=\"Shift_JIS\"><INPUT type=\"hidden\" name=\"oe\" value=\"Shift_JIS\"><INPUT type=\"hidden\" name=\"hl\" value=\"ja\"><INPUT type=\"hidden\" name=\"domains\" value=\"WERC.OR.JP\"><INPUT type=\"hidden\" name=\"sitesearch\" value=\"WERC.OR.JP\" checked></FORM>");
}

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() {
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//
//基本ボタンのロード
//
function MM_LoadImages(addpath)
{
  MM_preloadImages(addpath + 'basicimage/menu1/menu1.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_1.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_1_d.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_2.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_2_d.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_3.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_3_d.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_4.gif');
  MM_preloadImages(addpath + 'basicimage/menu1/menu1_4_d.gif');

  MM_preloadImages(addpath + 'basicimage/menu2/menu2.gif');
  MM_preloadImages(addpath + 'basicimage/menu2/menu2_1_d.gif');
  MM_preloadImages(addpath + 'basicimage/menu2/menu2_2.gif');
  MM_preloadImages(addpath + 'basicimage/menu2/menu2_2_d.gif');

  MM_preloadImages(addpath + 'basicimage/menu3/menu3.gif');
  MM_preloadImages(addpath + 'basicimage/menu3/menu3_1.gif');
  MM_preloadImages(addpath + 'basicimage/menu3/menu3_1_d.gif');
  MM_preloadImages(addpath + 'basicimage/menu3/menu3_2.gif');
  MM_preloadImages(addpath + 'basicimage/menu3/menu3_2_d.gif');

  MM_preloadImages(addpath + 'basicimage/menu4/menu4.gif');
  MM_preloadImages(addpath + 'basicimage/menu4/menu4_2.gif');
  MM_preloadImages(addpath + 'basicimage/menu4/menu4_2_d.gif');

  MM_preloadImages(addpath + 'basicimage/menu7/menu7.gif');
  MM_preloadImages(addpath + 'basicimage/menu7/menu7_1.gif');
  MM_preloadImages(addpath + 'basicimage/menu7/menu7_2.gif');

  MM_preloadImages(addpath + 'basicimage/submenu/submenu1.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu1_d.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu1_r.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu2.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu2_d.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu2_r.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu3.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu3_d.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu3_r.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu4.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu4_d.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu4_r.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu5.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu5_d.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu5_r.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu6.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu6_d.gif');
  MM_preloadImages(addpath + 'basicimage/submenu/submenu6_r.gif');
}

//
//ロールオーバー
//
function HpbImgPreload()
{
  var appVer=parseInt(navigator.appVersion);
  var isNC=false,isN6=false,isIE=false;
  if (document.all && appVer >= 4) isIE=true; else
    if (document.getElementById && appVer > 4) isN6=true; else
      if (document.layers && appVer >= 4) isNC=true;
  if (isNC||isN6||isIE)
  {
    if (document.images)
    {
      var imgName = HpbImgPreload.arguments[0];
      var cnt;
      swImg[imgName] = new Array;
      for (cnt = 1; cnt < HpbImgPreload.arguments.length; cnt++)
      {
        swImg[imgName][HpbImgPreload.arguments[cnt]] = new Image();
        swImg[imgName][HpbImgPreload.arguments[cnt]].src = HpbImgPreload.arguments[cnt];
      }
    }
  }
}

function HpbImgFind(doc, imgName)
{
  for (var i=0; i < doc.layers.length; i++)
  {
    var img = doc.layers[i].document.images[imgName];
    if (!img) img = HpbImgFind(doc.layers[i], imgName);
    if (img) return img;
  }
  return null;
}

function HpbImgSwap(imgName, imgSrc)
{
  var appVer=parseInt(navigator.appVersion);
  var isNC=false,isN6=false,isIE=false;
  if (document.all && appVer >= 4) isIE=true; else
    if (document.getElementById && appVer > 4) isN6=true; else
      if (document.layers && appVer >= 4) isNC=true;
  if (isNC||isN6||isIE)
  {
    if (document.images)
    {
      var img = document.images[imgName];
      if (!img) img = HpbImgFind(document, imgName);
      if (img) img.src = imgSrc;
    }
  }
}
var swImg; swImg=new Array;
