/*******
holidays.js

Copyright (c) 2001 Corey Chapman (cchapman@xnull.com)
*******/

calendar = new Date();
day = calendar.getDay();
month = calendar.getMonth();
date = calendar.getDate();
year = calendar.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 - 31*parseInt((emonth/4));
emonth--;

var dayname = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
var monthname = new Array ("01","02","03","04","05","06","07","08","09","10","11","12" );

printholiday = "";

// Easter
//if ((month == emonth) && (date == edate)) printholiday = "Easter Sunday (Western)";
// January
if (month == 0) {
  if (date == 1) printholiday = "Happy New Year!";
  else if (date == 6) printholiday = "Today is Aron Eisenberg's Birthday (Ensign Nog, DS9)";
  else if (date == 7) printholiday = "Today is Mark Allen's Birthday (Morn, DS9)";
  else if (date == 11) printholiday = "Happy Birthday, Trekkie Liesel Chong (aka Janeway)";
  else if (date == 15) printholiday = "Happy Birthday, Trekkie Ian Loke (aka J. Archer)";
  else if (date == 20) printholiday = "Today is DeForest Kelley's Birthday (Dr. Leonard McCoy, TOS)";
  else if (date == 23) printholiday = "Happy Birthday, Trekkie Yos Vincenzo (aka Genesis)";
  else if (date == 24) printholiday = "Happy Birthday, Trekkie Janice Hu (aka Precious Swallow, Superstar)";
  else if (date == 31) printholiday = "Happy Birthday, Trekkie Muhd Imran (aka Imran)";
}
// February
else if (month == 1) {
  if (date == 2) printholiday = "Today is Brent Spiner's Birthday (Lt.Commander Data, TNG)";
  else if (date == 8) printholiday = "Today is Ethan Phillips's Birthday (Neelix, VOY)";
  else if (date == 14) printholiday = "Today is Andrew Robinson's Birthday (Elim Garak, DS9)";
  else if (date == 16) printholiday = "Today is LeVar Burton's Birthday (Lt.Cmdr Geordi LaForge, TNG)";
  else if (date == 22) printholiday = "Birthdays of Jeri Ryan (7-of-9,VOY) & Trekkie Shiow Wei Hao (aka Wei)";
  else if (date == 23) printholiday = "Today is Majel Barret's Birthday (Chapel,TOS; Lwaxana Troi,TNG)";
  else if (date == 26) printholiday = "Today is Chase Masterson's Birthday (Leeta, DS9)";
}
// March
else if (month == 2) {
  if (date == 3) printholiday = "Today is James Doohan's Birthday (Capt. Montgomery Scott, TOS)";
  else if (date == 5) printholiday = "Today is Jolene Blalock's Birthday (Sub-Commander T'Pol, ENT)";
  else if (date == 18) printholiday = "Today is J.G. Hertzler's Birthday (General Martok, DS9)";
  else if (date == 19) printholiday = "Today is Connor Trineer's Birthday (Cmdr Charles Tucker, ENT)";
  else if (date == 20) printholiday = "Today is John DeLancie's Birthday ( &quot;Q&quot; , TNG, DS9, VOY)";
  else if (date == 21) printholiday = "Happy Birthday, Trekkie James Ng (aka Captain James)";
  else if (date == 22) printholiday = "Today is William Shatner's Birthday (Capt. James T. Kirk, TOS)";
  else if (date == 26) printholiday = "Today is Leonard Nimoy's Birthday (Captain Spock, TOS)";
  else if (date == 29) printholiday = "Today is Marina Sirtis's Birthday (Counselor Deanna Troi, TNG)";

}
// April
else if (month == 3) {
  if (date == 1) printholiday = "April Fools' Day! Grace Lee Whitney's Birthday (Yeoman Rand, TOS)";
  else if (date == 7) printholiday = "Today is FIRST CONTACT DAY (7 April 2063)";
  else if (date == 8) printholiday = "Today is Singapore Maquis Day!";
  else if (date == 13) printholiday = "Happy Birthday, Trekkie Harry Chua (aka peabh)";
  else if (date == 15) printholiday = "REMINDER: Today is the last day to submit your Income Tax!";
  else if (date == 20) printholiday = "Today is George Takei's Birthday (Captain Hikaru Sulu, TOS)";
  else if (date == 22) printholiday = "Today is Earth Day! Save the planet, our planet!";
  else if (date == 29) printholiday = "Today is Kate Mulgrew's Birthday (Captain Kathryn Janeway, VOY)";
  else if ((day == 5) && (date > 16) && (date< 22)) printholiday = "Today is Good Friday";
  else if ((day == 1) && (date > 19) && (date< 25)) printholiday = "Today is Easter Monday";
}
// May
else if (month == 4) {
  if (date == 1) printholiday = "Today is Labour Day! Happy Birthday, Trekkie Darren Seow (aka oprimau)";
  else if (date == 5) printholiday = "Today is Marc Alaimo's Birthday (Gul Dukat, DS9)";
  else if (date == 20) printholiday = "Today is John Billingsley's Birthday (Dr. Phlox, ENT)";
  else if (date == 23) printholiday = "Happy Birthday, Trekkie Shahul Hameed Bin Jonit (aka Darkman)";
  else if (date == 30) printholiday = "Birthdays of Michael Piller (Producer) & Colm Meaney (O'Brien,TNG/DS9)";
  else if (date == 31) printholiday = "Happy Birthday, Trekkie Fiona Chia (aka Dori)";
  else if ((day == 0) && (date > 7) && (date< 16)) printholiday = "Happy Mother's Day";
}
// June
else if (month == 5) {
  if (date == 1) printholiday = "Today is Rene Auberjonois's Birthday (Security Chief Odo, DS9)";
  else if (date == 2) printholiday = "Birthday of Anthony Montgomery (Ensign Travis Mayweather, ENT)";
  else if (date == 22) printholiday = "Today is Tim Russ's Birthday (Lt.Commander Tuvok, VOY)";
  else if (date == 28) printholiday = "Happy Birthday, Trekkies Kang Kee Yong and Kelvin Lim";
  else if (date == 30) printholiday = "Today is Jeri Taylor's Birthday (Co-Producer, VOY)";
  else if ((day == 0) && (date > 15) && (date< 24)) printholiday = "Happy Father's Day";
}
// July
else if (month == 6) {
  if (date == 1) printholiday = "Today is Dominic Keating's Birthday (Lt. Malcolm Reed, ENT)";
  else if (date == 4) printholiday = "Today is USA Independence Day";
  else if (date == 9) printholiday = "Today is Linda Park's Birthday (Ensign Hoshi Sato, ENT)";
  else if (date == 13) printholiday = "Today is Patrick Stewart's Birthday (Capt. Jean-Luc Picard, TNG)";
  else if (date == 25) printholiday = "Happy Birthday, Trekkie Vera Handayani (aka Seven-of-Nine)";
  else if (date == 26) printholiday = "Today is Nana Visitor's Birthday (Colonel Kira Nerys, DS9)";
  else if (date == 29) printholiday = "Today is Wil Wheaton's Birthday (Cadet Wesley Crusher, TNG)";
}
// August
else if (month == 7) {
  if (date == 7) printholiday = "Today is Cirroc Lofton's Birthday (Jake Sisko, DS9)";
  else if (date == 4) printholiday = "Happy Birthday, Trekkie Benedict Chew (aka sgstvoy)";
  else if (date == 9) printholiday = "Happy National Day, Singapore!";
  else if (date == 11) printholiday = "Happy Birthday, Trekkie Jeremy Fu (aka Lanman)";
  else if (date == 14) printholiday = "Today is Brannon Braga's Birthday (Producer, VOY)";
  else if (date == 19) printholiday = "Birthdays of Gene Roddenberry, Jonathan Frakes, Diana Muldaur";
  else if (date == 24) printholiday = "Today is Jennifer Lien's Birthday (Kes, VOY)";
  else if (date == 28) printholiday = "Today is Gates McFadden's Birthday (Dr. Beverly Crusher, TNG)";
  else if (date == 29) printholiday = "Happy Birthday, Trekkie Samuel Tan (aka Techmech)";
}
// September
else if (month == 8) {
  if (date == 8) printholiday = "Today is STAR TREK DAY ... Happy Anniversary !";
  else if (date == 9) printholiday = "Today is Jeffrey Combs's Birthday (Weyoun, DS9)";
  else if (date == 11) printholiday = "Today is Roxann Dawson's Birthday (Lt. B'Elanna Torres, VOY)";
  else if (date == 14) printholiday = "Birthday of Walter Koenig (Cmdr Pavel Andreievich Chekov, TOS)";
  else if (date == 23) printholiday = "Today is Rosalind Chao's Birthday (Keiko O'Brien, DS9)";
  else if (date == 25) printholiday = "Happy Birthday, Trekkie Leong Khin Meng (aka Chakotay Kolopak)";
}
// October
else if (month == 9) {
  if (date == 1) printholiday = "Happy Birthday, Trekkie Lim Hee Sen (aka lhs1701)";
  else if (date == 2) printholiday = "Birthday of Avery Brooks (Capt. Benjamin Lafayette Sisko, DS9)";
  else if (date == 4) printholiday = "Today is GENE RODDENBERRY DAY ... declared by El Paso, Texas, USA";
  else if (date == 9) printholiday = "Today is Scott Bakula's Birthday (Capt. Jonathan Archer, ENT)";
  else if (date == 10) printholiday = "Happy Birthday, Trekkies Jonathan Wong(aka Garak), Joel Foo(aka Kube)";
  else if (date == 11) printholiday = "Happy Birthday, Trekkie Ahmad Asrorie (aka Lt Hartson, Azaris)";
  else if (date == 15) printholiday = "Today is Mark Lenard's Birthday (Ambassador Sarek, TOS)";
  else if (date == 17) printholiday = "Happy Birthday, Trekkie James Lee (aka Dr EMH)";
  else if (date == 23) printholiday = "Happy Birthday, Ira Steven Behr (Producer, DS9) & Trekkie Valdore";
  else if (date == 24) printholiday = "Happy United Nations Day! Happy Birthday, Trekkie Joshua Bok(aka Josh)";
  else if (date == 26) printholiday = "Happy Birthday, Trekkie Joshua Sim (aka Jackle)";
  else if (date == 27) printholiday = "Today is Robert Picardo's Birthday (EMH, VOY)";
  else if (date == 29) printholiday = "Happy Birthday, Trekkie Julian Ng (aka Dr Richmond, Vampirovibrio)";
  else if (date == 31) printholiday = "Happy Halloween !";
}
// November
else if (month == 10) {
  if (date == 5) printholiday = "Today is Armin Shimerman's Birthday (Quark, DS9)";
  else if (date == 9) printholiday = "Today is Robert Duncan McNeill's Birthday (Lt. Tom Paris, VOY)";
  else if (date == 12) printholiday = "Today is Max Grodénchick's Birthday (Rom, DS9)";
  else if (date == 13) printholiday = "Today is Whoopi Goldberg's Birthday (Guinan, TNG)";
  else if (date == 19) printholiday = "Robert Beltran (Chakotay,VOY), Terry Farrell (Jadzia Dax,DS9) birthdays";
  else if (date == 21) printholiday = "Today is Alexandra Siddig's Birthday (Dr. Julian Bashir, DS9)";
  else if (date == 24) printholiday = "Today is Denise Crosby's Birthday (Lt. Tasha Yar, TNG)";
}
// December
else if (month == 11) {
  if (date == 9) printholiday = "Today is Michael Dorn's Birthday (Lt.Cmdr Worf, TNG/DS9)";
  else if (date == 10) printholiday = "Today is Human Rights Day!";
  else if (date == 15) printholiday = "Today is Garrett Wang's Birthday (Ensign Harry Kim, VOY)";
  else if (date == 20) printholiday = "Today is Nicole deBoer's Birthday (Lt. Ezri Dax, DS9)";
  else if (date == 24) printholiday = "Today is Christmas Eve!";
  else if (date == 25) printholiday = "Merry Christmas! Today is Rick Berman's Birthday (Exec Producer)";
  else if (date == 28) printholiday = "Today is Nichelle Nichols's Birthday (Commander Uhura, TOS)";
  else if (date == 31) printholiday = "Today is New Year's Eve!";
}

// Print the resulting date/holiday string
document.write( printholiday );
