//日付取得
var date=new Date();
var year = date.getFullYear();
var month = date.getMonth()+1;
var day = date.getDate();
if(day <= 9) { day = "0"+day }
var monthday = month +"."+ day;
var navi = monthday
//	navi = 12 ;

//パラメータ取得
if (window.location.search){
	navi = window.location.search.substring(1);
}

//	年間イメージのシーズン区分け
/*
var season;
if (( month >= 3 ) && ( month <= 4 )) { season = "spring01"; }
else if (( month >= 5 ) && ( monthday <= 6.20 )) { season = "spring02"; }
else if (( monthday >= 6.21 ) && ( month <= 8 )) { season = "summer"; }
else if ( month == 9 ) { season = "autumn01"; }
else if (( month >= 10 ) && ( monthday <= 11.17 )) { season = "autumn02"; }
else if (( monthday >= 11.18 ) || ( month <= 2 )) {  
	if ( monthday <= 12.25) { season = "xmas"; }
	if ( ( monthday >= 1.01 ) && ( monthday <= 1.10 ) ) { season = "nyear"; }
	else { season = "winter"; }
}
*/


//	おはようございます
var hour=date.getHours();
var fontBgcolor;

function greeting(fontcol){

if(fontcol != 3){
	if(fontcol == 0){ fontBgcolor = "white"; }
	else if(fontcol == 1){ fontBgcolor = "black"; }

		if ((hour > 17) || (hour < 4)) {
		document.write('<img src="season/' + fontBgcolor + '_night.png" width="361" height="48" alt="こんばんは" />');
			} else if (hour < 10) {
		document.write('<img src="season/' + fontBgcolor + '_morning.png" width="361" height="48" alt="おはようございます" />');
			} else {
		document.write('<img src="season/' + fontBgcolor + '_day.png" width="361" height="48" alt="こんにちは" />');
			}
		} else {
	document.write('<img src="season/akeome.png" width="361" height="48" alt="あけましておめでとうございます。" />');
	}
}

//更新日
var d=new Date(document.lastModified);
var dyear=d.getFullYear();
var dmonth=d.getMonth() + 1;
var dday=d.getDate();
function renew(){
document.write("更新日：<span class='ss'>"+dyear+"."+dmonth+"."+dday+"</span>");
}

//	リンク・ウインドウ制御
	function count() {
		nw=open("counter.html","photo","toolbar=no,location=no,directories=no,menubar=no,width=180,height=80,scrollbars=no,resizable=no");
	}
//	リリーフ誕生relief
	function relief() {
		nw=open("news/relief/relief.html","relief",
		"width=660,height=440,menubar=yes,scrollbars=yes,resizable=yes");
	}
 //	Window OPEN 
	function MM_openBrWindow(theURL,winName,features) {
		window.open(theURL,winName,features);
	}

//ボタン差し替え
if(navigator.appVersion.charAt(0) >= "3"){
	btn = new Array();

	btn[0] = new Image; btn[0].src = "topimg/btn_logon.gif";
	btn[1] = new Image; btn[1].src = "topimg/btn_logon_f2.gif";
	btn[2] = new Image; btn[2].src = "topimg/btn_service.gif";
	btn[3] = new Image; btn[3].src = "topimg/btn_service_f2.gif";
	btn[4] = new Image; btn[4].src = "topimg/topmenu03.gif";
	btn[5] = new Image; btn[5].src = "topimg/topmenu03_f2.gif";
	btn[6] = new Image; btn[6].src = "topimg/topmenu04.gif";
	btn[7] = new Image; btn[7].src = "topimg/topmenu04_f2.gif";
	btn[8] = new Image; btn[8].src = "topimg/topmenu05.gif";
	btn[9] = new Image; btn[9].src = "topimg/topmenu05_f2.gif";
	btn[10] = new Image; btn[10].src = "topimg/topmenu06.gif";
	btn[11] = new Image; btn[11].src = "topimg/topmenu06_f2.gif";
	btn[12] = new Image; btn[12].src = "topimg/btn_cs07.gif";
	btn[13] = new Image; btn[13].src = "topimg/btn_cs07_f2.gif";
	btn[14] = new Image; btn[14].src = "topimg/btn_more01.gif";
	btn[15] = new Image; btn[15].src = "topimg/btn_more02.gif";
}
function btn_img(imgname,imgstate){  
		document.images[imgname].src=btn[imgstate].src;
}

