Event.observe(document, "dom:loaded", function() {
	// return a 3-letter prefix day of week
	function getCurDayOfWeek() {
		var today = new Date();
	    var thisDay = today.getDay()+1;
		if (thisDay == 1) {
			return "SUN";
		} else if (thisDay == 2){
			return "MON";
		} else if (thisDay == 3) {
	         return "TUE";
		} else if (thisDay == 4) {
			return "WED";
		} else if (thisDay == 5) {
	         return "THU";
		} else if (thisDay == 6) {
	         return "FRI";
		} else if (thisDay == 7) {
	         return "SAT";
		} else {
			return "carousel";
		}
	}

	var xmlDataFile = "/xml/carousel/foxhomepage/"+getCurDayOfWeek()+".xml";
	var so = new SWFObject("carouselLoader.swf?xmlPath="+xmlDataFile, "carousel", "100%", "100%", "9", "#1e1e1e");
	so.addParam("wmode", "transparent");
	so.addParam("align", "BOTTOM"); 
	so.addParam("scale", "noscale");
	so.write("carouselContainer");
});
