function calendar(){
    
    var date=new Date();
    var Monthdays=new Array
    (31,28,31,30,31,30,31,31,30,31,30,31);
    var Days=new Array
    ("<FONT Color=\"#000000\" class=\"text12\">日","<FONT class=\"text12\">月","<FONT class=\"text12\">火","<FONT class=\"text12\">水","<FONT class=\"text12\">木","<FONT class=\"text12\">金","<FONT class=\"text12\">土");
    year=date.getYear();
    today=date.getDate();
    month=date.getMonth()+1;
//うるう年
    if(year<2000){year=year+1900;}
    if((year%4==0&&(year%100!=0))||(year%400==0)){
        Monthdays[1]=29;}
    thisMonthDays=Monthdays[date.getMonth()];
    date.setDate(1);
    Startday=date.getDay();
//年月
    document.write("<Table Border=0 WIDTH=\"160\">");
    document.write("<TR><TH Colspan=7 bgcolor=\"#CCCCCC\"><FONT class=\"text12\">");
    document.write(year,'/',date.getMonth()+1);
    document.write("</TH></TR>");
//曜日
    document.write("<TR><FONT class=\"text12\">");
    for(i=0;i<7;i++){
        document.write("<TH>");
        if(i==2){
            document.write("<FONT Color=\"#ff0000\" class=\"text12\">");
            }
        if((month==5) || (month==8) || (month==10)){
            document.write("<FONT Color=\"#000000\" class=\"text12\">");
            }
        document.write(Days[i]);
        if(i==0){
            document.write("</font>");
            }
        document.write("</TH>");
    }
    document.write("</TR>");
    //日
    document.write("<TR>");
    col=0;
    for(i=0;i<Startday;i++){
        document.write("<TD></TD>");
        col++;
    }
    for(i=1;i<=thisMonthDays;i++){
        document.write("<TD>");
        document.write("<center>");
        
        if(col==2){
            document.write("<FONT Color=\"#ff0000\">");
        }
        
        if((month==5) || (month==8) || (month==10)){
            document.write("<FONT Color=\"#000000\">");
        }
    
    //予定外、営業
        if(((month==4) && (i==29)) || ((month==9) && (i==22)) || ((month==10) && (i==9)) || ((month==10) && (i==16)) || ((month==10) && (i==23)) || ((month==10) && (i==30)) || ((month==12) && (i==29))){
            document.write("<FONT Color=\"#000000\">");
        }


    //予定外休
        if(((month==3) && (i==2)) || ((month==3) && (i==3)) || ((month==3) && (i==4)) || ((month==3) && (i==5)) || ((month==9) && (i==2))) {
            document.write("<FONT Color=\"#ff0000\"");
        }

    //年末年始休
        if(((month==12) && (i==31)) || ((month==1) && (i==1)) || ((month==1) && (i==2)) || ((month==1) && (i==3)) || ((month==1) && (i==4)) || ((month==1) && (i==5)) || ((month==1) && (i==6)) || ((month==1) && (i==7))){
            document.write("<FONT Color=\"#ff0000\">");
        }
        
        if(i==today){
            document.write("<b>");
        }

        document.write("<font class=\"text12\">" + i + "</font>");
        
        if(i==today){
            document.write("</b>");
        }

        if(col==0){
            document.write("</font>");
        }
        document.write("</TD>");
        col++;
        if(col==7){
            document.write("</TR>\n<TR>");
            col=0;
        }
    }
    document.write("</table>");
    
}
//-->