// File: ...183.05Sp/12assets/calendar.js                   27 Dec 2004// Author: Dr. George Corliss, MU EECE, August, 2001// Frequently modified//     document.write('<p>In calendar.js</p><p>');// CODING ERROR: MOTD for project gives wrong datevar TuesTopic  = new Array();var TuesAssign = new Array();var OneAssign  = new Array();var ProjAssign = new Array();var OneAssignDue  = new Array();var OneAssignMOTD = new Array();var ProjAssignDue = new Array();var ProjAssignMOTD = new Array();var ExamDue    = new Array();var OneLabel   = new Array();var ProjLabel  = new Array();var Chapter    = new Array();var ChapLabel  = new Array();var examLegend = new Array();var examList   = new Array();var thisChapt;w_arr = '<img src="12assets/images/arrow.gif" width="7" height="7" alt="-">';Chapter[1] = "Introduction to Computer Graphics";Chapter[2] = "Initial Steps in Drawing Figures";Chapter[3] = "Additional Drawing Tools";Chapter[4] = "Vector Tools for Graphics";Chapter[5] = "Transformations of Objects";Chapter[6] = "Modeling Shapes with Polygonal Meshes";Chapter[7] = "Three-Dimensional Viewing";Chapter[8] = "Rendering Faces for Visual Realism";Chapter[9] = "Tools for Raster Displays";Chapter[10] = "Curve and Surface Design";Chapter[11] = "Color Theory";Chapter[12] = "Introduction to Ray Tracing";var numbChapter = 12;for (i = 1; i <= numbChapter; i ++) {  ChapLabel[i] = '<a href="ch' + padZero(i) + '.html">Chapter '  + i + '</a> ' + Chapter[i];  // ChapLabel[i] = 'Chapter '  + i + sp + Chapter[i];}OneLabel[0] = 'Who Are You?';OneLabel[1] = 'Ch. 2 Getting Started';OneLabel[2] = 'Ch. 2 Getting Started - II';OneLabel[3] = 'Ch. 3 Drawing Tools';OneLabel[4] = 'Ch. 4 Vector Tools';OneLabel[5] = 'Ch. 5 Transformations';OneLabel[6] = 'Ch. 6 Polygonal Meshes';var numbOneAssign = 5;for (i = 0; i <= numbOneAssign; i ++) {  OneAssign[i] = 'Assign ' + i + ': <a href="oneAssign' + padZero(i) + '.html">' + OneLabel[i] + '</a>';}ProjLabel[1] = 'Plan 1 - Requirements';ProjLabel[2] = 'Plan 2 - Specifications';ProjLabel[3] = 'Progress report';ProjLabel[4] = 'Draft final deliverable';ProjLabel[5] = 'Final deliverable';ProjLabel[6] = 'Presentation';var numbProjAssign = 6;for (i = 1; i <= numbProjAssign; i ++) {  ProjAssign[i] = 'Design project: <a href="projAssign' + padZero(i) + '.html">' + ProjLabel[i] + '</a>';}for (i = 1; i <= 17; i ++) { TuesAssign[i] = sp;  TuesTopic[i] = sp; }nw = 1;  ch = 2;  as = 0;TuesTopic[nw] = ChapLabel[1] + br + ChapLabel[ch];TuesAssign[nw] = "Read Chapters 1 - 2" + br + OneAssign[as];OneAssignDue[as] = getMonthAndDate(nw, Mon);nw = 2;  ch = 2;  as = 1;assignDueDay = Wed;assignDueDayName = getDayName(assignDueDay);TuesTopic[nw] = "Monday - Martin Luther King Day; classes excused" + br       + 'Tuesday midnight - Registration ends.  Last day to drop a class without a grade of "W"' + br      + ChapLabel[ch];OneAssignDue[as]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]    = "Read Chapter " + ch + br + getCalAssign(as);OneAssignMOTD[as] = getAssignMOTD(nw, as, 'oneAssign');nw = 3;  ch = 3;  as = 2;TuesTopic[nw]     = ChapLabel[2] + br + ChapLabel[ch];OneAssignDue[as]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]    = "Read Chapter " + ch + br + getCalAssign(as);OneAssignMOTD[as] = getAssignMOTD(nw, as, 'oneAssign');nw = 4;  ch = 3;  as = 3;TuesTopic[nw]     = ChapLabel[ch];OneAssignDue[as]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]    = "Read Chapter " + ch + br + getCalAssign(as);OneAssignMOTD[as] = getAssignMOTD(nw, as, 'oneAssign');nw = 5;  ch = 4;  pas = 1;TuesTopic[nw]       = ChapLabel[ch];ProjAssignDue[pas]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]      = "Read Chapter " + ch + br + getCalProjAssign(pas);ProjAssignMOTD[pas] = getAssignMOTD(nw, pas, 'projAssign');nw = 6;  ch = 4;  as = 4;TuesTopic[nw]     = ChapLabel[ch];OneAssignDue[as]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]    = "Read Chapter " + ch + br + getCalAssign(as);OneAssignMOTD[as] = getAssignMOTD(nw, as, 'oneAssign');nw = 7;  ch = 5;    pas = 2;TuesTopic[nw]     = ChapLabel[ch];ProjAssignDue[pas]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]      = "Read Chapter " + ch + br + getCalProjAssign(pas);ProjAssignMOTD[pas] = getAssignMOTD(nw, pas, 'projAssign');nw = 8;  ch = 5;TuesTopic[nw] = ChapLabel[ch]  + br + 'Wednesday: <a href="examMid08A.html">Mid exam 1</a>';ExamDue[1] = getMonthAndDate(nw, Wed);TuesAssign[nw] = "Mid Exam 1, Wednesday, " + getMonthAndDate(nw, Wed) + br + getCalAssign(as);examLegend[1] = "Wed., " + getMonDate(nw, Wed);examList[1]   = "Midterm Exam 1, Wednesday, " + getMonthAndDate(nw, Wed);nw = 9; ch = 6;  as = 5;TuesTopic[nw] = ChapLabel[ch] + br      + "<b>Thursday - Spring Break begins.</b>";OneAssignDue[as]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]    = "Read Chapter " + ch + br + getCalAssign(as);OneAssignMOTD[as] = getAssignMOTD(nw, as, 'oneAssign');nw = 10;TuesTopic[nw] = "<b>Spring Break.  Classes excused.</b>";nw = 11;  ch = 6;TuesTopic[nw] = "Tuesday - Classes resume.  Early registration for Fall Term 2008-2009 begins" + br       + "What do I need to finish my project?";TuesAssign[nw] = "Read Chapter 6 - 8, 12?";nw = 12;  ch = 7;  pas = 3;TuesTopic[nw] = "What do I need to finish my project?";ProjAssignDue[pas]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]      = getCalProjAssign(pas);ProjAssignMOTD[pas] = getAssignMOTD(nw, pas, 'projAssign');nw = 13;  ch = 7;  as = 6;TuesTopic[nw] = ChapLabel[ch];// OneAssignDue[as]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]    = "Read Chapter " + ch + br           + 'Friday - Deadline to Withdraw with "W"' + br 		  + 'See university <a href="http://www.marquette.edu/registrar/calendar/08springugraddates.shtml">Course Dates and Deadlines for Undergraduates</a>\n';// OneAssignMOTD[as] = getAssignMOTD(nw, as, 'oneAssign');nw = 14;  ch = 8;  pas = 4;TuesTopic[nw]     = ChapLabel[ch];ProjAssignDue[pas]  = getMonthAndDate(nw, assignDueDay);TuesAssign[nw]      = "Read Chapter " + ch + br + getCalProjAssign(pas);ProjAssignMOTD[pas] = getAssignMOTD(nw, pas, 'projAssign');nw = 15;  ch = 12;TuesTopic[nw] = ChapLabel[ch];TuesAssign[nw]    = "Read Chapter " + ch;nw = 16;  pas = 5;TuesTopic[nw] = 'Presentations; Assessment';ProjAssignDue[pas]  = getMonthAndDate(nw, Mon);TuesAssign[nw]    = 'Presentations' + br + ProjAssign[pas] + ". Due Monday, " + ProjAssignDue[pas];ProjAssignMOTD[pas] = getAssignMOTD(nw, pas, 'projAssign');pas = 6;ProjAssignDue[pas]  = getMonthAndDate(nw, Mon);TuesAssign[nw]    = TuesAssign[nw] + br + ProjAssign[pas] + ". Due Monday, " + ProjAssignDue[pas];ProjAssignMOTD[pas] = getAssignMOTD(nw, pas, 'projAssign');nw = 17;TuesTopic[nw] = '<a href="examFinal08.html">Final exam</a>';ExamDue[2] = getMonthAndDate(nw, Mon);var univSpringExams = "See the university "          + '<a href="http://www.marquette.edu/registrar/calendar/spring08exams.shtml">Final Exam Schedule</a>';TuesAssign[nw] = "Final Exam, Monday, 3:30 - 5:30 P.M., " + getMonthAndDate(nw, Mon)          + br + univSpringExams;examLegend[2] = "Mon. 3:30 - 5:30 P.M., " + getMonDate(nw, Mon);examList[2]   = TuesAssign[nw];function emitWeekCalendar (wk) {  MonDate = new Date(semesterStartDate.getTime() + (7*wk - 7) * (1000 * 60 * 60 * 24));  document.write('<tr valign = "top"><td rowspan = "2"><b>Wk ' + wk + ':<br>'   + '<a href = "cal_' + padZero(wk) + '.html">'    + getMonthAbbrev(MonDate.getMonth())   + ' ' + MonDate.getDate() + '</a></b></td>\n');   document.write('<td class= cal">' + TuesTopic[wk] + '</td>\n');   document.write('</tr><tr valign="top">\n');   document.write('<td class="calAssign">' + TuesAssign[wk] + '</td>\n');   document.write('</tr>\n');}function OneAssn(ch) {   document.write(OneAssign[ch] + '. Due ' + OneAssignDue[ch]);}function ProjAssn(ch) {   document.write(ProjAssign[ch] + '. Due ' + ProjAssignDue[ch]);}function GradAssn(ch) {   document.write(GradAssign[ch]  + '. Due ' + GradAssignDue[ch]);}function toChapter(ch) {   document.write('Chapter ' + ch + ' <a href="ch' + ch + '.html">' + Chapter[ch] + '</a>');}function toNextChapter(ch) {   if (ch < 1) { ch = 1; }   if (ch < numbChapter) {      nextCh = ch+1;      document.write('<h3>Go to ' + ChapLabel[nextCh] + '</h3><p>&nbsp;</p>\n');   }}function toThisWk() {   document.write('<a href="cal_' + padZero(thisWk) + '.html" class="navBanner">This Wk</a>');}function toThisWeek () {  // var r = Math.round(noNav*Math.random() - 0.49);  document.write('<a href="cal_' + padZero(thisWeek) + '.html">'     + '<img src="../12assets/zimag_navs/nav_thisWeek66.gif" '     + 'alt="This week\'s notes" width="110" height="110" border="0"></a>');}function assignDue(one, n) {   if (one == 1) {     document.write('Due ' + OneAssignDue[n]);   } else {     document.write('Due ' + ProjAssignDue[n]);   }}function getCalAssign(as) {      return OneAssign[as] + ". Due " + assignDueDayName + ", " + OneAssignDue[as];}function getCalProjAssign(as) {      return ProjAssign[as] + ". Due " + assignDueDayName + ", " + ProjAssignDue[as];}function getAssignMOTD(nw, as, oneOrProj) {    return ' <a href="' + oneOrProj + padZero(as) + '.html" class = "motd">'       + as + ' (' + getMonthSlashDate(nw, assignDueDay) + ')</a>';}function emitCourseTitle() {  document.write('<font color="#003366" size="+2"><strong>' + cDesignation + sp + cTitle        + '</strong></font><br><font color="#003366" size="+1"><strong>' 		+ cInstructor + ", " + cSemester + '</strong></font>\n');}function emitNavBar(c) {  document.write('<a class="menuItem" href="syllabus.html" onMouseOver="HM_f_PopUp(\'elMenu2\',event)" '     + 'onMouseOut="HM_f_PopDown(\'elMenu2\')">About ' + cNumber + '</a></td>\n'     + '<td align="center" background="../12assets/zimag_navs/' + c + '_subnav_bac.gif"> <a class="menuItem" href="assignments.html" onMouseOver="HM_f_PopUp(\'elMenu3\',event)" '     + 'onMouseOut="HM_f_PopDown(\'elMenu3\')">Assignments</a></td>\n'     + '<td align="center" background="../12assets/zimag_navs/' + c + '_subnav_bac.gif"> <a class="menuItem" href="calendar.html" onMouseOver="HM_f_PopUp(\'elMenu4\',event)" '     + 'onMouseOut="HM_f_PopDown(\'elMenu4\')">Calendar</a></td>\n'     + '<td align="center" background="../12assets/zimag_navs/' + c + '_subnav_bac.gif"> <a class="menuItem" href="sites.html" onMouseOver="HM_f_PopUp(\'elMenu5\',event)" '     + 'onMouseOut="HM_f_PopDown(\'elMenu5\')">Resources</a></td>\n'     + '<td align="center" background="../12assets/zimag_navs/' + c + '_subnav_bac.gif"> <a class="menuItem" href="sitecontents.html" onMouseOver="HM_f_PopUp(\'elMenu6\',event)" '     + 'onMouseOut="HM_f_PopDown(\'elMenu6\')">Site contents</a></td>\n'     + '<td align="center" background="../12assets/zimag_navs/' + c + '_subnav_bac.gif"> <a class="menuItem" href="find.html">Find in ' + cNumber + '</a></td>\n'     + '<td background="../12assets/zimag_navs/' + c + '_subnav_bac.gif">&nbsp;\n');}function emitCrumbBar () {    document.write('&nbsp; ' + cMUCrumbLink + ' &gt; ' + cDeptCrumbLink + ' &gt; ' + cInstrCrumbLink + '\n');    document.write('&gt; <a class="crumbs" href="' + cURL + '">' + cNumber + '</a> &gt; \n');}function cOtherCourse () {  course.enrolled_in = cSwitch;  course.store();  window.location = window.location;}function hillCode(ch) {   document.write('Hill source code for <a href = "13materials/hill_code/ch'      + ch + '/">Chapter ' + ch + '</a> (protected directory)\n');}var examplesDir = '13materials/hill_corliss/';function sourceExecute(directory, sourceFile, executeFile) {   document.write('Source: <a href = "' + examplesDir + 'Fig' + directory      + '/fig' + sourceFile + '.cpp">fig' + sourceFile + '.cpp</a>, \n'      + 'Windows executable: <a href = "' + examplesDir + 'Fig' + directory      + '/fig' + executeFile + '.exe">fig' + executeFile + '.exe</a>\n');}function sourceExecuteX3(directory) {   sourceExecute(directory, directory, directory);}function sourceExecuteX2(directory, sourceFile) {   sourceExecute(directory, sourceFile, sourceFile);}function emitAngelTutorsExample (f, lab) {   document.write(lab + ' - Source: <a href = "13materials/angel_tutors/' + f + '.c">' + f + '.c</a>, \n'      + 'Windows executable: <a href = "13materials/angel_tutors/' + f + '.exe">' + f + '.exe</a><br>\n');}function AngelBookRefShort() {   document.write('Angel, <i>Interactive Computer Graphics,</i> '      + '<a href="13materials/angel_book/">examples</a> (directory)\n');}function emitAngelBookExample (f, lab) {   document.write(lab + ' - Source: <a href = "13materials/angel_book/' + f + '.c">' + f + '.c</a>, \n'      + 'Windows executable: <a href = "13materials/angel_book/' + f + '.exe">' + f + '.exe</a><br>\n');}function chaptCrumb(ch) {   thisChapt = ch;    document.write('Ch' + ch + ' ' + Chapter[ch]);}function chaptBodyHead(ch) {   document.write('Discussion Notes on Chapter ' + ch + '<br>' + Chapter[ch] + '\n');   document.write('<br>&nbsp;<table align="center" border="0" cellspacing="2" cellpadding = "3"><tr><td class="calNav">Chapter</td>\n');   for (i = 1; i <= 9; i ++) {      document.write('<td class="calNav"><a class="calNav" href="ch' + padZero(i) + '.html">' + i + '</a></td>\n');   }   document.write('</tr><tr><td class="calNav">Code</td><td class="calNav">&nbsp;</td>\n');  for (i = 2; i <= 9; i ++) {      document.write('<td class="calNav"><a class="calNav" href="13materials/hill_code/ch' + i + '">' + i + '</a></td>\n');  }  document.write('</tr></table>\n');}//    document.write('<p>In calendar.js</p><p>');
