/* Copyright by .:ArTuR:. Author Artur Grzybowski */ var monthsLengths = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); var weekdaysNames = new Array('PO','WT','ŚR','CZ','PT','SO','ND'); var monthsNames = new Array('Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'); function calendar(day,month,year,whereSign) { bName = navigator.appName; var calendarCode = ""; if (bName.substring(0,9) == "Microsoft") { calendarCode = calendarCode + "

"; } var calendarCode = calendarCode + "
"; firstDayOfMonth = new Date(year,(month-1),1); var firstDay = firstDayOfMonth.getDay(); if (firstDay == 0) { firstDay = 7; } if(year%4==0) monthsLengths[1]=29; leftLink = "<<"; rightLink = ">>"; calendarCode = calendarCode + ""; leftLink = "<<"; rightLink = ">>"; calendarCode = calendarCode + "
"+leftLink+""+year+""+rightLink+"
"+leftLink+""+monthsNames[month-1]+""+rightLink+"
"; calendarCode = calendarCode + ""; var currentDay = 0; var endDay = 7; while (currentDay"+weekDayName+""; currentDay++; } calendarCode = calendarCode + ""; currentDay = 1; endDay = firstDay; var newWeekDay = 0; while (currentDay < endDay){ background=''; background=(currentDay==6)?'class=\"saturday\"':background; background=(currentDay==7)?'class=\"sunday\"':background; calendarCode = calendarCode + ""; newWeekDay++; currentDay++; } currentDay = 1; endDay = monthsLengths[month-1]; while (currentDay <= endDay){ if (newWeekDay >= 7) { calendarCode = calendarCode + ""; newWeekDay=0; } background=''; background=(newWeekDay==5)?'class=\"saturday\"':background; background=(newWeekDay==6)?'class=\"sunday\"':background; background=((currentDay==07&&month==7&&year==2025))?'class=\"calendar_sign\"':background; calendarCode = calendarCode + ""; newWeekDay++; currentDay++; } while (newWeekDay < 7){ calendarCode = calendarCode + ""; newWeekDay++; } calendarCode = calendarCode + "
 
"+((currentDay<10)?'0'+currentDay:currentDay);+" 
Zamknij
"; change(whereSign+'_create_calendar','html',calendarCode); } function createCalendar(whereSign) { chstyle(whereSign+'_create_calendar','display','block','none'); calendar(07,7,2025,whereSign); } function signDate(day,month,year,whereSign){ day=((day<10)?'0'+day:day); month=((month<10)?'0'+month:month); change(whereSign,'value',year+'-'+month+'-'+day); }