
  //--- ロールオーバー
  Img = new Array()
  for (i = 1; i < 41; i++) {
    Img[i] = new Image()
    if (i < 10) { Img[i].src = "/image/index0" + i + ".gif" }
    else        { Img[i].src = "/image/index"  + i + ".gif" }
  }
  function CngImg(ImgName, ImgID) {
    document.images[ImgName].src = Img[ImgID].src
  }

  //--- ログイン判定
  function login_moji(UrlChk) {
    //--- ログイン文字の変更
    if (document.cookie.indexOf("AUT=") > -1) {
      moji1 = "<IMG src=\"/image/i_log_in.gif\" width=\"16\" height=\"16\" border=\"0\">";
      moji2 = "<SPAN CLASS=\"h1\"><FONT COLOR=\"#f19201\">ログイン中</FONT></SPAN>";
      document.getElementById("login_img").innerHTML = moji1;
      document.getElementById("login_str").innerHTML = moji2;
    }
    //--- cookie保存の URLページ を開く
    if (UrlChk == 1) {
      CokIti = document.cookie.indexOf("URL=");
      if (CokIti > -1) {
        LinkHREF = "OK";
        CokLen = document.cookie.length;
        CokStr = document.cookie.substring((CokIti+4),CokLen);
        CokIti = CokStr.indexOf(";");
        if (CokIti > -1) { LinkHREF = CokStr.substring(0,(CokIti-1)); }
        else             { LinkHREF = CokStr; }
        if (LinkHREF != "OK") {
          ToDay = "Tue, 1-Jan-1980 00:00:00";
          document.cookie = "URL=0; expires=" + ToDay + "; path=/; domain=.mards.net;";
          document.cookie = "BAK=0; expires=" + ToDay + "; path=/; domain=.mards.net;";
          if (LinkHREF.substring(0,4) == "http") {
            LinkHREF = unescape(LinkHREF);
            location.href = LinkHREF;
          }
        }
      }
    }
  }

  //--- ユーザー管理ツールを開くときの確認
  function UserToolChk() {
    LinkHREF = "OK";
    CokSet = document.cookie.indexOf("AUT=");
    if (CokSet > -1) {
      myDate = new Date();
      myTime = myDate.getTime();
      CokStr = document.cookie.substring((CokSet+4),(CokSet+5));
      if (CokStr == "2" || CokStr == "4") {
        if (document.cookie.indexOf("LID=") > -1 || document.cookie.indexOf("ADK=") > -1) {
          LinkHREF = "https://mrsi.mards.net/member/user_tool_menu.sc3?," + myTime;
        }
      }
      else {
        LinkHREF = "https://mrsi.mards.net/member/user_tool_menu.sc3?," + myTime;
      }
    }
    if (LinkHREF != "OK") {
      location.href = LinkHREF;
      return false;
    }
    else { return true; }
  }

  //--- 簡易表示のチェックボックス
  function LstChk() {
    CokSet = document.cookie.indexOf("LST=");
    //--- 削除
    if (CokSet > -1) {
      ToDay = "Tue, 1-Jan-1980 00:00:00";
      document.cookie = "LST=0; expires=" + ToDay + "; path=/; domain=.mards.net;";
    }
    //--- 保存（６ヶ月）
    else {
      exp = new Date();
      exp.setTime(exp.getTime()+1000*60*60*24*31*6);
      ToDay = exp.toGMTString();
      document.cookie = "LST=1; expires=" + ToDay + "; path=/; domain=.mards.net;";
    }
  }

  //--- 検索語保存
  function WordKeep() {
    if (document.Form_Search.KeyWord.value.length > 0) {
      kwd = escape(document.Form_Search.KeyWord.value.substring(0,500));
      document.cookie = "KWD=" + kwd + "; path=/; domain=.mards.net;";
    }
  }

  //--- 分野検索
  function genre_search() {
    document.Form_Search.action = "/sc/select_genre_search.sc3";
    document.Form_Search.submit();
  }

