document.write(''); var targetBox; var divCalendar; var names = new Array("Jan","Feb","March","April","May","June","July","Aug","Sept","Oct","Nov","Dec"); var days = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); var dow = new Array("S","M","T","W","T","F","S"); function toggleCal() { if (document.all.calframe.style.display=="block"){ document.all.calframe.style.display="none"; } else{ document.all.calframe.style.display="block"; } } function y2k(number) { number = parseFloat(number) if (number < 69){ number = number + 2000; } else if (number < 100){ number = number + 1900; } return (number) } function padout(number) { return (number < 10) ? '0' + number : number; } function update(m,d,y) { targetBox.value = '' + padout(m + 1) + '/' + padout(d) + '/' + y; divCalendar.style.display="none"; } function changeMonth (m,y,up) { if (up) m++; else m--; if (m<0) { m+=12; y--; } if (m>11) { m-=12; y++; } document.all("calframe").innerHTML = Calendar(m,y); } function Calendar(Month,Year) { today = new Date; cDay = today.getDate(); cMonth = today.getMonth(); cYear = today.getYear(); var output = ''; firstDay = new Date(Year,Month,1); startDay = firstDay.getDay(); if (((Year % 4 == 0) && (Year % 100 != 0)) || (Year % 400 == 0)) days[1] = 29; else days[1] = 28; output += '
' output += ''; output += '
'; output += ''; output += ''; output += '' output += '' for (i=0; i<7; i++) output += ''; var column = 0; var row = 0; var lastMonth = Month - 1; if (lastMonth < 0) lastMonth = 11; for (i=0; i'; output += ''; if (Month == cMonth && Year == cYear && cDay == i) output += '' + i + ''; else output += i; output += '' +'<\/TD>'; if (column == 6) { column = -1; if (i document.body.clientWidth){ divCalendar.style.left = document.body.clientWidth - parseInt(divCalendar.style.width); } toggleCal(); }
' output += ''; output += '<'; output += '' + names[Month] + ' ' + Year + '<\/FONT>' output += ''; output += ''; output += '>
' + dow[i] +'<\/TD>'; output += '<\/TR>