function todayDate(pFormat){
	//================================================================================
	//todayDate Function
	//Created: October 27, 2008
	//Modified: October 27, 2008
	//Purpose: This function displays today's date based on the input format parameter
	//pFormat (string)
		// "Full" - Full Date: Monday, October 28, 2008
		// "Long" - Long Date: October 28, 2008
		// "Short" - Short Date: 2008-10-28 (YYYY-MM-DD)
		// "YearLong" - Year: 2008
		// "YearShort" - Year: 08
		// "MonthNum" - Month Number: 10
		// "MonthName" - Month Name: October
		// "DayNum" - Day Number: 27
		// "DayName" - Day Name: Monday
	//================================================================================
	//Set the input parameter to lower case to avoid unnecessary typo errors
	var strFormat = pFormat.toLowerCase();	
	
	//Get today's date
	var todayDate = new Date();
	//Grab and format today's year properly
	var theYear = todayDate.getYear();
	if (theYear < 1000){
		theYear += 1900;
	}
	//Grab and format today's month properly ex: 09 instead of just 9
	var intMonth = todayDate.getMonth();
	if ((intMonth + 1) < 10){
		theMonth = "0" + intMonth;
	}else{
		theMonth = intMonth + 1;
		theMonth.toString;
	}
	//Grab and format today's day properly ex: 05 instead of just 5
	var intDay = todayDate.getDay();
	var theDay = todayDate.getDate();
	if (theDay < 10){
		theDay = "0" + theDay;
	}		
	//Create arrays to store day and month names
	var arrDay = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	var arrMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	
	//Output the desired date information based on the pFormat
	switch (strFormat){
		case "full":
			var dateOutput = arrDay[intDay] + ", " + arrMonth[intMonth] + " " + theDay + ", " + theYear;
			break;
		case "long":
			var dateOutput = arrMonth[intMonth] + " " + theDay + ", " + theYear;
			break;
		case "short":
			var dateOutput = theYear + "-" + theMonth + "-" + theDay;
			break;
		case "yearlong":
			var dateOutput = theYear;
			break;
		case "yearshort":
			strYear = theYear.toString();
			var dateOutput = strYear.substring(2,4);
			break;			
		case "monthnum":
			var dateOutput = theMonth;
			break;
		case "monthname":
			var dateOutput = arrMonth[intMonth];
			break;
		case "daynum":
			var dateOutput = theDay;
			break;
		case "dayname":
			var dateOutput = arrDay[intDay]
			break;
	}		
	//output the specified date to the page
	document.write(dateOutput);
}
