';
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,8,6,18,45);
tmpEpisode = new NextEpisodeInfo('Dodgems', '', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,6,16,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,6,17,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,6,15,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,8,7,18,45);
tmpEpisode = new NextEpisodeInfo('Tall Story Roary', '', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,7,16,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,7,17,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,7,15,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,8,8,18,45);
tmpEpisode = new NextEpisodeInfo('Hot Stuff', '', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,8,16,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,8,17,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,8,15,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,8,9,18,45);
tmpEpisode = new NextEpisodeInfo('Rules Are Rules', '', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,9,16,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,9,17,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,9,15,45));
partner_nextEpisodes.push(tmpEpisode);
tmpDate = new Date(2010,8,10,18,45);
tmpEpisode = new NextEpisodeInfo('Flash\'s Tea Party', '', tmpDate);
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,10,16,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,10,17,45));
tmpEpisode.EpisodeAirTimes.push(new Date(2010,8,10,15,45));
partner_nextEpisodes.push(tmpEpisode);
partner_newsItems.push('
We\'ve got a whole new season starting the week of Sept. 6th!');
partner_newsItems.push('
Watch these cute clips!');
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);