var bodyColor = "#ffffff";

function changeBack(color) {
    var rgbValue = '#' + color;
    document.bgColor = rgbValue;
    document.forms[0].copy.value = "\t\n 現在の色： " + rgbValue;
}

function resetBodyColor() {
    document.bgColor = "#ffffff";
}

function quick_go(w,formn){
    if (formn == "goFORM"){ temp = w[document.goFORM.lists.selectedIndex].value; }
    else if (formn == "Y1999"){ temp = w[document.Y1999.lists.selectedIndex].value; }
    else if (formn == "Y2000"){ temp = w[document.Y2000.lists.selectedIndex].value; }
    else if (formn == "Y2001"){ temp = w[document.Y2001.lists.selectedIndex].value; }
    else if (formn == "Y2002"){ temp = w[document.Y2002.lists.selectedIndex].value; }
    else if (formn == "Y2003"){ temp = w[document.Y2003.lists.selectedIndex].value; }
    else if (formn == "Y2004"){ temp = w[document.Y2004.lists.selectedIndex].value; }
    else if (formn == "Y2005"){ temp = w[document.Y2005.lists.selectedIndex].value; }
    else if (formn == "Y2006"){ temp = w[document.Y2006.lists.selectedIndex].value; }
    else if (formn == "Y2007"){ temp = w[document.Y2007.lists.selectedIndex].value; }
    else if (formn == "Y2008"){ temp = w[document.Y2008.lists.selectedIndex].value; }
    else if (formn == "Y2009"){ temp = w[document.Y2009.lists.selectedIndex].value; }
    else { return FALSE; }
    if (temp == "") { return ; }
    var ref = './' + temp;
    if (formn == "goFORM"){
        ref = './' + temp;
        document.goFORM.lists.selectedIndex = 0;
    }
    else if (formn == "Y1999"){ document.Y1999.lists.selectedIndex = 0; }
    else if (formn == "Y2000"){ document.Y2000.lists.selectedIndex = 0; }
    else if (formn == "Y2001"){ document.Y2001.lists.selectedIndex = 0; }
    else if (formn == "Y2002"){ document.Y2002.lists.selectedIndex = 0; }
    else if (formn == "Y2003"){ document.Y2003.lists.selectedIndex = 0; }
    else if (formn == "Y2004"){ document.Y2004.lists.selectedIndex = 0; }
    else if (formn == "Y2005"){ document.Y2005.lists.selectedIndex = 0; }
    else if (formn == "Y2006"){ document.Y2006.lists.selectedIndex = 0; }
    else if (formn == "Y2007"){ document.Y2007.lists.selectedIndex = 0; }
    else if (formn == "Y2008"){ document.Y2008.lists.selectedIndex = 0; }
    else if (formn == "Y2009"){ document.Y2009.lists.selectedIndex = 0; }
    else { return FALSE; }
    Linker = ref;
    location.href = Linker;
}

function quick_go2(w){
    temp = w[document.goFORM.lists.selectedIndex].value;
    if (temp == "") { return; }
    var ref = './' + temp;
    document.goFORM.lists.selectedIndex = 0;
    Linker = ref;
    location.href = Linker;
}

function getsToday() {
    var dt=new Date();
    var Ye=dt.getFullYear()+"年";
    var Mo=dt.getMonth()+1+"月";
    var Da=dt.getDate()+"日";
    var Dy=dt.getDay();
    var Dw=new Array(7);
    Dw[0]="日";
    Dw[1]="月";
    Dw[2]="火";
    Dw[3]="水";
    Dw[4]="木";
    Dw[5]="金";
    Dw[6]="土";
    var lastmod = getsLastMod();
    var timemes = getGreeting();
    var itstoday = lastmod +'<br><br>今日は'+Ye+Mo+Da+'（'+Dw[Dy]+'）'+'です。<br>'+timemes;
    return(itstoday);
}

function getsLastMod() {
    time = new Date(document.lastModified);
    var Yel=time.getFullYear()+"年";
    var Mol=time.getMonth()+1+"月";
    var Dal=time.getDate()+"日";
    var Hol=time.getHours()+"時";
    var Mil=time.getMinutes()+"分";
    var Sel=time.getSeconds()+"秒";
    var timel = Yel+Mol+Dal+Hol+Mil+Sel;
    var message = '最終更新日：'+ timel;
    return(message);
}

function getGreeting() {
    var message = '';
    date=new Date();
    hour=date.getHours();
    word = new Array(24);
    word[0]="日が変わりました。心機一転頑張りましょう！え？違う？（笑）";
    word[1]="午前 1時過ぎです。夜はまだこれから！えっ？もう寝ろって？（苦笑）";
    word[2]="午前 2時過ぎです。丑三時です。さあ丑の刻参りに･･･（ヤメレ）";
    word[3]="午前 3時過ぎです。この時間に来てるってことは･･･夜行性の方ですね？(^^;";
    word[4]="午前 4時過ぎです。えっと･･･寝ましょうよ、ねぇ？(^^;";
    word[5]="午前 5時過ぎです。えっと･･･寝ましょうよ、ねぇ？(^^;";
    word[6]="午前 6時過ぎです。えっと･･･寝ましょうよ、ねぇ？(^^;";
    word[7]="午前 7時過ぎです。おはようございます。今日も頑張りましょう。";
    word[8]="午前 8時過ぎです。朝ご飯を抜くと体に悪いし太りやすくなるんですよ（笑）";
    word[9]="午前 9時過ぎです。さて、気合い入れて頑張りますか！";
    word[10]="午前10時過ぎです。このくらいの時間まで毎日寝ていたいんですけどね(^^;";
    word[11]="午前11時過ぎです。お昼まであと少し♪え？食い意地はってますか？（汗）";
    word[12]="午後 0時過ぎです。今日のお昼は何食べましょうかね♪";
    word[13]="午後 1時過ぎです。今日のお昼は何食べましょうかね♪";
    word[14]="午後 2時過ぎです。眠い時間ですねぇ(^^;";
    word[15]="午後 3時過ぎです。ZZZzzz･･･はっ！寝てませんよ。えぇ、寝てませんとも（汗）";
    word[16]="午後 4時過ぎです。･･･････････････くー･･･すー･･･すぴー･･･Ｏo.(__ )";
    word[17]="午後 5時過ぎです。お疲れさまでした♪";
    word[18]="午後 6時過ぎです。お疲れさまでした♪";
    word[19]="午後 7時過ぎです。今夜は何食べようかなぁ♪";
    word[20]="午後 8時過ぎです。今夜は何食べようかなぁ♪";
    word[21]="午後 9時過ぎです。良い子は寝る時間です。え？良い子じゃない？（笑）";
    word[22]="午後10時過ぎです。そろそろ寝る準備したいところですが･･･え？甘い？(^^;";
    word[23]="午後11時過ぎです。もう日が変わりますね。今日もお疲れ様でした。";

    message = '<center>'+ word[hour] +'</center>';
    return(message);
}

