/* calculate ratio number of 10000*/
var newT = "";
if (typeof(window["showTop"]) == "undefined")
{
newT = ";dcopt=ist";
}




var p=parent;var d=document;var axel=Math.random()+"";var rNum=(axel*10000)+"";var dotat=rNum.indexOf(".");var aNum=rNum.substring(0,dotat);

var count=1;var dUnit=false;var dUnitSky=false;var dUnitBox=false;var sops="";var spos;var skyAd=false;

if(!snc){if(p.snc){var snc=p.snc;}else{var snc="";}}

if(!spos){if(p.spos){var spos=p.spos;}else{var spos="";}}

if(!sky_exist){if(p.sky_exist){var sky_exist=p.sky_exist;}else{var sky_exist=false;}}

// set variable defaults

useHouseAds = true;

// house list array - edited by Rachel, Ednel & Neil. 

// If you aren't Rachel or Ednel and want to edit

// this file make sure you're using the latest version

// format is:

// added google ads functionality which is still very basic - only one google add exists for the skyscraper slot. 

// I also split the ad formats out into a block each - houseList is for leaderboards, skyList is for skyscrapers,  boxList for boxes.

// flash is selected by filename. you can have a swf leaderboard and a jpg sky or vice-versa. If the swf is created, as for dart, with a clickTag, the same link as for the image will be used.

// leaving include empty means the file may appear anywhere, inserting sadpg or szone include means that a unit will not appear in a page that doesn't have either its szone or sadpg listed

// exclude is performed after include so a page that is first included then excluded will not run the unit.

// include and exclude can contain multiple entries separated by commas -- <Idol,Junos,TopStories, ShowsHome>

// default for target is "_top". Use "_blank" to open in a new window. Target doesn't work for flash.

// all artwork, except for swf files, need to filed using the img2 option in the pub tool. Path = /CTVShows/img2/Programs/Ads/

// all swf artwork needs to be FTP'd to: /generic/images/ads/SWF/

// format is:

// <link><sky ad filename><alt text><stats counter><szone exclude><sadpg exclude><szone include><sadpg include><target>

// ads on hold:

// none





var ord = -1;



var houseList_ctv = new Array(



"<http://healthblog.ctv.ca/blog><728medNEWS_blog2.gif><Med News Express Blog><medBlog><><><><><_self>",



"<http://www.ctv.ca/mednewsexpress><728medNEWS_lttr.gif><Med News Express Newsletter><medNews><><><><><_self>"

);

// format is:



// <link><sky ad filename><alt text><stats counter><szone exclude><sadpg exclude><szone include><sadpg include><target>



// ads on hold:





var skyList_ctv = new Array(



"<><google1><><><Consumer,WFive><><><><>",

"<><google3><><><Consumer,WFive><><><><>",

"<><google2><><><Consumer,WFive><><><><>"

);





// format is:

// <link><Box ad filename><alt text><stats counter><szone exclude><sadpg exclude><szone include><sadpg include><target>

// ads on hold:

// none



var boxList_ctv = new Array(





"<http://healthblog.ctv.ca/blog><300medNEWS_blog2.gif><Med News Express><medBlog><><><><><_self>",



"<http://www.ctv.ca/mednewsexpress><300medNEWS_lttr2.gif><Med News Express><medBlog><><><><><_self>",



"<http://www.ctv.ca/mednewsexpress><300medNEWS_lttr.gif><Med News Newsletter><medNews><><><><><_self>",



"<http://broadband.ctv.ca/?nla=1&id=4512><300_lost815.gif><Lost in 8:15><lost815><><><><><_blank>",



"<http://www.oprah.com/obc_classic/webevent_registration.jsp><ane_island_300x250_v7.jpg><Oprah><Oprahweb><><><><><_blank>",





"<><google4><><><><><FilmFest,PhotoGallery><><>");



// ads on hold:





// none

var forcedHoused;

function initForced()

{

forcedHoused = new Array(20);

for (var i = 0; i < 20; i++)

{

    forcedHoused[i] = new Array(2);

}

//forcedHoused[0][0] = "lost";

//forcedHoused[0][1] = "3";

forcedHoused[0][0] = "Oprah2";

forcedHoused[0][1] = "4";







}



function findSpecialHouse(idname, indexID)

{

if (forcedHoused == null)

{

initForced();

}



for (var i = 0; i < 20; i++)

{

if (forcedHoused[i][indexID] == idname)

{

return forcedHoused[i][1];

}

}

return -1;

}







/* for google ads */



function googleAdVars(adname,width,height){ 



if(adname=="google1" && width=="120"){



google_ad_client = "pub-8664210252640829";

google_alternate_ad_url = "http://www.ctv.ca/generic/dynInclude/ads/skyAd/iframe.html";

google_ad_width = 120;

google_ad_height = 600;

google_ad_format = "120x600_as";

google_ad_type = "text";

google_ad_channel ="1396848704";

google_color_border = "FFFFFF";

google_color_bg = "FFFFFF";

google_color_link = "003094";

google_color_url = "003094";

google_color_text = "000000";

}



else if (adname=="google2" && width=="120"){



google_ad_client = "pub-8664210252640829";

google_alternate_ad_url = "http://www.ctv.ca/generic/dynInclude/ads/skyAd/iframe.html";

google_ad_width = 120;

google_ad_height = 600;

google_ad_format = "120x600_as";

google_ad_type = "text";

google_ad_channel ="1396848704";

google_color_border = "FFFFFF";

google_color_bg = "FFFFFF";

google_color_link = "003094";

google_color_url = "003094";

google_color_text = "000000";

}



else if (adname=="google3" && width=="120"){



google_ad_client = "pub-8664210252640829";

google_alternate_ad_url = "http://www.ctv.ca/generic/dynInclude/ads/skyAd/iframe.html";

google_ad_width = 120;

google_ad_height = 600;

google_ad_format = "120x600_as";

google_ad_type = "text";

google_ad_channel ="1396848704";

google_color_border = "FFFFFF";

google_color_bg = "FFFFFF";

google_color_link = "003094";

google_color_url = "003094";

google_color_text = "000000";

}



else if(width=="300" && szone != "Toronto"){



google_ad_client = "pub-8664210252640829";

google_alternate_ad_url = "http://www.ctv.ca/generic/dynInclude/ads/skyAd/iframe.html";

google_ad_width = 300;

google_ad_height = 250;

google_ad_format = "300x250_as";

google_ad_type = "text";

google_ad_channel ="7884233294";

google_color_border = "FFFFFF";

google_color_bg = "FFFFFF";

google_color_link = "003094";

google_color_text = "000000";

google_color_url = "003094";

}



else if(width=="300"){



google_ad_client = "pub-8664210252640829";

google_alternate_ad_url = "http://www.ctv.ca/generic/dynInclude/ads/skyAd/iframe.html";

google_ad_width = 300;

google_ad_height = 250;

google_ad_format = "300x250_as";

google_ad_type = "text";

google_ad_channel ="4661160393";

google_color_border = "FFFFFF";

google_color_bg = "FFFFFF";

google_color_link = "003094";

google_color_text = "000000";

google_color_url = "003094";

}



}



// pick house ad

function selectImg(format,num){



			if (format == "728x90"){



			houseArray = houseList_ctv;	}



			else if (format == "300x250"){ houseArray = boxList_ctv;	}



			else if (format == "120x600"){ houseArray = skyList_ctv;}

			houseArrayParse     = /<(.*)><(.*)><(.*)><(.*)><(.*)><(.*)><(.*)><(.*)><(.*)>/g ;

			szoneExclIndex = "5";

			sadpgExclIndex = "6";

			szoneInclIndex = "7";

			sadpgInclIndex = "8";

			popWin = "9";



dropAds(format);



// alert(houseArray.length);

if (num == -1)

{

	randNum = Math.floor(Math.random()*houseArray.length) ;

        var specialH = findSpecialHouse(randNum,1);

        if (specialH != -1 && format == "300x250")

        {

            randNum = 0;

        }



        

}

else

{

	randNum = num;

}



// alert(randNum);

	url = houseArray.slice(randNum,randNum+1) ;



	if (houseArray.length > 1) {



	left  = houseArray.slice(0,randNum) ;



	right = houseArray.slice(randNum+1) ;



// alert(houseArray);

	houseArray = left.concat(right) ;

	}



	return url ;

}



function dropAds(format){

		for (i=(houseArray.length) ; i > 0 ; --i) {





			var currentZone = houseArray[i-1].replace(houseArrayParse,"$"+szoneExclIndex);







			var currentAdpg = houseArray[i-1].replace(houseArrayParse,"$"+sadpgExclIndex);	





			var currentiZone = houseArray[i-1].replace(houseArrayParse,"$"+szoneInclIndex);







			var currentiAdpg = houseArray[i-1].replace(houseArrayParse,"$"+sadpgInclIndex);





			var testCurrentZone = currentZone.split(/\,/g);





			var testCurrentAdpg = currentAdpg.split(/\,/g);



			var testCurrentiZone = currentiZone.split(/\,/g);



			var testCurrentiAdpg = currentiAdpg.split(/\,/g);		





			var currentAdIncl = 1;





			//if (sadpg == "Whistler-episodes") alert(houseArray[i-1].replace(houseArrayParse,"$"+3));



			if((currentiZone != "") || (currentiAdpg != "")) {



			currentAdIncl = 0;

			inZone = 0;

			inPage = 0;



			//#1





			//if (sadpg == "Whistler-episodes") alert("#1: " + currentAdIncl);



			for (j=(testCurrentiZone.length) ; j > 0 ; --j) {



			if(testCurrentiZone[j-1] == szone){





				currentAdIncl = 1;

				inZone = 1;



			}





			}







			//#2





			//if (sadpg == "Whistler-episodes") alert("#2: " + currentAdIncl);





			for (j=(testCurrentiAdpg.length) ; j > 0 ; --j) {



			if(testCurrentiAdpg[j-1] == sadpg){



				currentAdIncl = 1;

				inPage = 1;



			}			



			}



			//#3



			//if (sadpg == "Whistler-episodes") alert("#3: " + currentAdIncl);



			if((currentiZone != "") && (currentiAdpg != "") && (inZone === 0 || inPage === 0)) {

				currentAdIncl = 0;

			}

			

			}

			







			for (j=(testCurrentZone.length) ; j > 0 ; --j) {



			if((testCurrentZone[j-1] == szone) && (szone != "")){



				currentAdIncl = 0;



			}





			}



			//#4





			//if (sadpg == "Whistler-episodes") alert("#4: " + currentAdIncl);



			for (j=(testCurrentAdpg.length) ; j > 0 ; --j) {





			if((testCurrentAdpg[j-1] == sadpg) && (sadpg != "")){



				currentAdIncl = 0;

			}			

			}

			if(currentAdIncl === 0){

				houseArray.splice((i-1),1);

			}

		}



}



// house ad code

function writeHouseAd(format,num){

display = selectImg(format,num);



if(houseArray.length > 0) {

	pick = 1 ;

		for (i=0 ; i <= pick-1 ; i++ ) {



			var urlVal  = display[0].replace(houseArrayParse,"$1") ;



			var text  = display[0].replace(houseArrayParse,"$3") ;



			var adCounter  = display[0].replace(houseArrayParse,"$4") ;



			var currentDiv = document.getElementById(format+"temp");}



			var img=display[0].replace(houseArrayParse,"$2") ;



		if(format=="120x600"){

			var ad_width="120";

			var ad_height="600";



		}	

		else if(format=="728x90") {

			var ad_width="728";

			var ad_height="90";

		}



		else if (format=="300x250"){

			var ad_width="300";

			var ad_height="250";

}



		var currentPopWin = display[0].replace(houseArrayParse,"$"+popWin);

		var	imgParse     = /(.*)\.(.*)/g ;

		var imgFormat = img.replace(imgParse,"$2") ;



		if(isbroadband=true && szone.match(/Video/)){

		currentPopWin = "_blank";

		}



		else if(currentPopWin == ""){

		currentPopWin = "_top";

		}



			var adString = "";



			if(imgFormat.indexOf("google")!=-1){



			googleAdVars(img,ad_width,ad_height);



			adString+= '<scr'+'ipt type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></scr'+'ipt>';



 adString += '<div style="display: none"><img src="http://adcounter.theglobeandmail.com/servlet/AdletCounter?ad1=ctv_google_'+ad_width+'x'+ad_height+'_ctv&ad2=ctv_'+sadpg+'Google_'+ad_width+'x'+ad_height+'_ctv" width="1" height="1" border="0"></div>';

			}



					else if(imgFormat=="swf"){



if (sadpg=="CriminalMinds-episodes2" || sadpg=="CSI-default" || sadpg=="ClosetoHome2-default" || sadpg=="LawOrderSVU-default" || sadpg=="LawOrder-episodes17" || sadpg=="ER-default" || sadpg=="bio_gary_sinise_csi_ny" || sadpg=="feature-weekend" || sadpg=="bio_patricia_arquette_medium" || sadpg=="ColdCase-episodes4" || sadpg=="CriminalMinds-default") {



adString += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3,0,0,0" id="FLASH_AD" height="'+ad_height+'" width="'+ad_width+'"><param name="movie" value="http://www.ctv.ca/generic/images/ads/SWF/'+img+'"><param name="quality" value="autohigh"><param name="wmode" value="opaque"><embed wmode="opaque" src="http://www.ctv.ca/generic/images/ads/SWF/'+img+'" quality="autohigh" swliveconnect="TRUE" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="'+ad_height+'" width="'+ad_width+'"></object>'





                        adString += '<div style="display: none"><img src="http://adcounter.theglobeandmail.com/servlet/AdletCounter?ad1=ctv_'+adCounter+'House_'+ad_width+'x'+ad_height+'swf_ctv&ad2=ctv_'+sadpg+'House_'+ad_width+'x'+ad_height+'_ctv" width="1" height="1" border="0"></div>';



} else {



adString += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3,0,0,0" id="FLASH_AD" height="'+ad_height+'" width="'+ad_width+'"><param name="movie" value="http://www.ctv.ca/generic/images/ads/SWF/'+img+'?clickTag='+urlVal+'"><param name="quality" value="autohigh"><param name="wmode" value="opaque"><embed wmode="opaque" src="http://www.ctv.ca/generic/images/ads/SWF/'+img+'?clickTag='+urlVal+'" quality="autohigh" swliveconnect="TRUE" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="'+ad_height+'" width="'+ad_width+'"></object>'





                        adString += '<div style="display: none"><img src="http://adcounter.theglobeandmail.com/servlet/AdletCounter?ad1=ctv_'+adCounter+'House_'+ad_width+'x'+ad_height+'swf_ctv&ad2=ctv_'+sadpg+'House_'+ad_width+'x'+ad_height+'_ctv" width="1" height="1" border="0"></div>';



}



}



		else {



			adString += '<a href="'+urlVal+'" target="'+currentPopWin+'"><img src="http://www.ctv.ca/archives/CTVShows/img2/Programs/Ads/'+img+'" width="'+ad_width+'" name="&lid=AdLink_' + adCounter + '_' +ad_width+'x'+ad_height+ '" height="'+ad_height+'" alt="'+text+'" border="0"></a>';



			adString += '<div style="display: none"><img src="http://adcounter.theglobeandmail.com/servlet/AdletCounter?ad1=ctv_'+adCounter+'House_'+ad_width+'x'+ad_height+'_ctv&ad2=ctv_'+sadpg+'House_'+ad_width+'x'+ad_height+'_ctv" width="1" height="1" border="0"></div>'; 

}



// if(format == '120x600'){



// document.write('<scr'+'ipt type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></scr'+'ipt>')



// }

// else{

if((document.getElementById(format+"temp")) && (imgFormat.indexOf("google")==-1)){

			currentDiv.innerHTML = adString;

			currentDiv.style.display = "block";

}



else{



document.write(adString);



}



}



}	



// doubleclick code

function writeDClick(size) {



if(ord == -1){var abc=Math.random()+"";ord=abc.substring(2,abc.length);}



if((size=="728x90")&&(sky_exist)){spos="dsky";}



if(isbroadband=true && szone.match(/Video/)){



var adCodeTxt ='<iframe src="http://ad.ca.doubleclick.net/adi/ctv/Video'+szone+';!category=pop;!category=video;!category=float;!category=expand;sz='+size+';ord='+ord+'" id="adiframe" width="728" height="90" scrolling="no" frameborder="0"></iframe>';



adCodeTxt += '<div style="display: none"><img src="http://adcounter.theglobeandmail.com/servlet/AdletCounter?ad1=ctv_'+sadpg+'Dart_'+size+'_ctv" width="1" height="1" border="0"></div>';

document.getElementById(size+'temp').innerHTML=adCodeTxt;

}



else{

var newT = "";

if (size=="728x90" && (szone != "GossipGirlNew" && szone != "noads" && szone != "Home" && szone != "Dance/macvideo" && szone != "subarusneakpeeks" && szone.indexOf("Dance") == -1 && szone.indexOf("dance") == -1 && szone.indexOf("gossipgirl") == -1 && szone.indexOf("Emmy2009") == -1))

{

newT = ";dcopt=ist";

}
var nszone;
var checkzone = szone.substring(0, 3);
if (checkzone == "bcc")
{
nszone = "ctvbc.ca/" + szone.substring(4).toLowerCase();
}
else if (checkzone == "wpg")
{
nszone = "ctvwinnipeg.ca/" + szone.substring(4).toLowerCase();
}
else if (checkzone == "cal")
{
nszone = "ctvcalgary.ca/" + szone.substring(4).toLowerCase();
}
else if (checkzone == "tor")
{
nszone = "ctvtoronto.ca/" + szone.substring(4).toLowerCase();
}
else if (checkzone == "edm")
{
nszone = "ctvedmonton.ca/" + szone.substring(4).toLowerCase();
}
else if (checkzone == "ott")
{
nszone = "ctvottawa.ca/" + szone.substring(4).toLowerCase();
}
else if (checkzone == "mon")
{
nszone = "ctvmontreal.ca/" + szone.substring(4).toLowerCase();
}
else
{
nszone = "ctv.ca/" + szone.toLowerCase();
}

var adCodeTxt='<scr'+'ipt type=\"text/javascript\" src=\"http://ad.ca.doubleclick.net/adj/ctv.'+nszone+';sz='+size+newT+';tile='+count+';ord='+ord+'?\">'+'<\/scr'+'ipt>';



document.write(adCodeTxt);






	var currentDiv = document.getElementById(size+"temp");



if (currentDiv != null) {

	currentDiv.style.display = "none";

}



}



	count=count+1;spos="";

}



// main functions

// the stardard way to place an ad is writeHouseAd("120x600");

function placeRandom(format){



// ratio of doubleclick ads to house ads is 1 to nth (right now 1 to 8) 

var nth = 8;

var rnd = Math.floor(Math.random() * nth) + 1;

if (rnd == nth) {

     useHouseAds = false; 

}



// initialize variables and set conditions

// exceptions to this ratio follow:

// only doubleclick ads on the Contest Hub 

// - traffic is low on this hub and it 

// makes it easy to see dart ads to have 

// one hub with only doubleclick.



// skyscrapers ratio

if((format == "120x600")){

	useHouseAds = true;

        //if(aNum>=0000){useHouseAds=false;}
	}



// Home

if((szone == "Home")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	}



// TopStories

if((szone == "TopStories")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// Canada, World, Health, Politics, MSNHome

if((szone == "Canada" || szone == "World" || szone == "Politics" || szone == "MSNHome" || szone == "Health")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}	

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// Business

if((szone == "Business")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// SciTech

if((szone == "SciTech")){

	useHouseAds = true;

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// Entertainment

if((szone == "Entertainment" || szone == "entertainment")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}	

	}



// only paid ads on Canada AM 

if((szone == "CanadaAM")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid ads on Holiday Main 

if((szone == "holiday/main")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid ads on Poll Results 

if((szone == "AM")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid ads on Photo Gallery

if((szone == "PhotoGallery" && format == "300x250")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid on Photo Sky

if((szone == "PhotoSky")){

	useHouseAds = true;

	if(format=="160x600"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// Sports

if((szone == "Sports")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// Peak Performer

if((szone == "PeakPerformer")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// Kris Abel

if((szone == "krisabel")){

	useHouseAds = true;

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid ads on Programs, TV Listings and Contest

if((szone == "ShowsHome" || szone == "ComingUp" || szone == "Daytime" || szone == "HDTV" ||  szone == "LateNight" || szone == "TopShows" ||  szone == "tvlist" || szone == "AToZ" || szone == "Primetime" || szone == "ContestsHub")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid ads on Weather 

if((szone == "Weather")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid on Junos

if((szone == "Junos")){

	useHouseAds = true;

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid on Oscars

if((szone == "Oscars")){

	useHouseAds = true;

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	}



// only paid on FilmFest

if((szone == "FilmFest")){

	useHouseAds = true;

	}



// only paid ads on Toronto

if((szone == "Toronto" || szone == "TorontoHome")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// only house ads on Consumer

if((szone == "Consumer")){

	useHouseAds = true;

	}



// only paid ads on test

if((szone == "test" || "test2")){

	useHouseAds = false;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="120x600"){if(aNum>=0000){useHouseAds=false;}}

	}



// only house ads on PSA

if((szone == "PSA")){

	useHouseAds = true;

	}



// only house ads on idol

if((szone == "Idol" || szone == "idol" || szone == "idolblogs" || szone == "idolblogshouse" || szone == "Idol/pantene/backstage" || szone == "Idol/pantene/competitors" || szone == "Idol/allaccess" || szone == "Idol/confidential" || szone == "idolphotogallery")){

	useHouseAds = true;

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}		

	}



// Degrassi

if((szone == "Degrassi")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	}



// Controls Concert for Diana

if((szone == "concertfordiana")){

	useHouseAds = true;

	if(format=="728x90"){if(aNum>=0000){useHouseAds=false;}}

	if(format=="300x250"){if(aNum>=0000){useHouseAds=false;}}

	}



// Instant Star

if((szone == "InstantStar")){

	useHouseAds = true;

	}



// Video

if(szone.match(/Video/)){

	useHouseAds = true;

	}



// Video News Zones

if((szone == "VideoETalk" || szone.match("VideoToronto") || szone.match("VideoBritishColumbia") || szone.match("VideoOttawa") || szone.match("VideoEdmonton") || szone.match("VideoWinnipeg") || szone == "VideoCanadaAM" || szone == "VideoNews" || szone == "VideoElevenP" || szone == "VideoWFive" || szone == "VideoNewsTab" || szone == "VideoDocs" || szone =="VideorelatedTopStories" || szone =="VideorelatedWorld" || szone=="VideorelatedCanada" || szone=="VideoVGDEGR" || szone=="VideoVGCIDOL")){

	useHouseAds = false;

	}



// Happy box ads

if((szone == "happy" && format == "300x250")){

	useHouseAds = false;

	}



// Happy leaderboard

if((szone == "happy" && format == "728x90")){

	useHouseAds = false;

	}



// Lost

if (sadpg == "Lost" && format =="120x600") {

	useHouseAds = true;

}



//Criminal Minds pages

if((szone == "Degrassi" )){

	useHouseAds = false;

	}

	

if((szone == "InstantStar" )){

	useHouseAds = false;

	}

var checkzone = szone.substring(0, 3);

if (checkzone == "ott")
{
//useHouseAds = true;
}



if((dUnitSky)||(dUnitBox)){useHouseAds=false;}

//FORCE

//useHouseAds = false;



var specialH = findSpecialHouse(szone,0);

if (specialH != -1 && format == "300x250")

{

   writeHouseAd(format, specialH);

}

else if(useHouseAds == true){

	writeHouseAd(format,-1);

	}



else {

	writeDClick(format);

}



	}



// these functions are for reverse-compatibility 

function placeCTVRandom120x600Img(isBlank){

placeRandom("120x600");

}



function placeRandom728x90Img(isBlank){

placeRandom("728x90");

}



function placeRandom300x250Img(isBlank){

placeRandom("300x250");

}

function writeFooterLocal()
{
    document.write('<style>#footTopNav {background-color:#EFEFEF;padding-bottom:5px;padding-top:5px;text-align:center;}#totalBottomFooter {color:black;font-size:10px;font-weight:bold;text-align:center;}#allFooter {color:black;font-family:Verdana,Arial,sans-serif;font-size:11px;text-align:left;}#footBottomNav {background-color:#CFCFCF;padding-bottom:5px;padding-top:5px;}#totalBottomFooter {color:black;font-size:10px;font-weight:bold;text-align:center;}#footIcons {background-color:#FFFFFF;padding-bottom:0px;padding-top:0px;margin-top:0px!important; margin-right:auto!important; margin-left:auto!important; margin-bottom:0px!important;}#totalBottomFooter2 {color:white;font-size:10px;font-weight:bold;text-align:center;}#totalBottomFooter a {color:black;}#allFooter a:hover {text-decoration:underline;}#allFooter a {text-decoration:none}#totalBottomFooter2 a {color:#FFFFFF;padding:3px;}td.dsW{vertical-align:top!important}td.dsW img {margin-top:15px}td.dscH{vertical-align:top!important}td.dscH img{margin-top:11px}</style>\
     <div id="allFooter"><div id="totalBottomFooter"> <div id="footTopNav">  <a href="http://www.ctv.ca/generic/generated/static/CorpAbout/about.html" name="&lid=Footnav_About">About CTV</a>  |  <a href="http://works.workopolis.com/customers/bgm/gi/" target="_blank" name="&lid=Footnav_Careers">Careers</a>  |  <a href="http://www.ctv.ca/announce" name="&lid=Footnav_Announce">CTV Announcements</a>  |  <a href="http://sales.ctv.ca/" target="_blank" name="&lid=Footnav_AdTV">Advertise on TV</a>  |  <a href="http://ctvmedia.ca/" target="_blank" name="&lid=Footnav_AdMedia">CTV Media</a>  |  <a href="http://www.ctv.ca/generic/generated/static/CorpAdvertise/default.html" name="&lid=Footnav_AdWeb">Advertise on Web</a></div><div id="footBottomNav">  \
     <a href="http://www.ctv.ca/generic/generated/static/CorpTranscripts/transcripts.html" name="&lid=Footnav_ArchiveSales">Archive Sales</a>  |  <a href="http://www.ctv.ca/generic/generated/static/CorpTranscripts/transcripts.html" name="&lid=Footnav_Transcripts">Tapes and Transcripts</a>  |  <a href="http://www.ctvglobemedia.com/en/policiestermsconditions/privacypolicy/" name="&lid=Footnav_Privacy">Privacy Policy</a>  |  <a href="http://www.ctvglobemedia.com/en/policiestermsconditions/termsconditions/" name="&lid=Footnav_Terms">Terms and Conditions</a>  |  <a href="http://www.ctv.ca/contactus">Contact Us</a>  |  <a href="http://www.ctv.ca/sitemap">Site&nbsp;Map</a></div></div><table id="footIcons"><tr><td><a href="http://www.ctvolympics.ca?cid=ftctv" target="_blank" name="&lid=Footnav_Olympics"><img src="http://www.ctv.ca/mar/images/logo/ctvolympics.jpg" width="43" height="42" border="0" alt="CTV Olympics"></a></td><td><a href="http://www.ctv.ca/servlet/ArticleNews/story/CTVNews/1124900164735_120309364" target="_blank" name="&lid=Footnav_Newsnet"><img src="http://www.ctv.ca/mar/images/logo/newchannel0525.jpg" width="65" height="39" border="0" alt="CTV News Channel"></a></td><td><a href="http://www.bnn.ca" target="_blank" name="&lid=Footnav_BNN"><img src="http://images.ctv.ca/mar/images/logo/bnn0805.gif" width="62" height="39" border="0" alt="Business News Network"></a></td><td><a href="http://www.cp24.com/" target="_blank" name="&lid=Footnav_CP24"><img src="http://images.ctv.ca/mar/images/logo/cp240810a.gif" width="56" height="39" border="0" alt="CP24"></a></td><td><a href="http://www.Atv.ca/" target="_blank" name="&lid=Footnav_AChannel"><img src="http://images.ctv.ca/mar/images/logo/achannel0805.gif" width="46" height="39" border="0" alt="A" /></a></td><td><a href="http://www.muchmusic.com" name="&lid=Footnav_MuchMusic" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/much0805.gif" width="50" height="39" border="0" alt="MuchMusic" /></a></td><td><a href="http://www.mtv.ca" target="_blank" name="&lid=Footnav_MTV"><img src="http://images.ctv.ca/mar/images/logo/mtv0805.gif" width="52" height="39" border="0" alt="MTV" /></a></td><td><a href="http://www.muchloud.com" target="_blank" name="&lid=Footnav_MuchLOUD"><img src="http://images.ctv.ca/mar/images/logo/loud0805.gif" width="51" height="39" border="0" alt="MuchLOUD" /></a></td><td><a href="http://www.muchmore.ca/" target="_blank" name="&lid=Footnav_MuchMore"><img src="http://images.ctv.ca/mar/images/logo/mmm0904.gif" width="62" height="31" border="0" alt="MuchMore" /></a></td><td><a href="http://www.muchmoreretro.com" target="_blank" name="&lid=Footnav_MuchMoreRetro"><img src="http://images.ctv.ca/mar/images/logo/mmr0805.gif" width="46" height="39" border="0" alt="MuchMoreRetro" /></a></td><td><a href="http://www.muchvibe.ca" target="_blank" name="&lid=Footnav_MuchVibe"><img src="http://images.ctv.ca/mar/images/logo/vibe0805.gif" width="55" height="39" border="0" alt="MuchVibe" /></a></td><td><a href="http://www.punchmuch.com" target="_blank" name="&lid=Footnav_PunchMuch"><img src="http://images.ctv.ca/mar/images/logo/punch0805.gif" width="55" height="39" border="0" alt="PunchMuch" /></a></td><td><a href="http://www.tsn.ca" target="_blank" name="&lid=Footnav_TSN"><img src="http://images.ctv.ca/mar/images/logo/tsn0805a.gif" width="66" height="39" border="0" alt="TSN" /></a></td><td><a href="http://www.tsn2.ca" target="_blank" name="&lid=Footnav_TSN2"><img src="http://images.ctv.ca/mar/images/logo/tsn20805.gif" width="66" height="39" border="0" alt="TSN2" /></a></td><td><a href="http://www.rds.ca" target="_blank" name="&lid=Footnav_RDS"><img src="http://images.ctv.ca/mar/images/logo/rds0805a.gif" width="59" height="39" border="0" alt="RDS" /></a></td></tr></table><table id="footIcons"><tr><td><a href="http://www.mtv2.ca" target="_blank" name="&lid=Footnav_MTV2"><img src="http://images.ctv.ca/mar/images/logo/mtv2_logo.jpg" width="41" height="39" border="0" alt="MTV2" /></a></td><td><a href="http://www.tsn.ca/" target="_blank" name="&lid=Footnav_NHLNetwork"><img src="http://images.ctv.ca/mar/images/logo/nhl0805.gif" width="40" height="50" border="0" alt="NHL Network"></a></td><td><a href="http://www.tsn.ca/classic" target="_blank" name="&lid=Footnav_ESPNClassic"><img src="http://images.ctv.ca/mar/images/logo/espnC0805.gif" width="67" height="50" border="0" alt="ESPN Classic"></a></td><td><a href="http://www.rds.ca/ris/index.php" target="_blank" name="&lid=Footnav_RISInfo"><img src="http://images.ctv.ca/mar/images/logo/ris0805.gif" width="61" height="50" border="0" alt="RIS Info Sports"></a></td><td><a href="http://www.fashiontelevision.com/" target="_blank" name="&lid=Footnav_Fashion"><img src="http://images.ctv.ca/mar/images/logo/fashion0805.gif" width="78" height="50" border="0" alt="Fashion Television" /></a></td><td><a href="http://www.courttvcanada.ca" name="&lid=Footnav_CourtTV" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/court0805.gif" width="68" height="50" border="0" alt="CourtTV Canada" /></a></td><td><a href="http://www.sextelevision.net" target="_blank" name="&lid=Footnav_SEXTV"><img src="http://images.ctv.ca/mar/images/logo/sex0805.gif" width="65" height="50" border="0" alt="SexTV: The Channel" /></a></td><td><a href="http://www.bravo.ca" target="_blank" name="&lid=Footnav_Bravo"><img src="http://images.ctv.ca/mar/images/logo/bravo0805.gif" width="52" height="50" border="0" alt="Bravo!" /></a></td><td><a href="http://www.booktelevision.com" target="_blank" name="&lid=Footnav_Book"><img src="http://images.ctv.ca/mar/images/logo/book0805.gif" width="58" height="50" border="0" alt="BookTelevision" /></a></td><td class="dsW"><a href="http://www.discoverychannel.ca" target="_blank" name="&lid=Footnav_Discovery"><img src="http://images.ctv.ca/mar/images/logo/disc.gif" width="80" height="17" border="0" alt="Discovery Channel" /></a></td><td class="dscH"><a href="http://www.discoveryhd.ca" target="_blank" name="&lid=Footnav_DiscoveryHD"><img src="http://images.ctv.ca/mar/images/logo/discHD.gif" width="80" height="25" border="0" alt="Discovery HD" /></a></td><td><a href="http://www.discoverycivilization.ca" target="_blank" name="&lid=Footnav_Civilization"><img src="http://images.ctv.ca/mar/images/logo/discCiv0805.gif" width="58" height="50" border="0" alt="Discovery Civilization" /></a></td></tr></table><table id="footIcons"><tr><td><a href="http://www.animalplanet.ca" target="_blank" name="&lid=Footnav_Animal"><img src="http://images.ctv.ca/mar/images/logo/animal0805.gif" width="58" height="50" border="0" alt="Animal Planet" /></a></td><td><a href="http://www.travelandescape.ca" target="_blank" name="&lid=Footnav_Travel"><img src="http://images.ctv.ca/mar/images/logo/travel0805.gif" width="68" height="50" border="0" alt="Travel and Escape" /></a></td><td><a href="http://www.driveinclassics.ca" target="_blank" name="&lid=Footnav_Drive"><img src="http://images.ctv.ca/mar/images/logo/drive0805.gif" width="67" height="44" border="0" alt="Drive-In Classic"></a></td><td><a href="http://www.tvlandcanada.com" target="_blank" name="&lid=Footnav_TVLand"><img src="http://images.ctv.ca/mar/images/logo/tv0805.gif" width="63" height="44" border="0" alt="TV Land"></a></td><td><a href="http://www.thecomedynetwork.ca" target="_blank" name="&lid=Footnav_Comedy"><img src="http://images.ctv.ca/mar/images/logo/comedy0805.gif" width="75" height="44" border="0" alt="The Comedy Network"></a></td><td><a href="http://www.star-tv.ca/" target="_blank" name="&lid=Star"><img src="http://images.ctv.ca/mar/images/logo/star0805.gif" width="74" height="44" border="0" alt="Star!" /></a></td><td><a href="http://www.spacecast.com" name="&lid=Footnav_Space" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/space0805.gif" width="65" height="44" border="0" alt="Space" /></a></td><td><a href="http://www.accesstv.ca" target="_blank" name="&lid=Footnav_ACCESS"><img src="http://images.ctv.ca/mar/images/logo/access0805.gif" width="55" height="44" border="0" alt="ACCESS" /></a></td></tr></table><div id="footCopyRight"><p>&copy; 2009 <a href="http://www.ctvglobemedia.com" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/ctvglobemedia.gif" class="inline" width="144" height="34" alt="CTVglobemedia" style="vertical-align: middle" border="0" /></a> All Rights Reserved.</p></div></div></div>');
}

function writeFooterMain()
{
    document.write('<style>#footTopNav {background-color:#EFEFEF;margin:5px 2px 0px 2px;padding-top:2px; padding-bottom:2px;text-align:center;width:780px;border-top:1px solid black}#totalBottomFooter {color:black;font-size:10px;font-weight:bold;text-align:center;}#allFooter {color:black;font-family:Verdana,Arial,sans-serif;font-size:11px;text-align:left;}#footBottomNav {background-color:#CFCFCF;padding-bottom:2px;padding-top:2px;margin:0px 2px 0px 2px;text-align:center;width:780px}#totalBottomFooter {color:black;font-size:10px;font-weight:bold;text-align:center;}#footIcons {background-color:#FFFFFF;margin-top:10px!important; margin-right:auto!important; margin-left:auto!important; margin-bottom:0px!important;width:780px;padding-left:0px;padding-right:0px}#footIcons2 {background-color:#FFFFFF;margin-top:5px!important; margin-right:auto!important; margin-left:auto!important; margin-bottom:0px!important; width:400px; padding-left:0px;padding-right:0px}#totalBottomFooter2 {color:white;font-size:10px;font-weight:bold;text-align:center;}#totalBottomFooter a {color:black;}#allFooter a:hover {text-decoration:underline;}#allFooter a {text-decoration:none}#totalBottomFooter2 a {color:#FFFFFF;padding:3px;}div.centre{border-color:white;border-style:solid;border-width:0px 1px;margin:0px auto;text-align:left;width:780px;}#footIcons img {margin:0px auto;}img {display:block}img.inline {display:inline}#footIcons td {text-align:center;width:11%;vertical-align:middle}#footIcons2 td{vertical-align:middle}#footCopyRight {border-color:black;border-style:solid;border-width:1px 0;margin:5px 0px 0px;padding:0px}#footCopyRight p {font-size:10px;margin:3px;}table {border-collapse:collapse;margin:0px;padding:0px}td {margin:0px;padding:0px}td.dcH{vertical-align:top!important}td.dcH img{padding-top:13px}td.dcHD{vertical-align:top!important}td.dcHD img{padding-top:16px}</style>\
     <div class="centre"><div id="allFooter"><div id="totalBottomFooter"> <div id="footTopNav">  <a href="http://www.ctv.ca/generic/generated/static/CorpAbout/about.html" name="&lid=Footnav_About">About CTV</a>|  <a href="http://www.ctv.ca/contests" name="&lid=Footnav_Contests">Contests</a>  |  <a href="http://works.workopolis.com/customers/bgm/gi/" target="_blank" name="&lid=Footnav_Careers">Careers</a>  |  <a href="http://www.ctv.ca/announce" name="&lid=Footnav_Announce">CTV Announcements</a>  |  <a href="http://sales.ctv.ca/" target="_blank" name="&lid=Footnav_AdTV">Advertise on TV</a>  |  <a href="http://ctvmedia.ca/" target="_blank" name="&lid=Footnav_AdMedia">CTV Media</a>  |  <a href="http://www.ctv.ca/generic/generated/static/CorpAdvertise/default.html" name="&lid=Footnav_AdWeb">Advertise on Web</a></div><div id="footBottomNav">  \
     <a href="http://www.ctv.ca/generic/generated/static/CorpTranscripts/transcripts.html" name="&lid=Footnav_ArchiveSales">Archive Sales</a>  |  <a href="http://www.ctv.ca/generic/generated/static/CorpTranscripts/transcripts.html" name="&lid=Footnav_Transcripts">Tapes and Transcripts</a>  |  <a href="http://www.ctvglobemedia.com/en/policiestermsconditions/privacypolicy/" name="&lid=Footnav_Privacy">Privacy Policy</a>  |  <a href="http://www.ctvglobemedia.com/en/policiestermsconditions/termsconditions/" name="&lid=Footnav_Terms">Terms and Conditions</a>  |  <a href="http://www.ctv.ca/contactus">Contact Us</a>  |  <a href="http://www.ctv.ca/sitemap">Site&nbsp;Map</a></div></div><table id="footIcons"><tr><td><a href="http://www.ctvolympics.ca?cid=ftctv" target="_blank" name="&lid=Footnav_Olympics"><img src="http://www.ctv.ca/mar/images/logo/ctvolympics.jpg" width="43" height="42" border="0" alt="CTV Olympics"></a></td><td><a href="http://www.ctv.ca/servlet/ArticleNews/story/CTVNews/1124900164735_120309364" target="_blank" name="&lid=Footnav_Newsnet"><img src="http://www.ctv.ca/mar/images/logo/newchannel0525.jpg" width="65" height="39" border="0" alt="CTV News Channel"></a></td><td><a href="http://www.bnn.ca" target="_blank" name="&lid=Footnav_BNN"><img src="http://images.ctv.ca/mar/images/logo/bnn0805.gif" width="62" height="39" border="0" alt="Business News Network"></a></td><td><a href="http://www.cp24.com/" target="_blank" name="&lid=Footnav_CP24"><img src="http://images.ctv.ca/mar/images/logo/cp240810a.gif" width="56" height="39" border="0" alt="CP24"></a></td><td><a href="http://www.Atv.ca/" target="_blank" name="&lid=Footnav_AChannel"><img src="http://images.ctv.ca/mar/images/logo/achannel0805.gif" width="46" height="39" border="0" alt="A" /></a></td><td><a href="http://www.muchmusic.com" name="&lid=Footnav_MuchMusic" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/much0805.gif" width="50" height="39" border="0" alt="MuchMusic" /></a></td><td><a href="http://www.mtv.ca" target="_blank" name="&lid=Footnav_MTV"><img src="http://images.ctv.ca/mar/images/logo/mtv0805.gif" width="52" height="39" border="0" alt="MTV" /></a></td><td><a href="http://www.muchloud.com" target="_blank" name="&lid=Footnav_MuchLOUD"><img src="http://images.ctv.ca/mar/images/logo/loud0805.gif" width="51" height="39" border="0" alt="MuchLOUD" /></a></td><td><a href="http://www.muchmore.ca/" target="_blank" name="&lid=Footnav_MuchMore"><img src="http://images.ctv.ca/mar/images/logo/mmm0904.gif" width="62" height="31" border="0" alt="MuchMore" /></a></td><td><a href="http://www.muchmoreretro.com" target="_blank" name="&lid=Footnav_MuchMoreRetro"><img src="http://images.ctv.ca/mar/images/logo/mmr0805.gif" width="46" height="39" border="0" alt="MuchMoreRetro" /></a></td><td><a href="http://www.muchvibe.ca" target="_blank" name="&lid=Footnav_MuchVibe"><img src="http://images.ctv.ca/mar/images/logo/vibe0805.gif" width="55" height="39" border="0" alt="MuchVibe" /></a></td><td><a href="http://www.punchmuch.com" target="_blank" name="&lid=Footnav_PunchMuch"><img src="http://images.ctv.ca/mar/images/logo/punch0805.gif" width="55" height="39" border="0" alt="PunchMuch" /></a></td><td><a href="http://www.tsn.ca" target="_blank" name="&lid=Footnav_TSN"><img src="http://images.ctv.ca/mar/images/logo/tsn0805a.gif" width="66" height="39" border="0" alt="TSN" /></a></td></tr></table><table id="footIcons"><tr><td><a href="http://www.tsn2.ca" target="_blank" name="&lid=Footnav_TSN2"><img src="http://images.ctv.ca/mar/images/logo/tsn20805.gif" width="66" height="39" border="0" alt="TSN2" /></a></td><td><a href="http://www.rds.ca" target="_blank" name="&lid=Footnav_RDS"><img src="http://images.ctv.ca/mar/images/logo/rds0805a.gif" width="59" height="39" border="0" alt="RDS" /></a></td><td><a href="http://www.mtv2.ca" target="_blank" name="&lid=Footnav_MTV2"><img src="http://images.ctv.ca/mar/images/logo/mtv2_logo.jpg" width="41" height="39" border="0" alt="MTV2" /></a></td><td><a href="http://www.tsn.ca/" target="_blank" name="&lid=Footnav_NHLNetwork"><img src="http://images.ctv.ca/mar/images/logo/nhl0805.gif" width="40" height="50" border="0" alt="NHL Network"></a></td><td><a href="http://www.tsn.ca/classic" target="_blank" name="&lid=Footnav_ESPNClassic"><img src="http://images.ctv.ca/mar/images/logo/espnC0805.gif" width="67" height="50" border="0" alt="ESPN Classic"></a></td><td><a href="http://www.rds.ca/ris/index.php" target="_blank" name="&lid=Footnav_RISInfo"><img src="http://images.ctv.ca/mar/images/logo/ris0805.gif" width="61" height="50" border="0" alt="RIS Info Sports"></a></td><td><a href="http://www.fashiontelevision.com/" target="_blank" name="&lid=Footnav_Fashion"><img src="http://images.ctv.ca/mar/images/logo/fashion0805.gif" width="78" height="50" border="0" alt="Fashion Television" /></a></td><td><a href="http://www.courttvcanada.ca" name="&lid=Footnav_CourtTV" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/court0805.gif" width="68" height="50" border="0" alt="CourtTV Canada" /></a></td><td><a href="http://www.sextelevision.net" target="_blank" name="&lid=Footnav_SEXTV"><img src="http://images.ctv.ca/mar/images/logo/sex0805.gif" width="65" height="50" border="0" alt="SexTV: The Channel" /></a></td><td><a href="http://www.bravo.ca" target="_blank" name="&lid=Footnav_Bravo"><img src="http://images.ctv.ca/mar/images/logo/bravo0805.gif" width="52" height="50" border="0" alt="Bravo!" /></a></td><td><a href="http://www.booktelevision.com" target="_blank" name="&lid=Footnav_Book"><img src="http://images.ctv.ca/mar/images/logo/book0805.gif" width="58" height="50" border="0" alt="BookTelevision" /></a></td><td class="dcH"><a href="http://www.discoverychannel.ca" target="_blank" name="&lid=Footnav_Discovery"><img src="http://images.ctv.ca/mar/images/logo/disc.gif" width="80" height="17" border="0" alt="Discovery Channel" /></a></td></tr></table><table id="footIcons2"><tr><td class="dcHD"><a href="http://www.discoveryhd.ca" target="_blank" name="&lid=Footnav_DiscoveryHD"><img src="http://images.ctv.ca/mar/images/logo/discHD.gif" width="80" height="25" border="0" alt="Discovery HD" /></a></td><td><a href="http://www.discoverycivilization.ca" target="_blank" name="&lid=Footnav_Civilization"><img src="http://images.ctv.ca/mar/images/logo/discCiv0805.gif" width="58" height="50" border="0" alt="Discovery Civilization" /></a></td><td><a href="http://www.animalplanet.ca" target="_blank" name="&lid=Footnav_Animal"><img src="http://images.ctv.ca/mar/images/logo/animal0805.gif" width="58" height="50" border="0" alt="Animal Planet" /></a></td><td><a href="http://www.travelandescape.ca" target="_blank" name="&lid=Footnav_Travel"><img src="http://images.ctv.ca/mar/images/logo/travel0805.gif" width="68" height="50" border="0" alt="Travel and Escape" /></a></td><td><a href="http://www.driveinclassics.ca" target="_blank" name="&lid=Footnav_Drive"><img src="http://images.ctv.ca/mar/images/logo/drive0805.gif" width="67" height="44" border="0" alt="Drive-In Classic"></a></td><td><a href="http://www.tvlandcanada.com" target="_blank" name="&lid=Footnav_TVLand"><img src="http://images.ctv.ca/mar/images/logo/tv0805.gif" width="63" height="44" border="0" alt="TV Land"></a></td><td><a href="http://www.thecomedynetwork.ca" target="_blank" name="&lid=Footnav_Comedy"><img src="http://images.ctv.ca/mar/images/logo/comedy0805.gif" width="75" height="44" border="0" alt="The Comedy Network"></a></td><td><a href="http://www.star-tv.ca/" target="_blank" name="&lid=Star"><img src="http://images.ctv.ca/mar/images/logo/star0805.gif" width="74" height="44" border="0" alt="Star!" /></a></td><td><a href="http://www.spacecast.com" name="&lid=Footnav_Space" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/space0805.gif" width="65" height="44" border="0" alt="Space" /></a></td><td><a href="http://www.accesstv.ca" target="_blank" name="&lid=Footnav_ACCESS"><img src="http://images.ctv.ca/mar/images/logo/access0805.gif" width="55" height="44" border="0" alt="ACCESS" /></a></td></tr></table><div id="footCopyRight"><p>&copy; 2009 <a href="http://www.ctvglobemedia.com" target="_blank"><img src="http://images.ctv.ca/mar/images/logo/ctvglobemedia.gif" class="inline" width="144" height="34" alt="CTVglobemedia" style="vertical-align: middle" border="0" /></a> All Rights Reserved.</p></div></div></div></div>');
}

function validateSearch()
{
if(document.searchShow.query.value == "") {
alert("Please enter a search term!")
return false;
} else {
if (document.searchShow.site_codename[1].checked == true){
document.searchShow.submit();
}
else{
document.googleSearchCTV.query.value = document.searchShow.query.value;
document.googleSearchCTV.submit();
return false;
}
}
}

// programs and local stations select

currentMenu = "none";

if(document.all){

document.onmouseup = showCurrentMenu;

}

else{

window.addEventListener("load",addBodyListener,false);





}



function addBodyListener(){

document.getElementsByTagName('body')[0].addEventListener("mouseup",showCurrentMenu,false);

}



function showMenu(menu){

currentMenu = menu;



showCurrentMenu();

}

function showCurrentMenu(){





        if(currentMenu != "none"){

if(document.getElementById(currentMenu).style.visibility == "visible"){

document.getElementById("programs").style.visibility = "hidden";

document.getElementById("local").style.visibility = "hidden";

/* One Clip Hide Start */

if (document.getElementById('Player') !=null)
{
if (document.getElementById('Player').style.visibility == "hidden")

{

document.getElementById("Player").style.visibility = "visible";

}

else

{

document.getElementById("Player").style.visibility = "visible";

}

}

/* One Clip Hide End */

currentMenu = "none";



}

else if(currentMenu == "programs"){



document.getElementById("programs").style.visibility = "visible";



document.getElementById("programs").style.height = frames["programs"].document.getElementById("programsBody").offsetHeight + "px";

document.getElementById("local").style.visibility = "hidden";

/* One Clip Hide Start */

if (document.getElementById('Player') !=null)
{
if (document.getElementById('Player').style.visibility == "visible")

{

document.getElementById("Player").style.visibility = "hidden";

}

else

{

document.getElementById("Player").style.visibility = "visible";

}

}
/* One Clip Hide End */
}

else if(currentMenu == "local"){

document.getElementById("programs").style.visibility = "hidden";

document.getElementById("local").style.visibility = "visible";

/* One Clip Hide Start */

if (document.getElementById('Player') !=null)
{
if (document.getElementById('Player').style.visibility == "hidden")

{

document.getElementById("Player").style.visibility = "visible";

}

else

{

document.getElementById("Player").style.visibility = "visible";

}

}

/* One Clip Hide End */

document.getElementById("local").style.height = frames["local"].document.getElementById("localBody").offsetHeight + "px";



}

}

else{



}

}

function writeHeaderMain()
{
    document.write('<style>body{text-align:center;margin:5px 0px;background-color:#FFFFFF;color:#000000;font-family:verdana,arial,sans-serif;font-size:11px}#mainNav table {width:780px}#mainNav td.divider{background-color:#EFEFEF;border:none;width:1px}#subNav2 td{margin:3px 7px 3px 5px}div#subNavEmpty td{margin:3px 7px 3px 5px}#mainNav td{margin:3px 7px 3px 5px;border-color:#000000;border-style:solid;border-width:0px 1px;text-align:center;vertical-align:top;padding:0px}#mainNav a {color:white;font-size:10px;font-weight:bold;text-decoration:none}#mainNav p{margin:3px 5px 5px}#mainNav{z-index:100;position:relative;border:0px solid #999999;background-color:black;background-image:url(http://www.ctv.ca/mar/images/nav/CTV_topNAV_BG.gif);color:white;font-size:11px;margin:0px auto;padding:0px;text-align:left;width:780px}div.centre{border-style:solid;text-align:left;border-color:white;border-width:0px 1px;margin:0px auto;width:780px;font-family:Verdana,Arial,sans-serif;}img{display:block}#topSearchBar{background-color:#F2F2F2;background-image:url(http://images.ctv.ca/mar/images/widgets/searchHeaderBg.gif);background-repeat:repeat-x;border:1px solid #AAAAAA;margin:1px 0px 0px;padding:0px; position:relative;z-index:101}#topSearch{position:absolute;right:10px;text-align:right;top:22px}#topSearch form{margin:0px 215px 0px auto;padding:0px;width:440px; }#searchButton{position:relative;top:2px;right:3px}#localM select{font-size:10px}#localM input{font-size:10px;}img.inline{display:inline}#topSearchBar img{margin:0px}#googleSearchCTV{display:none}div#navColourBar{background-color:#C60000;height:3px;margin-top:2px}#mainNav table{border-collapse:collapse}p.menuButton{cursor:pointer}#localStation .dropDownContainer{right: 115px;}#localStation .dynamicMenu{width:150px}.dropDownContainer{float:right;margin-top:5px;z-index:101;}.dropDownContainer{position:absolute}.dropDownContainer p{margin:0px;padding:0px}#programListI .dropDownContainer{right:1px;position:absolute}#programListI .dynamicMenu{width:650px}.dynamicMenu{position:absolute;right:3px;top:1px;visibility:hidden;border:none}</style>\
<div class="centre"><a name="top"></a><div id="topColourBar"><img src="http://images.ctv.ca/mar/images/widgets/topheaderColour.gif" height="4" width="780" /></div><div id="topSearchBar"><div id="topSearch"><div id="localM"><div id="loco"><div id="localStation"><div class="dropDownContainer" onmouseup="event.cancelBubble = true;"><iframe src="http://www.ctv.ca/mar/inc/localOptions.html" frameborder="0" scrolling="no" name="local" id="local" class="dynamicMenu"></iframe><p onclick="showMenu(\'local\');" class="menuButton"><img src="http://images.ctv.ca/mar/images/widgets/local_selectG.gif" alt="Local Stations" height="15" width="108"></p></div></div><div id="programListI"><div class="dropDownContainer"  onmouseup="event.cancelBubble = true;" ><iframe src="http://www.ctv.ca/mar/generated/fragments/programsList.html" frameborder="0" scrolling="no"  id="programs"   name="programs" class="dynamicMenu"></iframe><p onclick=\"showMenu(\'programs\');\" class="menuButton"><img src="http://images.ctv.ca/mar/images/widgets/programs_select.gif" alt="Programs A-Z" height="15" width="99"></p></div></div></div><form method="get" action="http://www.ctv.ca/servlet/HTMLTemplate/!ctv/Search" name="searchShow" target="_top" onsubmit="return validateSearch();"><!-- for netscape 4 label bug --><input src="http://images.ctv.ca/mar/images/widgets/search_Button.gif" width="60" height="18" id="searchButton" alt="search" type="image"/><input type="hidden" name="site_codename" value="ctv"><!--label for="searchCTV"><input type="hidden" name="site_codename" value="ctv">CTV.ca </label--><input type="text" name="query" value="" size="30" maxlength="300" accesskey="s" class="searLoco" /><!--label for="searchTheWeb"><input type="radio" name="site_codename" value="sympatico">The Web </label><label for="searchCTV"><input type="radio" name="site_codename" value="ctv" checked="checked">CTV.ca </label-->&nbsp;<img src="http://images.ctv.ca/mar/images/widgets/searchSep.gif" class="inline" width="2" height="18" alt="|" />&nbsp;&nbsp;</form><form id="googleSearchCTV" name="googleSearchCTV" action="http://search.sli.sympatico.ca/partner/whitelabel/ctv/asp/results.asp" method="get"><input type="hidden" name="query" value="" size="15" maxlength="300" /><input type="hidden" value="ctv" name="provider" /></form></div></div><a href="http://www.ctv.ca" name="&lid=TopNav_Home_Logo"><img src="http://images.ctv.ca/mar/images/logo/ctvLogoSm.gif" width="185" height="44" alt="CTV.ca" id="ctvLogo" border="0" title="return to the CTV.ca Homepage" /></a></div><div id="navColourBar"><img src="http://images.ctv.ca/mar/images/p.gif" height="3" width="4" /></div><div id="mainNav"><table><tr><td class="currentItem1" style="border-left: 1px solid white;"><p><a href="http://www.ctv.ca/home" name="&lid=TopNav_Home">Home</a></p></td><td class="divider"><img src="images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem2"><p><a href="http://www.ctv.ca/news" name="&lid=TopNav_News">News</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem3"><p><a href="http://www.ctv.ca/canadaam" name="&lid=TopNav_Canadaam">Canada&nbsp;AM</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem4"><p><a href="http://www.ctv.ca/w5" name="&lid=TopNav_WFive">W5</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem5"><p><a href="http://www.ctv.ca/weather" name="&lid=TopNav_Weather">Weather</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem6"><p><a href="http://shows.ctv.ca/2007/" name="&lid=TopNav_Video">Video</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem7"><p><a href="http://www.ctv.ca/sports" name="&lid=TopNav_Sports">Sports</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem8"><p><a href="http://www.ctv.ca/entertainment" name="&lid=TopNav_Entertainment">Entertainment</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem9"><p><a href="http://www.ctv.ca/programs" name="&lid=TopNav_Programs">Programs</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem10"><p><a href="http://www.ctv.ca/tvlist" name="&lid=TopNav_Tvlist">TV&nbsp;Listings</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem11"><p><a href="http://autos.ctv.ca" name="&lid=TopNav_Autos">Autos</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem12"><p><a href="http://www.ctv.ca/contests" name="&lid=TopNav_Contests">Contests</a></p></td><!--     <td class="##menu_main_Local##"><p><a href="##WEBSITE_CTVCA##/local" name="&lid=TopNav_Local">Local</a></p></td><td class="divider"><img src="##WEBSITE_IMAGES_CTVCA##/mar/images/p.gif" width="1" height="20" /></td>--></tr></table></div>');
}

function writeHeaderLocal()
{
    document.write('<style>#logo-zone{background-color:none;height:45px;padding-left:0px;position:absolute;width:150px;text-align:left;margin-left:-487px}body{color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;margin:5px auto 0px;text-align:center;width:990px}body a{color:#013195;text-decoration:none;}form{margin:0px;padding:0px}table{border:none;font-size:11px;margin:0px;padding:0px}#searchNavBar td{padding-right:5px}.mainHeader{color:#FFFFFF;font-size:10px;font-weight:bold;padding-left:5px}.mainHeader a{color:#FFFFFF}#headerBackground{background-image:url(http://www.ctv.ca/mar/images/local990/topHeaderCTVLogo.jpg);background-repeat:no-repeat;height:45px;width:976px}#headerWidth{width:976px}</style>\
<div id="headerWidth"><div id="headerBackground"><a id="logo-zone" href="http://www.ctv.ca"></a><form method="get" action="http://www.ctv.ca/servlet/HTMLTemplate/!ctv/Search" name="searchShow" target="_top" onsubmit="return validateSearch();"><table id="searchNavBar" cellpadding="0" cellspacing="0" border="0" style="margin-top:1px;font-weight:bold;color:white;height:20px" align="right"><tr><!-- <td><input type="radio" name="site_codename" value="web"></td><td>Web</td><td><input type="radio" name="site_codename" value="ctv" CHECKED></td><td>CTV.ca</td>--><td><input type="text" name="query" size=15></td><td><input src="http://images.ctv.ca/mar/images/widgets/search_Button990.gif" id="searchButton" alt="search" type="image" /></td><td><div class="dropDownContainer" onmouseup="event.cancelBubble = true;"><img src="http://images.ctv.ca/mar/images/widgets/local_selectG.gif" alt="Local Stations" height="15" width="108" onclick=\"showMenu(\'local\');\" class="menuButton"><iframe src="http://www.ctv.ca/mar/inc/localOptions.html" frameborder="0" scrolling="no" name="local" id="local" class="dynamicMenu" style="visibility:hidden;position:absolute; margin-left: -163px; height:144px; width: 150px"></iframe></div></td><td><img src="http://images.ctv.ca/mar/images/widgets/programs_select.gif" alt="Programs A-Z" height="15" width="99" onclick=\"showMenu(\'programs\')\"><iframe src="http://www.ctv.ca/mar/generated/fragments/programsList.html" frameborder="0" scrolling="no"  id="programs" name="programs" style="visibility:hidden;position:absolute;height:675px;width:500px;border:medium none; margin-left: -513px"></iframe></td></tr></table><br clear="both"><table align=right class="mainHeader" style="height:20px;"><tr><td><a href="http://www.ctv.ca/home">HOME</a></td><td>|</td><td><a href="http://www.ctv.ca/news">News</a></td><td>|</td><td><a href="http://www.ctv.ca/canadaam">Canada AM</a></td><td>|</td><td><a href="http://www.ctv.ca/w5">W5</a></td><td>|</td><td><a href="http://www.ctv.ca/weather">Weather</a></td><td>|</td><td><a href="http://shows.ctv.ca/2007/">Video</a></td><td>|</td><td><a href="http://www.ctv.ca/sports">Sports</a></td><td>|</td><td><a href="http://www.ctv.ca/entertainment">Entertainment</a></td><td>|</td><td><a href="http://www.ctv.ca/programs">Programs</a></td><td>|</td><td><a href="http://www.ctv.ca/tvlist">TV Listing</a></td><td>|</td><td><a href="http://autos.ctv.ca/">Autos</a></td><td>|</td><td><a href="http://www.ctv.ca/contests">Contests</a></td></tr></table></form></div></div><div style="text-align:left;margin:auto;width:990px" id="topHeaderDivI">');
}

function writeHeaderLocalExt()
{
    document.write('<style>body{text-align:center;margin:5px 0px;background-color:#FFFFFF;color:#000000;font-family:verdana,arial,sans-serif;font-size:11px}#mainNav table {width:780px}#mainNav td.divider{background-color:#EFEFEF;border:none;width:1px}#subNav2 td{margin:3px 7px 3px 5px}div#subNavEmpty td{margin:3px 7px 3px 5px}#mainNav td{margin:3px 7px 3px 5px;border-color:#000000;border-style:solid;border-width:0px 1px;text-align:center;vertical-align:top;padding:0px}#mainNav a {color:white;font-size:10px;font-weight:bold;text-decoration:none}#mainNav p{margin:3px 5px 5px}#mainNav{z-index:100;position:relative;border:0px solid #999999;background-color:black;background-image:url(http://www.ctv.ca/mar/images/nav/CTV_topNAV_BG.gif);color:white;font-size:11px;margin:0px auto;padding:0px;text-align:left;width:780px}div.centre{border-style:solid;text-align:left;border-color:white;border-width:0px 1px;margin:0px auto;width:780px;font-family:Verdana,Arial,sans-serif;}img{display:block}#topSearchBar{background-color:#F2F2F2;background-image:url(http://images.ctv.ca/mar/images/widgets/searchHeaderBg.gif);background-repeat:repeat-x;border:1px solid #AAAAAA;margin:1px 0px 0px;padding:0px; position:relative;z-index:101}#topSearch{position:absolute;right:10px;text-align:right;top:22px}#topSearch form{margin:0px 215px 0px auto;padding:0px;width:440px; }#searchButton{position:relative;top:2px;right:3px}#localM select{font-size:10px}#localM input{font-size:10px;}img.inline{display:inline}#topSearchBar img{margin:0px}#googleSearchCTV{display:none}div#navColourBar{background-color:#C60000;height:3px;margin-top:2px}#mainNav table{border-collapse:collapse}p.menuButton{cursor:pointer}#localStation .dropDownContainer{right: 115px;}#localStation .dynamicMenu{width:150px}.dropDownContainer{float:right;margin-top:5px;z-index:101;}.dropDownContainer{position:absolute}.dropDownContainer p{margin:0px;padding:0px}#programListI .dropDownContainer{right:1px;position:absolute}#programListI .dynamicMenu{width:650px}.dynamicMenu{position:absolute;right:3px;top:1px;visibility:hidden;border:none}</style>\
<div class="centre"><a name="top"></a><div id="topColoursBar"><img src="http://images.ctv.ca/mar/images/widgets/topheaderColour.gif" height="4" width="780" /></div><div id="topSearchBar"><div id="topSearch"><div id="localM"><div id="loco"><div id="localStation"><div class="dropDownContainer" onmouseup="event.cancelBubble = true;"><iframe src="/video/localOptions.html" frameborder="0" scrolling="no" name="local" id="local" class="dynamicMenu"></iframe><p onclick="showMenu(\'local\');" class="menuButton"><img src="http://images.ctv.ca/mar/images/widgets/local_selectG.gif" alt="Local Stations" height="15" width="108"></p></div></div><div id="programListI"><div class="dropDownContainer"  onmouseup="event.cancelBubble = true;" ><iframe src="/video/programsList.html" frameborder="0" scrolling="no"  id="programs"   name="programs" class="dynamicMenu"></iframe><p onclick=\"showMenu(\'programs\');\" class="menuButton"><img src="http://images.ctv.ca/mar/images/widgets/programs_select.gif" alt="Programs A-Z" height="15" width="99"></p></div></div></div><form method="get" action="http://www.ctv.ca/servlet/HTMLTemplate/!ctv/Search" name="searchShow" target="_top" onsubmit="return validateSearch();"><!-- for netscape 4 label bug --><input src="http://images.ctv.ca/mar/images/widgets/search_Button.gif" width="60" height="18" id="searchButton" alt="search" type="image"/><input type="hidden" name="site_codename" value="ctv"><!--label for="searchCTV"><input type="hidden" name="site_codename" value="ctv">CTV.ca </label--><input type="text" name="query" value="" size="30" maxlength="300" accesskey="s" class="searLoco" /><!--label for="searchTheWeb"><input type="radio" name="site_codename" value="sympatico">The Web </label><label for="searchCTV"><input type="radio" name="site_codename" value="ctv" checked="checked">CTV.ca </label-->&nbsp;<img src="http://images.ctv.ca/mar/images/widgets/searchSep.gif" class="inline" width="2" height="18" alt="|" />&nbsp;&nbsp;</form><form id="googleSearchCTV" name="googleSearchCTV" action="http://search.sli.sympatico.ca/partner/whitelabel/ctv/asp/results.asp" method="get"><input type="hidden" name="query" value="" size="15" maxlength="300" /><input type="hidden" value="ctv" name="provider" /></form></div></div><a href="http://www.ctv.ca" name="&lid=TopNav_Home_Logo"><img src="http://images.ctv.ca/mar/images/logo/ctvLogoSm.gif" width="185" height="44" alt="CTV.ca" id="ctvLogo" border="0" title="return to the CTV.ca Homepage" /></a></div><div id="navColourBar"><img src="http://images.ctv.ca/mar/images/p.gif" height="3" width="4" /></div><div id="mainNav"><table><tr><td class="currentItem1" style="border-left: 1px solid white;"><p><a href="http://www.ctv.ca/home" name="&lid=TopNav_Home">Home</a></p></td><td class="divider"><img src="images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem2"><p><a href="http://www.ctv.ca/news" name="&lid=TopNav_News">News</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem3"><p><a href="http://www.ctv.ca/canadaam" name="&lid=TopNav_Canadaam">Canada&nbsp;AM</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem4"><p><a href="http://www.ctv.ca/w5" name="&lid=TopNav_WFive">W5</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem5"><p><a href="http://www.ctv.ca/weather" name="&lid=TopNav_Weather">Weather</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem6"><p><a href="http://shows.ctv.ca/2007/" name="&lid=TopNav_Video">Video</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem7"><p><a href="http://www.ctv.ca/sports" name="&lid=TopNav_Sports">Sports</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem8"><p><a href="http://www.ctv.ca/entertainment" name="&lid=TopNav_Entertainment">Entertainment</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem9"><p><a href="http://www.ctv.ca/programs" name="&lid=TopNav_Programs">Programs</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem10"><p><a href="http://www.ctv.ca/tvlist" name="&lid=TopNav_Tvlist">TV&nbsp;Listings</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem11"><p><a href="http://autos.ctv.ca" name="&lid=TopNav_Autos">Autos</a></p></td><td class="divider"><img src="http://images.ctv.ca/mar/images/p.gif" width="1" height="20" /></td><td class="currentItem12"><p><a href="http://www.ctv.ca/contests" name="&lid=TopNav_Contests">Contests</a></p></td><!--     <td class="##menu_main_Local##"><p><a href="##WEBSITE_CTVCA##/local" name="&lid=TopNav_Local">Local</a></p></td><td class="divider"><img src="##WEBSITE_IMAGES_CTVCA##/mar/images/p.gif" width="1" height="20" /></td>--></tr></table></div>');
}

function showMenuExt(idI)
{
if (document.getElementById(idI).style.visibility == "hidden")
{
document.getElementById(idI).style.visibility = "visible";
}
else
{
document.getElementById(idI).style.visibility = "hidden";
}
}