//*****************************************************************************
// Name:	getDaysInMonth
//
// Purpose:	Returns the total number of days for the combination of the
//			specified month and year
//			
// Inputs:
//			date: a Date object to examine.
// Returns: number of days in month for a 
//
//*****************************************************************************
function getDaysInMonth(date)
{
	var month = date.getMonth()+1;
	var year = date.getYear();
	if (month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12)
		return 31;
	else if (month==4 || month==6 || month==9 || month==11)
		return 30;
	else if (month==2)
	{
		if (isLeapYear(year))
			return 29;
		else
			return 28;
	}
}


function isLeapYear(year)
{
	if (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0))
		return true;
	else
		return false;
}

Date.prototype.getMonthName = function()
{
		var names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
		this.getMonth()
		return names[this.getMonth()];

}



