<!--
/*
 Copyright © Eugene Vassiltsov. But please, let me know if you will use it.
*/

 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 ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
 var monthname = 
 new Array ("January","February","March","April","May","June","July","August","September","October","November","December" );
 //test added here
today = new Date();
realdate = today.getDate();
end = "<sup>th</sup>";
if (realdate==1 || realdate==21 || realdate==31) end="<sup>st</sup>";
if (realdate==2 || realdate==22) end="<sup>nd</sup>";
if (realdate==3 || realdate==23) end="<sup>rd</sup>";
realdate+=end;
//end test added 
document.write("<center><b>");
 document.write("Today is ");
 document.write(dayname[day] + "<br>");
 document.write(monthname[month] + " ");
 document.write(realdate + " ");
 document.write(year + "    <br><font color=FF0000>");

 // Easter
 if ((month == emonth) && (date == edate)) document.write("<br><img src='./images/easter1.jpg'><br>Easter Sunday");
 if ((month == emonth) && (date == edate-2)) document.write("<br><img src='./images/kite.jpg'><br>Good Friday");
 // January
 if ((month == 0) && (date == 1)) document.write("<br><img src='./images/newyear1.jpg'><br>New Year's Day");
 if ((month == 0) && (date == 15)) document.write("Adults Day (Japan)");
 if ((month == 0) && (day == 1) && (date > 14) && (date< 22)) document.write("Martin Luther King's Birthday");


 // February
 if ((month == 1) && (date == 2)) document.write("Groundhog Day");
 if ((month == 1) && (date == 3)) document.write("<br><img src='./images/chin-new-year.jpg'><br>Chinese New Year"); //checked for 2011
 if ((month == 1) && (date == 14)) document.write("<br>&#9829; &#9829; &#9829; &#9829; <br>St. Valentine's Day");
 if ((month == 1) && (date == 22)) document.write("Washington's Birthday");
 if ((month == 1) && (date == 29)) document.write("Leap Day");
 // March
 if ((month == 2) && (date == 17)) document.write("<br><img src='./images/stpatrick.jpg'><br>");
 if ((month == 2) && (day == 0) && (date > 8) && (date< 15)) document.write("<br><img src='./images/springforward.jpg'><br>Daylight Savings Time Begins");

 // April
 if ((month == 3) && (date == 3)) document.write("Mother's Day in UK"); //checked for 2011
 if ((month == 3) && (date == 1)) document.write("April Fools' Day");
 if ((month == 3) && (date == 15) && (day != 0)) document.write("Income Tax Day (USA),   ");
 if ((month == 3) && (date == 16) && (day == 1)) document.write("Income Tax Day (USA) ");
 if ((month == 3) && (date == 22)) document.write("Earth Day");
 // May
 if ((month == 4) && (date == 1)) document.write("May Day");
 if ((month == 4) && (date == 24)) document.write("<br><img src='./images/anbdaflag02.gif'><br>Bermuda Day"); //checked for 2011
 if ((month == 4) && (day == 0) && (date > 7) && (date< 16)) document.write("Mother's Day in USA & Bermuda");
 if ((month == 4) && (day == 1) && (date > 24)) document.write("Memorial Day");
 // June
 if ((month == 5) && (date == 6)) document.write("Anniversary of D-Day");
 if ((month == 5) && (date == 20)) document.write("National Heroes Day"); //checked for 2011
 if ((month == 5) && (date == 15)) document.write("World Elder Abuse Awareness Day");
 if ((month == 5) && (date == 21)) document.write("Summer Solstice");
 if ((month == 5) && (day == 0) && (date > 15) && (date< 24)) document.write("Father's Day");
 // July
 if ((month == 6) && (date == 1)) document.write("<br><img src='./images/maple.jpg'><br>Canada Day");
 if ((month == 6) && (date == 4)) document.write("<br><img src='./images/starsnstripes.jpg'><br>Independence Day (USA)");
 if ((month == 6) && (date == 14)) document.write("Bastille Day (France)");
 if ((month == 6) && (date == 28)) document.write("Cup Match"); //checked for 2011
 if ((month == 6) && (date == 29)) document.write("Cup Match"); //checked for 2011
 // August
 if ((month == 7) && (date == 15)) document.write("Independence Day (India)");
 // September
 if ((month == 8) && (day == 1) && (date > 0) && (date< 8)) document.write("Labour Day");
 if ((month == 8) && (date == 15)) document.write("Respect for the Aged Day (Japan)");
 // October
 if ((month == 9) && (day == 1) && (date > 7) && (date< 16)) document.write("Columbus Day (USA)");

 if ((month == 9) && (date == 24)) document.write("<br><img src='./images/un.jpg'><br>United Nations Day");
 if ((month == 9) && (date == 31)) document.write("<br><img src='./images/pumpkin.jpg'><br>Halloween");
 // November
 if ((month == 10) && (day == 0) && (date > 0) && (date< 8)) document.write("<br><img src='./images/fall-back3.jpg'><br>Daylight Savings Time Ends");
 if ((month == 10) && (date == 1)) document.write("All Saints Day");
 if ((month == 10) && (date == 2)) document.write("All Souls Day");
 if ((month == 10) && (date == 11)) document.write("<br><img src='./images/poppy.gif'><br>Remembrance Day");
 if ((month == 10) && (day == 4) && (date > 23) && (date< 30)) document.write("<br><img src='./images/cornucopia.jpg'><br>Thanksgiving (USA)");
 if ((month == 10) && (date == 30) && (day == 4)) document.write("Thanksgiving (USA)");

 // December
 if ((month == 11) && (date == 10)) document.write("Human Rights Day");
 if ((month == 11) && (date == 21)) document.write("Winter Solstice");
 if ((month == 11) && (date == 24)) document.write("<br><img src='./images/xmas01.jpg'><br>Christmas Eve");
 if ((month == 11) && (date == 25)) document.write("<br><img src='./images/xmas01.jpg'><br>Christmas");
 if ((month == 11) && (date == 26)) document.write("<br><img src='./images/xmas01.jpg'><br>Boxing Day");
 if ((month == 11) && (date == 31)) document.write("New Year's Eve");
 document.write("</font><br></b></center>");
//-->

