//カレンダー（表）を書く

	st_cell_color = new Array( 	'<td bgcolor="#FFFFFF" width="10" align="right"><span class="small-size">',		// 他　（白）
								'<td bgcolor="#00FFFF" width="10" align="right"><span class="small-size">');		// 当日（青）

	st_font_color = new Array(	'<font color="#D92525">',							// 休日（赤）
								'<font color="#5E5D50">');							// 平日（灰）

	i_cell_status = 0;	// 0：他　　1：当日
	i_font_status = 0;	// 0：休日　1：平日
	
	today = new Date();
	i_today_year	=	today.getFullYear();	//	年
	i_today_month	=	today.getMonth();	//	月
	i_today_date	=	today.getDate();	//	日
	i_today_hours	=	today.getHours();	//	時
	i_today_minute	=	today.getMinutes();	//	分


	i_day_bgcolor		=	0;	//	カレンダーでのその日の背景色　平日 白(0)  当日 青色(1)　で表示
	i_day_fontcolor		=	0;	//	カレンダーでのその日の文字色　平日 灰(0)  休日 赤色(1)　で表示

	i_calendar_delay	=	i_day_status[ 34 * i_today_month+1 ];		//	配列の先頭を見て何日ずらして１を置くか
	i_calendar_day		=	1;										//	表を作る時にカウントする


	i_before_date		=	0;			//	１分たったら日が変わった？
	i_total_minute		=	0;			//	AM 0:00から今は何分？

	i_loop = 0;	// 日付が変わるまでループする
	i_old_date = i_today_date;			//	起動した時の日を記憶し、更新したか比べる

	document.write('<table border="0" bgcolor="#C6C6C6" cellspacing=1 cellpadding=1>');

	for ( i_week=0 ; i_week<6 ; i_week++)
	{
			document.write('<tr>');

			for ( i_day=0 ; i_day<7 ; i_day++)
			{
				if ( i_calendar_delay > 0 || i_calendar_day > 31 || i_day_status[ 34 * i_today_month+i_calendar_day + 1 ] == 9 )
				{
					document.write('<td bgcolor=white width=10 align=right><span class="small-size">　</span></td>');
				}
				else
				{
					if ( i_calendar_day == i_today_date )	i_cell_status = 1;	// 今日と同じ日を書いたらセルの色を青に
					else									i_cell_status = 0;	// 未来なら白にする

					if ( i_day_status[ 34 * i_today_month + i_calendar_day + 1 ] == 0 ) i_font_status = 1; else i_font_status = 0;
					document.write( st_cell_color[ i_cell_status ] , st_font_color[ i_font_status ] , i_calendar_day , '</font></span></td>');
					i_calendar_day++;
				}
				i_calendar_delay--;
			
			}
		document.write('</tr>');
	}

	document.write('</table>');
	
	
/*	while (i_loop == 0)
	{
		i_today_date	=	today.getDate();	//	日
		if ( i_old_date != i_today_date ) i_loop = 1;
	}
//	location.reload();
*/
//	setTimeout("location.reload()",1000);
