var weeks = new Array('日','月','火','水','木','金','土');

var now = new Date();

var month = now.getMonth() + 1; // 月
var day = now.getDate(); // 日
var week = weeks[ now.getDay() ]; // 曜日


// 数値が1桁の場合、頭に0を付けて2桁で表示する指定
if(month < 10) { month = "0" + month; }
if(day < 10) { day = "0" + day; }

// 表示開始
document.write('本日：<strong>' + month + '月' + day + '日（' + week + '）</strong>');
// 表示終了


//// 時間と曜日によって変化するメッセージ

var h,wday,day;
var now;

function time1(){
	now = new Date();
	day = now.getDate();	//日付を得る
	h = now.getHours(); //時間を得る
	wday = now.getDay();	//曜日を得る
}


function MsgList(a,b,c,d,e){

	this.a = a;
	this.b = b;
	this.c = c;
	this.d = d;
	this.e = e;
}

var msg1 = new MsgList("<strong>14:00までのご注文は本日</strong>",
	"<strong>14:00までのご注文は本日</strong>",
	"<strong>今からのご注文は明日</strong>",
	"<strong>今からのご注文は明日</strong>",
	"<strong>14:00までのご注文は本日</strong>");

var msg2 = new MsgList("<strong>14:00までのご注文は本日</strong>",
	"<strong>14:00までのご注文は本日</strong>",
	"<strong>今からのご注文は明日</strong>",
	"<strong>今からのご注文は明日</strong>",
	"<strong>14:00までのご注文は本日</strong>");

function DispMsg(list){
	time1();	//現在の時間と曜日を取ってきます。
	var msg;
	if(6 == wday || 0 == wday){		//休日の場合
		if(4 <= h && h < 10){
			msg = msg2.a;
		}else if(10 <= h && h < 14){
			msg = msg2.b;
		}else if(14 <= h && h < 19){
			msg = msg2.c;
		}else if(19 <= h && h < 24){
			msg = msg2.d;
		}else if(0 <= h && h < 4){
			msg = msg2.e;
		}
	}else{	//平日の場合
		if(4 <= h && h < 10){
			msg = msg1.a;
		}else if(10 <= h && h < 14){
			msg = msg1.b;
		}else if(14 <= h && h < 19){
			msg = msg1.c;
		}else if(19 <= h && h < 24){
			msg = msg1.d;
		}else if(0 <= h && h < 4){
			msg = msg1.e;
		}
	}
	document.write(msg);
}



	DispMsg();




var weeks = new Array('日','月','火','水','木','金','土');
var weeks2 = new Array('月','火','水','木','金','土','日');

var now = new Date();

var year = now.getYear(); // 年
var month = now.getMonth() + 1; // 月
var day = now.getDate(); // 日
var week = weeks[ now.getDay()]; // 曜日
var week2 = weeks2[ now.getDay()]; // 曜日
var hour = now.getHours() ; // 時
var min = now.getMinutes(); // 分
var sec = now.getSeconds(); // 秒

if(year < 2000) { year += 1900; }
if(hour >= 14) { day += 1; }

// 数値が1桁の場合、頭に0を付けて2桁で表示する指定
if(month < 10) { month = "0" + month; }
if(day < 10) { day = "0" + day; }
if(hour < 10) { hour = "0" + hour; }
if(min < 10) { min = "0" + min; }
if(sec < 10) { sec = "0" + sec; }

// 表示開始
if(hour >= 14)
document.write('<FONT COLOR="#FFFF00"><strong>' + month + '月' + day + '日（' + week2 + '）</strong></FONT> ');
else
document.write('<FONT COLOR="#FFFF00"><strong>' + month + '月' + day + '日（' + week + '）</strong></FONT> ');
// 表示終了
