
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 = "/new/calendar/calendar.xhtml"
var Content = new Array();
var Seasons = new Array();
var Disneyland_Park_Content = {"Class" : "Park", "Name" : "Disneyland Park" ,"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","01052010" : "10:00-22:00","02052010" : "10:00-21:00","03052010" : "10:00-19:00","04052010" : "10:00-19:00","05052010" : "10:00-19:00","06052010" : "10:00-19:00","07052010" : "10:00-19:00","08052010" : "10:00-22:00","09052010" : "10:00-21:00","10052010" : "10:00-19:00","11052010" : "10:00-19:00","12052010" : "10:00-19:00","13052010" : "10:00-22:00","14052010" : "10:00-22:00","15052010" : "10:00-22:00","16052010" : "10:00-21:00","17052010" : "10:00-19:00","18052010" : "10:00-19:00","19052010" : "10:00-19:00","20052010" : "10:00-19:00","21052010" : "10:00-19:00","22052010" : "10:00-22:00","23052010" : "10:00-22:00","24052010" : "10:00-21:00","25052010" : "10:00-19:00","26052010" : "10:00-19:00","27052010" : "10:00-19:00","28052010" : "10:00-19:00","29052010" : "09:30-22:00","30052010" : "09:30-22:00","31052010" : "10:00-19:00","01062010" : "10:00-19:00","02062010" : "10:00-19:00","03062010" : "10:00-19:00","04062010" : "10:00-19:00","05062010" : "09:30-22:00","06062010" : "09:30-22:00","07062010" : "10:00-19:00","08062010" : "10:00-19:00","09062010" : "10:00-19:00","10062010" : "10:00-19:00","11062010" : "10:00-19:00","12062010" : "09:30-22:00","13062010" : "09:30-22:00","14062010" : "10:00-19:00","15062010" : "10:00-19:00","16062010" : "10:00-19:00","17062010" : "10:00-19:00","18062010" : "10:00-19:00","19062010" : "09:30-22:00","20062010" : "09:30-22:00","21062010" : "10:00-20:00","22062010" : "10:00-20:00","23062010" : "10:00-20:00","24062010" : "10:00-20:00","25062010" : "10:00-20:00","26062010" : "09:30-22:00","27062010" : "09:30-22:00","28062010" : "10:00-21:00","29062010" : "10:00-21:00","30062010" : "10:00-21:00","01072010" : "10:00-21:00","02072010" : "10:00-21:00","03072010" : "10:00-23:00","04072010" : "10:00-23:00","05072010" : "10:00-23:00","06072010" : "10:00-23:00","07072010" : "10:00-23:00","08072010" : "10:00-23:00","09072010" : "10:00-23:00","10072010" : "10:00-23:00","11072010" : "10:00-23:00","12072010" : "10:00-23:00","13072010" : "10:00-23:00","14072010" : "10:00-23:00","15072010" : "10:00-23:00","16072010" : "10:00-23:00","17072010" : "10:00-23:00","18072010" : "10:00-23:00","19072010" : "10:00-23:00","20072010" : "10:00-23:00","21072010" : "10:00-23:00","22072010" : "10:00-23:00","23072010" : "10:00-23:00","24072010" : "10:00-23:00","25072010" : "10:00-23:00","26072010" : "10:00-23:00","27072010" : "10:00-23:00","28072010" : "10:00-23:00","29072010" : "10:00-23:00","30072010" : "10:00-23:00","31072010" : "10:00-23:00","01082010" : "10:00-23:00","02082010" : "10:00-23:00","03082010" : "10:00-23:00","04082010" : "10:00-23:00","05082010" : "10:00-23:00","06082010" : "10:00-23:00","07082010" : "10:00-23:00","08082010" : "10:00-23:00","09082010" : "10:00-23:00","10082010" : "10:00-23:00","11082010" : "10:00-23:00","12082010" : "10:00-23:00","13082010" : "10:00-23:00","14082010" : "10:00-23:00","15082010" : "10:00-23:00","16082010" : "10:00-23:00","17082010" : "10:00-23:00","18082010" : "10:00-23:00","19082010" : "10:00-23:00","20082010" : "10:00-23:00","21082010" : "10:00-23:00","22082010" : "10:00-23:00","23082010" : "10:00-23:00","24082010" : "10:00-23:00","25082010" : "10:00-23:00","26082010" : "10:00-23:00","27082010" : "10:00-23:00","28082010" : "10:00-23:00","29082010" : "10:00-23:00","30082010" : "10:00-19:00","31082010" : "10:00-19:00","01092010" : "10:00-19:00","02092010" : "10:00-19:00","03092010" : "10:00-19:00","04092010" : "10:00-21:00","05092010" : "10:00-21:00","06092010" : "10:00-18:00","07092010" : "10:00-18:00","08092010" : "10:00-18:00","09092010" : "10:00-18:00","10092010" : "10:00-18:00","11092010" : "10:00-22:00","12092010" : "10:00-21:00","13092010" : "10:00-18:00","14092010" : "10:00-18:00","15092010" : "10:00-18:00","16092010" : "10:00-18:00","17092010" : "10:00-18:00","18092010" : "10:00-22:00","19092010" : "10:00-21:00","20092010" : "10:00-18:00","21092010" : "10:00-18:00","22092010" : "10:00-18:00","23092010" : "10:00-18:00","24092010" : "10:00-18:00","25092010" : "10:00-22:00","26092010" : "10:00-21:00","27092010" : "10:00-18:00","28092010" : "10:00-18:00","29092010" : "10:00-18:00","30092010" : "10:00-18:00","01102010" : "10:00-18:00","02102010" : "10:00-20:00","03102010" : "10:00-20:00","04102010" : "10:00-18:00","05102010" : "10:00-18:00","06102010" : "10:00-18:00","07102010" : "10:00-18:00","08102010" : "10:00-18:00","09102010" : "10:00-22:00","10102010" : "10:00-21:00","11102010" : "10:00-19:00","12102010" : "10:00-19:00","13102010" : "10:00-19:00","14102010" : "10:00-19:00","15102010" : "10:00-19:00","16102010" : "10:00-22:00","17102010" : "10:00-21:00","18102010" : "10:00-19:00","19102010" : "10:00-19:00","20102010" : "10:00-19:00","21102010" : "10:00-19:00","22102010" : "10:00-19:00","23102010" : "10:00-22:00","24102010" : "10:00-22:00","25102010" : "10:00-22:00","26102010" : "10:00-19:00","27102010" : "10:00-22:00","28102010" : "10:00-22:00","29102010" : "10:00-22:00","30102010" : "10:00-22:00","31102010" : "10:00-20:00"};
Content.push(Disneyland_Park_Content);
var Walt_Disney_Studios_Content = {"Class" : "Studios", "Name" : "Walt Disney Studios" ,"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","01052010" : "10:00-19:00","02052010" : "10:00-19:00","03052010" : "10:00-18:00","04052010" : "10:00-18:00","05052010" : "10:00-18:00","06052010" : "10:00-18:00","07052010" : "10:00-18:00","08052010" : "10:00-19:00","09052010" : "10:00-19:00","10052010" : "10:00-18:00","11052010" : "10:00-18:00","12052010" : "10:00-18:00","13052010" : "10:00-19:00","14052010" : "10:00-19:00","15052010" : "10:00-19:00","16052010" : "10:00-19:00","17052010" : "10:00-18:00","18052010" : "10:00-18:00","19052010" : "10:00-18:00","20052010" : "10:00-18:00","21052010" : "10:00-18:00","22052010" : "10:00-19:00","23052010" : "10:00-19:00","24052010" : "10:00-19:00","25052010" : "10:00-18:00","26052010" : "10:00-18:00","27052010" : "10:00-18:00","28052010" : "10:00-18:00","29052010" : "10:00-19:00","30052010" : "10:00-19:00","31052010" : "10:00-19:00","01062010" : "10:00-19:00","02062010" : "10:00-19:00","03062010" : "10:00-19:00","04062010" : "10:00-19:00","05062010" : "10:00-19:00","06062010" : "10:00-19:00","07062010" : "10:00-19:00","08062010" : "10:00-19:00","09062010" : "10:00-19:00","10062010" : "10:00-19:00","11062010" : "10:00-19:00","12062010" : "10:00-19:00","13062010" : "10:00-19:00","14062010" : "10:00-19:00","15062010" : "10:00-19:00","16062010" : "10:00-19:00","17062010" : "10:00-19:00","18062010" : "10:00-19:00","19062010" : "10:00-19:00","20062010" : "10:00-19:00","21062010" : "10:00-19:00","22062010" : "10:00-19:00","23062010" : "10:00-19:00","24062010" : "10:00-19:00","25062010" : "10:00-19:00","26062010" : "10:00-19:00","27062010" : "10:00-19:00","28062010" : "10:00-19:00","29062010" : "10:00-19:00","30062010" : "10:00-19:00","01072010" : "10:00-19:00","02072010" : "10:00-19:00","03072010" : "10:00-19:00","04072010" : "10:00-19:00","05072010" : "10:00-19:00","06072010" : "10:00-19:00","07072010" : "10:00-19:00","08072010" : "10:00-19:00","09072010" : "10:00-19:00","10072010" : "10:00-19:00","11072010" : "10:00-19:00","12072010" : "10:00-19:00","13072010" : "10:00-19:00","14072010" : "10:00-19:00","15072010" : "10:00-19:00","16072010" : "10:00-19:00","17072010" : "10:00-19:00","18072010" : "10:00-19:00","19072010" : "10:00-19:00","20072010" : "10:00-19:00","21072010" : "10:00-19:00","22072010" : "10:00-19:00","23072010" : "10:00-19:00","24072010" : "10:00-19:00","25072010" : "10:00-19:00","26072010" : "10:00-19:00","27072010" : "10:00-19:00","28072010" : "10:00-19:00","29072010" : "10:00-19:00","30072010" : "10:00-19:00","31072010" : "10:00-19:00","01082010" : "10:00-19:00","02082010" : "10:00-19:00","03082010" : "10:00-19:00","04082010" : "10:00-19:00","05082010" : "10:00-19:00","06082010" : "10:00-19:00","07082010" : "10:00-19:00","08082010" : "10:00-19:00","09082010" : "10:00-19:00","10082010" : "10:00-19:00","11082010" : "10:00-19:00","12082010" : "10:00-19:00","13082010" : "10:00-19:00","14082010" : "10:00-19:00","15082010" : "10:00-19:00","16082010" : "10:00-19:00","17082010" : "10:00-19:00","18082010" : "10:00-19:00","19082010" : "10:00-19:00","20082010" : "10:00-19:00","21082010" : "10:00-21:00","22082010" : "10:00-19:00","23082010" : "10:00-19:00","24082010" : "10:00-19:00","25082010" : "10:00-19:00","26082010" : "10:00-19:00","27082010" : "10:00-19:00","28082010" : "10:00-21:00","29082010" : "10:00-19:00","30082010" : "10:00-19:00","31082010" : "10:00-19:00","01092010" : "10:00-19:00","02092010" : "10:00-19:00","03092010" : "10:00-19:00","04092010" : "10:00-19:00","05092010" : "10:00-19:00","06092010" : "10:00-18:00","07092010" : "10:00-18:00","08092010" : "10:00-18:00","09092010" : "10:00-18:00","10092010" : "10:00-18:00","11092010" : "10:00-19:00","12092010" : "10:00-19:00","13092010" : "10:00-18:00","14092010" : "10:00-18:00","15092010" : "10:00-18:00","16092010" : "10:00-18:00","17092010" : "10:00-18:00","18092010" : "10:00-19:00","19092010" : "10:00-19:00","20092010" : "10:00-18:00","21092010" : "10:00-18:00","22092010" : "10:00-18:00","23092010" : "10:00-18:00","24092010" : "10:00-18:00","25092010" : "10:00-19:00","26092010" : "10:00-19:00","27092010" : "10:00-18:00","28092010" : "10:00-18:00","29092010" : "10:00-18:00","30092010" : "10:00-18:00","01102010" : "10:00-18:00","02102010" : "10:00-19:00","03102010" : "10:00-19:00","04102010" : "10:00-18:00","05102010" : "10:00-18:00","06102010" : "10:00-18:00","07102010" : "10:00-18:00","08102010" : "10:00-18:00","09102010" : "10:00-19:00","10102010" : "10:00-19:00","11102010" : "10:00-18:00","12102010" : "10:00-18:00","13102010" : "10:00-18:00","14102010" : "10:00-18:00","15102010" : "10:00-18:00","16102010" : "10:00-19:00","17102010" : "10:00-19:00","18102010" : "10:00-18:00","19102010" : "10:00-18:00","20102010" : "10:00-18:00","21102010" : "10:00-18:00","22102010" : "10:00-18:00","23102010" : "10:00-19:00","24102010" : "10:00-19:00","25102010" : "10:00-19:00","26102010" : "10:00-19:00","27102010" : "10:00-19:00","28102010" : "10:00-19:00","29102010" : "10:00-19:00","30102010" : "10:00-19:00","31102010" : "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:201-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:201-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:201-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:201-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;

}
