// JavaScript Document <!--
/*
This holiday calendar is used in conjunction with the timestamp complexdate javascript that provides info based on day 
of the week and time of day. This one provides an opportunity to highlight certain days of the year that require special 
messages - Spring break, holidays, etc. It needs to be updated each December.

*/

d = new Date();
var Time;
Hours = d.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}
if (Hours > 12) {
Hours -= 12;
}
if (Hours == 0) {
Hours = 12;
}
Mins = d.getMinutes();
if (Mins < 10) {
Mins = "0" + Mins;
}	
//document.write('<font size=2 face=Arial><b>' + Hours + ":" + Mins + Time + '</b></font>');

d = new Date();
 day = d.getDay();
 month = d.getMonth();
 date = d.getDate();
 year = d.getYear();
 if (year < 1000)
 year+=1900
 cent = parseInt(year/100);
 g = year % 19;
 k = parseInt((cent - 17)/25);
 i = (cent - parseInt(cent/4) - parseInt((cent - k)/3) + 19*g + 15) % 30;
 i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1))*parseInt((21-g)/11));
 j = (year + parseInt(year/4) + i + 2 - cent + parseInt(cent/4)) % 7;
 l = i - j;
 emonth = 3 + parseInt((l + 40)/44);
 edate = l + 28 - 32*parseInt((emonth/4));
 emonth--;
 dayValue = d.getDay();
monthValue = d.getMonth();
month+=" "
if (monthValue == 0)
    month += "January";
if (monthValue == 1)
    month += "February";
if (monthValue == 2)
    month += "March";
if (monthValue == 3)
    month += "April";
if (monthValue == 4)
    month += "May";
if (monthValue == 5)
    month += "June";
if (monthValue == 6)
    month += "July";
if (monthValue == 7)
    month += "August";
if (monthValue == 8)
    month += "September";
if (monthValue == 9)
    month += "October";
if (monthValue == 10)
    month += "November";
if (monthValue == 11)
    month += "December";
 
 //document.write("<font face=verdana,arial size=2>");
 //document.write(month+=" " + " ");
 // if (date< 10) document.write("0" + date + ", ");
   //   else document.write(date + ", ");
//document.write( year + "  " + "</font> <b><font color=FF0000>");
   
 
 // January
  //exceptions/holidays
 if ((monthValue == 0) && (date > 0) && (date < 5 )) document.write("<br><font color=#cc3300>** Mugar Library is closed  Jan. 1-4 **</font><br>");


 
// February
 
 //Presidents Day
 if ((monthValue == 1) && (date > 9) && (date < 17 )) document.write("<br><font color=#cc3300>** Mugar Library is open   Monday Feb. 16 President's Day 8 am - Midnight **</font><br>");

 
 // March note:  day 0=Sun
   
//Spring Recess  
  if ((monthValue == 2) && (date > 2) && (date < 16 )) document.write("<br><font color=#cc3300>** Mugar Library is open normal hours Mar 7-15 (Spring Recess)**</font><br>");

 //exceptions/holidays

 

// April
 //Patriots' Day
 if ((monthValue == 3) && (date > 13) && (date < 21 )) document.write("<br><font color=#cc3300>** Mugar Library is open   Monday Apr. 20 Patriots' Day 8 am - Midnight **</font><br>");

//extended hours
if ((monthValue == 3) && (date > 25) && (date < 31)) document.write("<br><font color=#cc3300>** Mugar Extended Hours begin May 2nd (<a href=http://www.bu.edu/library/ask/main/exthoursmay.html>more info</a>)**</font><br>");
 
 
// May

//finals hours
if ((monthValue == 4) && (date > 0) && (date < 10)) document.write("<br><font color=#cc3300>** Mugar Extended Hours begin May 2nd (<a href=http://www.bu.edu/library/ask/main/exthoursmay.html>more info</a>)**</font><br>");

// COMMENCEMENT WEEK
 if ((monthValue == 4) && (date > 9) && (date < 18)) document.write("<br>**COMMENCEMENT WEEK - note change in hours**");

//Memorial Day

 if ((monthValue == 4) && (date > 18) && (date < 26)) document.write("<br><font color=#cc3300>** Mugar Library is open Monday May 25 Memorial Day 8 am - 11 pm **</font><br>");

// June
 
// normal summer hours
//4th of July week advance notice
 if ((monthValue == 5) && (date > 21)) document.write("<br>**<b>All libraries closed</b> Fri and Sat, July 3 & 4 - <font color=#cc3300>Independence Day</font>**" );



 // July
//4th of July week
 if ((monthValue == 6) && (date > 0) && (date < 5)) document.write("<br>**<b>All libraries closed</b> Fri and Sat, July 3 & 4 - <font color=#cc3300>Independence Day</font>**");
 
 
// August
 //holiday hours trigger for pre-Labor day week

 if ((monthValue == 7) && (date > 28)) document.write("<br><font color=#cc3300>** Mugar Library is open Monday September 7 Labor Day 8 am - 5 pm **</font><br>");
 
 
 // September
 //holiday hours trigger for Labor Day week 

if ((monthValue == 8) && (date > 0) && (date < 8)) document.write("<br><font color=#cc3300>** Mugar Library is open Monday September 7 Labor Day 8 am - 10 pm **</font><br>");


 // October
 // Columbus Day  10/12/09
 if ((monthValue == 9) && (date > 5) && (date < 13)) document.write("<br><font color=#cc3300>** Mugar Library is open Monday October 12 Columbus Day 7am - 2am**</font><br>");

  
 // November
 //Veteran's Day  11/11/09
 
if ((monthValue == 10) && (date < 12 )) document.write("<br><font color=#cc3300>** Mugar Library is open Veterans Day, Nov. 11 8am - 2am**</font><br>");

//Thanksgiving 
 
if ((monthValue == 10) && (date > 11) && (date < 27 )) document.write("<br><font color=#cc3300>** Mugar Library is closed Thanksgiving Day, Nov. 26 **</font><br>");

 
 // December
 //exceptions/holidays
 
if ((monthValue == 11) && (date > 7) && (date < 19)) document.write("<br><font color=#cc3300>** Mugar Extended Hours begin Dec. 12th (<a href=http://www.bu.edu/library/ask/main/exthours.html>more info</a>)**</font><br>");

if ((monthValue == 11) && (date > 14) && (date < 32 )) document.write("<br><font color=#cc3300>** Mugar Library is closed Dec 25-28 and Jan. 1-4 **</font><br>");
// normal hours
 
 
 

