/* 
   New Perspectives on HTML and XHTML
   Review Assignment

   Name: Jeff Kendall
   Date: 5-2-2005

	Variables for showDate:
	thisWDay = the day of the week
	thisDay = the date of the month
	thisMonth = the month
	thisYear = the 4digit year
	monthName = the month spelled out
	wdayName = the day of the week spelled out
	niceDate = the date in the format for display on the Web page	

*/


function XmasDays(thisDate) {
   var XMYear=thisDate.getFullYear();
   var XMDay=new Date("October, 14, 2006");
   XMDay.setFullYear(XMYear);
   var dayTotal=(XMDay-thisDate)/(1000*60*60*24);
   dayTotal=Math.round(dayTotal);
   return dayTotal;
} 


function showDate(thisDate) {
	var thisWDay=thisDate.getDay();
	var thisDay=thisDate.getDate();
	var thisMonth=thisDate.getMonth();
	var thisYear=thisDate.getFullYear();

	var monthName=new Array("January", "February", "March", "April", "May", "June", 
	"July", "August", "September", "October", "November", "December");

	var wdayName=new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
	 "Friday", "Saturday");

	return niceDate=wdayName[thisWDay]+", "+ monthName[thisMonth]+" "+ thisDay +", "+ thisYear;
	
	}
 