﻿function sysTime(){
now = new Date();
year = now.getFullYear();
month = now.getMonth()+1;
day = now.getDate();
week = now.getDay();
hour = now.getHours();
min = ((now.getMinutes() < 10) ? "0" : "") + now.getMinutes();
sec = ((now.getSeconds() < 10) ? "0" : "") + now.getSeconds();
wk = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
}

function wanichan_status(){
if (hour<= 4) wanichan="深夜のアクセスありがとう！<BR>ワニchanはただいまお休み中です…<BR><IMG SRC='../common/images/wani_status/sleep.gif' alt='お休み中…'>";
else if (hour<= 6) wanichan="おはよう！　もう起きたの？<BR>早起きだね…<BR>ワニchanはまだお休み中です…<BR><IMG SRC='../common/images/wani_status/sleep.gif' alt='お休み中…'>";
else if (hour<= 9) wanichan="おはよう！　朝ご飯食べた？<br>今日も一日がんばろうね(^^)<br><img src='../common/images/wani_status/wani.gif' alr='やっほー'>";
else if (hour<12) wanichan="こんにちは。元気かな？<br>…ってまだ今は「おはよう」なのかなぁ？<br><img src='../common/images/wani_status/wani.gif' alt='やっほー'>";
else if (hour == 12) wanichan="おなか空いたね。おひるごはん食べた？<br>ワニchanはごはんをたべています<br><img src='../common/images/wani_status/rice.gif' alt='ワニchan'>";
else if (hour<= 14) wanichan="こんにちは。 元気にしてる？<BR>おひるごはん食べた後って眠いよね？<br><IMG SRC='../common/images/wani_status/wani.gif' alt='げんきかな？'>";
else if (hour<= 15) wanichan="おやつの時間だぁ♪<br>３時になったからケーキでも食べようかな？<BR><IMG SRC='../common/images/wani_status/cake.gif' alt='ケーキを食べています'>";
else if (hour<= 21) wanichan="来てくれてありがと(^^)<br>ゆっくりしていってね<BR><IMG SRC='../common/images/wani_status/wanichan.gif' alt='ワニchan'>";
else wanichan="こんばんは。<br>ネットサーフィンしてる？<BR><IMG SRC='../common/images/wani_status/wanichan1.gif' alt='ネットサーフィンしてる？'>";
document.write (wanichan);
}
function last_update(){
now = new Date(document.lastModified);
if(navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE",0)+5)<= 4) { 
now.setTime(now.getTime() + 9*60*60*1000);} 
year = now.getFullYear();
month = now.getMonth()+1;
month =((month < 10) ? "0" : "") + month;
day = ((now.getDate() < 10) ? "0" : "") + now.getDate();
week = now.getDay();
hour = now.getHours();
min = ((now.getMinutes() < 10) ? "0" : "") + now.getMinutes();
sec = ((now.getSeconds() < 10) ? "0" : "") + now.getSeconds();
wk = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
document.write("<div style='text-align:right'>最終更新日: "+year+"/"+month+"/"+day+"("+wk[week]+") "+hour+":"+min+":"+sec+"</div>");
}
function log_web(){
document.write("<img src='http://hpcgi3.nifty.com/wanichan/report/report.cgi?"); 
document.write(document.referrer+"' width=1 height=1>"); 
}
function log_pc(){
document.write("<img src='http://hpcgi3.nifty.com/wanichan/report/report_pc.cgi?"); 
document.write(document.referrer+"' width=1 height=1>"); 
}
function log_beginner(){
document.write("<img src='http://hpcgi3.nifty.com/wanichan/report/report_beginner.cgi?"); 
document.write(document.referrer+"' width=1 height=1>"); 
}
function log_other(){
document.write("<img src='http://hpcgi3.nifty.com/wanichan/report/report_other.cgi?"); 
document.write(document.referrer+"' width=1 height=1>"); 
}