function GameDay()
{
	this.getGameDay = function(month, year)
		{
			var args = new Object();
			args.ptrs = ProgramList.PAGESIZE_THUMB_ROWSIZE_LARGE;
			var date=new Date();

			if(month!=null)
				args.month=month;
			else
				args.month=0;

			if(year!=null)
				args.year=year;
			else
				args.year=new Date().getFullYear();

			document.getElementById("content_GameDay").innerHTML = getLocalizedString("loading");;
			_console.getComponentContent("gameday", args, this.getGameDayCallBack, false);
			_util.cancelEvt(window.event);
		}
		
	this.getGameDayCallBack = function(result)
		{
			document.getElementById("content_GameDay").innerHTML = result;		
			if (document.getElementById("_gameday_month")!=null && document.getElementById("_gameday_year")!=null)
			{
				var month=document.getElementById("_gameday_month").value;
				var year=document.getElementById("_gameday_year").value;
				if (month!=null && month.indexOf("0")==0)
					month=month.substring(1);
				_util.setListBoxValue(document.getElementById("gamedayYear"),year);
				_util.setListBoxValue(document.getElementById("gamedayMonth"),month);
			}
			
			if (!g_firstVideoPlayed && g_defaultVideoId=="")
			{
				g_firstVideoPlayed=true;
				var td=document.getElementById("_gameday_0");
				if (td)
					td.onclick();
			}
		}
}
