var now = new Date var dd = now.getDate() var mm = now.getMonth() var dow = now.getDay() var yyyy = now.getFullYear() var selMonth = mm; var selYear = yyyy; var posToday; function maxDays(mm, yyyy){ var mDay; if((mm == 3) || (mm == 5) || (mm == 8) || (mm == 10)){ mDay = 30; } else{ mDay = 31 if(mm == 1){ if (yyyy/4 - parseInt(yyyy/4) != 0){ mDay = 28 } else{ mDay = 29 } } } return mDay; } function writeCalendar(){ var tmpCalendarLabelWidth = widthCalendarTables - widthImgNavBack - widthImgNavNext var arrY = new Array() for (ii=0;ii<=4;ii++){ arrY[ii] = yyyy - 2 + ii } var text = "" text += "
" text += "
" text += "
" text += "" text += ""+altImgEvents+"" text += "<\/a>" text += "<\/div>" text += "
" text += ""+altImgNavBack+"<\/a>" text += "<\/div>" text += "
" text += "
Monat Jahr<\/div>" text += "<\/div>" text += "
" text += ""+altImgNavNext+"<\/a>" text += "<\/div>" text += "
" text += "" text += "" text += "" for (ii=0;ii<=6;ii++){ text += "" forZahl0 = 0 for (forZahl1=0;forZahl1<=5;forZahl1++){ text += "" for (forZahl2=0;forZahl2<=6;forZahl2++){ if (forZahl1!=5) { text += "
"+caption+"<\/caption>" text += "
" + arrD[ii] + "<\/span><\/th>" } text += "<\/tr>" text += "<\/thead>" text += "
[]<\/td>" } else { text += "[]<\/td>" } forZahl0 += 1 } text += "<\/tr>" } text += "<\/tbody>" text += "<\/table>" text += "<\/div>" text += "<\/div>" text += "<\/form>" document.write(text) changeCal() } function changeCal(){ var arrN = new Array(41) var aa var dCount = 0 var tmpMonth var tmpDay var tmpYear var tmpShowYear var curDate = new Date() curDate.setFullYear(selYear) curDate.setMonth(selMonth) curDate.setDate(1) var day1; if (weekMode == 1) { day1 = curDate.getDay() - 1; } else { day1 = curDate.getDay(); } if (day1 < 0) { day1 = 7 - Math.abs(day1); } var prevM if (selMonth!=0){ prevM = selMonth - 1 } else{ prevM = 11 } for (forZahl0=0;forZahl020))||((ii>27)&&(arrN[ii]<20))){ if (ii>7) { document.getElementById("sp"+ii).innerHTML = ""+arrN[ii]+"<\/font><\/a>" } else { document.getElementById("sp"+ii).innerHTML = ""+arrN[ii]+"<\/font><\/a>" } } else { if (arrN[ii] <= 9) { tmpDay = "0"+arrN[ii]; } else { tmpDay = arrN[ii]; } tmpHREF = urlServer+urlPathBeforeDate+tmpDay+dateFormatChar+tmpMonth+dateFormatChar+tmpYear+urlToDate+tmpDay+dateFormatChar+tmpMonth+dateFormatChar+tmpYear; if ((dCount==0)||(dCount==6)){ document.getElementById("sp"+ii).innerHTML = ""+arrN[ii]+"<\/font><\/a>" } else{ document.getElementById("sp"+ii).innerHTML = ""+arrN[ii]+"<\/font><\/a>" } if ((arrN[ii]==dd)&&(mm==selMonth)&&(yyyy==selYear)){ document.getElementById("sp"+ii).style.backgroundColor=colorHighlightToday posToday = ii; } } dCount += 1 if (dCount>6){ dCount=0 } } document.getElementById("spmm").innerHTML = arrM[selMonth]+" "+tmpShowYear } function nextMonth() { if (selMonth == 11){ selMonth = 0; selYear++; } else { selMonth++; } } function showNextMonth() { nextMonth(); changeCal(); highlightToday(); } function previousMonth() { if (selMonth == 0){ selMonth = 11; selYear--; } else { selMonth--; } } function showPreviousMonth() { previousMonth(); changeCal(); highlightToday(); } function highlightToday() { if(mm == selMonth & yyyy == selYear) { document.getElementById("sp"+posToday).style.backgroundColor=colorHighlightToday } else { document.getElementById("sp"+posToday).style.backgroundColor=colorResetHighlightToday } } function getCalToday() { selMonth = mm; selYear = yyyy; changeCal(); highlightToday(); }