';
var partner_newsItems = [];
var partner_episodeItems = [];
var partner_showInfo = '';
var partner_nextEpisodes = [];
var partner_months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var partner_days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
function NextEpisodeInfo(name, description, time) {
this.EpisodeName = "
"+ name +"";
this.EpisodeDescription = description;
this.EpisodeAirTimes = [];
this.EpisodeAirTimes.push(time);
}
NextEpisodeInfo.prototype = {
getShowTime : function(intIdentifier) {
return this.EpisodeAirTimes[intIdentifier];
}
};
var tmpDate;
var tmpEpisode;
partner_showInfo = '
Roary is a bright red, cheeky and energetic single-seater racing car who lives at Silver Hatch racetrack. He has the spirit and sense of a young boy whose boundless enthusiasm and curiosity often leads him into trouble. However, this novice has a heart of chrome under his bonnet and he’s always willing to make amends. Set in and around Silver Hatch, the stories explore Roary’s relationships with his amazing group of racing car friends and Big Chris, the karaoke loving mechanic. Children will love to join Roary on his journey through life, learning lessons as they go; how to do the right thing, how to be positive and helpful to others, road safety, the environment, ways to share and communicate ideas, solving problems, being creative, the importance of taking exercise, and healthy living. Roary is a young racing car, and sometimes he rushes too fast, just like children, so he must learn to slow down and listen from time to time!
© Chapman Entertainment Limited & David Jenkins 2009.';
tmpDate = new Date(2010,1,9,14,45);
tmpEpisode = new NextEpisodeInfo('Workshop Roary; Tip Top Tin Top', '', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,9,12,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,9,13,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,9,11,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,1,10,14,45);
tmpEpisode = new NextEpisodeInfo('Tip Top Tin Top', 'Tin Top is trying his hardest to avoid any scrapes and crashes as an important car designer is coming to visit.', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,10,12,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,10,13,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,10,11,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,1,11,14,45);
tmpEpisode = new NextEpisodeInfo('Tunnel Vision; Molecom Makes Music', '', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,11,12,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,11,13,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,11,11,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,1,12,14,45);
tmpEpisode = new NextEpisodeInfo('Molecom Makes Music', 'Farmer Green is getting ready for a barn dance.', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,12,12,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,12,13,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,12,11,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,1,14,12,45);
tmpEpisode = new NextEpisodeInfo('Roary and Nigel', 'Roary brings a crab back to the track from the beach.', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,14,10,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,14,11,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,1,14,9,45));
partner_nextEpisodes.push(tmpEpisode);
if(partner_newsItems.length > 0)
partner_html = partner_html.replace(/%% NEWS_GOES_HERE %%/g, partner_newsItems.join('
'));
else
partner_html = partner_html.replace(/%% NEWS_GOES_HERE %%/g, '
There is no news available right now
');
if(partner_nextEpisodes.length > 0) {
partner_html = partner_html.replace(/%% EPISODES_GO_HERE %%/g, partner_nextEpisodes[0].EpisodeName +"
"+ partner_nextEpisodes[0].EpisodeDescription);
}
function partner_leadingZero(nr) {
if (nr < 10) nr = "0" + nr;
return nr;
}
function partner_getHourAndTT(dte) {
var hour = dte.getHours();
var tag;
if (hour > 12) {
hour = hour - 12;
tag = "PM";
}
else {
tag = "AM";
}
return [partner_leadingZero(hour), tag];
}
function partner_getFormattedDate(date) {
var html = partner_days[date.getDay()] +', '+ partner_months[date.getMonth()] +' '+ date.getDate() +', '+ date.getFullYear();
html += " AT "+ partner_getHourAndTT(date)[0] +':'+ partner_leadingZero(date.getMinutes()) +' '+ partner_getHourAndTT(date)[1];
return html +' EST';
}
var strPartnerShowTime = '';
for(var i=0;i
";
}
partner_html = partner_html.replace(/%% SHOW_INFO_HERE %%/g, strPartnerShowTime);
document.write(partner_html);