// JavaScript Document var g_today = new Date(); g_today.setDate(9); g_today.setMonth(5); g_today.setYear(2026); var current_time = '06:49 PM'; function clickDateSelection() { main_form = document.contact; lmonth = main_form.month.selectedIndex; lyear = main_form.year.selectedIndex+g_today.getFullYear(); show_calendar(lmonth, lyear); return false; } function load_date() { main_form = document.contact; var cr_year = g_today.getFullYear(); for (var year_val = 0; year_val < 7; year_val++) { main_form.year.options[year_val] = new Option(cr_year+year_val) } main_form.year.options[0].selected = true; main_form.month.options[g_today.getMonth()].selected = true; main_form.day.options[g_today.getDate()-1].selected = false; ChangeDays(); } function ChangeDays() { day = main_form.day.selectedIndex; days = main_form.day.length; days = GetDays(); while(main_form.day.options.length > 28) { main_form.day.options[28] = null; } for (var i = 28; i < days; i++) { main_form.day.options[i] = new Option(i+1, i+1); } if(day > days - 1) { day = days - 1; } main_form.day.options[day].selected = true; } function GetDays() { mon = main_form.month.selectedIndex + 1; yr = main_form.year.options[main_form.year.selectedIndex].value; return GetDaysEx(mon, yr); } function GetDaysEx(mon, year) { if(mon == 1 || mon == 3 || mon == 5 || mon == 7 || mon == 8 || mon == 10 || mon == 12) return 31; if(mon == 4 || mon == 6 || mon == 9 || mon == 11) return 30; if(mon == 2 && yr % 400 == 0) return 29; if(mon == 2 && yr % 100 == 0) return 28; if(mon == 2 && yr % 4 == 0) return 29; if(mon == 2) return 28; return 0; } //calendar formation scripts var gNow = new Date(g_today); var g_popup; var bColor = "#999999"; // bordercolor variable for Netscape compatibility isNetscape = (navigator.appName.indexOf("Netscape") != -1) ? true : false; isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false; function call_date(main_form, calendar_date) { var form_day; var form_month; var form_year; form_day = main_form.day; form_month = main_form.month; form_year = main_form.year; var vLastDay = JSCalendar.get_daysofmonth(calendar_date.getMonth(), calendar_date.getYear()); while(form_day.options.length > 28) { form_day.options[28] = null; } for (var i = 0; i < form_month.options.length; i++) { if(i == calendar_date.getMonth()) { form_month.options[i].selected = true; } } for (var i = 28; i < vLastDay; i++) { form_day.options[i] = new Option(i+1, i+1); } for (var i = 0; i < vLastDay; i++) { if (i+1 == calendar_date.getDate()) { form_day.options[i].selected = true; } } if ((calendar_date.getMonth() < g_today.getMonth()) && (calendar_date.getFullYear() <= g_today.getFullYear())) { //form_year.value = g_today.getFullYear() + 1; form_year.options[0].selected = true; } else { form_year.options[calendar_date.getFullYear()-g_today.getFullYear()].selected = true; /*if ((calendar_date.getMonth() >= g_today.getMonth()) && (calendar_date.getFullYear() > g_today.getFullYear())) { form_year.value = g_today.getFullYear(); } else { form_year.value = calendar_date.getFullYear(); }*/ } ChangeDays(); } function check_date(main_form, calendar_date) { if (calendar_date == 'null') { selectedYearValue = parseInt(main_form.year.value,10); selectedDayValue = parseInt(main_form.day.options[main_form.day.selectedIndex].text,10); selectedMonValue = parseInt(main_form.month.options[main_form.month.selectedIndex].value,10); } else { theDate = new Date(calendar_date); selectedMonValue = theDate.getMonth(); selectedDayValue = theDate.getDate(); selectedYearValue = theDate.getFullYear(); } var new_date = new Date(selectedYearValue, selectedMonValue, selectedDayValue); call_date(main_form, new_date); } JSCalendar.Months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; JSCalendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; JSCalendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; function JSCalendar(p_month, p_year) { if ((p_month == null) && (p_year == null)) { return; } if (p_month == null) { this.gMonthName = null; this.gMonth = null; this.gYearly = true; } else { this.gMonthName = JSCalendar.get_month(p_month); this.gMonth = new Number(p_month); this.gYearly = false; } this.gYear = p_year; } JSCalendar.get_month = calendar_get_month; JSCalendar.get_daysofmonth = calendar_get_daysofmonth; JSCalendar.calc_month_year = calendar_calc_month_year; function calendar_get_month(monthNo) { return JSCalendar.Months[monthNo]; } function calendar_get_daysofmonth(monthNo, p_year) { if((p_year % 4) == 0) { if((p_year % 100) == 0 && (p_year % 400) != 0) { return JSCalendar.DOMonth[monthNo]; } return JSCalendar.lDOMonth[monthNo]; } else { return JSCalendar.DOMonth[monthNo]; } } function calendar_calc_month_year(p_Month, p_Year, incr) { var ret_arr = new Array(); if (incr == -1) { if (p_Month == 0) { ret_arr[0] = 11; ret_arr[1] = parseInt(p_Year) - 1; } else { ret_arr[0] = parseInt(p_Month) - 1; ret_arr[1] = parseInt(p_Year); } } else if (incr == 1) { if (p_Month == 11) { ret_arr[0] = 0; ret_arr[1] = parseInt(p_Year) + 1; } else { ret_arr[0] = parseInt(p_Month) + 1; ret_arr[1] = parseInt(p_Year); } } return ret_arr; } // This is for compatibility with Navigator 3, we have to create and discard one object before the prototype object exists. new JSCalendar(); JSCalendar.prototype.show = function() { var vCode = ""; g_popup.document.open(); // Show navigation buttons var prevMMYYYY = JSCalendar.calc_month_year(this.gMonth, this.gYear, -1); var prevMM = prevMMYYYY[0]; var prevYYYY = prevMMYYYY[1]; var nextMMYYYY = JSCalendar.calc_month_year(this.gMonth, this.gYear, 1); var nextMM = nextMMYYYY[0]; var nextYYYY = nextMMYYYY[1]; // Setup the page... this.wwrite(""); this.wwrite("Calendar"); // write out style rules this.wwrite(this.createCSS()); this.wwrite(""); this.wwrite(""); // create calendar header this.wwrite(""); this.wwrite("
To select your deadline date, click on a date below.
Today's U.S. CST date and time is: "+calendar_get_month(g_today.getMonth())+" "+g_today.getDate()+", "+current_time+"
"); // Create the master table that contains all the tables making up the calendar. this.wwrite(""); this.wwrite(""); this.wwrite(""); this.wwrite(""); if (z == 0) this.wwrite("
"); // create the table that contains the buttons to next and previous months and years. this.wwrite(""); this.wwrite(""); //create hyperlink to the previous month button this.wwrite(""); //create hyperlink to the next month button this.wwrite(""); this.wwrite(""); this.wwrite("
"); this.wwrite("< Previous"); this.wwrite("Next >
"); for (z = 0; z < 2; z++) { this.gMonthName = JSCalendar.Months[this.gMonth]; // Create the string with the month name and the year this.wwrite(""); this.wwrite(""); this.wwrite(""); this.wwrite(""); this.wwrite("
"); this.wwrite("" + this.gMonthName + " " + this.gYear + ""); this.wwrite("
"); this.wwrite(""); // Get the complete calendar code for the month.. vCode = this.getMonthlyCalendarCode(); this.wwrite(vCode); this.wwrite("
 "); if (this.gMonth == 11) { this.gMonth = 0; this.gYear++; } else { this.gMonth++; } } this.wwrite("
"); this.wwrite(""); g_popup.document.close(); } JSCalendar.prototype.getMonthlyCalendarCode = function() { var vCode = ""; var vHeader_Code = ""; var vData_Code = ""; vCode += "\n"; vCode += "body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333333; background-color: #ffffff; margin: 0px }\n"; vCode += "table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333333 }\n"; vCode += "td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333333 }\n"; vCode += "b { font-weight: bold }\n"; vCode += "a:link { color: #003399; text-decoration: underline; font-weight: bold }\n"; vCode += "a:visited { color: #003399; text-decoration: underline; font-weight: bold }\n"; vCode += "a:active { color: #003399; text-decoration: underline; font-weight: bold }\n"; vCode += "a:hover { color: #0000FF; text-decoration: underline; font-weight: bold }\n"; vCode += ".header-tool { background-color: #003399; font-size: 12px; color: #ffffff; font-weight: bold }\n"; vCode += ".MonthTableBorder { background-color: #dddddd }\n"; vCode += ".MonthTableHeader { color: #DDDDDD; background-color: #888888 }\n"; vCode += ".calBody { background-color: #eeeeee }\n"; vCode += ".calMonth { font-size: 12px }\n"; vCode += "a.DateSelect:link { color: #001177; text-decoration: underline; font-weight: bold }\n"; vCode += "a.DateSelect:visited { color: #001177; text-decoration: underline; font-weight: bold }\n"; vCode += "a.DateSelect:active { color: #001177; text-decoration: underline; font-weight: bold }\n"; vCode += "a.DateSelect:hover { color: #0000FF; text-decoration: underline; font-weight: bold }\n"; vCode += "a.nav:link { color: #003399; text-decoration: underline; font-weight: bold }\n"; vCode += "a.nav:visited { color: #003399; text-decoration: underline; font-weight: bold }\n"; vCode += "a.nav:active { color: #003399; text-decoration: underline; font-weight: bold }\n"; vCode += "a.nav:hover { color: #0000FF; text-decoration: underline; font-weight: bold }\n"; vCode += ".invalid { color: #cccccc }\n"; vCode += ".Today { color: #000;background-color:#ffffcc;padding:1px 6px }\n"; vCode += "\n"; return vCode; } JSCalendar.prototype.cal_header = function() { var vCode = ""; vCode += "\n"; vCode += "\n"; vCode += "\n"; vCode += "\n"; vCode += "\n"; vCode += "\n"; vCode += "\n"; vCode += "\n"; vCode += "\n"; return vCode; } JSCalendar.prototype.cal_data = function() { var vDate = new Date(g_today); vDate.setDate(1); vDate.setMonth(this.gMonth); vDate.setFullYear(this.gYear); var rightNow = new Date(g_today); var msDay = 86400000; var vFirstDay=vDate.getDay(); var vDay=1; var vLastDay=JSCalendar.get_daysofmonth(this.gMonth, this.gYear); var vOnLastDay=0; var vCode = ""; vCode += "\n"; for (i = 0; i < vFirstDay; i++) { vCode += "\n"; } // Write rest of the 1st week for (j = vFirstDay; j < 7; j++) { vCode += "\n"; vDay++; } vCode += "\n"; // Write the rest of the weeks for (k = 2; k < 7; k++) { vCode += "\n"; for (j = 0; j < 7; j++) { vCode += "\n"; vDay++; if (vDay > vLastDay) { vOnLastDay = 1; break; } } if (j == 6) { vCode += "\n"; } if (vOnLastDay == 1) { break; } } // Fill up the rest of last week with proper blanks, so that we get proper square blocks for (m = 1; m < (7 - j); m++) { vCode += "\n"; } vCode += ""; return vCode; } JSCalendar.prototype.format_day = function(vday) { var vNowDay = gNow.getDate(); var vNowMonth = gNow.getMonth(); var vNowYear = gNow.getFullYear(); if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear == vNowYear) { return ("" + vday + ""); } else { return (vday); } } JSCalendar.prototype.format_data = function(p_day) { var vData; var vMonth = this.gMonth + 1; vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth; var vMon = JSCalendar.get_month(this.gMonth).substr(0,3).toUpperCase(); var vFMon = JSCalendar.get_month(this.gMonth).toUpperCase(); var vY4 = new String(this.gYear); var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day; vData = vMonth + "\/" + vDD + "\/" + vY4; return vData; } function create_calendar(p_month, p_year) { g_calendar = new JSCalendar(p_month, p_year); g_calendar.show(); } function show_calendar(p_month, p_year) { if(isNetscape) { g_popup = window.open("", "Calendar", "width=500,height=245,status=no,resizable=yes,top=150,left=250"); } else { g_popup = window.open("", "Calendar", "width=500,height=240,status=no,resizable=yes,top=150,left=250"); } g_popup.opener = self; create_calendar(p_month, p_year); }
SunMonTueWedThuFriSat
 "; var checkDay = new Date(this.gYear, this.gMonth, vDay); if((checkDay - rightNow) / msDay > 0) { vCode += "" + this.format_day(vDay) + ""; } else { vCode += "" + this.format_day(vDay) + ""; } vCode += "
"; var checkDay = new Date(this.gYear, this.gMonth, vDay); if ((checkDay - rightNow) / msDay > -1) { vCode += "" + this.format_day(vDay) + ""; } else { vCode += "" + this.format_day(vDay) + ""; } vCode += "