// Error suppression
if (location && !(location.search && location.search.indexOf('showerror') > -1)) {window.onerror = function (m,u,l){a=window['errorlist'];if (!a) a=window['errorlist']=[];try {a[a.length]=u+' line '+l+': '+m;}catch (e) {a[a.length]='Unhandled exception';}return true;}}
// === text size start
var currFont = 1;
function setTextSize(s) {
var arrFont = new Array('.8em', '1em', '1.2em', '1.4em', '1.6em');
var arrHeight = new Array('1.3em', '1.35em', '1.4em', '1.45em', '1.5em');
if (s == 'up') {
currFont++;
}
if (s == 'down') {
currFont--;
}
if (currFont >= 4) {
currFont = 4;
}
if (currFont <= 0) {
currFont = 0;
}
document.getElementById('tsnStory').style.fontSize = arrFont[currFont];
document.getElementById('tsnStory').style.lineHeight = arrHeight[currFont];
}// --- text size end
function setFlashHeight(divId, newH) {
document.getElementById(divId).style.height = newH+"px";
}
// -- Legacy functions
function openNewWindow(URLtoOpen,windowName,windowFeatures){window.open(URLtoOpen,windowName,windowFeatures);}
function playClip(p_cid){openNewWindow('http://broadband.tsn.ca/?vid='+p_cid,'TSNBroadband','height=820,width=1010,toolbar=0,scrollbars=1,resizable=1,status=0');}
function openGallery(intGalleryId){window.open('http://www.tsn.ca/window/gallery.aspx?galleryid='+intGalleryId,'TSNGallery','height=501,width=760,toolbar=no,scrollbars=no,resizable=no,status=no');}
TSNMedia = {
'ShowImagePopup' : function(strImagePath,intWidth,intHeight, strParams) {window.open('/Story/Image.aspx?path=' + strImagePath + '&width=' + intWidth + '&height=' + intHeight,'popupimage', "menubar=0,resizable=0,width=" + intWidth + ",height=" + intHeight);},
'openNewWindow' : function(URLtoOpen,windowName,windowFeatures) {window.open(URLtoOpen,windowName,windowFeatures);return false;},
'playClip' : function(p_cid) {openNewWindow('http://broadband.tsn.ca/?vid='+p_cid,'TSNBroadband','height=820,width=1010,toolbar=0,scrollbars=1,resizable=1,status=0');},
'openGallery' : function(intGalleryId) {openNewWindow('http://www.tsn.ca/window/gallery.aspx?galleryid='+intGalleryId,'TSNGallery','height=591,width=760,toolbar=no,scrollbars=no,resizable=no,status=no');return false;},
'openGalleryFromStory' : function(intGalleryId) {openNewWindow('http://www.tsn.ca/window/gallery.aspx?galleryid='+intGalleryId,'TSNGallery','height=591,width=760,toolbar=no,scrollbars=no,resizable=no,status=no');},
'swapImg' : function (thisImg,newImg,imgDir) {newUrl = imgDir+newImg;if(document.images) {document.images[thisImg].src=newUrl;}return false;},
'placeScoreBoardOLD' : function (showSport, showAll, showFull) {document.write('<div class="imgOnly"><div id="tsnLiveSB"><\/div><\/div>');var flashvars = {};flashvars.initSB = showSport;flashvars.showAll = showAll;flashvars.showFull = showFull;flashvars.cache = tsnFlashTimeStamp;var params = {};params.wmode = 'transparent';params.allowscriptaccess = 'always';params.scale = 'noscale';params.salign = 'tl';var attributes = {};swfobject.embedSWF('http://www2.tsn.ca/media/flash/scoreboard/scoreboard.swf', 'tsnLiveSB', '218', '122', '8.0.0', false, flashvars, params, attributes);},
'placeScoreBoard' : function (showSport, showAll, showFull) {intH = 94; if (showAll == 'true'){intH=103;}document.write('<div class="imgOnly"><div id="tsnLiveSB"><\/div><\/div>');var flashvars = {};flashvars.initSB = showSport.toUpperCase();flashvars.showAll = showAll;flashvars.showFull = showFull;flashvars.cache = tsnFlashTimeStamp;var params = {};params.wmode = 'transparent';params.allowscriptaccess = 'always';params.scale = 'noscale';params.salign = 'tl';var attributes = {};swfobject.embedSWF('http://www2.tsn.ca/media/flash/scoreboard9/scoreboard.swf', 'tsnLiveSB', '218', intH, '9.0.0', false, flashvars, params, attributes);},
'setDivHeight': function (divId, newH) {document.getElementById(divId).style.height = newH+"px";}
}
// -- Interrupt auto post
function stopRKey(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
}
document.onkeypress = stopRKey;
// -- Ad code placement
var p=parent;
var d=document;
var adord = (typeof adord == 'undefined' ? (typeof p.ord == 'undefined' ? '' : p.ord) : adord)
var szone = (typeof szone == 'undefined' ? (typeof p.szone == 'undefined' ? '' : p.szone) : szone);
var smode = (typeof smode == 'undefined' ? (typeof p.smode == 'undefined' ? '' : p.smode) : smode);
var spos = (typeof spos == 'undefined' ? (typeof p.spos == 'undefined' ? '' : p.spos) : spos);
var sarena = (typeof sarena == 'undefined' ? (typeof p.sarena == 'undefined' ? 'sports' : p.sarena) : sarena);
var snc = typeof snc == 'undefined' ? "" : snc;
var sops = typeof sops == 'undefined' ? "" : sops;
var sloc = getLoc();
var size;
var stile;
var dclkBanner = true;
function quoteCleanUp(strInput) {
boolOdd = true;
while(strInput.indexOf('"') > -1) {
intReplacement = strInput.indexOf('"');
strInput = strInput.substr(0,intReplacement) + (boolOdd ? '\u201c' : '\u201d') + strInput.substr(intReplacement + 1);
boolOdd = !boolOdd;
}
return strInput;
}
function writeDClick() {
stile = typeof stile == 'undefined' ? "0" : stile;
adpg2 = window['adpg2'] ? adpg2:'unknown';
adCode='<scr'+'ipt language="javascript1.1" src="http://ad.ca.doubleclick.net/adj/ctv.tsn.ca/'+adpg+';abr=!webtv;mode='+smode+';loc='+sloc+';adpg='+adpg+';adpg2=' + adpg2 + ';arena=sports;ops='+sops+';pos='+spos+';kw=;nc='+snc+';sz='+size+';tile=' + stile + ';ord='+adord+'?"></scr'+'ipt>';
adCode+='<div style="position:absolute;visibility:hidden;display:inline;"><img src="http://adcounter.theglobeandmail.com/servlet/AdletCounter?ad1=TSNpg_'+adpg+'_'+size+'" width="1" height="1" border="0"></div>';
document.write(adCode);
}
function getLoc() {
try {
var c = ['teams/story','story','feature','scores','schedule','standings','statistics','teams','players','injuries','transactions','daily_line'];
var u = document.location.toString().toLowerCase();
for(i = 0; i < c.length;i++) {
if(u.indexOf('/'+c[i]+'/') > 0) return c[i];
}
if (u.indexOf('id=') > 0) return 'nonhub';
return 'hub';
}
catch(e) { return 'unknown'; }
}
function place728x90(stileOverride) {
stile = stileOverride ? stileOverride : "1";
size="728x90";
writeDClick();
}
function place300x250(stileOverride){
stile = stileOverride ? stileOverride : "2";
size="300x250";
writeDClick();
ad3=true;
}
function place160x600(stileOverride){
stile = stileOverride  ? stileOverride : "3";
size="160x600";
writeDClick();
}
function place468x60(stileOverride){
stile = stileOverride ? stileOverride : "4";
size="468x60";
writeDClick();
}
function place120x600(stileOverride){
stile = stileOverride ? stileOverride : "5";
size="120x600";
writeDClick();
}
function isNumeric(sText) {
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;
for (i = 0; i < sText.length && IsNumber == true; i++) {
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1) {
IsNumber = false;
}
}
return IsNumber;
}
//Done
/* START OF INTERSTITIAL CODE */
/*  ADDED JANUARY 2009 */
CookieWriter =
{
nomCookie : '',
EcrireCookie : function(valeur)
{
var argv=this.EcrireCookie.arguments;
var argc=this.EcrireCookie.arguments.length;
var today = new Date();
var expires= 1 * 1000 * 60 * 60 * 24;
var expires_date = new Date( today.getTime() + (expires) );
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
document.cookie=this.nomCookie+"="+escape(valeur)+
((expires==null) ? "" : ("; expires="+expires_date.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");
},
LireCookie : function ()
{
var arg=this.nomCookie+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen){
var j=i+alen;
if (document.cookie.substring(i, j)==arg)
return this.CookieVal(j);
i=document.cookie.indexOf(" ",i)+1;
if (i==0)
break;
}
return null;
},
CookieVal: function (offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1) endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
}
var cookieName = '';
var redirect_path = '';
var adDuration = 7;
var remaining = adDuration;
var codeInsert = '';
var userViews;
var maxViews;
function activateIntersticielle(){
CookieWriter.nomCookie = cookieName;
userViews = CookieWriter.LireCookie();
if(userViews != null){userViews = parseInt(userViews);}
else {userViews = 0;}
if(userViews >= maxViews)
{
redirect(redirect_path);
} else {
CookieWriter.EcrireCookie(userViews+1);
holder= document.getElementById('intersticielleHolder');
if(codeInsert == '')
{
holder.innerHTML = '<IFRAME SRC="http://ad.ca.doubleclick.net/adi/N3644.RDS/B2756644.3;sz=640x480;click=;ord=[timestamp]?" WIDTH=640 HEIGHT=480 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR="#000000">' +
'<SCRIPT language="JavaScript1.1" SRC="http://ad.ca.doubleclick.net/adj/N3644.RDS/B2756644.3;abr=!ie;sz=640x480;click=;ord=[timestamp]?">' +
'</SCRIPT>' +
'<NOSCRIPT>' +
'<A HREF="http://ad.ca.doubleclick.net/jump/N3644.RDS/B2756644.3;abr=!ie4;abr=!ie5;sz=640x480;ord=[timestamp]?">' +
'<IMG SRC="http://ad.ca.doubleclick.net/ad/N3644.RDS/B2756644.3;abr=!ie4;abr=!ie5;sz=640x480;ord=[timestamp]?" BORDER=0 WIDTH=640 HEIGHT=480 ALT="Click Here"></A>' +
'</NOSCRIPT>' +
'</IFRAME>';
} else {
holder.innerHTML = codeInsert;
}
setTimeout("redirect('"+redirect_path+"')", adDuration *1000);
setInterval("updateRemaining('counter')", 1000);
}
}
function redirect(path) {
window.location = path;
}
function updateRemaining(targetId){
if(remaining > 0){
remaining -= 1;
}
remainingHolder = document.getElementById(targetId);
remainingHolder.innerHTML = remaining;
}
/* END OF INTERSTITIAL CODE */
function tsnRequest(){
var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]
if (window.ActiveXObject){
for (var i=0; i<activexmodes.length; i++){
try{
return new ActiveXObject(activexmodes[i])
}
catch(e){
}
}
}
else if (window.XMLHttpRequest)
return new XMLHttpRequest()
else
return false
}
TsnDivCycle = function(p,m) {
var strMenuItemIdPrefix = p;
var intMaxNavCount = m;
this.show = function(i) {
var intSelectedIndex = i;
var objDiv;
if (!document.getElementById(strMenuItemIdPrefix + i.toString())) {
return false;
}
for (var i = 1; i <= intMaxNavCount; i++) {
objDiv = document.getElementById(strMenuItemIdPrefix + i.toString());
if (objDiv) {
objDiv.style.display = (i === intSelectedIndex) ? 'block' : 'none';
}
}
}
}
 
/*SWFObject v2.0 rc4 <http://code.google.com/p/swfobject/>
Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var X="undefined",P="object",a="visibility:visible",e="visibility:hidden",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",V="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,S=false,C=false;var Y=function(){var l=typeof g.getElementById!=X&&typeof g.getElementsByTagName!=X&&typeof g.createElement!=X&&typeof g.appendChild!=X&&typeof g.replaceChild!=X&&typeof g.removeChild!=X&&typeof g.cloneNode!=X,t=[0,0,0],n=null;if(typeof N.plugins!=X&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=X){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v);/*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var d=function(){if(!Y.w3cdom){return }J(I);if(Y.ie&&Y.win){try{g.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var i=b("__ie_ondomload");if(i){i.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);U()}}}}catch(j){}}if(Y.webkit&&typeof g.readyState!=X){Q=setInterval(function(){if(/loaded|complete/.test(g.readyState)){U()}},10)}if(typeof g.addEventListener!=X){g.addEventListener("DOMContentLoaded",U,null)}M(U)}();function U(){if(S){return }if(Y.ie&&Y.win){var m=W("span");try{var l=g.getElementsByTagName("body")[0].appendChild(m);l.parentNode.removeChild(l)}catch(n){return }}S=true;if(Q){clearInterval(Q);Q=null}var j=f.length;for(var k=0;k<j;k++){f[k]()}}function J(i){if(S){i()}else{f[f.length]=i}}function M(j){if(typeof G.addEventListener!=X){G.addEventListener("load",j,false)}else{if(typeof g.addEventListener!=X){g.addEventListener("load",j,false)}else{if(typeof G.attachEvent!=X){G.attachEvent("onload",j)}else{if(typeof G.onload=="function"){var i=G.onload;G.onload=function(){i();j()}}else{G.onload=j}}}}}function I(){var l=H.length;for(var j=0;j<l;j++){var m=H[j].id;if(Y.pv[0]>0){var k=b(m);if(k){H[j].width=k.getAttribute("width")?k.getAttribute("width"):"0";H[j].height=k.getAttribute("height")?k.getAttribute("height"):"0";if(O(H[j].swfVersion)){if(Y.webkit&&Y.webkit<312){T(k)}}else{if(H[j].expressInstall&&!C&&O("6.0.65")&&(Y.win||Y.mac)){D(H[j])}else{c(k)}}}}A("#"+m,a)}}function T(m){var k=m.getElementsByTagName(P)[0];if(k){var p=W("embed"),r=k.attributes;if(r){var o=r.length;for(var n=0;n<o;n++){if(r[n].nodeName.toLowerCase()=="data"){p.setAttribute("src",r[n].nodeValue)}else{p.setAttribute(r[n].nodeName,r[n].nodeValue)}}}var q=k.childNodes;if(q){var s=q.length;for(var l=0;l<s;l++){if(q[l].nodeType==1&&q[l].nodeName.toLowerCase()=="param"){p.setAttribute(q[l].getAttribute("name"),q[l].getAttribute("value"))}}}m.parentNode.replaceChild(p,m)}}function F(i){if(Y.ie&&Y.win&&O("8.0.0")){G.attachEvent("onunload",function(){try {var k=b(i);for(var j in k){if(typeof k[j]=="function"){k[j]=function(){}}}k.parentNode.removeChild(k)}catch(e){}})}}function D(j){C=true;var o=b(j.id);if(o){if(j.altContentId){var l=b(j.altContentId);if(l){L=l}}else{L=Z(o)}if(!(/%$/.test(j.width))&&parseInt(j.width,10)<310){j.width="310"}if(!(/%$/.test(j.height))&&parseInt(j.height,10)<137){j.height="137"}g.title=g.title.slice(0,47)+" - Flash Player Installation";var n=Y.ie&&Y.win?"ActiveX":"PlugIn",k=g.title,m="MMredirectURL="+G.location+"&MMplayerType="+n+"&MMdoctitle="+k,p=j.id;if(Y.ie&&Y.win&&o.readyState!=4){var i=W("div");p+="SWFObjectNew";i.setAttribute("id",p);o.parentNode.insertBefore(i,o);o.style.display="none";G.attachEvent("onload",function(){o.parentNode.removeChild(o)})}R({data:j.expressInstall,id:K,width:j.width,height:j.height},{flashvars:m},p)}}function c(j){if(Y.ie&&Y.win&&j.readyState!=4){var i=W("div");j.parentNode.insertBefore(i,j);i.parentNode.replaceChild(Z(j),i);j.style.display="none";G.attachEvent("onload",function(){j.parentNode.removeChild(j)})}else{j.parentNode.replaceChild(Z(j),j)}}function Z(n){var m=W("div");if(Y.win&&Y.ie){m.innerHTML=n.innerHTML}else{var k=n.getElementsByTagName(P)[0];if(k){var o=k.childNodes;if(o){var j=o.length;for(var l=0;l<j;l++){if(!(o[l].nodeType==1&&o[l].nodeName.toLowerCase()=="param")&&!(o[l].nodeType==8)){m.appendChild(o[l].cloneNode(true))}}}}}return m}function R(AE,AC,q){var p,t=b(q);if(typeof AE.id==X){AE.id=q}if(Y.ie&&Y.win){var AD="";for(var z in AE){if(AE[z]!=Object.prototype[z]){if(z=="data"){AC.movie=AE[z]}else{if(z.toLowerCase()=="styleclass"){AD+=' class="'+AE[z]+'"'}else{if(z!="classid"){AD+=" "+z+'="'+AE[z]+'"'}}}}}var AB="";for(var y in AC){if(AC[y]!=Object.prototype[y]){AB+='<param name="'+y+'" value="'+AC[y]+'" />'}}t.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AD+">"+AB+"</object>";F(AE.id);p=b(AE.id)}else{if(Y.webkit&&Y.webkit<312){var AA=W("embed");AA.setAttribute("type",V);for(var x in AE){if(AE[x]!=Object.prototype[x]){if(x=="data"){AA.setAttribute("src",AE[x])}else{if(x.toLowerCase()=="styleclass"){AA.setAttribute("class",AE[x])}else{if(x!="classid"){AA.setAttribute(x,AE[x])}}}}}for(var w in AC){if(AC[w]!=Object.prototype[w]){if(w!="movie"){AA.setAttribute(w,AC[w])}}}t.parentNode.replaceChild(AA,t);p=AA}else{var s=W(P);s.setAttribute("type",V);for(var v in AE){if(AE[v]!=Object.prototype[v]){if(v.toLowerCase()=="styleclass"){s.setAttribute("class",AE[v])}else{if(v!="classid"){s.setAttribute(v,AE[v])}}}}for(var u in AC){if(AC[u]!=Object.prototype[u]&&u!="movie"){E(s,u,AC[u])}}t.parentNode.replaceChild(s,t);p=s}}return p}function E(k,i,j){var l=W("param");l.setAttribute("name",i);l.setAttribute("value",j);k.appendChild(l)}function b(i){try{return g.getElementById(i)}catch(e){}}function W(i){return g.createElement(i)}function O(k){var j=Y.pv,i=k.split(".");i[0]=parseInt(i[0],10);i[1]=parseInt(i[1],10);i[2]=parseInt(i[2],10);return(j[0]>i[0]||(j[0]==i[0]&&j[1]>i[1])||(j[0]==i[0]&&j[1]==i[1]&&j[2]>=i[2]))?true:false}function A(m,j){if(Y.ie&&Y.mac){return }var l=g.getElementsByTagName("head")[0],k=W("style");k.setAttribute("type","text/css");k.setAttribute("media","screen");if(!(Y.ie&&Y.win)&&typeof g.createTextNode!=X){k.appendChild(g.createTextNode(m+" {"+j+"}"))}l.appendChild(k);if(Y.ie&&Y.win&&typeof g.styleSheets!=X&&g.styleSheets.length>0){var i=g.styleSheets[g.styleSheets.length-1];if(typeof i.addRule==P){i.addRule(m,j)}}}return{registerObject:function(l,i,k){if(!Y.w3cdom||!l||!i){return }var j={};j.id=l;j.swfVersion=i;j.expressInstall=k?k:false;H[H.length]=j;A("#"+l,e)},getObjectById:function(l){var i=null;if(Y.w3cdom&&S){var j=b(l);if(j){var k=j.getElementsByTagName(P)[0];if(!k||(k&&typeof j.SetVariable!=X)){i=j}else{if(typeof k.SetVariable!=X){i=k}}}}return i},embedSWF:function(n,u,r,t,j,m,k,p,s){if(!Y.w3cdom||!n||!u||!r||!t||!j){return }r+="";t+="";if(O(j)){A("#"+u,e);var q=(typeof s==P)?s:{};q.data=n;q.width=r;q.height=t;var o=(typeof p==P)?p:{};if(typeof k==P){for(var l in k){if(k[l]!=Object.prototype[l]){if(typeof o.flashvars!=X){o.flashvars+="&"+l+"="+k[l]}else{o.flashvars=l+"="+k[l]}}}}J(function(){R(q,o,u);A("#"+u,a)})}else{if(m&&!C&&O("6.0.65")&&(Y.win||Y.mac)){A("#"+u,e);J(function(){var i={};i.id=i.altContentId=u;i.width=r;i.height=t;i.expressInstall=m;D(i);A("#"+u,a)})}}},getFlashPlayerVersion:function(){return{major:Y.pv[0],minor:Y.pv[1],release:Y.pv[2]}},hasFlashPlayerVersion:O,createSWF:function(k,j,i){if(Y.w3cdom&&S){return R(k,j,i)}else{return undefined}},createCSS:function(j,i){if(Y.w3cdom){A(j,i)}},addDomLoadEvent:J,addLoadEvent:M,getQueryParamValue:function(m){var l=g.location.search||g.location.hash;if(m==null){return l}if(l){var k=l.substring(1).split("&");for(var j=0;j<k.length;j++){if(k[j].substring(0,k[j].indexOf("="))==m){return k[j].substring((k[j].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(C&&L){var i=b(K);if(i){i.parentNode.replaceChild(L,i);L=null;C=false}}}}}();
TSNMedia.embedSWF = swfobject.embedSWF;
TSNMedia.embedAdSWF = swfobject.embedSWF;
function placeSWFLogo(nm, w, h) {
var intRand = Math.floor((Math.random()*9999+1));
var strDivNm = nm+"_"+intRand;
var strDivHtml = '<div id="'+strDivNm+'"></div>';
document.write(strDivHtml);
var flashvars = {};
var params = {};
params.allowscriptaccess = 'always';
var attributes = {};
TSNMedia.embedSWF('http://images.tsn.ca/images/silver/flash/'+nm+".swf", strDivNm, w, h, '9.0.0', false, flashvars, params, attributes);
}
function placeH1SWF(nm, w, h, txt) {
var intRand = Math.floor((Math.random()*9999+1));
var flashvars = {};
flashvars.txtSub = txt;
flashvars.txtColor = '0x484f53';
var params = {};
params.wmode = 'transparent';
params.scale = 'noscale';
params.salign = 'tl';
var attributes = {};
TSNMedia.embedSWF('http://www.tsn.ca/media/flash/headlines/h1.swf', nm, w, h, '8.0.0', false, flashvars, params, attributes);
}
function placeFragmentH1(txt) {
var intRand = Math.floor((Math.random()*9999+1));
var flashvars = {};
flashvars.txtSub = txt;
flashvars.txtColor = '0x484f53';
var params = {};
params.wmode = 'transparent';
params.scale = 'noscale';
params.salign = 'tl';
var attributes = {};
TSNMedia.embedSWF('http://www.tsn.ca/media/flash/headlines/h1.swf', 'tsnH1', 640, 44, '8.0.0', false, flashvars, params, attributes);
}
 
var OneClipVideoListRenderer = {
'SuppressPlayer' : false,
'OverrideOneClipImageUrl' : null,
'OverrideOneClipImagePriority' : 0,
'Pages':[],
'PageIndex' : 0,
'ClipsPerPage':5,
'MaximumClipList' : 10,
'ClickMoreInvitation':'Watch more in our video player!',
'SpecialPrerollObject':null,
'SpecialPrerollVideo':null,
'SpecialPrerollShown':null,
'SpecialPrerollPlayOnce':true,
'SpecialPrerollPriority':0,
'PrerollFrequency':90,
'AutoPlay':false,
'DefaultPath' : 'Feature',
'ThemePath' : 'http://watch.tsn.ca/themes/TSN/player/onecliptheme.aspx',
'ErrorMessage':'',
'arrOneClipVideoList' : [],
'Redirects' : [{'clipid':228330,'url':'/cfl/special/?id=11971'}],
'UrlHash' : location.hash,
'UrlPathname' : location.pathname,
'ClipIdFromHash' : /clip(\d+)/,
'UpArrow' : null,
'DownArrow' : null,
'OverrideOneClipImage' : function(strUrl,intPriority) {
boolOverrideImage = true;
if (OneClipVideoListRenderer.OverrideOneClipImagePriority != null && OneClipVideoListRenderer.OverrideOneClipImagePriority > intPriority) {
boolOverrideImage = false;
}
if (boolOverrideImage) {
OneClipVideoListRenderer.OverrideOneClipImageUrl = strUrl;
OneClipVideoListRenderer.OverrideOneClipImagePriority = intPriority;
}
},
'GetSpecialPreroll':function() {
if (!OneClipVideoListRenderer.SpecialPrerollVideo && OneClipVideoListRenderer.SpecialPrerollObject) {
intPrerollClipId = OneClipVideoListRenderer.SpecialPrerollObject['clipid'];
strPrerollTitle = OneClipVideoListRenderer.SpecialPrerollObject['title'];
strPrerollFormat = OneClipVideoListRenderer.SpecialPrerollObject['format'];
OneClipVideoListRenderer.SpecialPrerollVideo = new Video( {ClipId:intPrerollClipId, Title: strPrerollTitle, Format: strPrerollFormat } );
}
return OneClipVideoListRenderer.SpecialPrerollVideo;
},
'SetSpecialPreroll':function(objClip,intPriority,playOnce) {
var intPriority = intPriority ? intPriority:1;
OneClipVideoListRenderer.SpecialPrerollPlayOnce = playOnce === true;
OneClipVideoListRenderer.SpecialPrerollShown = false;
if (intPriority > OneClipVideoListRenderer.SpecialPrerollPriority) {
OneClipVideoListRenderer.SpecialPrerollObject = objClip;
OneClipVideoListRenderer.SpecialPrerollPriority = intPriority;
}
},
'SetDefaultPath' : function(strPath) {
OneClipVideoListRenderer.DefaultPath = strPath == 'feature' ? 'featured' : strPath;
},
'AddClip' : function(objDetails) {
if (OneClipVideoListRenderer.arrOneClipVideoList.length < OneClipVideoListRenderer.MaximumClipList) {
if (objDetails.format === undefined || objDetails.format === '') {
objDetails.format = 'FLV';
}
OneClipVideoListRenderer.arrOneClipVideoList.push(objDetails);
return true;
}
return false;
},
'ClearClips' : function() {
if (window["Playlist"]) {
Playlist.FeaturedVideos = [];
}
OneClipVideoListRenderer.arrOneClipVideoList = [];
},
'StandardLookRenderer' : function(objTarget,arrDetails) {
var intPages = Math.ceil(arrDetails.length / OneClipVideoListRenderer.ClipsPerPage);
var arrClips = [];
var arrPageClips = [];
var objUl1, objLi1, objDl, objDd1a, objA1a, objImg, objDt, objA1b, objDd1b;
var objDiv, objUl2, objLi2a, objLi2b, objBr, objA2a,objA2b,objA3;
var isAd, intPopupId,strImageHref,strTitle,strDescription,isVisible;
for (var i=0;i<arrDetails.length;i++) {
objDetails = arrDetails[i];
isAd = objDetails['isad'] == true;
intPopupId = objDetails['clipid'];
strImageHref = objDetails['image'];
strTitle = objDetails['title'];
strDescription = objDetails['description'];
objImg = OneClipVideoListRenderer.RenderElement('img',null,{'height':'60','width':'80','src':strImageHref + "/80/60/image.ashx",'alt':strDescription});
objA1a = OneClipVideoListRenderer.RenderElement('a',objImg,{'href':'javascript:void(0)','title':'Play now'});
objDd1a = OneClipVideoListRenderer.RenderElement('dd',objA1a); objDd1a.className = 'Thumbnail';
objA1b = OneClipVideoListRenderer.RenderElement('a',strTitle,{'href':'javascript:void(0)','title':'Play now'});
objDt = OneClipVideoListRenderer.RenderElement('dt',objA1b);
objDd1b = OneClipVideoListRenderer.RenderElement('dd',strDescription); objDd1b.className = 'Description';
objDl = OneClipVideoListRenderer.RenderElement('dl',[objDd1a,objDt,objDd1b]);
objLi1 = OneClipVideoListRenderer.RenderElement('li',objDl); objLi1.className = isAd ? 'ad' : '';
objA1a.onclick = OneClipVideoListRenderer.Bind(OneClipVideoListRenderer.PlayVideo,i);
objA1b.onclick = OneClipVideoListRenderer.Bind(OneClipVideoListRenderer.PlayVideo,i);
arrClips.push(objLi1);
}
for (var i=0;i<intPages;i++) {
arrPageClips = arrClips.slice(i*OneClipVideoListRenderer.ClipsPerPage,(i+1)*OneClipVideoListRenderer.ClipsPerPage);
isVisible = i==0;
objUl1 = OneClipVideoListRenderer.RenderElement('ul',arrPageClips,{'id':'PlaylistPage_' + i}); objUl1.className = 'playlistpage'; objUl1.style.display = i===0 ? 'block' : 'none';
OneClipVideoListRenderer.Pages.push(objUl1);
objTarget.appendChild(objUl1);
}
arrPageControls = [];
if (intPages > 1) {
objA2a = OneClipVideoListRenderer.RenderElement('a',String.fromCharCode(160),{'href':'javascript:void(0)','id':'uparrow'}); objA2a.onclick = OneClipVideoListRenderer.Bind(OneClipVideoListRenderer.ShowPage,-1);
objDiv2a = OneClipVideoListRenderer.RenderElement('div',objA2a);objDiv2a.className='leftarrow_inactive';
objSpan2 = OneClipVideoListRenderer.RenderElement('span','1 of ' + intPages);
objDiv2b = OneClipVideoListRenderer.RenderElement('div',objSpan2);objDiv2b.className='numbers';
objA2b = OneClipVideoListRenderer.RenderElement('a',String.fromCharCode(160),{'href':'javascript:void(0)','id':'downarrow'}); objA2b.onclick = OneClipVideoListRenderer.Bind(OneClipVideoListRenderer.ShowPage,1);
objDiv2c = OneClipVideoListRenderer.RenderElement('div',objA2b);objDiv2c.className='rightarrow_active';
objDiv = OneClipVideoListRenderer.RenderElement('div',[objDiv2a,objDiv2b,objDiv2c]);objDiv.className='pageWrap';
arrPageControls.push(objDiv);
OneClipVideoListRenderer.UpArrow = objDiv2a;
OneClipVideoListRenderer.DownArrow = objDiv2c;
OneClipVideoListRenderer.PageCount = intPages;
OneClipVideoListRenderer.PageCounter = objSpan2;
}
objA3 = OneClipVideoListRenderer.RenderElement('a',OneClipVideoListRenderer.ClickMoreInvitation,{'title':OneClipVideoListRenderer.ClickMoreInvitation,'href':'javascript:void(0)'}); objA3.onclick = OneClipVideoListRenderer.LaunchPopupPlayer;
objP3 = OneClipVideoListRenderer.RenderElement('p',objA3);
arrPageControls.push(objP3);
objPageControlsDiv = OneClipVideoListRenderer.RenderElement('div',arrPageControls,{'id':'pagecontrols'});
objTarget.appendChild(objPageControlsDiv);
},
'TestRedirect' : function(o,b) { // o = playlist item, b = force redirect to associated URL
var objItem;
var rxLinkTest;
try {
for (var i=0; i<OneClipVideoListRenderer.Redirects.length; i++) {
objItem = OneClipVideoListRenderer.Redirects[i];
rxLinkTest = /(story|feature|window)/;
if (objItem.clipid === o.clipid && !rxLinkTest.test(location.pathname)) {
if (b) {
location.href = objItem.url;
return true;
}
}
}
}
catch(e) {
if (window.errorlist===undefined) {
window.errorlist = [];
}
window.errorlist.push(e.message);
}
return false;
},
'RenderElement' : function(t,v,a){ // t = tagname, v = tag value, a = attribute list
var objTag = document.createElement(t);
if (v != undefined && v != null) {
if (typeof(v) == 'string') {
v = document.createTextNode(v);
objTag.appendChild(v)
}
else if(v.length > 0) {
for (var i=0;i<v.length;i++) {
objTag.appendChild(v[i]);
}
}
else {
objTag.appendChild(v);
}
}
if (a != undefined) {
for (var s in a) {
var n = document.createAttribute(s);
n.value = a[s];
objTag.setAttributeNode(n);
}
}
return objTag;
},
'RenderList' : function(fnRenderer) {
if (OneClipVideoListRenderer.SuppressPlayer) {
return false;
}
if (OneClipVideoListRenderer.arrOneClipVideoList && OneClipVideoListRenderer.arrOneClipVideoList.length) {
objTarget = document.getElementById('Playlist');
fnRenderer(objTarget, OneClipVideoListRenderer.arrOneClipVideoList);
}
return true;
},
'Bind' : function(fn,args) {
return function() { fn(args) };
},
'LaunchPopupPlayer' : function(objDetails) {
Player.GetInstance().Wait();
window.open('http://watch.tsn.ca/' + OneClipVideoListRenderer.DefaultPath + '/', 'TSNBroadband','width=1010,height=850,toolbar=0,status=0,scrollbars=1,resizable=1');
return false;
},
'LoadOneClipPlayer' : function() {
if (OneClipVideoListRenderer.SuppressPlayer) {
if(document.getElementById("OneClipViewer")) {
document.getElementById("OneClipViewer").style.display = "none";
}
return false;
}
if (document.getElementById("OneClipViewer") && window["Interface"] && OneClipVideoListRenderer.arrOneClipVideoList && OneClipVideoListRenderer.arrOneClipVideoList.length) {
if (OneClipVideoListRenderer.OverrideOneClipImageUrl) {
strTopImage = OneClipVideoListRenderer.OverrideOneClipImageUrl;
}
else {
strTopImage = OneClipVideoListRenderer.arrOneClipVideoList[0].image + "/320/240/image.ashx";
}
try {
Interface.PermalinkClicked = function( url ) {
if( Playlist.GetInstance().Current.IsAd ) {window.open( url , "player" );}
else {location = url;}
}
}
catch(e) {
OneClipVideoListRenderer.ErrorMessage += e.message;
}
try {
strAdpg = "/" + adpg;
}
catch(e) {
strAdpg = "/main";
}
Interface.GetInstance().PlayerViewer = document.getElementById("OneClipViewer");
new Framework( Format.FlashVideo, OneClipVideoListRenderer.PrerollFrequency, "chumtvtsn", "One Clip Player", "ctv.tsnwatch.ca" + strAdpg,OneClipVideoListRenderer.ThemePath, strTopImage);
if (OneClipVideoListRenderer && OneClipVideoListRenderer.arrOneClipVideoList && OneClipVideoListRenderer.arrOneClipVideoList.length) {
Playlist.FeaturedVideos = [];
var arrAutoPlayClipId = OneClipVideoListRenderer.UrlHash.match(OneClipVideoListRenderer.ClipIdFromHash);
if (arrAutoPlayClipId) {
Playlist.GetInstance().Play( new Video( {ClipId:arrAutoPlayClipId[1],Title: ' ', Format:'FLV'} ) );
}
if(OneClipVideoListRenderer.SpecialPrerollObject) {
if (OneClipVideoListRenderer.AutoPlay) {
Playlist.GetInstance().Play( OneClipVideoListRenderer.GetSpecialPreroll() );
OneClipVideoListRenderer.SpecialPrerollShown = true;
}
else {
Playlist.FeaturedVideos.push( OneClipVideoListRenderer.GetSpecialPreroll() );
}
}
for (intOneClipVideo = 0; intOneClipVideo < OneClipVideoListRenderer.arrOneClipVideoList.length; intOneClipVideo++) {
objOneClipVideo = OneClipVideoListRenderer.arrOneClipVideoList[intOneClipVideo];
if (objOneClipVideo['clipid'] &&  OneClipVideoListRenderer.TestRedirect(objOneClipVideo,false) !== true) {
strTitle = objOneClipVideo['title'];
intClipId = objOneClipVideo['clipid'];
strFormat = objOneClipVideo['format'] ? objOneClipVideo['format'] : 'FLV';
vidClip = new Video( {ClipId:intClipId, Title: strTitle, Format:strFormat});
if (OneClipVideoListRenderer.AutoPlay && intOneClipVideo == 0 && !OneClipVideoListRenderer.SpecialPrerollObject) {
Playlist.GetInstance().Play( vidClip );
}
else {
Playlist.FeaturedVideos.push( vidClip );
}
}
else if (objOneClipVideo['episodeclips']) {
for (intEpisodeClip = 0; intEpisodeClip < objOneClipVideo['episodeclips'].length; intEpisodeClip++) {
objEpisodeClip = objOneClipVideo['episodeclips'][intEpisodeClip];
strTitle = objEpisodeClip['title'];
intClipId = objEpisodeClip['clipid'];
strFormat = objEpisodeClip['format'] ? objEpisodeClip['format'] : 'FLV';
vidClip = new Video( {ClipId:intClipId, Title: strTitle, Format:strFormat});
if (OneClipVideoListRenderer.AutoPlay && intEpisodeClip == 0 && !OneClipVideoListRenderer.SpecialPrerollObject) {
Playlist.GetInstance().Play( vidClip );
}
else {
Playlist.FeaturedVideos.push( vidClip );
}
}
}
}
}
}
return false;
},
'PlayVideo' : function(intClipIndex) {
var objItem;
var objVideo;
var bQueueVideo = false;
var self = OneClipVideoListRenderer;
Playlist.FeaturedVideos = [];
if (self.arrOneClipVideoList[intClipIndex] && self.TestRedirect(self.arrOneClipVideoList[intClipIndex],true)) {
return false;
}
for(var i=intClipIndex;i<self.arrOneClipVideoList.length;i++) {
objItem = self.arrOneClipVideoList[i];
if (objItem['episodeclips']) {
for (var j=0;j<objItem.episodeclips.length;j++) {
objSegment = objItem.episodeclips[j];
objVideo = new Video({ClipId:objSegment['clipid'] , Format:objSegment['format'], Title:objSegment['title'] } );
if (!bQueueVideo) {
Playlist.GetInstance().Play(objVideo);
bQueueVideo = true;
}
else {
Playlist.FeaturedVideos.push(objVideo);
}
}
}
else if(objItem['clipid']) {
objVideo = new Video( {'ClipId':objItem['clipid'] , 'Format':objItem['format'], 'Title':objItem['title'] } );
if (!bQueueVideo) {
Playlist.GetInstance().Play(objVideo);
bQueueVideo = true;
}
else if (self.TestRedirect(objItem,false)) {
Playlist.FeaturedVideos.push(objVideo);
}
}
}
},
'ShowPage' : function(intDirection) {
var self = OneClipVideoListRenderer;
self.PageIndex = self.PageIndex + intDirection;
if (self.UpArrow && self.DownArrow) {
self.UpArrow.className = 'leftarrow_active';
self.DownArrow.className = 'rightarrow_active';
}
if (self.PageIndex <= 0) {
self.PageIndex = 0;
if (self.UpArrow) {
self.UpArrow.className = 'leftarrow_inactive';
}
}
else if (self.PageIndex >= self.Pages.length - 1) {
self.PageIndex = self.Pages.length - 1;
if (self.DownArrow) {
self.DownArrow.className = 'rightarrow_inactive';
}
}
self.PageCounter.innerHTML = (self.PageIndex + 1) + " of " + self.PageCount;
for(var i=0;i<self.Pages.length;i++) {
self.Pages[i].style.display = self.PageIndex === i ? 'block' : 'none';
}
}
};
 
if (window['OneClipVideoListRenderer']) {
OneClipVideoListRenderer.SetDefaultPath('featured');
OneClipVideoListRenderer.ClearClips();
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_11_2/phillies_110209a.jpg",title:"Highlights: NYY 6, PHI 8",description:"The Phillies survived a late Yankees push to force a trip back to New York. NYY leads World Series 3-2.",clipid:230618,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_11_2/islanders_110209.jpg",title:"Highlights: EDM 1, NYI 3",description:"John Tavares scored his 5th goal and Brendan Witt netted 2 as the Islanders edged the Oilers.",clipid:230619,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_11_3/saints_110209.jpg",title:"Highlights: ATL 27, NO 35",description:"The Falcons recovered the late onside kick, but it was too little, too late in their loss to the Saints.",clipid:230623,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_11_2/kessel2.jpg",title:"Phil-ing The Void",description:"Phil Kessel's debut could occur Tuesday, if he's cleared he'll skate with Matt Stajan and Jason Blake.",clipid:230454,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_1_13/xhonroll.jpg",title:"Honour Roll",description:"A great catch at the wall by Brett Gardner in Game 5 takes its spot in Monday's Honour Roll.",clipid:230630,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_11_2/coyotes.jpg",title:"Done Deal",description:"The sale of the Coyotes to the NHL has been made final after being approved in a Phoenix court.",clipid:230625,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2008_10_14/topten_101408a.jpg",title:"Top 10 NHL Plays of the Week",description:"Some pretty passing by the Capitals headlines this week's edition of the Top 10 Plays of the Week.",clipid:230500,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_11_3/bruce.jpg",title:"CFL Rewind: Week 18",description:"There were some tricks and some treats this week in the CFL, catch them all in the Rewind.",clipid:230659,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_11_2/knicks_110209a.jpg",title:"Highlights: NO 111, NY 117",description:"David Lee had a season-high 28 points to lead the Knicks to their first win of the season.",clipid:230627,format:'FLV'});
OneClipVideoListRenderer.AddClip({image:"http://images.ctvdigital.com/images/pub2upload/9/2009_1_13/xhon.jpg",title:"Highlight of the Night",description:"Steven Stamkos steals the puck and lasers a shot top shelf to pick up Monday night's HON.",clipid:230631,format:'FLV'});
}
 
// REMOVE THIS FILE POST YC Promotion
mootoolsstatus="off"
 
