/*2007年営業カレンダー
/* $Id: jscript_calendar.js,v 2.0 2006/12/06 14:19 therese Exp $ */

var monthDays=new Array(31,28,31,30,31,30,31,31,30,31,30,31);today_tmp=new Date();today=new Date();var year=today_tmp.getFullYear();if(((year%4==0)&&(year%100!=0))||(year%400==0)){monthDays[1]=29}var nowDays=monthDays[today_tmp.getMonth()];var thisDay=today_tmp.getDate();var nowMonth=today_tmp.getMonth()+1;function checkholidayName(){var holiday=new Array();
//祝日の設定　開始
//holidayとholidayNameは必ず対応させる事
holiday[0]="1/1"
holiday[1]="1/11"
holiday[2]="2/11"
holiday[3]="3/21"
holiday[4]="4/29"
holiday[5]="5/3"
holiday[6]="5/4"
holiday[7]="5/5"
holiday[8]="7/19"
holiday[9]="9/20"
holiday[10]="9/23"
holiday[11]="10/11"
holiday[12]="11/3"
holiday[13]="11/23"
holiday[14]="12/23"
holiday[15]="3/22"
//holiday[16]=""
var holidayName=new Array();
holidayName[0]="元旦"
holidayName[1]="成人の日"
holidayName[2]="建国記念の日"
holidayName[3]="春分の日"
holidayName[4]="昭和の日"
holidayName[5]="憲法記念日"
holidayName[6]="みどりの日"
holidayName[7]="こどもの日"
holidayName[8]="海の日"
holidayName[9]="敬老の日"
holidayName[10]="秋分の日"
holidayName[11]="体育の日"
holidayName[12]="文化の日"
holidayName[13]="勤労感謝の日"
holidayName[14]="天皇誕生日"
holidayName[15]="休日"
//holidayName[16]="休日"
//祝日の設定　終了
var flag=false;var check=today_tmp.getMonth()+1+"/"+today_tmp.getDate();for(var i=0;i<holiday.length;i++){if(check==holiday[i]){flag=holidayName[i]}}return flag}
function checktemporarycloseddayName(){
var temporaryclosedday=new Array();
//臨時休業日の設定　開始
//temporarycloseddayとtemporarycloseddayName は必ず対応させる事

// DP_tokyoS
temporaryclosedday[0]="4/29"
temporaryclosedday[1]="4/30"
temporaryclosedday[2]="5/1"
temporaryclosedday[3]="5/2"
temporaryclosedday[4]="5/6"
temporaryclosedday[5]="5/7"
temporaryclosedday[6]="5/8"
temporaryclosedday[7]="5/9"
temporaryclosedday[8]="5/10"
// DP_osakaS
temporaryclosedday[9]="6/17"
temporaryclosedday[10]="6/18"
temporaryclosedday[11]="6/19"
temporaryclosedday[12]="6/20"
temporaryclosedday[13]="6/21"
temporaryclosedday[14]="6/22"
// DP_tokyoA
temporaryclosedday[15]="9/28"
temporaryclosedday[16]="9/29"
temporaryclosedday[17]="9/30"
temporaryclosedday[18]="10/01"
temporaryclosedday[19]="10/02"
temporaryclosedday[20]="10/03"
temporaryclosedday[21]="10/04"
temporaryclosedday[22]="10/05"
temporaryclosedday[23]="10/06"
// DP_osakaA
temporaryclosedday[24]="11/19"
temporaryclosedday[25]="11/20"
temporaryclosedday[26]="11/21"
temporaryclosedday[27]="11/22"
temporaryclosedday[28]="11/23"
temporaryclosedday[29]="11/24"
temporaryclosedday[30]="11/25"
temporaryclosedday[31]="11/26"
temporaryclosedday[32]="11/27"
// comikeS
temporaryclosedday[33]="8/9"
temporaryclosedday[34]="8/10"
temporaryclosedday[35]="8/11"
temporaryclosedday[36]="8/12"
temporaryclosedday[37]="8/13"
temporaryclosedday[38]="8/14"
temporaryclosedday[39]="8/15"
temporaryclosedday[40]="8/16"
temporaryclosedday[41]="8/17"
temporaryclosedday[42]="8/18"
temporaryclosedday[43]="8/19"
// comikeW
temporaryclosedday[44]="12/24"
temporaryclosedday[45]="12/25"
temporaryclosedday[46]="12/26"
temporaryclosedday[47]="12/27"
temporaryclosedday[48]="12/28"
temporaryclosedday[49]="12/29"
temporaryclosedday[50]="12/30"
temporaryclosedday[51]="12/31"
temporaryclosedday[52]="1/1"
temporaryclosedday[53]="1/2"
temporaryclosedday[54]="1/3"
temporaryclosedday[55]="1/4"
temporaryclosedday[56]="1/5"
// etc
temporaryclosedday[57]="12/28"
temporaryclosedday[58]="12/29"
temporaryclosedday[59]="12/30"
temporaryclosedday[60]="12/31"
temporaryclosedday[61]="1/1"
temporaryclosedday[62]="1/2"
temporaryclosedday[63]="1/3"
// etc2
temporaryclosedday[64]="9/16"
temporaryclosedday[65]="9/17"
temporaryclosedday[66]="9/18"
temporaryclosedday[67]="9/19"
// etc3
temporaryclosedday[68]="3/19"
temporaryclosedday[69]="3/23"

// Name
var temporarycloseddayName=new Array();
temporarycloseddayName[0]="イベント開催前後期間"
temporarycloseddayName[1]="イベント開催前後期間"
temporarycloseddayName[2]="イベント開催前後期間"
temporarycloseddayName[3]="イベント開催前後期間"
temporarycloseddayName[4]="イベント開催前後期間"
temporarycloseddayName[5]="イベント開催前後期間"
temporarycloseddayName[6]="イベント開催前後期間"
temporarycloseddayName[7]="イベント開催前後期間"
temporarycloseddayName[8]="イベント開催前後期間"
temporarycloseddayName[9]="イベント開催前後期間"
temporarycloseddayName[10]="イベント開催前後期間"
temporarycloseddayName[11]="イベント開催前後期間"
temporarycloseddayName[12]="イベント開催前後期間"
temporarycloseddayName[13]="イベント開催前後期間"
temporarycloseddayName[14]="イベント開催前後期間"
temporarycloseddayName[15]="イベント開催前後期間"
temporarycloseddayName[16]="イベント開催前後期間"
temporarycloseddayName[17]="イベント開催前後期間"
temporarycloseddayName[18]="イベント開催前後期間"
temporarycloseddayName[19]="イベント開催前後期間"
temporarycloseddayName[20]="イベント開催前後期間"
temporarycloseddayName[21]="イベント開催前後期間"
temporarycloseddayName[22]="イベント開催前後期間"
temporarycloseddayName[23]="イベント開催前後期間"
temporarycloseddayName[24]="イベント開催前後期間"
temporarycloseddayName[25]="イベント開催前後期間"
temporarycloseddayName[26]="イベント開催前後期間"
temporarycloseddayName[27]="イベント開催前後期間"
temporarycloseddayName[28]="イベント開催前後期間"
temporarycloseddayName[29]="イベント開催前後期間"
temporarycloseddayName[30]="イベント開催前後期間"
temporarycloseddayName[31]="イベント開催前後期間"
temporarycloseddayName[32]="イベント開催前後期間"
temporarycloseddayName[33]="イベント開催前後期間"
temporarycloseddayName[34]="イベント開催前後期間"
temporarycloseddayName[35]="イベント開催前後期間"
temporarycloseddayName[36]="イベント開催前後期間"
temporarycloseddayName[37]="イベント開催前後期間"
temporarycloseddayName[38]="イベント開催前後期間"
temporarycloseddayName[39]="イベント開催前後期間"
temporarycloseddayName[40]="イベント開催前後期間"
temporarycloseddayName[41]="イベント開催前後期間"
temporarycloseddayName[42]="イベント開催前後期間"
temporarycloseddayName[43]="イベント開催前後期間"
temporarycloseddayName[44]="イベント開催前後期間"
temporarycloseddayName[45]="イベント開催前後期間"
temporarycloseddayName[46]="イベント開催前後期間"
temporarycloseddayName[47]="イベント開催前後期間"
temporarycloseddayName[48]="イベント開催前後期間"
temporarycloseddayName[49]="イベント開催前後期間"
temporarycloseddayName[50]="イベント開催前後期間"
temporarycloseddayName[51]="イベント開催前後期間"
temporarycloseddayName[52]="イベント開催前後期間"
temporarycloseddayName[53]="イベント開催前後期間"
temporarycloseddayName[54]="イベント開催前後期間"
temporarycloseddayName[55]="イベント開催前後期間"
temporarycloseddayName[56]="イベント開催前後期間"
temporarycloseddayName[57]="年末年始"
temporarycloseddayName[58]="年末年始"
temporarycloseddayName[59]="年末年始"
temporarycloseddayName[60]="年末年始"
temporarycloseddayName[61]="年末年始"
temporarycloseddayName[62]="年末年始"
temporarycloseddayName[63]="年末年始"
temporarycloseddayName[64]="臨時休業"
temporarycloseddayName[65]="臨時休業"
temporarycloseddayName[66]="臨時休業"
temporarycloseddayName[67]="臨時休業"
temporarycloseddayName[68]="イベント開催前後期間"
temporarycloseddayName[69]="イベント開催前後期間"

//臨時休業日の設定　終了
var flag=false;var check=today_tmp.getMonth()+1+"/"+today_tmp.getDate();
for(var i=0;i<temporaryclosedday.length;i++){if(check==temporaryclosedday[i]){flag=temporarycloseddayName[i]}}return flag}function makeCalendar(){var day_date=new Array;var day_day=new Array;var day_holiday=new Array;var day_temporaryclosedday=new Array;for(var i=1;i<=nowDays;i++){today_tmp.setDate(i);day_date[i]=today_tmp.getDate();day_day[i]=today_tmp.getDay();day_holiday[i]=checkholidayName();day_temporaryclosedday[i]=checktemporarycloseddayName()}var content="<TABLE cellpadding='0' cellspacing='3' class='calendartable'><TR><TD colspan='7' class='year'>"+year+"年&#32;"+nowMonth+"月</TD></TR>";content+="<TR>";
content+="<TD class='sunday'>日</TD>";
content+="<TD class='monday'>月</TD>";
content+="<TD class='tuesday' >火</TD>";
content+="<TD class='wednesday'>水</TD>";
content+="<TD class='thursday'>木</TD>";
content+="<TD class='friday'>金</TD>";
content+="<TD class='saturday'>土</TD>";content+="</TR>";content+="<TR align='right'>";var column=0;for(var i=0;i<day_day[1];i++){content+="<TD>&nbsp;</TD>";column++}for(var i=1;i<=nowDays;i++)
{
if(today.getDate()==i){
	if(day_temporaryclosedday[i]==false){
		if(day_holiday[i]==false){
			if(column==6){content+="<TD class='t_saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='t_monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='t_tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='t_wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='t_thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='t_friday' >"+i+"</TD>";column++}
			else{content+="<TD class='t_sunday'>"+i+"</TD>";column++}
		}
		else{
			if(column==6){content+="<TD class='t_H_saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='t_H_monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='t_H_tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='t_H_wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='t_H_thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='t_H_friday' >"+i+"</TD>";column++}
			else{content+="<TD class='t_H_sunday' >"+i+"</TD>";column++}
			}
	}
	else{
		if(day_holiday[i]==false){ 
			if(column==6){content+="<TD class='t_TC_saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='t_TC_monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='t_TC_tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='t_TC_wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='t_TC_thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='t_TC_friday' >"+i+"</TD>";column++}
			else{content+="<TD class='t_TC_sunday' >"+i+"</TD>";column++}
		}
		else{
			if(column==6){content+="<TD class='t_TC_H_saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='t_TC_H_monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='t_TC_H_tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='t_TC_H_wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='t_TC_H_thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='t_TC_H_friday' >"+i+"</TD>";column++}
			else{content+="<TD class='t_TC_H_sunday' >"+i+"</TD>";column++}
		}
	}
	}
else{
	if(day_temporaryclosedday[i]==false){
		if(day_holiday[i]==false){ 
			if(column==6){content+="<TD class='saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='friday' >"+i+"</TD>";column++}
			else{content+="<TD class='sunday' >"+i+"</TD>";column++}
		}
		else{
			if(column==6){content+="<TD class='H_saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='H_monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='H_tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='H_wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='H_thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='H_friday' >"+i+"</TD>";column++}
			else{content+="<TD class='H_sunday' >"+i+"</TD>";column++}
			}
		}
	else{
		if(day_holiday[i]==false){ 
			if(column==6){content+="<TD class='TC_saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='TC_monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='TC_tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='TC_wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='TC_thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='TC_friday' >"+i+"</TD>";column++}
			else{content+="<TD class='TC_sunday' >"+i+"</TD>";column++}
		}
		else{
			if(column==6){content+="<TD class='TC_H_saturday' >"+i+"</TD></TR>";column++}
			else if(column==1){content+="<TD class='TC_H_monday' >"+i+"</TD>";column++}
			else if(column==2){content+="<TD class='TC_H_tuesday' >"+i+"</TD>";column++}
			else if(column==3){content+="<TD class='TC_H_wednesday' >"+i+"</TD>";column++}
			else if(column==4){content+="<TD class='TC_H_thursday' >"+i+"</TD>";column++}
			else if(column==5){content+="<TD class='TC_H_friday' >"+i+"</TD>";column++}
			else{content+="<TD class='TC_H_sunday' >"+i+"</TD>";column++}
			}
		}
	}
if(column==7){content+="</TR><TR align='right'>";column=0}}content+="</TR></TABLE>";document.write(content)}
