//Copyright (C) Kazuhide Senda. All Rights Reserved.
//JavaScript program
//js_name: noritcl.js
//The copyright of this program maintains by Kazuhide Senda and does not abandon the right.
//Browser which can be inspected and the version.
//Netscape Communicator 4 later and Internet Explorer 4 later.
//However, it is not in the one to necessarily guarantee operation by the above-mentioned browser and the version.

//====== NO! ERROR SCRIPT MESSAGE (Netscape Communicator 3 later and Internet Explorer 4 later.) ======
//====== web_error off / local_error off ======
//if (document.URL!=null) onerror = new Function("return true");
//====== web_error off / local_error on ======
var L=location+"";
if ((L.indexOf("file://")<0) && (document.URL!=null))onerror = new Function("return true");

//右クリック・禁止 //html: <BODY oncontextmenu="return false";>[Internet Explorer 5 later only.]
/*
function myEventIE() {        //IEのクリック時
         if (event.button == 2) {    //右クリックかを判定
             alert("\nPROHIBITION OF RIGHT-CLICKING\n\nPOWERED BY KAZUHIDE SENDA.\n\n");
         }
}
function myEventNN(myEvent) {  //NCのクリック時
         if (myEvent.which == 3) {    //右クリックかを判定
             alert("\nPROHIBITION OF RIGHT-CLICKING\n\nPOWERED BY KAZUHIDE SENDA.\n\n");
             return false;
             }
}

if (document.all) {    //IEでDHTML対応かを判定
    document.onmousedown = myEventIE ;
}
if (document.layers) { //NCでDHTML対応かを判定
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = myEventNN ;
}
*/



//====== AUTO NEW MARK POP UP PROGRAM ====

//====== START Manual for html tags ======
// <!--AUTO NEW MARK POP UP-->
// <SCRIPT>whatMark(2003,10,31,0);</SCRIPT>
// <SCRIPT>whatMark(2003,10,31,1);</SCRIPT>
//====== END   Manual for html tags ======

//TYPE 1
/*
function whatMark(year,month,day) {
         update = new Date(year,month-1,day);
         newday = new Date();
         spanday = (newday - update) / (60*60*24*1000);
         if (spanday <= 14) { //day setting
             document.write("<SPAN TITLE='NEW !'><IMG SRC='new.gif'></SPAN>");}
         }
*/



//TYPE 2
var need = 14;	//NEW，UPを表示する日数
var color = "#FF3366";  //色
var color2 = "#0066FF"; //色2

var _dom = (document.all?3:(document.getElementById?1:(document.layers?2:0)));
function whatMark(y,m,d,up) {
var rd = new Date(y,m-1,d+need);
var td = new Date();
var wn;
if (rd.getTime() > td.getTime()) {
if (_dom == 1 || _dom == 3) {
    //if (up) wn = '<FONT color="'+color+'" title="'+y+', '+m+'/'+d+'" style="cursor:help"><B>UP</B><'+'/FONT>';
    //if (up) wn = '<FONT color="'+color+'" title="'+y+', '+m+'/'+d+'" style="cursor:help"><IMG SRC="image/cool.gif"><'+'/FONT>';
    if (up) wn = '<FONT color="'+color+'"><SPAN TITLE="NICE !"><IMG SRC="cool.gif"></SPAN><'+'/FONT>'; //image only
    //if (up) wn = '<FONT color="'+color+'" title="'+m+'/'+d+'" style="cursor:help"><IMG SRC="image/cool.gif"><'+'/FONT>';

    //else wn = '<FONT color="'+color+'" title="'+y+', '+m+'/'+d+'" style="cursor:help"><B>NEW</B><'+'/FONT>';
    else wn = '<FONT color="'+color+'" title="'+y+', '+m+'/'+d+'" style="cursor:help"><IMG SRC="image/new.gif"><'+'/FONT>';}
    //else wn = '<FONT color="'+color+'" title="'+m+'/'+d+'" style="cursor:help"><IMG SRC="image/new.gif"><'+'/FONT>';}
    else {
          if (up) wn = '<FONT color="'+color+'"><B>UP</B><'+'/FONT>';
          else wn = '<FONT color="'+color+'"><B>NEW</B><'+'/FONT>';}
               document.write(wn);}
}

