
var DaysList = new Array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");
var MonthsList = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var DetailsURL = "/calendar/calendar.xhtml"
var Content = new Array();
var Seasons = new Array();
var Disneyland_Park_Content = {"Class" : "Park", "Name" : "Disneyland Park" ,"01052009" : "10:00-22:00","02052009" : "10:00-22:00","03052009" : "10:00-21:00","04052009" : "10:00-19:00","05052009" : "10:00-19:00","06052009" : "10:00-19:00","07052009" : "10:00-19:00","08052009" : "10:00-21:00","09052009" : "10:00-22:00","10052009" : "10:00-21:00","11052009" : "10:00-19:00","12052009" : "10:00-19:00","13052009" : "10:00-19:00","14052009" : "10:00-19:00","15052009" : "10:00-19:00","16052009" : "10:00-22:00","17052009" : "10:00-21:00","18052009" : "10:00-19:00","19052009" : "10:00-19:00","20052009" : "10:00-19:00","21052009" : "10:00-20:00","22052009" : "10:00-21:00","23052009" : "10:00-22:00","24052009" : "10:00-21:00","25052009" : "10:00-19:00","26052009" : "10:00-19:00","27052009" : "10:00-19:00","28052009" : "10:00-19:00","29052009" : "10:00-19:00","30052009" : "10:00-20:00","31052009" : "10:00-22:00","01062009" : "10:00-21:00","02062009" : "10:00-19:00","03062009" : "10:00-19:00","04062009" : "10:00-19:00","05062009" : "10:00-19:00","06062009" : "10:00-22:00","07062009" : "10:00-22:00","08062009" : "10:00-19:00","09062009" : "10:00-19:00","10062009" : "10:00-19:00","11062009" : "10:00-19:00","12062009" : "10:00-19:00","13062009" : "10:00-22:00","14062009" : "10:00-22:00","15062009" : "10:00-19:00","16062009" : "10:00-19:00","17062009" : "10:00-19:00","18062009" : "10:00-19:00","19062009" : "10:00-19:00","20062009" : "10:00-22:00","21062009" : "10:00-22:00","22062009" : "10:00-20:00","23062009" : "10:00-20:00","24062009" : "10:00-20:00","25062009" : "10:00-20:00","26062009" : "10:00-20:00","27062009" : "10:00-22:00","28062009" : "10:00-22:00","29062009" : "10:00-20:00","30062009" : "10:00-20:00","01072009" : "10:00-20:00","02072009" : "10:00-20:00","03072009" : "10:00-20:00","04072009" : "10:00-23:00","05072009" : "10:00-23:00","06072009" : "10:00-23:00","07072009" : "10:00-23:00","08072009" : "10:00-23:00","09072009" : "10:00-23:00","10072009" : "10:00-23:00","11072009" : "10:00-23:00","12072009" : "10:00-23:00","13072009" : "10:00-23:00","14072009" : "10:00-23:00","15072009" : "10:00-23:00","16072009" : "10:00-23:00","17072009" : "10:00-23:00","18072009" : "10:00-23:00","19072009" : "10:00-23:00","20072009" : "10:00-23:00","21072009" : "10:00-23:00","22072009" : "10:00-23:00","23072009" : "10:00-23:00","24072009" : "10:00-23:00","25072009" : "10:00-23:00","26072009" : "10:00-23:00","27072009" : "10:00-23:00","28072009" : "10:00-23:00","29072009" : "10:00-23:00","30072009" : "10:00-23:00","31072009" : "10:00-23:00","01082009" : "10:00-23:00","02082009" : "10:00-23:00","03082009" : "10:00-23:00","04082009" : "10:00-23:00","05082009" : "10:00-23:00","06082009" : "10:00-23:00","07082009" : "10:00-23:00","08082009" : "10:00-23:00","09082009" : "10:00-23:00","10082009" : "10:00-23:00","11082009" : "10:00-23:00","12082009" : "10:00-23:00","13082009" : "10:00-23:00","14082009" : "10:00-23:00","15082009" : "10:00-23:00","16082009" : "10:00-23:00","17082009" : "10:00-23:00","18082009" : "10:00-23:00","19082009" : "10:00-23:00","20082009" : "10:00-23:00","21082009" : "10:00-23:00","22082009" : "10:00-23:00","23082009" : "10:00-23:00","24082009" : "10:00-22:00","25082009" : "10:00-22:00","26082009" : "10:00-22:00","27082009" : "10:00-22:00","28082009" : "10:00-22:00","29082009" : "10:00-22:00","30082009" : "10:00-22:00","31082009" : "10:00-19:00","01092009" : "10:00-19:00","02092009" : "10:00-19:00","03092009" : "10:00-19:00","04092009" : "10:00-19:00","05092009" : "10:00-22:00","06092009" : "10:00-21:00","07092009" : "10:00-19:00","08092009" : "10:00-19:00","09092009" : "10:00-19:00","10092009" : "10:00-19:00","11092009" : "10:00-19:00","12092009" : "10:00-22:00","13092009" : "10:00-21:00","14092009" : "10:00-19:00","15092009" : "10:00-19:00","16092009" : "10:00-19:00","17092009" : "10:00-19:00","18092009" : "10:00-19:00","19092009" : "10:00-22:00","20092009" : "10:00-21:00","21092009" : "10:00-19:00","22092009" : "10:00-19:00","23092009" : "10:00-19:00","24092009" : "10:00-19:00","25092009" : "10:00-19:00","26092009" : "10:00-22:00","27092009" : "10:00-21:00","28092009" : "10:00-19:00","29092009" : "10:00-19:00","30092009" : "10:00-19:00","01102009" : "10:00-19:00","02102009" : "10:00-19:00","03102009" : "10:00-22:00","04102009" : "10:00-21:00","05102009" : "10:00-19:00","06102009" : "10:00-19:00","07102009" : "10:00-19:00","08102009" : "10:00-19:00","09102009" : "10:00-19:00","10102009" : "10:00-22:00","11102009" : "10:00-21:00","12102009" : "10:00-19:00","13102009" : "10:00-19:00","14102009" : "10:00-19:00","15102009" : "10:00-19:00","16102009" : "10:00-19:00","17102009" : "10:00-22:00","18102009" : "10:00-21:00","19102009" : "10:00-19:00","20102009" : "10:00-19:00","21102009" : "10:00-19:00","22102009" : "10:00-19:00","23102009" : "10:00-19:00","24102009" : "10:00-22:00","25102009" : "10:00-22:00","26102009" : "10:00-22:00","27102009" : "10:00-19:00","28102009" : "10:00-22:00","29102009" : "10:00-22:00","30102009" : "10:00-22:00","31102009" : "10:00-20:00","01112009" : "10:00-21:00","02112009" : "10:00-19:00","03112009" : "10:00-19:00","04112009" : "10:00-19:00","05112009" : "10:00-19:00","06112009" : "10:00-19:00","07112009" : "10:00-21:00","08112009" : "10:00-21:00","09112009" : "10:00-19:00","10112009" : "10:00-19:00","11112009" : "10:00-20:00","12112009" : "10:00-19:00","13112009" : "10:00-19:00","14112009" : "10:00-22:00","15112009" : "10:00-21:00","16112009" : "10:00-19:00","17112009" : "10:00-19:00","18112009" : "10:00-19:00","19112009" : "10:00-19:00","20112009" : "10:00-19:00","21112009" : "10:00-22:00","22112009" : "10:00-22:00","23112009" : "10:00-19:00","24112009" : "10:00-19:00","25112009" : "10:00-19:00","26112009" : "10:00-19:00","27112009" : "10:00-19:00","28112009" : "09:00-22:00","29112009" : "09:00-22:00","30112009" : "10:00-19:00","01122009" : "10:00-19:00","02122009" : "10:00-19:00","03122009" : "10:00-19:00","04122009" : "10:00-19:00","05122009" : "09:00-22:00","06122009" : "09:00-22:00","07122009" : "10:00-19:00","08122009" : "10:00-19:00","09122009" : "10:00-19:00","10122009" : "10:00-19:00","11122009" : "10:00-19:00","12122009" : "09:00-22:00","13122009" : "09:00-22:00","14122009" : "10:00-19:00","15122009" : "10:00-19:00","16122009" : "10:00-19:00","17122009" : "10:00-19:00","18122009" : "10:00-19:00","19122009" : "09:30-22:00","20122009" : "09:30-22:00","21122009" : "09:30-22:00","22122009" : "09:30-22:00","23122009" : "09:30-22:00","24122009" : "09:30-22:00","25122009" : "09:30-22:00","26122009" : "09:30-22:00","27122009" : "09:30-22:00","28122009" : "09:30-22:00","29122009" : "09:30-22:00","30122009" : "09:30-22:00","31122009" : "09:30-01:00","01012010" : "10:00-22:00","02012010" : "10:00-22:00","03012010" : "10:00-21:00","04012010" : "10:00-19:00","05012010" : "10:00-19:00","06012010" : "10:00-19:00","07012010" : "10:00-18:00","08012010" : "10:00-18:00","09012010" : "10:00-20:00","10012010" : "10:00-20:00","11012010" : "10:00-18:00","12012010" : "10:00-18:00","13012010" : "10:00-18:00","14012010" : "10:00-18:00","15012010" : "10:00-18:00","16012010" : "10:00-20:00","17012010" : "10:00-20:00","18012010" : "10:00-18:00","19012010" : "10:00-18:00","20012010" : "10:00-18:00","21012010" : "10:00-18:00","22012010" : "10:00-18:00","23012010" : "10:00-20:00","24012010" : "10:00-20:00","25012010" : "10:00-18:00","26012010" : "10:00-18:00","27012010" : "10:00-18:00","28012010" : "10:00-18:00","29012010" : "10:00-18:00","30012010" : "10:00-20:00","31012010" : "10:00-20:00","01022010" : "10:00-18:00","02022010" : "10:00-18:00","03022010" : "10:00-18:00","04022010" : "10:00-18:00","05022010" : "10:00-18:00","06022010" : "10:00-21:00","07022010" : "10:00-20:00","08022010" : "10:00-19:00","09022010" : "10:00-19:00","10022010" : "10:00-19:00","11022010" : "10:00-19:00","12022010" : "10:00-19:00","13022010" : "10:00-22:00","14022010" : "10:00-21:00","15022010" : "10:00-20:00","16022010" : "10:00-20:00","17022010" : "10:00-20:00","18022010" : "10:00-20:00","19022010" : "10:00-20:00","20022010" : "10:00-22:00","21022010" : "10:00-21:00","22022010" : "10:00-20:00","23022010" : "10:00-20:00","24022010" : "10:00-20:00","25022010" : "10:00-20:00","26022010" : "10:00-20:00","27022010" : "10:00-22:00","28022010" : "10:00-21:00","01032010" : "10:00-19:00","02032010" : "10:00-19:00","03032010" : "10:00-19:00","04032010" : "10:00-19:00","05032010" : "10:00-19:00","06032010" : "10:00-22:00","07032010" : "10:00-21:00","08032010" : "10:00-19:00","09032010" : "10:00-19:00","10032010" : "10:00-19:00","11032010" : "10:00-19:00","12032010" : "10:00-19:00","13032010" : "10:00-22:00","14032010" : "10:00-22:00","15032010" : "10:00-19:00","16032010" : "10:00-19:00","17032010" : "10:00-20:00","18032010" : "10:00-19:00","19032010" : "10:00-19:00","20032010" : "9:30-22:00","21032010" : "9:30-22:00","22032010" : "10:00-19:00","23032010" : "10:00-19:00","24032010" : "10:00-19:00","25032010" : "10:00-19:00","26032010" : "10:00-19:00","27032010" : "9:30-22:00","28032010" : "9:30-22:00","29032010" : "10:00-20:00","30032010" : "10:00-20:00","31032010" : "10:00-20:00","01042010" : "10:00-20:00","02042010" : "10:00-20:00","03042010" : "10:00-22:00","04042010" : "10:00-22:00","05042010" : "10:00-21:00","06042010" : "10:00-20:00","07042010" : "10:00-20:00","08042010" : "10:00-20:00","09042010" : "10:00-20:00","10042010" : "10:00-22:00","11042010" : "10:00-21:00","12042010" : "10:00-20:00","13042010" : "10:00-20:00","14042010" : "10:00-20:00","15042010" : "10:00-20:00","16042010" : "10:00-20:00","17042010" : "10:00-22:00","18042010" : "10:00-21:00","19042010" : "10:00-20:00","20042010" : "10:00-20:00","21042010" : "10:00-20:00","22042010" : "10:00-20:00","23042010" : "10:00-20:00","24042010" : "10:00-22:00","25042010" : "10:00-21:00","26042010" : "10:00-20:00","27042010" : "10:00-20:00","28042010" : "10:00-20:00","29042010" : "10:00-20:00","30042010" : "10:00-20:00"};
Content.push(Disneyland_Park_Content);
var Walt_Disney_Studios_Content = {"Class" : "Studios", "Name" : "Walt Disney Studios" ,"01052009" : "10:00-19:00","02052009" : "10:00-19:00","03052009" : "10:00-19:00","04052009" : "10:00-19:00","05052009" : "10:00-19:00","06052009" : "10:00-19:00","07052009" : "10:00-19:00","08052009" : "10:00-19:00","09052009" : "10:00-19:00","10052009" : "10:00-19:00","11052009" : "10:00-19:00","12052009" : "10:00-19:00","13052009" : "10:00-19:00","14052009" : "10:00-19:00","15052009" : "10:00-19:00","16052009" : "10:00-19:00","17052009" : "10:00-19:00","18052009" : "10:00-19:00","19052009" : "10:00-19:00","20052009" : "10:00-19:00","21052009" : "10:00-19:00","22052009" : "10:00-19:00","23052009" : "10:00-19:00","24052009" : "10:00-19:00","25052009" : "10:00-19:00","26052009" : "10:00-19:00","27052009" : "10:00-19:00","28052009" : "10:00-19:00","29052009" : "10:00-19:00","30052009" : "10:00-19:00","31052009" : "10:00-19:00","01062009" : "10:00-19:00","02062009" : "10:00-19:00","03062009" : "10:00-19:00","04062009" : "10:00-19:00","05062009" : "10:00-19:00","06062009" : "10:00-19:00","07062009" : "10:00-19:00","08062009" : "10:00-19:00","09062009" : "10:00-19:00","10062009" : "10:00-19:00","11062009" : "10:00-19:00","12062009" : "10:00-19:00","13062009" : "10:00-19:00","14062009" : "10:00-19:00","15062009" : "10:00-19:00","16062009" : "10:00-19:00","17062009" : "10:00-19:00","18062009" : "10:00-19:00","19062009" : "10:00-19:00","20062009" : "10:00-19:00","21062009" : "10:00-19:00","22062009" : "10:00-19:00","23062009" : "10:00-19:00","24062009" : "10:00-19:00","25062009" : "10:00-19:00","26062009" : "10:00-19:00","27062009" : "10:00-19:00","28062009" : "10:00-19:00","29062009" : "10:00-19:00","30062009" : "10:00-19:00","01072009" : "10:00-19:00","02072009" : "10:00-19:00","03072009" : "10:00-19:00","04072009" : "10:00-19:00","05072009" : "10:00-19:00","06072009" : "10:00-19:00","07072009" : "10:00-19:00","08072009" : "10:00-19:00","09072009" : "10:00-19:00","10072009" : "10:00-19:00","11072009" : "10:00-19:00","12072009" : "10:00-19:00","13072009" : "10:00-19:00","14072009" : "10:00-19:00","15072009" : "10:00-19:00","16072009" : "10:00-19:00","17072009" : "10:00-19:00","18072009" : "10:00-19:00","19072009" : "10:00-19:00","20072009" : "10:00-19:00","21072009" : "10:00-19:00","22072009" : "10:00-19:00","23072009" : "10:00-19:00","24072009" : "10:00-19:00","25072009" : "10:00-19:00","26072009" : "10:00-19:00","27072009" : "10:00-19:00","28072009" : "10:00-19:00","29072009" : "10:00-19:00","30072009" : "10:00-19:00","31072009" : "10:00-19:00","01082009" : "10:00-19:00","02082009" : "10:00-19:00","03082009" : "10:00-19:00","04082009" : "10:00-19:00","05082009" : "10:00-19:00","06082009" : "10:00-19:00","07082009" : "10:00-19:00","08082009" : "10:00-19:00","09082009" : "10:00-19:00","10082009" : "10:00-19:00","11082009" : "10:00-19:00","12082009" : "10:00-19:00","13082009" : "10:00-19:00","14082009" : "10:00-19:00","15082009" : "10:00-19:00","16082009" : "10:00-19:00","17082009" : "10:00-19:00","18082009" : "10:00-19:00","19082009" : "10:00-19:00","20082009" : "10:00-19:00","21082009" : "10:00-19:00","22082009" : "10:00-19:00","23082009" : "10:00-19:00","24082009" : "10:00-19:00","25082009" : "10:00-19:00","26082009" : "10:00-19:00","27082009" : "10:00-19:00","28082009" : "10:00-19:00","29082009" : "10:00-19:00","30082009" : "10:00-19:00","31082009" : "10:00-19:00","01092009" : "10:00-19:00","02092009" : "10:00-19:00","03092009" : "10:00-19:00","04092009" : "10:00-19:00","05092009" : "10:00-19:00","06092009" : "10:00-19:00","07092009" : "10:00-18:00","08092009" : "10:00-18:00","09092009" : "10:00-18:00","10092009" : "10:00-18:00","11092009" : "10:00-18:00","12092009" : "10:00-19:00","13092009" : "10:00-19:00","14092009" : "10:00-18:00","15092009" : "10:00-18:00","16092009" : "10:00-18:00","17092009" : "10:00-18:00","18092009" : "10:00-18:00","19092009" : "10:00-19:00","20092009" : "10:00-19:00","21092009" : "10:00-18:00","22092009" : "10:00-18:00","23092009" : "10:00-18:00","24092009" : "10:00-18:00","25092009" : "10:00-18:00","26092009" : "10:00-19:00","27092009" : "10:00-19:00","28092009" : "10:00-18:00","29092009" : "10:00-18:00","30092009" : "10:00-18:00","01102009" : "10:00-18:00","02102009" : "10:00-18:00","03102009" : "10:00-19:00","04102009" : "10:00-19:00","05102009" : "10:00-18:00","06102009" : "10:00-18:00","07102009" : "10:00-18:00","08102009" : "10:00-18:00","09102009" : "10:00-18:00","10102009" : "10:00-19:00","11102009" : "10:00-19:00","12102009" : "10:00-18:00","13102009" : "10:00-18:00","14102009" : "10:00-18:00","15102009" : "10:00-18:00","16102009" : "10:00-18:00","17102009" : "10:00-19:00","18102009" : "10:00-19:00","19102009" : "10:00-18:00","20102009" : "10:00-18:00","21102009" : "10:00-18:00","22102009" : "10:00-18:00","23102009" : "10:00-18:00","24102009" : "10:00-19:00","25102009" : "10:00-19:00","26102009" : "10:00-19:00","27102009" : "10:00-19:00","28102009" : "10:00-19:00","29102009" : "10:00-19:00","30102009" : "10:00-19:00","31102009" : "10:00-19:00","01112009" : "10:00-19:00","02112009" : "10:00-19:00","03112009" : "10:00-19:00","04112009" : "10:00-18:00","05112009" : "10:00-18:00","06112009" : "10:00-18:00","07112009" : "10:00-19:00","08112009" : "10:00-19:00","09112009" : "10:00-18:00","10112009" : "10:00-18:00","11112009" : "10:00-18:00","12112009" : "10:00-18:00","13112009" : "10:00-18:00","14112009" : "10:00-19:00","15112009" : "10:00-19:00","16112009" : "10:00-18:00","17112009" : "10:00-18:00","18112009" : "10:00-18:00","19112009" : "10:00-18:00","20112009" : "10:00-18:00","21112009" : "10:00-19:00","22112009" : "10:00-19:00","23112009" : "10:00-18:00","24112009" : "10:00-18:00","25112009" : "10:00-18:00","26112009" : "10:00-18:00","27112009" : "10:00-18:00","28112009" : "09:00-19:00","29112009" : "09:00-19:00","30112009" : "10:00-18:00","01122009" : "10:00-18:00","02122009" : "10:00-18:00","03122009" : "10:00-18:00","04122009" : "10:00-18:00","05122009" : "09:00-19:00","06122009" : "09:00-19:00","07122009" : "10:00-18:00","08122009" : "10:00-18:00","09122009" : "10:00-18:00","10122009" : "10:00-18:00","11122009" : "10:00-18:00","12122009" : "09:00-19:00","13122009" : "09:00-19:00","14122009" : "10:00-18:00","15122009" : "10:00-18:00","16122009" : "10:00-18:00","17122009" : "10:00-18:00","18122009" : "10:00-18:00","19122009" : "09:00-19:00","20122009" : "09:00-19:00","21122009" : "10:00-19:00","22122009" : "10:00-19:00","23122009" : "10:00-19:00","24122009" : "10:00-19:00","25122009" : "10:00-19:00","26122009" : "10:00-19:00","27122009" : "10:00-19:00","28122009" : "10:00-19:00","29122009" : "10:00-19:00","30122009" : "10:00-19:00","31122009" : "10:00-01:00","01012010" : "10:00-19:00","02012010" : "10:00-19:00","03012010" : "10:00-19:00","04012010" : "10:00-18:00","05012010" : "10:00-18:00","06012010" : "10:00-18:00","07012010" : "10:00-18:00","08012010" : "10:00-18:00","09012010" : "10:00-19:00","10012010" : "10:00-19:00","11012010" : "10:00-18:00","12012010" : "10:00-18:00","13012010" : "10:00-18:00","14012010" : "10:00-18:00","15012010" : "10:00-18:00","16012010" : "10:00-19:00","17012010" : "10:00-19:00","18012010" : "10:00-18:00","19012010" : "10:00-18:00","20012010" : "10:00-18:00","21012010" : "10:00-18:00","22012010" : "10:00-18:00","23012010" : "10:00-19:00","24012010" : "10:00-19:00","25012010" : "10:00-18:00","26012010" : "10:00-18:00","27012010" : "10:00-18:00","28012010" : "10:00-18:00","29012010" : "10:00-18:00","30012010" : "10:00-19:00","31012010" : "10:00-19:00","01022010" : "10:00-18:00","02022010" : "10:00-18:00","03022010" : "10:00-18:00","04022010" : "10:00-18:00","05022010" : "10:00-18:00","06022010" : "10:00-19:00","07022010" : "10:00-19:00","08022010" : "10:00-18:00","09022010" : "10:00-18:00","10022010" : "10:00-18:00","11022010" : "10:00-18:00","12022010" : "10:00-18:00","13022010" : "10:00-19:00","14022010" : "10:00-19:00","15022010" : "10:00-19:00","16022010" : "10:00-19:00","17022010" : "10:00-19:00","18022010" : "10:00-19:00","19022010" : "10:00-19:00","20022010" : "10:00-19:00","21022010" : "10:00-19:00","22022010" : "10:00-19:00","23022010" : "10:00-19:00","24022010" : "10:00-19:00","25022010" : "10:00-19:00","26022010" : "10:00-19:00","27022010" : "10:00-19:00","28022010" : "10:00-19:00","01032010" : "10:00-18:00","02032010" : "10:00-18:00","03032010" : "10:00-18:00","04032010" : "10:00-18:00","05032010" : "10:00-18:00","06032010" : "10:00-19:00","07032010" : "10:00-19:00","08032010" : "10:00-18:00","09032010" : "10:00-18:00","10032010" : "10:00-18:00","11032010" : "10:00-18:00","12032010" : "10:00-18:00","13032010" : "10:00-19:00","14032010" : "10:00-19:00","15032010" : "10:00-18:00","16032010" : "10:00-18:00","17032010" : "10:00-18:00","18032010" : "10:00-18:00","19032010" : "10:00-18:00","20032010" : "10:00-19:00","21032010" : "10:00-19:00","22032010" : "10:00-18:00","23032010" : "10:00-18:00","24032010" : "10:00-18:00","25032010" : "10:00-18:00","26032010" : "10:00-18:00","27032010" : "10:00-19:00","28032010" : "10:00-19:00","29032010" : "10:00-19:00","30032010" : "10:00-19:00","31032010" : "10:00-19:00","01042010" : "10:00-19:00","02042010" : "10:00-19:00","03042010" : "10:00-19:00","04042010" : "10:00-19:00","05042010" : "10:00-19:00","06042010" : "10:00-19:00","07042010" : "10:00-19:00","08042010" : "10:00-19:00","09042010" : "10:00-19:00","10042010" : "10:00-19:00","11042010" : "10:00-19:00","12042010" : "10:00-19:00","13042010" : "10:00-19:00","14042010" : "10:00-19:00","15042010" : "10:00-19:00","16042010" : "10:00-19:00","17042010" : "10:00-19:00","18042010" : "10:00-19:00","19042010" : "10:00-19:00","20042010" : "10:00-19:00","21042010" : "10:00-19:00","22042010" : "10:00-19:00","23042010" : "10:00-19:00","24042010" : "10:00-19:00","25042010" : "10:00-19:00","26042010" : "10:00-19:00","27042010" : "10:00-19:00","28042010" : "10:00-19:00","29042010" : "10:00-19:00","30042010" : "10:00-19:00"};
Content.push(Walt_Disney_Studios_Content);
var A_Fairytale_Christmas_Content = {"Class" : "Christmas", "Name" : "A Fairytale Christmas" };
var A_Fairytale_Christmas_Seasons = {"Title" : "A Fairytale Christmas","Link" : "tcm:73-10568","Image" : "","ImageDisabled" : "","ImageLegend" : "","Park" : "Seasons","Location" : "Seasons details","Hours" : A_Fairytale_Christmas_Content}
Seasons.push(A_Fairytale_Christmas_Seasons);
var Disneys_Bonfire_Spectacular_Content = {"Class" : "Spectacular", "Name" : "Disney's Bonfire Spectacular" };
var Disneys_Bonfire_Spectacular_Seasons = {"Title" : "Disneys Bonfire Spectacular","Link" : "tcm:73-10583","Image" : "","ImageDisabled" : "","ImageLegend" : "","Park" : "Seasons","Location" : "Seasons details","Hours" : Disneys_Bonfire_Spectacular_Content}
Seasons.push(Disneys_Bonfire_Spectacular_Seasons);
var Disneys_Halloween_Festival_Content = {"Class" : "Festival", "Name" : "Disney's Halloween Festival" };
var Disneys_Halloween_Festival_Seasons = {"Title" : "Disneys Halloween Festival","Link" : "tcm:73-10580","Image" : "","ImageDisabled" : "","ImageLegend" : "","Park" : "Seasons","Location" : "Seasons details","Hours" : Disneys_Halloween_Festival_Content}
Seasons.push(Disneys_Halloween_Festival_Seasons);
var Kids_Go_Free_Content = {"Class" : "Free", "Name" : "Kids Go Free" };
var Always_Something_New_Seasons = {"Title" : "Always Something New","Link" : "tcm:73-9098","Image" : "","ImageDisabled" : "","ImageLegend" : "","Park" : "Content","Location" : "What's new","Hours" : Kids_Go_Free_Content}
Seasons.push(Always_Something_New_Seasons);

var Today = new Date();
// Get the year (YYYY)
var CurrentYear = Today.getFullYear();
var TodaysYear = CurrentYear;
// Get the month (0..11)
var CurrentMonth = Today.getMonth();
var TodaysMonth = CurrentMonth;
// Get the day in the month (1..31)
var CurrentDay = Today.getDate();
var TodaysDate = CurrentDay;
// Get the day in the week for the current date (0..6, 0=>Sunday, ...)
var TodaysDay = GetDayNumber(Today.getDay());
// Get the day in the week for the first day of the month
Today = new Date(TodaysYear,TodaysMonth,1);
var TodaysFirstDay = GetDayNumber(Today.getDay());

var MonthLength = new Array(31,GetFebruaryNbDays(TodaysYear),31,30,31,30,31,31,30,31,30,31);

/*
 ** Construct the calendar for the previous month
 */
function GoToMonthPrevious(){
    TodaysMonth -= 1;
    if(TodaysMonth<0){
        TodaysMonth = 11;
        TodaysYear -= 1;
        // reCalculate the number of days for the month of february (in case of a bissextile year)
        MonthLength[1] = GetFebruaryNbDays(TodaysYear)
    }
    Today = new Date(TodaysYear,TodaysMonth,1);
    TodaysFirstDay = GetDayNumber(Today.getDay());
    ConstructCalendar();
}
/*
 ** Construct the calendar for the next month
 */
function GoToMonthNext(){
    TodaysMonth += 1;
    if(TodaysMonth>11){
        TodaysMonth = 0;
        TodaysYear += 1;
        // reCalculate the number of days for the month of february (in case of a bissextile year)
        MonthLength[1] = GetFebruaryNbDays(TodaysYear);
    }
    Today = new Date(TodaysYear,TodaysMonth,1);
    TodaysFirstDay = GetDayNumber(Today.getDay());
    ConstructCalendar();
}
/*
 ** Construct the calendar
 */
function ConstructCalendar(){
    // Change the label (Month + Year) of the calendar
    document.getElementById("labelMonthYear").innerHTML = MonthsList[TodaysMonth] + " " + TodaysYear;
    var calendarContent = "";
    var numDay;
    var numDayNextMonth = 0;
    var seasonLegend = "";

    // Calculate the number of line in the calendar (possibility : 4, 5 or 6)
    var nbLine = 4;
    for(i=4 ; i<=6 ; i++){
        if( i*7 >= (TodaysFirstDay - 1 + GetMonthLength(TodaysMonth))){
            nbLine = i;
            break;
        }
    }
    for(i=0 ; i<nbLine ; i++){
        calendarContent += "<div class=\"CalendarDetailR\">";
        
        for(j=1 ; j<=7 ; j++){
            if(((i * 7) + j) < TodaysFirstDay){
                // Day of the previous month
                numDay = GetMonthLength(TodaysMonth-1) - TodaysFirstDay + j + 1
                //alert(GetDisabledSeasonImage(numDay,TodaysMonth-1,TodaysYear));
                 seasonLegend  += GetAllSeason(numDay,TodaysMonth-1,TodaysYear,seasonLegend);
                if(j == 1){
                    // First cell in the calendar => special style
                    calendarContent += "<div class=\"CalendarDetailC1\">";
			        calendarContent += "  <div class=\"DayR\" "+GetDisabledSeasonImage(numDay,TodaysMonth-1,TodaysYear)+">";
			        calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			        calendarContent += "    <div class=\"clear\"></div>";
			        calendarContent += "  </div>";
			        calendarContent += "</div>";
                }
                else{
                    calendarContent += "<div class=\"CalendarDetailC2\">";
			        calendarContent += "  <div class=\"DayR\" "+GetDisabledSeasonImage(numDay,TodaysMonth-1,TodaysYear)+">";
			        calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			        calendarContent += "    <div class=\"clear\"></div>";
			        calendarContent += "  </div>";
			        calendarContent += "</div>";
			    }
			}
			else if(((i * 7) + j - TodaysFirstDay + 1) > GetMonthLength(TodaysMonth)){
			    // Day of the next month
			    numDayNextMonth++;
                if(i == (nbLine-1) && j == 7){
                    // Cell at the bottom right corner of the calendar
			        calendarContent += "<div class=\"CalendarDetailC5\">";
			        calendarContent += "  <div class=\"DayR\" "+GetDisabledSeasonImage(numDayNextMonth,TodaysMonth+1,TodaysYear)+">";
			        calendarContent += "    <div class=\"NumDay\">"+numDayNextMonth+"</div>";
			        calendarContent += "    <div class=\"clear\"></div>";
			        calendarContent += "  </div>";
			        calendarContent += "</div>";
			    }
			    else{
			        // Cell at the bottom of the calendar
			        calendarContent += "<div class=\"CalendarDetailC4\">";
			        calendarContent += "  <div class=\"DayR\" "+GetDisabledSeasonImage(numDayNextMonth,TodaysMonth+1,TodaysYear)+">";
			        calendarContent += "    <div class=\"NumDay\">"+numDayNextMonth+"</div>";
			        calendarContent += "    <div class=\"clear\"></div>";
			        calendarContent += "  </div>";
			        calendarContent += "</div>";
			    }
			}
			else{
			    // Day of the current month
			    numDay = (i * 7) + j - TodaysFirstDay + 1
                if(i == (nbLine-1)){
                    // Cell at the bottom of the calendar
                    if(j == 1){
                        // Cell at the bottom left corner
                        if(numDay == CurrentDay && TodaysMonth == CurrentMonth && TodaysYear == CurrentYear){
                            // Day of today
			                calendarContent += "<div class=\"CalendarDetailC3Tdy\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			            else{
			                calendarContent += "<div class=\"CalendarDetailC3\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			        }
			        else if(j == 6){
			            // Cell just before the bottom right corner
			            if(numDay == CurrentDay && TodaysMonth == CurrentMonth && TodaysYear == CurrentYear){
                            // Day of today
			                calendarContent += "<div class=\"CalendarDetailC7Tdy\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			            else{
			                calendarContent += "<div class=\"CalendarDetailC7\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			                
			        }
			        else if(j == 7){
			            // Cell at the bottom right corner
			            if(numDay == CurrentDay && TodaysMonth == CurrentMonth && TodaysYear == CurrentYear){
                            // Day of today
			                calendarContent += "<div class=\"CalendarDetailC8Tdy\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			            else{
			                calendarContent += "<div class=\"CalendarDetailC8\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			        }
			        else{
			            // Cell at the bottom in the middle
			            if(numDay == CurrentDay && TodaysMonth == CurrentMonth && TodaysYear == CurrentYear){
			                // Day of today
			                calendarContent += "<div class=\"CalendarDetailC6Tdy\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			            else{
			                calendarContent += "<div class=\"CalendarDetailC6\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			        }
			    }
			    else{
			        // Other cell of the calendar for the current month
			        if(j == 1){
			            // cell on the left
			            if(numDay == CurrentDay && TodaysMonth == CurrentMonth && TodaysYear == CurrentYear){
			                // Day of today
			                calendarContent += "<div class=\"CalendarDetailToday1\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			            else{
			                // Other day of the current month
			                calendarContent += "<div class=\"CalendarDetailC\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			        }
			        else{
			            // other cell
			            if(numDay == CurrentDay && TodaysMonth == CurrentMonth && TodaysYear == CurrentYear){
			                // Day of today
			                calendarContent += "<div class=\"CalendarDetailToday\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			            else{
			                // Other day of the current month
			                calendarContent += "<div class=\"CalendarDetailC\">";
			                calendarContent += "  <div class=\"DayR\" "+GetSeasonImage(numDay,TodaysMonth,TodaysYear)+">";
			                calendarContent += "    <div class=\"NumDay\">"+numDay+"</div>";
			                calendarContent += "    <div class=\"clear\"></div>";
			                calendarContent += "  </div>";
			                calendarContent += GetCellContent(numDay);
			                calendarContent += "</div>";
			            }
			        }
			    }
			}
        }
        calendarContent += "</div>";
    }
    document.getElementById("calendarContent").innerHTML = calendarContent;
document.getElementById("seasonLegend").innerHTML = seasonLegend;
}

function GetAllSeason(day, month, year,content){
    var theDay;
    var result = "";
    if(day < 10){
        theDay = "0"+day.toString();
    }
    else{
        theDay = day.toString();
    }
    var theMonth;
    var theYear = year;
    if(month < 0){
        theMonth = 12;
        theYear -= 1;
    }
    else if((month+1) < 10){
        theMonth = "0"+(month+1);
    }
    else{
        theMonth = month+1;
    }
    theMonth = theMonth.toString();
    var key;
    key = theDay+theMonth+theYear.toString();
    key = key.toString();
    for(var i=0 ; i<Seasons.length ; i++){
        if(Seasons[i]["Hours"][key]){
            if(content.indexOf(Seasons[i]["Title"],0)>-1){
                   result = result +     "<div class=\"legendC\"><img src=\""+Seasons[i]["ImageLegend"]+"\" class=\"ftLeft\" alt=\"\" width=\"13\" heigth=\"14\"/>";
                   result = result +  "<div class=\"legendTxt\">"+Seasons[i]["Title"]+"</div>";
                   result = result +  "</div>"; 
            }
        }
    }
   return result;
}


/*
 ** Get the content of a cell of the calendar
 */
function GetCellContent(day){
    var theDay;
    if(day < 10){
        theDay = "0"+day.toString();
    }
    else{
        theDay = day.toString();
    }
    var theMonth;
    if((TodaysMonth+1) < 10){
        theMonth = "0"+(TodaysMonth+1);
    }
    else{
        theMonth = TodaysMonth+1;
        
    }
    theMonth = theMonth.toString();
    var key;
    var result = "";
    key = theDay+theMonth+TodaysYear.toString();
    key = key.toString();
    for(var i=0 ; i<Content.length ; i++){
        if(Content[i][key]){
            result += "<div class='Day"+Content[i]["Class"]+"'>" + Content[i][key] + "</div>";
        }
        else{
            result += "<div class='Day"+Content[i]["Class"]+"'></div>";
        }
    }
    result += "<div class=\"DayR2\"><a href=\""+DetailsURL+"?day="+day+"&month="+TodaysMonth+"&year="+TodaysYear+"\">More</a></div>"
    return result;
}
/*
 ** Get the image of the season for the date in parameter
 */
function GetSeasonImage(day, month, year){
    var theDay;
    if(day < 10){
        theDay = "0"+day.toString();
    }
    else{
        theDay = day.toString();
    }
    var theMonth;
    var theYear = year;
    if(month < 0){
        theMonth = 12;
        theYear -= 1;
    }
    else if((month+1) < 10){
        theMonth = "0"+(month+1);
    }
    else{
        theMonth = month+1;
    }
    theMonth = theMonth.toString();
    var key;
    key = theDay+theMonth+theYear.toString();
    key = key.toString();
    for(var i=0 ; i<Seasons.length ; i++){
        if(Seasons[i]["Hours"][key]){
            return "style=\"background-image:url("+Seasons[i]["Image"]+");background-position: 82px 3px;background-repeat: no-repeat;\"";
            
        }
    }
    return "";
}
function GetDisabledSeasonImage(day, month, year){
    var theDay;
    if(day < 10){
        theDay = "0"+day.toString();
    }
    else{
        theDay = day.toString();
    }
    var theMonth;
    var theYear = year;
    if(month < 0){
        theMonth = 12;
        theYear -= 1;
    }
    else if((month+1) < 10){
        theMonth = "0"+(month+1);
    }
    else{
        theMonth = month+1;
    }
    theMonth = theMonth.toString();
    var key;
    key = theDay+theMonth+theYear.toString();
    key = key.toString();
    for(var i=0 ; i<Seasons.length ; i++){
        if(Seasons[i]["Hours"][key]){
            return "style=\"background-image:url("+Seasons[i]["ImageDisabled"]+");background-position: 82px 3px;background-repeat: no-repeat;\"";
            
        }
    }
    return "";
}
/*
 ** Get the day number in a week (1=>Monday, ..., 7=>Sunday)
 */
function GetDayNumber(day){
    if(day == 0){
        return 7;
    }
    else{
        return day;
    }
}
/*
 ** Get the number of days in the month in parameter
 */
function GetMonthLength(month){
    if(month == -1){
        return MonthLength[11];
    }
    else if(month == 12){
        return MonthLength[0];
    }
    else{
        return MonthLength[month];
    }
}
/* 
 ** Get the number of days of the february month for the year in parameter
 */
function GetFebruaryNbDays(yy){
    if ((yy % 100 != 0 && yy % 4 == 0) || (yy % 400 == 0)){
        return 29;
    }
    else{
        return 28;
    }
}
/*
 ** Get the value of a variable in current page URL
 */
function getURLVariable(strVarNameToSearch){
    if(location.search.substring(1)){
        // Get all the argument in the URL in a table
        tbVar = location.search.substring(1).split('&');

	    for(i=0 ; i<tbVar.length ; i++){
		    // Look for equal character
		    intPosEgal = (tbVar[i].indexOf("=",0));
    		
		    // Get the name of the variable
		    strVarName = tbVar[i].substring(0,intPosEgal);
    		
    		if(strVarNameToSearch == strVarName){
		        // Return the variable value
		        return tbVar[i].substring(intPosEgal+1,tbVar[i].length);
		    }
	    }
    }
    // variable not found
    return ""
}


/*CFT
// return the opening hours of the day depending of the parks. 
//Variables:
//'day' : ddmmyyyy
//'park' : Park=0 | Studios=1
*/
function getOpenHoursByDay(day, park){
        var result = "";
        day = day.toString();
        var i=park;
        if (park=="Park"){i=0;}else if(park=="Studios"){i=1;}
        if(Content[i][day]){
            result =  Content[i][day];
        }
    return result;

}
