/*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/22"   //春分の日"
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]="5/6"   //振り替え休日
//holiday[17]="9/22"  //振り替え休日
//holiday[18]="12/24" //振り替え休日

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[17]="休日"
//holidayName[18]="休日"
//祝日の設定　終了
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 は必ず対応させる事
temporaryclosedday[0]="12/30"
temporaryclosedday[1]="1/31"
temporaryclosedday[2]="1/1"
temporaryclosedday[3]="1/2"
temporaryclosedday[4]="1/3"
temporaryclosedday[5]="1/4"
temporaryclosedday[8]="1/10"
temporaryclosedday[9]="1/11"
temporaryclosedday[10]="1/17"
temporaryclosedday[11]="1/24"
temporaryclosedday[12]="2/7"
temporaryclosedday[13]="2/11"
temporaryclosedday[14]="2/14"
temporaryclosedday[15]="2/21"
temporaryclosedday[16]="2/28"
temporaryclosedday[17]="3/7"
temporaryclosedday[18]="3/14"
temporaryclosedday[19]="3/21"
temporaryclosedday[20]="3/22"
temporaryclosedday[21]="3/28"
temporaryclosedday[22]="4/4"
temporaryclosedday[23]="4/11"
temporaryclosedday[24]="4/18"
temporaryclosedday[25]="4/25"
temporaryclosedday[26]="4/29"
temporaryclosedday[30]="5/2"
temporaryclosedday[31]="5/3"
temporaryclosedday[32]="5/4"
temporaryclosedday[33]="5/5"
temporaryclosedday[34]="5/9"
temporaryclosedday[35]="5/16"
temporaryclosedday[36]="5/23"
temporaryclosedday[37]="5/30"
temporaryclosedday[38]="6/6"
temporaryclosedday[39]="6/13"
temporaryclosedday[40]="6/20"
temporaryclosedday[41]="6/27"
temporaryclosedday[42]="7/4"
temporaryclosedday[43]="7/11"
temporaryclosedday[44]="7/18"
temporaryclosedday[45]="7/25"
temporaryclosedday[46]="8/1"
temporaryclosedday[47]="8/15"
temporaryclosedday[48]="8/22"
temporaryclosedday[49]="8/29"
temporaryclosedday[50]="9/5"
temporaryclosedday[51]="9/5"
temporaryclosedday[52]="9/12"
temporaryclosedday[53]="9/19"
temporaryclosedday[54]="9/20"
temporaryclosedday[55]="9/23"
temporaryclosedday[56]="9/26"
temporaryclosedday[57]="9/26"
temporaryclosedday[58]="9/26"
temporaryclosedday[59]="8/8"
temporaryclosedday[60]="8/8"
temporaryclosedday[61]="8/8"
temporaryclosedday[62]="10/4"
temporaryclosedday[63]="10/11"
temporaryclosedday[64]="10/12"
temporaryclosedday[65]="10/18"
temporaryclosedday[66]="10/25"
temporaryclosedday[67]="11/1"
temporaryclosedday[68]="11/3"
temporaryclosedday[69]="11/8"
temporaryclosedday[70]="11/15"
temporaryclosedday[71]="11/22"
temporaryclosedday[72]="11/23"
temporaryclosedday[73]="11/29"
temporaryclosedday[74]="12/6"
temporaryclosedday[76]="12/13"
temporaryclosedday[77]="12/20"
temporaryclosedday[78]="12/23"
temporaryclosedday[79]="12/27"
temporaryclosedday[80]="12/29"
temporaryclosedday[81]="12/30"
temporaryclosedday[82]="12/31"
var temporarycloseddayName=new Array();
temporarycloseddayName[0]="年末年始"
temporarycloseddayName[1]="年末年始"
temporarycloseddayName[2]="年末年始"
temporarycloseddayName[3]="年末年始"
temporarycloseddayName[4]="年末年始"
temporarycloseddayName[5]="年末年始"
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[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]="休業日"
temporarycloseddayName[70]="休業日"
temporarycloseddayName[71]="休業日"
temporarycloseddayName[72]="休業日"
temporarycloseddayName[73]="休業日"
temporarycloseddayName[74]="休業日"
temporarycloseddayName[76]="休業日"
temporarycloseddayName[77]="休業日"
temporarycloseddayName[78]="休業日"
temporarycloseddayName[79]="休業日"
temporarycloseddayName[80]="休業日"
temporarycloseddayName[81]="休業日"
temporarycloseddayName[82]="休業日"
//臨時休業日の設定　終了
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)}