<!--
//     Javann
//
//     Copyright (C) 2002 by Naoya Ando All Rights Reserved.
//
//     URL: http://homepage2.nifty.com/ann
//     mailto: naoya.ando@nifty.com
//
//         Ver 0.1 2002/5/10 全面作り直し
//-->

function isBrowser() {
   var strVersion = "";
   strVersion = navigator.appVersion;

//debug
//alert(strVersion.substring(0,1));

   if(navigator.appName == "Microsoft Internet Explorer") {
      return 1;  // IE

   } else if((navigator.appName == "Netscape") && (strVersion.substring(0,1) == 5)) {
      return 2;  // NN 6.x

   } else if((navigator.appName == "Netscape") && (strVersion.substring(0,1) == 4)) {
      return 3;  // NN 4.x

   } else {
      return 0;
   }
}


function imgLoad(id, url) {

    switch(isBrowser()) {

// IE 4.x以降
        case 1:
            document.all[id].src = url;
            break;

// DOM（IE 5.x/NN 6.x）用
        case 2:
            document.getElementById(id).src = url;
            break;

// NN 4.x用
        case 3:
            document.layers[id].src = url;
            break;
    }
}

function lastModified() {

    //最終更新日時を自動挿入する処理
    var datLastMod = document.lastModified;

    document.write("最終更新日：");
    document.write(datLastMod);
}

function counter() {

    document.write('<img src="http://hpcounter2.nifty.com/cgi-bin/counter.cgi?u=PXD03624&p=7&c=6" title="カウンター">');

}


function acc() {

    document.write("<img src='http://hpcgi2.nifty.com/ann/acc/acclog.cgi?");
    document.write("referrer="+document.referrer+"&");
    document.write("width="+screen.width+"&");
    document.write("height="+screen.height+"&");
    document.write("color="+screen.colorDepth+"'>");

}

function init() {
var on_time = 0;

function cant_look_NN(event) {
  if(event.which==3) alert('!');
  return;
}
function cant_look_IE() {
  if (event.button==2) alert('!');
  return;
}
function cant_look_NN_M(event) {
  on_Date = new Date();
  on_time = on_Date.getTime(); 
  return;
}
function cant_look_NN_M2() {
  var off_time;
  off_Date = new Date();
  off_time = off_Date.getTime(); 
  if((off_time - on_time)>300){
     alert('!');
  }
  return;
}
function cant_look_IE_M() {
  on_Date = new Date();
  on_time = on_Date.getTime(); 
  return;
}
function cant_look_IE_M2() {
  var off_time;
  off_Date = new Date();
  off_time = off_Date.getTime(); 
  if((off_time - on_time)>300){
    alert('!');
  }
  return;
}
if (navigator.appVersion.indexOf("Mac",0) != -1){
  if (navigator.appName == "Netscape")
  {
    window.captureEvents(Event.CLICK);
    document.onmousedown = cant_look_NN_M;
    document.onmouseup = cant_look_NN_M2;
  }else{
    document.onmousedown = cant_look_IE_M;
    document.onmouseup = cant_look_IE_M2;
  }
}else{
  if (navigator.appName == "Netscape")
  {
    window.captureEvents(Event.CLICK);
    document.onmousedown = cant_look_NN;
  }else{
    document.onmousedown = cant_look_IE;
  }
}
}

init();
//acc();
