//
// ----- Extend the Date Object to include some additional functions
//
function GetDayName(intNameStyle) {
	var astrDayName = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')
	var strDayName = new String
	strDayName = astrDayName[this.getDay()]
	switch (intNameStyle)	{
		case 2: strDayName = strDayName.substring(0,2); break;
		case 3: strDayName = strDayName.substring(0,3); break;
	}
	return strDayName
}

function GetFullDateString() {
	return (this.getDate() < 10 ? '0' : '') + this.getDate()
}

function GetMonthName(intNameStyle) {
	var astrMonthName = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')
	var strMonthName = new String
	strMonthName = astrMonthName[this.getMonth()]
	switch (intNameStyle) {
		case 2: strMonthName = strMonthName.substring(0,2); break;
		case 3: strMonthName = strMonthName.substring(0,3); break;
	}
	return strMonthName
}

function GetFullMonthString() {
	return (this.getMonth() < 9 ? '0' : '') + (this.getMonth() + 1)
}

function GetJulianDays() {
	var dJan1 = new Date(this.getFullYear(), 0, 1)
	var iJulianDays = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0) - Date.UTC(dJan1.getFullYear(), dJan1.getMonth(), dJan1.getDate(),0,0,0)
	return ((iJulianDays/1000/60/60/24) + 1)
}

Date.prototype.getDayName = GetDayName
Date.prototype.getFullDateString = GetFullDateString
Date.prototype.getMonthName = GetMonthName
Date.prototype.getFullMonthString = GetFullMonthString
Date.prototype.getJulianDays = GetJulianDays
