﻿function GetObject(id) {
  var x;

  doc=document;
  if (!(x=doc[id]) && doc.all) x = doc.all[id];
  if (!x && doc.getElementById) x = doc.getElementById(id);
  return x;
}

function showhide(id,moji) {
  var flg,obj;

    if ((obj = GetObject(id))!=null){
      flg = moji;
      if (obj.style){
        obj=obj.style;
        if (flg == "show")
          flg = "visible";
        else
          flg = "hidden";
      }
      obj.visibility = flg;
    }
}

function enlarge(prm){
  newprm = prm.replace("_s","_b");
  title  = prm.replace("photo/","ti_");
  title  = title.replace("_s.jpg",".gif");

//  winOption = "resizable=yes,scrollbars=yes";
  winOption = "width=680,height=680,resizable=yes,scrollbars=yes";
  win_a =  window.open("","",winOption);

  win_a.document.open();
  win_a.document.write(
      "<html>\n" +
      "<head>\n" +
      "  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" +
      "  <meta http-equiv=\"content-style-type\" content=\"text/css\">\n" +
      "  <link rel=\"stylesheet\" href=\"../invader.css\" type=\"text/css\">\n"+
      "  <title>写真</title>\n" +
      "</head>\n" +
      "<body>\n" + 
      "<center>\n" +
      "<img src=\"\" border=\"0\" alt=\"和名\">\n" +
      "<BR><BR>" +
      "<img src=\"\" border=\"0\" alt=\"写真\">\n" +
      "<BR><BR>\n" +
      '<img src="../image/btn_close.gif" onclick="self.close()" border=\"0\" alt="閉じる">\n' +
             "</center>\n" +
             "</body></html>\n"); 
  win_a.document.close();
  win_a.document.images[0].src = title;
  win_a.document.images[1].src = newprm;
}

////////////////////////
//// 以下, 2009年度追加 invader/DB/ 専用
// 大写真表示スクリプト
function mirak(prm,name){
    lphoto = ("../image/photo/"+prm+"_b.jpg");
//  newprm = prm.replace("_s","_b");
  title  = prm.replace("photo/","ti_");
  title  = title.replace("_s.jpg",".gif");

//  winOption = "resizable=yes,scrollbars=yes";
  winOption = "width=800,height=680,resizable=yes,scrollbars=yes";
  win_a =  window.open("","",winOption);

  win_a.document.open();
  win_a.document.write(
      "<html>" +
      "<head>"+
      "  <meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=UTF-8\">\n" +
      "  <meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n" +
      "  <link rel=\"stylesheet\" href=\"../invader.css\" type=\"text/css\">"+
      "  <title>"+ name +" Photo</title>"+
      "</head>" +
      "<body>" + 
      "<center>" +
      "<table class=\"ti\" border=\"2\" rules=\"none\" width=\"430\" cellpadding=\"0\"><tr>"+
      "  <td width=\"81\"><img src=\"../image/ti01.png\"></td>"+
      "  <td class=\"tisp\">"+ name +"</td>"+
      "  <td width=\"81\"><img src=\"../image/ti02.png\"></td>"+
      "</tr></table><br>"+
      "<img src=\"../image/photo/"+prm+"_b.jpg\" border=\"0\">" +
      "<br/><br/>" +
      "<img src='../image/btn_close.gif' border=0 width=120 height=20 alt='閉じる' onClick='self.close()'>" +
      "</center>" +
      "</body></html>"); 
  win_a.document.close();
  win_a.document.images[0].src = title;
  win_a.document.images[2].src = lphoto;
}

// 大写真表示スクリプト
function magnj(prm,name){
    lphoto = ("../image/photo/"+prm+"_b.jpg");
//  newprm = prm.replace("_s","_b");
  title  = prm.replace("photo/","ti_");
  title  = title.replace("_s.jpg",".gif");

//  winOption = "resizable=yes,scrollbars=yes";
  winOption = "width=800,height=680,resizable=yes,scrollbars=yes";
  win_a =  window.open("","",winOption);

  win_a.document.open();
  win_a.document.write(
      "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
      "<html>\n" +
      "<head>\n"+
      "  <meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=UTF-8\">\n" +
      "  <meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n" +
      "  <link rel=\"stylesheet\" href=\"../invader.css\" type=\"text/css\">\n"+
      "  <title>"+ name +" 写真</title>\n"+
      "</head>\n" +
      "<body>\n" + 
      "<center>\n" +
      "<table class=\"ti\" border=\"2\" rules=\"none\" width=\"430\" cellpadding=\"0\"><tr>\n"+
      "  <td width=\"81\"><img src=\"../image/ti01.png\" alt=\"IAS DB\"></td>\n"+
      "  <td class=\"tisp\">"+ name +"</td>\n"+
      "  <td width=\"81\"><img src=\"../image/ti02.png\" alt=\"IAS DB\"></td>\n"+
      "</tr></table><br/>\n"+
      "<img src=\"../image/photo/"+prm+"_b.jpg\" border=\"0\" alt=\"Photo\">\n" +
      "<br/><br/>\n" +
      "<img src=\"../image/btn_close.gif\" alt=\"閉じる\" onmouseover=\"this.src='../image/btn_close2.gif'\" onmouseout=\"this.src='../image/btn_close.gif'\" onclick=\"self.close()\" />\n" +
      "</center>\n" +
      "</body>\n</html>"); 
  win_a.document.close();
  win_a.document.images[0].src = title;
  win_a.document.images[2].src = lphoto;
}

// 大写真表示スクリプト
function magne(prm,name){
    lphoto = ("../image/photo/"+prm+"_b.jpg");
//  newprm = prm.replace("_s","_b");
  title  = prm.replace("photo/","ti_");
  title  = title.replace("_s.jpg",".gif");

//  winOption = "resizable=yes,scrollbars=yes";
  winOption = "width=800,height=680,resizable=yes,scrollbars=yes";
  win_a =  window.open("","",winOption);

  win_a.document.open();
  win_a.document.write(
      "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
      "<html>\n" +
      "<head>\n"+
      "  <meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=UTF-8\">\n" +
      "  <meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n" +
      "  <link rel=\"stylesheet\" href=\"../invader.css\" type=\"text/css\">\n"+
      "  <title>"+ name +" Photo</title>\n"+
      "</head>\n" +
      "<body>\n" +
      "<center>\n" +
      "<table class=\"ti\" border=\"2\" rules=\"none\" width=\"430\" cellpadding=\"0\"><tr>\n"+
      "  <td width=\"81\"><img src=\"../image/ti01.png\" alt=\"IAS DB\"></td>\n"+
      "  <td class=\"tisp\">"+ name +"</td>\n"+
      "  <td width=\"81\"><img src=\"../image/ti02.png\" alt=\"IAS DB\"></td>\n"+
      "</tr></table><br/>\n"+
      "<img src=\"../image/photo/"+prm+"_b.jpg\" border=\"0\" alt=\"Photo\">\n" +
      "<br/><br/>\n" +
      "<img src=\"../image/btn_close.gif\" alt=\"Close\" onmouseover=\"this.src='../image/btn_close2.gif'\" onmouseout=\"this.src='../image/btn_close.gif'\" onclick=\"self.close()\" />\n" +
      "</center>\n" +
      "</body>\n</html>"); 
  win_a.document.close();
  win_a.document.images[0].src = title;
  win_a.document.images[2].src = lphoto;
}

