var objDate			=	new Date();
var intDay			=	objDate.getDate();
var intMonth		=	objDate.getMonth();
var strSeason	=	"1";		//
if(intMonth == 0){			//	If Month is January
	strSeason = "1";			//		Snow
}												//
if(intMonth == 1){			//	If Month is February
	if(intDay < 8){				//		& Day is less than 9
		strSeason = "1";		//			Snow
	}											//
	if(intDay >= 9){			//		& Day is greater than or equal to 10
		strSeason = "2";		//			Hearts
	}											//
	if(intDay >= 15){			//		& Day is greater than or equal to 16
		strSeason = "3";		//			Snow
	}											//
}												//
if(intMonth == 2){			//	If Month is March
	if(intDay <= 9){			//		& Day is less than or equal to 10
		strSeason = "3";		//			Snow
	}											//
	if(intDay >= 10){			//		& Day is greater than or equal to 11
		strSeason = "4";		//	 		Shamrocks
	}											//
	if(intDay >= 18){			//		& Day is greater than or equal to 19
		strSeason = "5";		//			Yellow Tulips
	}											//
}												//
if(intMonth == 3){			//	If Month is April
		strSeason = "5";		//		Yellow Tulips
}												//
if(intMonth == 4){			//	If Month is May
	if(intDay <= 23){			//		& Day is less than or equal to 24
		strSeason = "5";		//			Yellow Tulips
	}											//
	if(intDay >= 24){			//		& Day is greater than or equal to 25
		strSeason = "6";		//	 		Flag Motif
	}											//
}												//
if(intMonth == 5){			//	If Month is June
	strSeason = "7";			//		Black Eyed Susan Flowers
}												//
if(intMonth == 6){			//	If Month is July
	if(intDay == 0){			//		& Day is equal to 1 
		strSeason = "7";		//			Black Eyed Susan Flowers
	}											//
	if(intDay >= 1){			//		& Day is greater than or equal to 2
		strSeason = "8";		//			Flag
	}											//
	if(intDay >= 7){			//		&	Day is greater than or equal to 8
		strSeason = "7";		//			Black Eyed Susan Flowers
	}											//
}												//
if(intMonth == 7){			//	If Month is August
	if(intDay <= 14){			//		& Day is less than or equal to 15
		strSeason = "7";		//			Black Eyed Susan Flowers
	}											//
	if(intDay >= 15){			//		& Day is greater than or equal to 16
		strSeason = "11";		//			Back to School
	}											//
}												//
if(intMonth == 8){			//	If Month is September
	if(intDay <= 14){			//		& Day is less than or equal to 15
		strSeason = "11";		//			Back to School
	}											//
	if(intDay >= 15){			//		& Day is greater than or equal to 16
		strSeason = "10";		//			Leafs
	}											//
}												//
if(intMonth == 9){			//	If Month is October
	strSeason = "10";			//		Leafs
}												//
if(intMonth == 10){			//	If Month is November
	if(intDay <= 24){			//		& Day is less than or equal to 25
		strSeason = "10";		//			Leafs
	}											//
	if(intDay >= 25){			//		& Day is greater than or equal to 26
		strSeason = "12";		//			Christmas
	}											//
}												//
if(intMonth == 11){			//	If Month is December
	strSeason = "12";			//		Christmas
}												//
String.prototype.repeat = function(l){
	return new Array(l+1).join(this);
};
var strBasePath	=	'../'.repeat(intSeasonalBasePath);
var strLogoDir = strBasePath + 'images/seasonal_2008/' + strSeason + '/';
var intHour = objDate.getHours();
if (intHour >=12){ var xm = 'P' } else { var xm = 'A' }
var intHour = ((intHour >12) ? intHour -12 :intHour)
if (intHour == "0") intHour = 12;
var strTime = intHour + "" + xm;
var strImage	=	"";
var strImageNight = '_night';
if(strTime == '12A'){strImage = strImageNight;}
if(strTime == '1A'){strImage = strImageNight;}
if(strTime == '2A'){strImage = strImageNight;}
if(strTime == '3A'){strImage = strImageNight;}
if(strTime == '4A'){strImage = strImageNight;}
if(strTime == '5A'){strImage = strImageNight;}
if(strTime == '6A'){strImage = strImageNight;}
if(strTime == '8P'){strImage = strImageNight;}
if(strTime == '9P'){strImage = strImageNight;}
if(strTime == '10P'){strImage = strImageNight;}
if(strTime == '11P'){strImage = strImageNight;}
var strSeasonGraphic	=	strLogoDir + 'header' + strImage + ".jpg";
function setSeasonHeader(){
	if(x = document.getElementById('seasonalHeader')){
		if(x.tagName != 'IMG'){
			x.style.background	=	'url('+strSeasonGraphic+') no-repeat #e0dfde';
		}else{
			x.src	=	strSeasonGraphic;
		}
	}
}
if(window.addEventListener){
	window.addEventListener('load',setSeasonHeader,false);
}else if(window.attachEvent){
	window.attachEvent('onload',setSeasonHeader);
}