function calen(){
	//今日の日付を求める---------------------------------------------
	today = new Date();
	y = today.getFullYear();
	m = today.getMonth()+1;
	d = today.getDate();
	
	//各月の末日を設定する-------------------------------------------
	monthdays = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
	
	//うるう年だったら、2月を29日にする------------------------------
	if( (y%400==0)||((y%100!=0)&&(y%4==0)) ){
		monthdays[2]=29;
	}
	
	//今年の1月1日の曜日番号を求める----------------------------------
	startday=y+Math.floor((y-1)/400)-Math.floor((y-1)/100)+Math.floor((y-1)/4);
	
	//今月の1日の曜日番号を求める-------------------------------------
	for(i=1;i<m;i++){
		startday+=monthdays[i];
	}
	startday%=7;
	
	//曜日の一覧を設定する--------------------------------------------
	youbi = new Array("日","月","火","水","木","金","土");
	
	fsize=13;
	str="";
	str+="<table cellspacing=1 cellpadding=0 style='border:1px solid #089cff;background-color:#089cff;'>";
	str+="<tr>\n";
	str+="<td colspan=7 align=center bgcolor=#99ccff style='font-size:"+fsize+"px;color:#0833ff;width:146px;height:20px;text-align:center;'>"+y+"年"+m+"月</td>";
	str+="</tr>\n";
	str+="<tr>\n";
	for(i=0;i<7;i++){
		str+="<td bgcolor=#ffffff style='font-size:"+fsize+"px;color:#0833ff;width:20px;height:20px;text-align:center;'>"+youbi[i]+"</td>";
	}
	str+="</tr>\n";
	for(i=0,c=1-startday;i<Math.ceil((startday+monthdays[m])/7);i++){
		str+="<tr>\n";
		for(j=0;j<=6;j++,c++){
			if(c>=1 && c<=monthdays[m]){
				
				//祭日リストを読み込み照合する---------
				flag=0;
				for(k=0;k<holiday.length;k++){
					s1=holiday[k].indexOf("/",0);        //1つ目の「/」が何文字目か
					s2=holiday[k].indexOf("/",s1+1);     //2つ目の「/」が何文字目か
					
					yy=holiday[k].substring(0,s1);
					mm=holiday[k].substring(s1+1,s2);
					dd=holiday[k].substring(s2+1);
					
					if(y==yy && m==mm && c==dd){
						flag=1;
						break;
					}
				}
				
				str+="<td align=center";
				//今日の判定------------------
				if(c==d){
					str+=" bgcolor=#8a92f0";
				}
				//日曜日の判定----------------
				else if(j==0){
					str+=" bgcolor=#ff6f80";
				}
				//祭日の判定----------------
				else if(flag==1){
					str+=" bgcolor=#d9ff72";
				}
				//土曜日の判定----------------
				else if(j==6){
					str+=" bgcolor=#4df681";
				}
				//それ以外の判定--------------
				else{
					str+=" bgcolor=#ffffff";
				}
				str+=" style='font-size:"+fsize+"px;width:20px;height:20px;text-align:center;'>\n";
				str+=c;
				str+="</td>\n";
			}
			else{
				str+="<td bgcolor=#eeeeee style='font-size:"+fsize+"px;width:20px;height:20px;text-align:center;'>&nbsp;</td>\n";
			}
		}
		str+="</tr>\n";
	}
	str+="</table>\n";
	
	document.write(str);
	
	
}

