// JavaScript Document

//height="+h+",
//special holiday script
var	Today =	new Date();
var	mo=Today.getMonth();
var	numDate = Today.getDate();
var	nDay = Today.getDay();
var yr = Today.getYear();
var	Month = new Array( "January","February","March","April","May","June","July","August","September","October","November","December");
var	Day = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");

var 	msg;

//find the date of the 4th Monday, function is called only if it is May
function FindMemDate(){
	memoDay = new Date();
	memoDay.setDate(1); //set to 1st day of Month
	var tempDay = memoDay.getDay(); //what day is it?
	
	DaysTilSunday = 7-tempDay;  //how many days until the end of the week
	DateOfMemorialDay = DaysTilSunday + 23;
	if (DateOfMemorialDay <= 24){
		DateOfMemorialDay = DateOfMemorialDay + 7;
		}
		return DateOfMemorialDay;
	}
//find the date of the 4th Thursday, function is called only if it is November
function FindThanksDate(){
	TurkeyDay = new Date();
	//TurkeyDay.setYear(1994); //inserted for testing
	//TurkeyDay.setMonth(10); //inserted for testing
	TurkeyDay.setDate(1); //set to 1st day of Month
	//var m = TurkeyDay.getMonth();//inserted for testing
	var tempDay = TurkeyDay.getDay(); //what day is it?
	DaysTilSunday = 7-tempDay;  //how many days until the end of the week
	DateOfThanksgivingDay = DaysTilSunday + 26;
	if (DateOfThanksgivingDay >= 29){
		DateOfThanksgivingDay = DateOfThanksgivingDay - 7;
		}
	return DateOfThanksgivingDay;
	}

function SpecialDay(){
   switch(mo){
	case 0:	// special dates in January
	{
		if(1==numDate){
			msg="<br />Happy New Year's"
			return msg;
		}	
		if(9==numDate){
			msg="<br />Today is Greg's Birthday!  Happy Birthday"
			return msg;
		}	
		if(0<=(23-numDate) &&(23-numDate)< 7){
			var DaysLeft = (23-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until Dad's Birthday";
				}
			else{
				msg="<br />Today is Dad's Birthday!  Happy Birthday"
			}
			return msg;
		}
		break;
	} // end of special days in January
	
	case 1:	// special dates in February
	{
		if(2==numDate){
			msg="<br />Today is Groundhog Day!<br /> Let's go Phil"
			return msg;
		}
		if(5==numDate){
			msg="<br />Hammerin' Hank Aaron<br />Happy Birthday"
			return msg;
		}
		if(6==numDate){
			msg="<br />Hat's off to the Babe<br />Happy Birthday"
			return msg;
		}				
		if(0<=(14-numDate) &&(14-numDate)< 7){
			var DaysLeft = (14-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until Valentine's Day";
				}
			else{
				msg="<br />Happy Valentine's Day"
			}
			return msg;
		}
		if(24==numDate){
			msg="<br />Happy Birthday<br />Honus Wagner"
			return msg;
		}
		if(25==numDate){
			msg="<br />We miss you,<br />George Harrison"
			return msg;
		}
		break;		
	} // end of special days in February
	
	case 2:	// special dates in March
	{		
		if(0<=(17-numDate) &&(17-numDate)< 7){
			var DaysLeft = (17-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until St. Patrick's Day";
			}
			else{
				msg="<br />Corned Beef, cabbage and green beer.  yummm";
			}
			return msg;
		}
		break;		
	} // end of special days in March	
	
	case 3:	// special dates in April
	{
		if(1==numDate){
			msg="<br />Today is Abraham Lincoln's Birthday!  Happy Birthday Abe";
			msg += "<br />Let's chop down a cherry pie...or tree...or something";
			return msg;
		}	
		if(3==numDate){
			msg="Today is Scot's Birthday!<br />  Happy Birthday"
			return msg;
		}	
		if(0<=(24-numDate) &&(24-numDate)< 7){
			var DaysLeft = (24-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until Sean's Birthday";
				}
			else{
				msg="<br />Today is Sean's Birthday!  Happy Birthday"
			}
			return msg;
		}
		if(0<=(30-numDate)&&(30-numDate)<=5){
			var DaysLeft = (30-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until Naiying's Birthday";
			}
			else{
				msg="<br />Today is Naiying's Birthday!  Happy Birthday"
			}
			return msg;
		}
		break;		
	} // end of special days in April
	
	case 4:	// special dates in May
	{
		if( 0<=(FindMemDate()-numDate) && (FindMemDate()-numDate)<=7 )
		{
			var DaysLeft = (FindMemDate()-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until Memorial Day";
			}
			else{
				msg="<br />Today is Memorial Day! Thanks to all who paid for our freedom.";
			}
			return msg;
		}
		break;		
	} // end of special days in May
			
	case 5:	// special dates in June
	{
		if(0<=(14-numDate)&&(14-numDate)<=7){
			var DaysLeft = (14-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days until America's Flag Day!";
			}
			else{
				msg="<br />Today is Flag Day!"
			}
			return msg;
		}
		if(0<=(21-numDate)&&(21-numDate)<=7){
			var DaysLeft = (21-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days until the start of Summer!";
			}
			else{
				msg="<br />Today is Summer! Time to hit the	beach."
			}
			return msg;
		}
		break;		
	} // end of special days in June
			
	case 6:	// special dates in July
	{			
		if(0<=(4-numDate)&&(4-numDate)<=4){
			var DaysLeft = (4-numDate);
			if(DaysLeft != 0){ 
				msg = "there are "+DaysLeft+" days remaining until Independance Day";
			}
			else{
				msg = "Happy Fourth of July! Thanks, TJ, JA and the rest of the gang back in Philadelphia";
			}
		return msg;
		}

	switch(numDate){
		case 16:
			{
			msg="Happy Birthday to Shoeless Joe Jackson.";
			msg += " One of the greatest.";
			return msg;
			}
		case 17:
			{
			msg="Happy Birthday to George Barnes";
			msg +="and Lou Boudreau";
			return msg;
			}
		case 19:
			{
			msg="Happy Birthday to Brian May";
			return msg;
			}
		case 20:
			{
			msg="Happy Birthday to Carlos Santana";
			return msg;
			}			
		case 21:
			{
			msg="Tinker to Evers to Chance.";
			msg=" Johnny Evers born this day in 1881";			
			return msg;
			}
		case 26:
			{
			msg="Happy Birthday to Mick Jagger";
			msg=" and also to Hoyt Wilhelm";			
			return msg;
			}			
		case 27:
			{
			msg="Tinker to Evers to Chance.";
			msg=" Joe Tinker born this day in 1880";			
			return msg;
			}	
	        }	// end inner switch				
		break;			
	} // end of special days in July
			
	case 7:	// special dates in August
	{			
		msg = "there are no special holidays in the U.S.A. in August...except for the day the children return to school :)<br />  Many other countries celebrate their Independance Day or Liberation Day this month.";
		return msg;
		break;
	} // end of special days in August

	case 8:	// special dates in September
	{						
	switch(numDate){
		case 1:
		{
			msg=" Nap Lajoie born this day in 1874";			
			return msg;
		}
		case 5:
		{
			msg=" Nap Lajoie born this day in 1874";			
			return msg;
		}
		case 13:
		{
			msg="Sha doo be dop doo wee!<br />";
			msg=msg + "Mel Torme born this day in 1925";			
			return msg;
		}
		case 16:
		{
			msg="The Thrill continues.<br />";
			msg=msg + " B.B. King born this day in 1925";			
			return msg;
		}
		case 23:
		{
			msg="What I Say<br />";
			msg=msg + " Ray Charles born this day in 1930";			
			return msg;
		}
	} // end inner switch
		
		if(0<=(21-numDate)&&(21-numDate)<=7){
			var DaysLeft = (21-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are only "+DaysLeft+" days of Summer remaining!";
			}
			else{
				msg="<br />Today is the start of Autunmn.  I can see the frost on the pumpkins"
			}
			return msg;
		}
		if (numDate == 30){
			msg=" Robin Roberts born this day in 1926";			
			return msg;
		}	
		break;		
	} // end of special days in September
			
	case 9:	// special dates in October
	{	
	switch (numDate){		
		case 1:
		{
			msg=" Rod Carew born this day in 1945";			
			return msg;
		}
		case 3:
		{
			msg=" Stevie Ray born this day in 1954";			
			return msg;
		}
		case 9:
		{
			msg=" John Lennon born this day in 1940";			
			return msg;
		}
		case 13:
		{
			msg="Rube Waddell born this day in 1876";			
			return msg;
		}				
	} // end inner switch		

		if(0<=(17-numDate)&&(17-numDate)<=7){
			var DaysLeft = (17-numDate);
			if(DaysLeft != 0){ 
			msg = "<br />there are "+DaysLeft+" days remaining until Lele's Birthday!";
			}
			else{
				msg="<br />Happy Birthday Lele!"
			}
			return msg;
		}

	switch(numDate){
		case 19:
		{
			msg=" \"Three Finger\" Mordecai Brown born this day in 1876";			
			return msg;
		}		
		case 20:
		{
			msg="Mickie Mantle born this day in 1931<br />";			
			msg=msg + "As was Juan Marichal Ford in 1937";
			return msg;
		}
		case 21:
		{
			msg="Dizzy Gillespie born this day in 1939<br />";
			msg=msg + "As was Whitey Ford in 1928";			
			return msg;
		}
		case 22:
		{
			msg=" Jimmie Foxx born this day in 1907";			
			return msg;
		}		
		case 29:
		{
			msg=" Albatross!<br />";			
			msg=msg + " Peter Green born this day in 1946<br />";						
			msg=msg + " As was Leon Redbone in 1939";			
			return msg;
		}
		case 30:
		{
			msg=" Grace Slick born this day in 1939";			
			return msg;
		}	
	} // end inner switch
		if(0<=(31-numDate)&&(31-numDate)<=7){
			var DaysLeft = (31-numDate);
			if(DaysLeft != 0){ 
			msg = "<br />there are "+DaysLeft+" days remaining until Halloween.  Boo!";
			}
			else{
				msg="<br /><span style='font-size:18pt'>Boo!</span>";
				}
		return msg;
		}
		break;		
	} // end of special days in October
			
	case 10:	// special dates in November
	{					
		if(0<=(12-numDate)&&(12-numDate)<=7){
			var DaysLeft = (12-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until Mom&#39;'s Birthday";
			}
			else{
				msg="<br />Happy Birthday, Mom";
			}
			return msg;
		}
		
		if(0<=(FindThanksDate()-numDate)&&(FindThanksDate()-numDate)<=10){
			var DaysLeft = (FindThanksDate()-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until Thanksgiving.";
			}
			else{
				msg="<br />Happy Thanksgiving.  Thanks, Squanto";
			}
			return msg;
		}
		break;		
	} // end of special days in November
			
	case 11:	// special dates in December
	{								
		if(0<=(21-numDate)&&(21-numDate)<=7){
			var DaysLeft = (21-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until the start of Winter.";
			}
			else{
				msg="<br />It's Winter.  3 more months until Spring";
			}
			return msg;
		}
		if(0<=(25-numDate)&&(25-numDate)<=3){
			var DaysLeft = (25-numDate);
			if(DaysLeft != 0){ 
				msg = "<br />there are "+DaysLeft+" days remaining until the celebration of the birth of Jesus";
			}
			else{
				msg="<br />Merry Christmas";
			}
			return msg;
		}		
		break;
	} // end of special days in December
   } // end outer switch, month test

		msg="Kwazy Wabbit!";
		return msg;


}//end of SpecialDay function

