/* Vision Calender 1.2                         */
/* Copyright (C) 2002 Matthias Mohr            */
/* E-mail: webmaster@mamo-net.de               */
/* Homepage: http://www.mamo-net.de            */
/* ------------------------------------------- */
/* Sie dürfen dieses Script frei benutzen wenn */ 
/* dieser Corpright Hinweis bestehen bleibt.   */

   if (lang=="De"){
	var day_of_week = new Array('So','Mo','Di','Mi','Do','Fr','Sa');
	var month_of_year = new Array('Januar ','Februar ','März ','April ','Mai ','Juni ','Juli ','August ','September ','Oktober ','November ','Dezember ');}
   else if (lang=="En"){
	var day_of_week = new Array('Su','Mo','Tu','We','Th','Fr','Sa');
	var month_of_year = new Array('January ','February ','March ','April ','May ','June ','July ','August ','September ','October ','November ','December ');}
   else{	
	var day_of_week = new Array('So','Mo','Di','Mi','Do','Fr','Sa');
	var month_of_year = new Array('01. ','02. ','03. ','04. ','05. ','06. ','07. ','08. ','09. ','10. ','11. ','12. ');}

var Calendar = new Date();

var browser=navigator.appName;
var version=parseInt(navigator.appVersion);

    if (browser=="Netscape" && version<4.06)
        {
         year=Calendar.getYear();
          if (year<=99)
           {
            year="19"+year;
           }
          else
           {
             year=year.toString();
             year=year.slice(1);
             year="20"+year;
           }

        }
     else
        {
          year=Calendar.getFullYear();

        }

var month = Calendar.getMonth();
var today = Calendar.getDate();
var weekday = Calendar.getDay();

var DAYS_OF_WEEK = 7;
var DAYS_OF_MONTH = 31;
var cal;

Calendar.setDate(1);
Calendar.setMonth(month);

var TR_start = '<TR>';
var TR_end = '</TR>';
var highlight_start = '<TD WIDTH="20"><TABLE CELLSPACING=0 BORDER=0><TR><TD WIDTH=20><p align="left"><font class="caltag">';
var highlight_end   = '</p></font></TD></TR></TABLE><font class="cal">';
var TD_start = '<TD WIDTH="20"><font class="cal">';
var TD_end = '</font></TD>';

cal =  '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><font class="cal">';
cal += '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=1>' + TR_start;
cal += '<TD COLSPAN="' + DAYS_OF_WEEK + '"class="tablerand"><font class="menu">';
cal += month_of_year[month] + year + TD_end + TR_end;
cal += TR_start;

for(index=0; index < DAYS_OF_WEEK; index++)
{

if(weekday == index)
cal += TD_start + '<font class="calwd">' + day_of_week[index] + '</font>' + TD_end;

else
cal += TD_start + day_of_week[index] + TD_end;
}

cal += TD_end + TR_end;
cal += TR_start;

for(index=0; index < Calendar.getDay(); index++)
cal += TD_start + '  ' + TD_end;

for(index=0; index < DAYS_OF_MONTH; index++)
{
if( Calendar.getDate() > index )
{
  week_day =Calendar.getDay();

  if(week_day == 0)
  cal += TR_start;

  if(week_day != DAYS_OF_WEEK)
  {

  var day  = Calendar.getDate();

  if( today==Calendar.getDate() )
  cal += highlight_start + day + highlight_end + TD_end;

  else
  cal += TD_start + day + TD_end;
  }

  if(week_day == DAYS_OF_WEEK)
  cal += TR_end;
  }

  Calendar.setDate(Calendar.getDate()+1);

}

cal += '</TD></TR></TABLE></TABLE>';

document.write(cal);