// window close
	function wClose() {
		window.close();
	} 


// テロップ  
function telop(marqueecontents){

  var marqueewidth=330
  var marqueeheight=20
  var speed=3
//  var marqueecontents='<B>納期、見積もり、起こし方等、お気軽にお問い合わせください。</B>　'

  if (document.all)
    document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>')
  window.onload=regenerate2
}

function regenerate(){
  window.location.reload()
}
function regenerate2(){
  if (document.layers){
    setTimeout("window.onresize=regenerate",450)
    intializemarquee()
  }
}

function intializemarquee(){
  document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
  document.cmarquee01.document.cmarquee02.document.close()
  thelength=document.cmarquee01.document.cmarquee02.document.width
  scrollit()
}

function scrollit(){
  if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
    document.cmarquee01.document.cmarquee02.left-=speed
    setTimeout("scrollit()",100)
  }
  else{
    document.cmarquee01.document.cmarquee02.left=marqueewidth
    scrollit()
  }
}
  

        //
        // カレンダー（２）
        // Version 0.01a        Update 1997. 7.20.
        //
        // Copyright    : H.Yamashita
        // E-mail       : yamashita@mtj.biglobe.ne.jp
        // URL          : http://www2s.biglobe.ne.jp/~Hiro/
        // Notice       : 個人的な利用の範囲内で使用して下さい
        //
        //////////////////////////////////////////
        // ※ユーザー設定箇所は 2 箇所あります。//
        //////////////////////////////////////////
        function calendar_2 () {
                var     date, today, year, month, day, week, msg, holiday;

                holiday = false;
                msg     = "";

                //
                // 今日の日付取得
                //
                date    = new Date();
                year    = date.getYear();
                month   = date.getMonth();
                today   = date.getDate();

                //
                // browser check
                //
                var     browser = navigator.appName;
                if (browser.indexOf("Netscape") == -1) {
                        //
                        // ブラウザが Netscape Navigator 以外の処理
                        // （つまり Internet Explore の時を想定している）
                        //
                        year += 1900;
                }
                else {
                        //
                        // ブラウザが Netscape Navigator の処理
                        //
                        if (year < 2000) {
                                year += 1900;
                        }
                }
                //
                // 日数設定
                //
                var     m_tbl = new Array(12);
                m_tbl[0] = 31;          // Jan
                m_tbl[1] = 28;          // Feb
                m_tbl[2] = 31;          // Mar
                m_tbl[3] = 30;          // Apr
                m_tbl[4] = 31;          // May
                m_tbl[5] = 30;          // Jun
                m_tbl[6] = 31;          // Jul
                m_tbl[7] = 31;          // Aug
                m_tbl[8] = 30;          // Sep
                m_tbl[9] = 31;          // Oct
                m_tbl[10] = 30;         // Nov
                m_tbl[11] = 31;         // Dec

                var     m_name_tbl = new Array(12);
                //////////////////////////////////////////////////////////
                // ***** ここからユーザーの設定箇所 (1) *****
                //
                // １．月名設定
                //     １月から１２月までの名称を設定できます。
                //      m_name_tbl[?] の ? は月から１引いた値が入ります。
                //      例えば m_name_tbl[0] で指定する名前は１月に当たります。
                //
                m_name_tbl[0] = "January";
                m_name_tbl[1] = "February";
                m_name_tbl[2] = "March";
                m_name_tbl[3] = "April";
                m_name_tbl[4] = "May";
                m_name_tbl[5] = "June";
                m_name_tbl[6] = "July";
                m_name_tbl[7] = "August";
                m_name_tbl[8] = "September";
                m_name_tbl[9] = "October";
                m_name_tbl[10] = "November";
                m_name_tbl[11] = "December";
                //
                // ***** ここからユーザーの設定箇所 (1) *****
                //////////////////////////////////////////////////////////

                //
                // 記念日データ格納用配列作成
                //
                var     msg_d = new Array(12);
                for (i = 0; i < 12; i++) {
                        var     base = new Array(31);
                        for (j = 0; j < 31; j++) {
                                base[j] = "";
                        }
                        msg_d[i] = base;
                }
                //////////////////////////////////////////////////////////
                // ***** ここからユーザーの設定箇所 (2) *****
                //
                // １．記念日データ作成
                //     一般的なものは設定済みだが、付け加えたいものがあれば
                //     次の規則によって追加・変更可能。
                //     msg_d の [] には、１つ目が月から１を引いた値、２つ目が
                //     日から１を引いた値が入っている。つまり、msg_d[0][0]
                //     は１月１日に表示させる内容となる。この方式に従って
                //     書き加えることで、１年のどの月日にも内容を設定できる。
                //     msg_d[0][0] = "..." 等を作らなければ、何も表示されない。
                //     また祝日は _ から書き始める。
                //
                // １月
                msg_d[0][0]     = "_元日";
                msg_d[0][1]     = "初夢";
                msg_d[0][6]     = "七草";
                msg_d[0][14]    = "_成人式";
                // ２月
                msg_d[1][11]    = "_建国記念の日";
                msg_d[1][13]    = "バレンタイン・デー";
                // ３月
                msg_d[2][2]     = "桃の節句";
                msg_d[2][9]     = "東京大空襲記念日";
                msg_d[2][13]    = "ホワイト・デー";
                msg_d[2][19]    = "_春分の日";  // 一定ではないので注意
                // ４月
                msg_d[3][0]     = "エイプリル・フール";
                msg_d[3][28]    = "_みどりの日";
                // ５月
                msg_d[4][1]     = "メーデー";
                msg_d[4][2]     = "_憲法記念日";
                msg_d[4][3]     = "_国民の休日";
                msg_d[4][4]     = "_こどもの日";
                msg_d[4][30]    = "世界禁煙デー";
                // ６月
                msg_d[5][0]     = "衣替え";
                msg_d[5][22]    = "沖縄慰霊の日";
                // ７月
                msg_d[6][0]     = "海開き・山開き";
                msg_d[6][19]    = "_海の日";
                // ８月
                msg_d[7][5]     = "広島平和記念日";
                msg_d[7][8]     = "長崎原爆の日";
                msg_d[7][14]    = "終戦記念日";
                // ９月
                msg_d[8][0]     = "防災の日";
                msg_d[8][14]    = "_敬老の日";
                msg_d[8][22]    = "_秋分の日";  // 一定ではないので注意
                // １０月
                msg_d[9][0]     = "衣替え";
                msg_d[9][9]     = "_体育の日";
                msg_d[9][30]    = "ハロウィン";
                // １１月
                msg_d[10][2]    = "_文化の日";
                msg_d[10][22]   = "_勤労感謝の日";
                // １２月
                msg_d[11][7]    = "太平洋戦争開戦記念日";

                msg_d[11][22]   = "_天皇誕生日";
                msg_d[11][23]   = "クリスマス・イヴ";
                msg_d[11][24]   = "クリスマス";
                msg_d[11][30]   = "大晦日";
                //
                // ***** ここまでユーザーの設定箇所 (2) *****
                //////////////////////////////////////////////////////////

                //
                // うるう年チェック
                //
                if (month == 1) {
                        if (year % 4 == 0) {
                                if (year % 100 == 0) {
                                        if (((year / 100) % 4) == 0) {
                                                m_tbl[1] = 29;
                                        }
                                }
                                else {
                                        m_tbl[1] = 29;
                                }
                        }
                }

                //
                // カレンダー描画処理
                //
                document.write("<TABLE BORDER BGCOLOR=#F4A460>\n");
                document.write("<TR><TH COLSPAN=7 ALIGN=center BGCOLOR=#FFDEAD><FONT COLOR=#8B0000>" + m_name_tbl[month] + "</FONT></TH></TR>");

                for (i = 1; i <= m_tbl[month]; i++) {
                        //
                        // 描画したい日付に設定
                        //
                        date.setDate(i);

                        if ((day = date.getDate()) < 10) {
                                day = " " + day;
                        }

                        //
                        // 設定した日付の曜日取得
                        //
                        week = date.getDay();

                        //
                        // 日付の書き出し位置設定
                        //
                        if ((i == 1) && (week != 0)) {
                                document.write("<TR>");
                                j = 0;
                                while (j < week) {
                                        j++;
                                }
                                if (j) {
                                        document.write("<TD COLSPAN=" + j + "><FONT COLOR=#F4A460>.</FONT></TD>");
                                }
                        }

                        //
                        // 表示する記念日があれば表示用データ作成
                        //
                        holiday = false;
                        if ((msg_d[month][(i-1)]) != "") {
                                //
                                // 祝日のチェック
                                //
                                if ((msg_d[month][(i-1)].substring(0,1))=="_") {
                                        holiday = true;
                                }
                        }

                        if (week == 0) {
                                // 日曜の処理
                                document.write("<TR>");
                        }

                        if ((week == 0) || (holiday)) {
                                // 日曜・祝日の処理
                                document.write("<TD BGCOLOR=#FFC0CB ALIGN=right><FONT COLOR=#FF0000>");
                        }
                        else if (week == 6) {
                                // 土曜の処理
                                document.write("<TD BGCOLOR=#87CEFA ALIGN=right><FONT COLOR=#4B0082>");
                        }
                        else {
                                // 平日の処理
                                document.write("<TD BGCOLOR=#FFFFFF ALIGN=right><FONT COLOR=#000000>");
                        }

                        //
                        // 今日の処理
                        //
                        if (day == today) {
                                document.write("<B>" + day + "</B>");
                                //
                                // 記念日のチェック
                                //
                                if ((msg_d[month][day-1]) != "") {
                                        //
                                        // 祝日のチェック
                                        //
                                        if ((msg_d[month][day-1].substring(0,1))=="_") {
                                                //
                                                // 祝日の記念日取得
                                                //
                                                msg = msg_d[month][day-1];
                                                msg =  msg.substring(1,msg.length);
                                                msg = "<FONT COLOR=#FF0000>" + msg + "</FONT>";
                                        }
                                        else {
                                                //
                                                // 平日の記念日取得
                                                //
                                                msg = msg_d[month][day-1];
                                        }
                                }
                        }
                        else {
                                //
                                // 今日以外の日付の描画処理
                                //
                                document.write(day);
                        }

                        document.write("</TD>");

                        //
                        // 一週間分出力後の処理
                        //
                        if (week == 6) {
                                document.write("</TR>");
                        }
                }

                //
                // １ヶ月の最後の日が土曜日以外の場合の処理
                //
                if (week < 6) {
                        j = 0;
                        while ((j + week) < 6) {
                                j++;
                        }
                        document.write("<TD COLSPAN=" + j + "><FONT COLOR=#F4A460>.</FONT></TD>");
                }

                //
                // 記念日があれば記念日描画
                //
                if (msg != "") {
                        document.write("<TR><TD COLSPAN=7 ALIGN=center BGCOLOR=#FFDEAD>");
                        document.write("<FONT SIZE=2 COLOR=#8B0000>");
                        document.write("今日の記念日<BR>" + msg + "<BR></FONT>");
                        document.write("</TD></TR>");
                }
                document.write("</TABLE>");
        }
