function myCalendar( myTodayOffset ){

	//******************
	//****休日を定義****
	//******************
	
	//**1月の休み**
	H101 = 101;
	H102 = 102;
	H103 = 103;
	H104 = 104;
	H105 = 000;
	H106 = 000;
	H107 = 000;
	H108 = 000;
	H109 = 000;
	
	//**2月の休み**
	H201 = 211;
	H202 = 000;
	H203 = 000;
	H204 = 000;

	//**3月の休み**
	H301 = 321;
	H302 = 000;
	H303 = 000;
	H304 = 000;
	
	//**4月の休み**
	H401 = 429;
	H402 = 000;
	H403 = 000;
	H404 = 000;
	
	//**5月の休み**
	H501 = 503;
	H502 = 504;
	H503 = 505;
	H504 = 000;
	H505 = 000;
	H506 = 000;	
	
	//**6月の休み**
	H601 = 000;
	H602 = 000;
	H603 = 000;
	H604 = 000;	

	//**7月の休み**
	H701 = 718;
	H702 = 000;
	H703 = 000;
	H704 = 000;	

	//**8月の休み**
	H801 = 812;
	H802 = 813;
	H803 = 814;	
	H804 = 815;
	H805 = 816;
	H806 = 000;
	H807 = 000;
	H808 = 000;
	
	//**9月の休み**
	H901 = 919;
	H902 = 923;
	H903 = 000;
	H904 = 000;
	H905 = 000;
	
	//**10月の休み**
	H1001 = 1010;
	H1002 = 000;
	H1003 = 000;
	H1004 = 000;	

	//**11月の休み**
	H1101 = 1103;
	H1102 = 1123;
	H1103 = 000;
	H1104 = 000;
	H1105 = 000;

	//**12月の休み**
	H1201 = 1223;
	H1202 = 1229;
	H1203 = 1230;
	H1204 = 1231;
		
	//**********
	//**下準備**
	//**********
	myDate = new Date();
	myYear = myDate.getFullYear();
	myMonth = myDate.getMonth();
	
	//月ごとに分岐
	if(myTodayOffset == +1){
		if(myMonth ==11){
			myYear++;
			myMonth =0;
		}else{
			myMonth++;
		}; 
	};
	
	if (myTodayOffset != 0){
		myDate.setDate(1);
	};
		myDate.setFullYear(myYear);
		myDate.setMonth(myMonth);

	myWeekTbl = new Array("日","月","火","水","木","金","土");
	myMonthTbl = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	myToday = myDate.getDate();// 今日の日付
	myDate.setDate(1); // 日付を1に
	myWeek = myDate.getDay(); //日付1の曜日を取得
	myTblLine = Math.ceil((myWeek+myMonthTbl[myMonth])/7);
	myTable = new Array(7*myTblLine);
	
	if(((myYear%4)==0 && (myYear%100)!=0) || (myYear%400)==0){// うるう年
		myMonthTbl[1] = 29;
	};
	
	for(i=0; i<7*myTblLine; i++){
		myTable[i] = "　";
	};
	
	for(i=0; i<myMonthTbl[myMonth]; i++){
		myTable[i+myWeek] = i+1;
	};
	
	//************
	//**カレンダー**
	//************
	document.write("<table class='calendar' border='0' cellpadding='0' cellspacing='0'>");
	document.write("<caption>"+myYear+"年"+(myMonth+1)+"月"+"</caption>");
	//カレンダー曜日エリア
	for( i=0; i<7; i++){
		if(i==0){
			document.write("<th style='color:#ff2b0f;'>");
		}else if(i==6){
			document.write("<th style='color:#2871d4;'>");
		}else{
			document.write("<th>");
		}
		document.write(myWeekTbl[i]);
		document.write("</th>");
	};
	
	//カレンダー日付エリア
	for( i=0; i<myTblLine; i++){
		document.write("<tr>");
		for( j=0; j<7; j++){
			H00 = myTable[j+(i*7)]+((myMonth+1)*100);
			myDat = myTable[j+(i*7)] ;
			if(myDat=='　'){
				document.write("<td>");
			}else if(j==0){
				document.write("<td class='off'>");
			/*}else if((H00 == H101)||(H00 == H102)||(H00 == H103)||(H00 == H104)||(H00 == H105)||(H00 == H106)||(H00 == H107)||(H00 == H108)||(H00 == H109)||(H00 == H201)||(H00 == H202)||(H00 == H203)||(H00 == H204)||(H00 == H301)||(H00 == H302)||(H00 == H303)||(H00 == H304)||(H00 == H401)||(H00 == H402)||(H00 == H403)||(H00 == H404)||(H00 == H501)||(H00 == H502)||(H00 == H503)||(H00 == H504)||(H00 == H505)||(H00 == H506)||(H00 == H601)||(H00 == H602)||(H00 == H603)||(H00 == H701)||(H00 == H702)||(H00 == H703)||(H00 == H704)||(H00 == H801)||(H00 == H802)||(H00 == H803)||(H00 == H804)||(H00 == H805)||(H00 == H806)||(H00 == H807)||(H00 == H808)||(H00 == H901)||(H00 == H902)||(H00 == H903)||(H00 == H904)||(H00 == H905)||(H00 == H1001)||(H00 == H1002)||(H00 == H1003)||(H00 == H1004)||(H00 == H1101)||(H00 == H1102)||(H00 == H1103)||(H00 == H1104)||(H00 == H1105)||(H00 == H1201)||(H00 == H1202)||(H00 == H1203)||(H00 == H1204)){
				document.write("<td class='off'>");*/
			}else if(j==6){
				document.write("<td class='off'>");
			}else{
				document.write("<td>");
			}
			if(myDat == myToday && myTodayOffset == 0){
				document.write("<span>"+myDat+"</span>");
			}else{
				document.write(myDat);
			};
			document.write("</td>");
		};
		document.write("</tr>");
	};
	
	document.write("</table>");

};
myCalendar();

