var moviesColour = "#9172a0";
var moviesColourLight = "#d9cfde";
var moviesColourDark = "#654673";

var dramasColour = "#78b0be";
var dramasColourLight = "#d3eae9";
var dramasColourDark = "#2d7486";

var awardsColour = "#D8A66B";
var awardsColourLight = "#F4E3D0";
var awardsColourDark = "#B48144";

var comedyColour = "#FFF661";
var comedyColourLight = "#fffcd3";
var comedyColourDark = "#d38502";

var musicColour = "#85b8ab";
var musicColourLight = "#dbece7";
var musicColourDark = "#4d7d79";

var artsColour = "#AF7638";
var artsColourLight = "#E5D9C0";
var artsColourDark = "#793C1B";

var scienceColour = "#bdc8cc";
var scienceColourLight = "#e9eced";
var scienceColourDark = "#7a8d9d";

var navTitle = new Array();
navTitle[0] = new Image();
navTitle[0].src = "/tvarts/catnav/interactive_title.gif";
navTitle[1] = new Image();
navTitle[1].src = "/tvarts/catnav/holiday1title.gif";
navTitle[2] = new Image();
navTitle[2].src = "/tvarts/catnav/holiday2title.gif";
navTitle[3] = new Image();
navTitle[3].src = "/tvarts/catnav/holiday3title.gif";
navTitle[4] = new Image();
navTitle[4].src = "/tvarts/catnav/holiday4title.gif";
navTitle[5] = new Image();
navTitle[5].src = "/tvarts/catnav/holiday5title.gif";
navTitle[6] = new Image();
navTitle[6].src = "/tvarts/catnav/holiday6title.gif";
navTitle[7] = new Image();
navTitle[7].src = "/tvarts/catnav/holiday7title.gif";

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {
  		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.MM_pgW=innerWidth;
			document.MM_pgH=innerHeight;
			onresize=MM_reloadPage;
		}
	}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
		location.reload();
}

MM_reloadPage(true);

detectFlash();  // call our detector now that it's safely loaded. 

function formHandler(form){
	var URL = form.site.options[form.site.selectedIndex].value;
	if (form.site.selectedIndex!=0)
		window.location.href = URL;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
	var p,i,x;
	if(!d)
		d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
  	if(!(x=d[n])&&d.all)
  		x=d.all[n];
  	for (i=0;!x&&i<d.forms.length;i++)
  		x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++)
		x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById)
		x=document.getElementById(n);
	return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3)
  	if ((obj=MM_findObj(args[i]))!=null) {
  		v=args[i+2];
		if (obj.style) {
			obj=obj.style;
			v=(v=='show')?'visible':(v='hide')?'hidden':v;
		}
    		obj.visibility=v;
    	}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

//    ************************************************************
//	FUNCTION: buildTopNav
//    ************************************************************
//	Builds the top CBC bar that spans the page
//
//				********************
//				 DO NOT ALTER THIS!
//				********************
//
//    ************************************************************
function buildTopNav() {
	document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"22\">");
	document.write("	<tr>");
	document.write("		<td align=\"left\" bgcolor=\"#000000\"><a href=\"http://www.cbc.ca/index.html\"><img src=\"/includes/gfx/topnav_home.gif\" width=\"67\" height=\"20\" alt=\"Home\" border=\"0\"></a><a  href=\"http://www.cbc.ca/radioguide/\" onmouseout=\"FW_startTimeout();\" onmouseover=\"window.FW_showMenu(window.fw_menu_0,68,18);\"><img src=\"/includes/gfx/topnav_radio.gif\" width=\"48\" height=\"20\" alt=\"Radio\" border=\"0\"></a><a  href=\"http://www.cbc.ca/television/\" onmouseout=\"FW_startTimeout();\" onmouseover=\"window.FW_showMenu(window.fw_menu_1,116,18);\"><img src=\"/includes/gfx/topnav_tv.gif\" width=\"73\" height=\"20\" alt=\"Television\" border=\"0\"></a><a  href=\"http://www.cbc.ca/local/\"><img src=\"/includes/gfx/topnav_local.gif\" width=\"49\" height=\"20\" alt=\"Local\" border=\"0\"></a></td>");
	document.write("		<td align=\"right\" bgcolor=\"#000000\" valign=\"top\"><a  href=\"http://www.cbc.ca/aboutcbc/contact/\"><img src=\"/includes/gfx/topnav_contact.gif\" width=\"77\" height=\"20\" alt=\"Contact\" border=\"0\"></a><a  href=\"http://www.cbc.ca/search/\"><img src=\"/includes/gfx/topnav_search.gif\" width=\"73\" height=\"20\" alt=\"Search\" border=\"0\"></a><a  href=\"http://www.cbc.ca/help/\"><img src=\"/includes/gfx/topnav_help.gif\" width=\"58\" height=\"20\" alt=\"Help\" border=\"0\"></a></td>");
	document.write("	</tr>");
	document.write("	<tr> ");
	document.write("		<td colspan=\"2\" bgcolor=\"#333333\"><img src=\"/includes/gfx/blank.gif\" width=\"1\" height=\"1\" vspace=\"0\" hspace=\"0\" border=\"0\"></td>");
	document.write("	</tr>");
	document.write("</table>");
}


//    ************************************************************
//	FUNCTION: buildBreadcrumb
//    ************************************************************
//	This function will build the breadcrumb trail
//	It takes a series of arguments in the following format:
//	"title","link"[,...]
//    ************************************************************
function buildBreadcrumb() {
	var i,num,args=buildBreadcrumb.arguments;
	
	if (document.layers)
		document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ><tr><td height=\"15\" class=\"breadcrumbsNS\">");
	else
		document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ><tr><td height=\"15\" class=\"breadcrumbs\">");
	for (i=0;i<(args.length-1);i+=2) {
		if (args[i+1]!="")
			document.write("<a href=\""+args[i+1]+"\">"+args[i]+"</a>");
		else
			document.write(""+args[i]);
		if ((i+2)<args.length)
			document.write("<span class=\"bread-arrow\">>></span>");
	}
	document.write("</td></tr></table>");
}


//    ************************************************************
//	FUNCTION: buildPromo
//    ************************************************************
//	This function will build the promo bar
//	The promo picture is a local image in the show_promo dir
//	It takes a series of arguments in the following format:
//	section,"promo_pic","Item Title","Item Info"[,...]
//    ************************************************************
function buildPromo() {
	var i,cssArg,spacer,promoPic,args=buildPromo.arguments;
	
	switch(args[0]) {
		case 1: 	cssArg="promo-title-movies";
				spacer="movies_space.gif";
				break;
		case 2: 	cssArg="promo-title-dramas";
				spacer="dramas_space.gif";
				break;
		case 3: 	cssArg="promo-title-music";
				spacer="music_space.gif";
				break;
		case 4: 	cssArg="promo-title-comedy";
				spacer="comedy_space.gif";
				break;
		case 5: 	cssArg="promo-title-awards";
				spacer="awards_space.gif";
				break;
		case 6: 	cssArg="promo-title-arts";
				spacer="arts_space.gif";
				break;
		case 7: 	cssArg="promo-title-science";
				spacer="science_space.gif";
				break;
		default: 	cssArg="promo-title";
				spacer="wht_space.gif";
				break;
	}
	showNav = args[1];
	promoPic = args[2];
	if (document.MM_pgW<760)
		width=440;
	else
		width=document.MM_pgW-320;
	document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("	<tr>");
	document.write("		<td height=\"75\" width=\"100\" align=left valign=middle bgcolor=\"black\"><img src=\"show_promo/"+promoPic+"\" width=\"100\" height=\"75\"></td>");
	document.write("		<td height=\"75\" width=\""+width+"\" align=left valign=middle bgcolor=\"black\" class=\"promo-text\">");
	for (i=3;i<(args.length-1);i+=2) {
		document.write("<span class=\""+cssArg+"\">"+args[i]+"</span> "+args[i+1]+"");
		if (i<(args.length-2))
			document.write("<br>");
	}
	document.write("		</td>");
	document.write("		<td height=\"75\" width=\"220\" align=right valign=bottom bgcolor=\"#000000\" border=\"0\" background=\"/tvarts/spacer/blk_space.gif\"><img src=\"/tvarts/spacer/blk_space.gif\">");
	if (showNav==1)
		BuildNav(args[0]);
	document.write("		</td>");
	document.write("	</tr>");
	document.write("</table>");
	document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("  <tr>");
	document.write("    <td height=\"3\" border=\"0\" bgcolor=\"black\"><img src=\"/tvarts/spacer/blk_space.gif\" height=\"3\" width=\"1\"></td>");
	document.write("  </tr>");
	document.write("</table>");
}

function buildMenuNav() {
	var i,args=buildMenuNav.arguments;
	
	document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("	<tr>");
	document.write("		<td align=right valign=bottom bgcolor=\"#000000\" border=\"0\">");
	BuildNav(args[0]);
	document.write("		</td>");
	document.write("	</tr>");
	document.write("</table>");
	document.write("<table width=100% cellpadding=0 cellspacing=0 border=0>");
	document.write("	<tr>");
	document.write("		<td height=\"3\" width=\"100%\" bgcolor=\"black\" border=\"0\"><img src=\"/tvarts/spacer/blk_space.gif\"></td>");
	document.write("	</tr>");
	document.write("</table>");
}

//    ************************************************************
//	FUNCTION: BuildNav
//    ************************************************************
function BuildNav(section) {			//set up navigation links and graphics
	// The following are the "section" variable values:
	// 0 - no section (no title is highlighted)
	// 1 - Movies and Mini-series
	// 2 - Dramas
	// 3 - Music and Variety
	// 4 - Comedy
	// 5 - Awards Shows
	// 6 - Arts and Science

	var numCategories = 7;

	var nav0="<a href=\"/tvarts/interactive/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[0].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/interactive_icon.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";
	var nav1="<a href=\"/tvarts/movies/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[1].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/category1.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";
	var nav2="<a href=\"/tvarts/drama/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[2].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/category2.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";
	var nav3="<a href=\"/tvarts/specials/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[3].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/category3.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";
	var nav4="<a href=\"/tvarts/comedy/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[4].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/category4.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";
	var nav5="<a href=\"/tvarts/specials/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[5].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/category5.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";
	var nav6="<a href=\"/tvarts/arts/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[6].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/category6.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";
	var nav7="<a href=\"/documentaries/\" onMouseOver=\"javascript: document.navtitle.src=navTitle[7].src;\" onMouseOut=\"javascript: document.navtitle.src=navTitle["+section+"].src;\"><img src=\"/tvarts/catnav/category7.gif\" width=\"29\" height=\"24\" border=\"0\"></a>";

	var navTitle0="<img src=\"/tvarts/catnav/interactive_title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";
	var navTitle1="<img src=\"/tvarts/catnav/holiday1title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";
	var navTitle2="<img src=\"/tvarts/catnav/holiday2title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";
	var navTitle3="<img src=\"/tvarts/catnav/holiday3title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";
	var navTitle4="<img src=\"/tvarts/catnav/holiday4title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";
	var navTitle5="<img src=\"/tvarts/catnav/holiday5title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";
	var navTitle6="<img src=\"/tvarts/catnav/holiday6title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";
	var navTitle7="<img src=\"/tvarts/catnav/holiday7title.gif\" width=\"232\" height=\"19\" border=\"0\" name=\"navtitle\">";

	document.write("			<table cellpadding=0 cellspacing=0 border=\"0\" valign=\"bottom\">");
//	if (section!=0)
		document.write("				<tr><td valign=top width=232 colspan="+(numCategories+1)+">" + eval("navTitle" + section) + "</td></tr>");
//	else
//		document.write("				<tr><td valign=top width=232 colspan="+(numCategories+1)+"><img src=\"/tvarts/spacer/blk_space.gif\" width=\"232\" height=\"19\" name=\"navtitle\"></td></tr>");
	document.write("				<tr>");
	for(i=0;i<=numCategories;i++) {
		document.write("					<td width=29>" +eval("nav" + i) + "</td>");
	}
	document.write("				</tr>");
	document.write("			</table>");
}


//    ************************************************************
//	FUNCTION: buildMainFeature
//    ************************************************************
//	This function will build the Main Feature box
//	Parameters: genre, feature image, alignment, link text,
//			 link location, link target
//    ************************************************************
function buildMainFeature() {
	var i,j,bgColour,picAlign,textClass,imgPath,args=buildMainFeature.arguments;
	dramasColourLightTmp="#91cddc";
	
	switch(args[0]) {
		case 1:	bgColour=moviesColourLight;
				borderColour=moviesColourDark;
				textClass="feature-text-movies";
				imgPath="movies/";
				break;
		case 2:	bgColour=dramasColourLight;
				borderColour=dramasColourDark;
				textClass="feature-text-dramas";
				imgPath="dramas/";
				break;
		case 3:	bgColour=musicColourLight;
				borderColour=musicColourDark;
				textClass="feature-text-music";
				imgPath="music/";
				break;
		case 4:	bgColour=comedyColourLight;
				borderColour=comedyColourDark;
				textClass="feature-text-comedy";
				imgPath="comedy/";
				break;
		case 5:	bgColour=awardsColourLight;
				borderColour=awardsColourDark;
				textClass="feature-text-awards";
				imgPath="awards/";
				break;
		case 6:	bgColour=artsColourLight;
				borderColour=artsColourDark;
				textClass="feature-text-arts";
				imgPath="arts/";
				break;
		case 7:	bgColour=scienceColourLight;
				borderColour=scienceColourDark;
				textClass="feature-text-science";
				imgPath="science/";
				break;
		default:	bgColour="#cccccc";
				borderColour="#666666";
				textClass="features-text";
				imgPath="";
				break;
	}
	picAlign=args[2];
	if (args[5])
		target=args[5];
	else
		target="_self";
	document.write("			<img src=\"/tvarts/spacer/wht_space.gif\" width=1 height=4><br clear=all>");
// Start Main Feature Box
	document.write("<table cellpadding=0 cellspacing=0 border=0>");
	document.write("	<tr>");
	document.write("		<td valign=top width=5 bgcolor=white><img src=\"/tvarts/spacer/wht_space.gif\" width=5 height=1></td>");
	document.write("		<td valign=top bgcolor=white width=200>");
	document.write("			<table cellpadding=0 cellspacing=0 border=0>");
	document.write("				<tr>");
	document.write("					<TD valign=top colspan=5><IMG SRC=\"/tvarts/features/"+imgPath+"mainfeature.gif\" WIDTH=200 HEIGHT=15 ALT=\"Main Feature\"></TD>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top bgcolor=\"white\" height=2 colspan=5><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top bgcolor=\""+borderColour+"\" height=1 colspan=5><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top width=1 bgcolor=\""+borderColour+"\"><img src=\"/tvarts/spacer/space.gif\"></td>");
	if (picAlign=="left") {
		document.write("				      <TD bgcolor=\""+bgColour+"\" WIDTH=65 HEIGHT=71><a href=\""+args[4]+"\" target=\""+target+"\"><IMG SRC=\"features/"+args[1]+"\" WIDTH=60 HEIGHT=71 border=0></a><IMG SRC=\"/tvarts/spacer/space.gif\" width=5 height=1></TD>");
		document.write("					<TD bgcolor=\""+bgColour+"\" WIDTH=128 HEIGHT=71 align=\"middle\" class=\""+textClass+"\"><img src=\"/tvarts/spacer/space.gif\" width=128 height=1><br clear=all><a href=\""+args[4]+"\" target=\""+target+"\">"+args[3]+"</a></TD>");
		document.write("				      <TD bgcolor=\""+bgColour+"\" WIDTH=5 HEIGHT=71><IMG SRC=\"/tvarts/spacer/space.gif\" width=5 height=1></TD>");
	}
	else {
		document.write("				      <TD bgcolor=\""+bgColour+"\" WIDTH=5 HEIGHT=71><IMG SRC=\"/tvarts/spacer/space.gif\" width=5 height=1></TD>");
		document.write("					<TD bgcolor=\""+bgColour+"\" WIDTH=128 HEIGHT=71 align=\"middle\" class=\""+textClass+"\"><img src=\"/tvarts/spacer/space.gif\" width=128 height=1><br clear=all><a href=\""+args[4]+"\" target=\""+target+"\">"+args[3]+"</a></TD>");
		document.write("				      <TD bgcolor=\""+bgColour+"\" WIDTH=65 HEIGHT=71 align=\"right\"><IMG SRC=\"/tvarts/spacer/space.gif\" width=5 height=1><a href=\""+args[4]+"\" target=\""+target+"\"><IMG SRC=\"features/"+args[1]+"\" WIDTH=60 HEIGHT=71 border=0></a></TD>");
	}
	document.write("					<td valign=top width=1 bgcolor=\""+borderColour+"\"><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top bgcolor=\""+borderColour+"\" height=1 colspan=5><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("			</table>");
	document.write("		</td>");
	document.write("	</tr>");
	document.write("</table>");
// End Main Feature Box
}

//    ************************************************************
//	FUNCTION: buildQuickArchive
//    ************************************************************
//	This function will build the Quick Archive box
//	Parameters: genre, quick archive image, option, url[,...]
//    ************************************************************
function buildQuickArchive() {
	var i,j,bgColour,quickImg,args=buildQuickArchive.arguments;
	
	switch(args[0]) {
		case 1:	bgColour=moviesColourLight;
				borderColour=moviesColourDark;
				textClass="movies";
				imgPath="movies/";
				break;
		case 2:	bgColour=dramasColourLight;
				borderColour=dramasColourDark;
				textClass="dramas";
				imgPath="dramas/";
				break;
		case 3:	bgColour=musicColourLight;
				borderColour=musicColourDark;
				textClass="music";
				imgPath="music/";
				break;
		case 4:	bgColour=comedyColourLight;
				borderColour=comedyColourDark;
				textClass="comedy";
				imgPath="comedy/";
				break;
		case 5:	bgColour=awardsColourLight;
				borderColour=awardsColourDark;
				textClass="awards";
				imgPath="awards/";
				break;
		case 6:	bgColour=artsColourLight;
				borderColour=artsColourDark;
				textClass="arts";
				imgPath="arts/";
				break;
		case 7:	bgColour=scienceColourLight;
				borderColour=scienceColourDark;
				textClass="science";
				imgPath="science/";
				break;
		default:	bgColour="#cccccc";
				borderColour="#666666";
				textClass="default";
				imgPath="";
				break;
	}
	quickImg=args[1];
	document.write("			<img src=\"/tvarts/spacer/wht_space.gif\" width=1 height=7><br clear=all>");

// Start Quickarchive Box 
	document.write("<table cellpadding=0 cellspacing=0 border=0>");
	document.write("	<tr>");
	document.write("		<td valign=top width=5 bgcolor=white><img src=\"/tvarts/spacer/wht_space.gif\" width=5 height=1></td>");
	document.write("		<td valign=top bgcolor=white width=200>");
	document.write("			<table cellpadding=0 cellspacing=0 border=0>");
	document.write("				<tr>");
	document.write("					<TD valign=top colspan=3><img src=\"features/"+quickImg+"\"></TD>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top bgcolor=\"white\" height=2 colspan=3><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top bgcolor=\""+borderColour+"\" height=1 colspan=3><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top width=1 bgcolor=\""+borderColour+"\"><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("					<td align=center width=198 height=30 valign=middle bgcolor=\""+bgColour+"\">");
	if (!document.layers)
		document.write("						<div id=\"quickarchive\" style=\"position:relative; left:0px; top:0px; width:198px; height:18px; z-index:10; overflow: hidden; valign:middle;\">");
	document.write("						<form name=\"categoriesForm\" class=\"categories-"+textClass+"\">");
	document.write("							<select name=\"site\" onChange=\"javascript:formHandler(document.categoriesForm)\" class=\"categoriesOptions-"+textClass+"\">");
	for (i=2;i<(args.length-1);i+=2) {
		document.write("								<option value=\""+args[i+1]+"\">"+args[i]+"</option>");
	}
	document.write("							</select>");
	document.write("						</form>");
	if (!document.layers)
		document.write("						</div>");
	document.write("					<img src=\"/tvarts/spacer/space.gif\" width=198 height=1></td>");
	document.write("					<td valign=top width=1 bgcolor=\""+borderColour+"\"><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top bgcolor=\""+borderColour+"\" height=1 colspan=3><img src=\"/tvarts/spacer/space.gif\"></td>");
	document.write("				</tr>");
	document.write("			</table>");
	document.write("		</td>");
	document.write("	</tr>");
	document.write("</table>");
// End Quickarchive Box 
}


//    ************************************************************
//	FUNCTION: buildFeatures
//    ************************************************************
//	This function will build the Features box
//	Parameters: genre, link img, link align, link text,
//			link location, link target[,...]
//    ************************************************************
function buildFeatures() {
	var i,j,bgColour,args=buildFeatures.arguments;
	
	switch(args[0]) {
		case 1:	bgColour=moviesColourLight;
				borderColour=moviesColourDark;
				textClass="feature-text-movies";
				imgPath="movies/";
				break;
		case 2:	bgColour=dramasColourLight;
				borderColour=dramasColourDark;
				textClass="feature-text-dramas";
				imgPath="dramas/";
				break;
		case 3:	bgColour=musicColourLight;
				borderColour=musicColourDark;
				textClass="feature-text-music";
				imgPath="music/";
				break;
		case 4:	bgColour=comedyColourLight;
				borderColour=comedyColourDark;
				textClass="feature-text-comedy";
				imgPath="comedy/";
				break;
		case 5:	bgColour=awardsColourLight;
				borderColour=awardsColourDark;
				textClass="feature-text-awards";
				imgPath="awards/";
				break;
		case 6:	bgColour=artsColourLight;
				borderColour=artsColourDark;
				textClass="feature-text-arts";
				imgPath="arts/";
				break;
		case 7:	bgColour=scienceColourLight;
				borderColour=scienceColourDark;
				textClass="feature-text-science";
				imgPath="science/";
				break;
		default:	bgColour="#cccccc";
				borderColour="#666666";
				textClass="features-text";
				imgPath="";
				break;
	}
	document.write("			<img src=\"/tvarts/spacer/wht_space.gif\" width=1 height=7><br clear=all>");
	
// Start Subfeatures Box 
	document.write("<table cellpadding=0 cellspacing=0 border=0>");
	document.write("	<tr>");
	document.write("		<td valign=top width=5 bgcolor=white><img src=\"/tvarts/spacer/wht_space.gif\" width=5 height=1></td>");
	document.write("		<td valign=top bgcolor=white width=200>");
	document.write("			<table cellpadding=0 cellspacing=0 border=0>");
	document.write("				<tr>");
	document.write("					<TD valign=top colspan=3><img src=\"/tvarts/features/"+imgPath+"subfeatures.gif\" width=200 height=15></TD>");
	document.write("				</tr>");
	for (i=1;i<(args.length-4);i+=5) {
		document.write("				<tr>");
		document.write("					<td valign=top bgcolor=\"white\" height=2 colspan=3><img src=\"/tvarts/spacer/space.gif\"></td>");
		document.write("				</tr>");
		document.write("				<tr>");
		document.write("					<td valign=top bgcolor=\""+borderColour+"\" height=1 colspan=3><img src=\"/tvarts/spacer/space.gif\"></td>");
		document.write("				</tr>");
		document.write("				<tr>");
		document.write("					<td valign=top width=1 bgcolor=\""+borderColour+"\"><img src=\"/tvarts/spacer/space.gif\"></td>");
		document.write("					<td valign=top width=198 bgcolor=\""+bgColour+"\"><table cellpadding=0 cellspacing=0 border=0>");
		if (args[i+4]=="")
			target="_self";
		else
			target=args[i+4];
		document.write("						<tr>");
		if (args[i+1]=="left") {
			document.write("						      <td valign=\"middle\" width=40 align=\"middle\"><a href=\""+args[i+3]+"\" target=\""+target+"\"><img src=\"features/"+args[i]+"\" border=0 alt=''></a></td>");
			document.write("						      <td valign=\"top\" width=10 align=\"right\"><img src=\"/tvarts/spacer/space.gif\" width=10 height=1></td>");
			document.write("							<td valign=\"middle\" align=\"middle\" width=138 class=\""+textClass+"\"><img src=\"/tvarts/spacer/space.gif\" width=138 height=1><br clear=all><a href=\""+args[i+3]+"\" target=\""+target+"\">"+args[i+2]+"</a></td>");
			document.write("						      <td valign=\"top\" width=10 align=\"right\"><img src=\"/tvarts/spacer/space.gif\" width=10 height=1></td>");
		}
		else {
			document.write("						      <td valign=\"top\" width=10 align=\"right\"><img src=\"/tvarts/spacer/space.gif\" width=10 height=1></td>");
			document.write("							<td valign=\"middle\" align=\"middle\" width=138 class=\""+textClass+"\"><img src=\"/tvarts/spacer/space.gif\" width=138 height=1><br clear=all><a href=\""+args[i+3]+"\" target=\""+target+"\">"+args[i+2]+"</a></td>");
			document.write("						      <td valign=\"top\" width=10 align=\"right\"><img src=\"/tvarts/spacer/space.gif\" width=10 height=1></td>");
			document.write("						      <td valign=\"middle\" width=40 align=\"middle\"><a href=\""+args[i+3]+"\" target=\""+target+"\"><img src=\"features/"+args[i]+"\" border=0 alt=''></a></td>");
		}
		document.write("						</tr>");
		document.write("					</table></td>");
		document.write("					<td valign=top width=1 bgcolor=\""+borderColour+"\"><img src=\"/tvarts/spacer/space.gif\"></td>");
		document.write("				</tr>");
		document.write("				<tr>");
		document.write("					<td valign=top bgcolor=\""+borderColour+"\" height=1 colspan=3><img src=\"/tvarts/spacer/space.gif\"></td>");
		document.write("				</tr>");
	}
	document.write("			</table>");
	document.write("		</td>");
	document.write("	</tr>");
	document.write("</table>");
// End Subfeatures Box
}


//    ************************************************************
//	FUNCTION: buildBottomBar
//    ************************************************************
//	This function builds the bottom branding bar
//    ************************************************************
function buildBottomBar() {
	var bgColour,args=buildBottomBar.arguments;

	switch(args[0]) {
		case 1:	bgColour=moviesColourDark;
				imgPath="movies/";
				break;
		case 2:	bgColour=dramasColourDark;
				imgPath="dramas/";
				break;
		case 3:	bgColour=musicColourDark;
				imgPath="music/";
				break;
		case 4:	bgColour=comedyColourDark;
				imgPath="comedy/";
				break;
		case 5:	bgColour=awardsColourDark;
				imgPath="awards/";
				break;
		case 6:	bgColour=artsColourDark;
				imgPath="arts/";
				break;
		case 7:	bgColour=scienceColourDark;
				imgPath="science/";
				break;
		default:	bgColour="#cccccc";
				imgPath="";
				break;
	}	
	document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"black\">");
	if (args[0]!=0) {
		document.write("	<tr>");
		document.write("		<td colspan=2 align=\"left\" height=\"55\" valign=\"top\" bgcolor=\""+bgColour+"\"><center>");
		document.write("			<table cellspacing=0 cellpadding=0 border=0 width=764><tr><td valign=top height=55 bgcolor=white><img src=\"bottom_bumper/bottom_bumper.jpg\"></td></tr></table>");
		document.write("		</center></td>");
		document.write("	</tr>");
	}
	document.write("	<tr>");
//	if (args[0]!=0)
		document.write("		<td align=\"left\" valign=\"top\"><img src=\"/tvarts/branding/arts_title2.gif\" width=\"240\" height=\"40\"></td>");
	document.write("		<td align=\"right\" valign=\"top\"><a href=\"http://www.cbc.ca/television\"><img src=\"/tvarts/branding/molecule.gif\" width=\"83\" height=\"70\" border=\"0\"></a></td>");
	document.write("	</tr>");
	document.write("</table>");
}


//    ************************************************************
//	FUNCTION: buildShowNavigation
//    ************************************************************
//	This function will build the show navigation bar
//	The show title is in a dir called "shownav"
//	The navigation elements are in a dir called "shownav"
//	It takes a series of arguments in the following format:
//	section,subnav,"show_title","image_on","image_off","link"[,...]
//	
//	section:	The current section (movies, arts, dramas, etc.)
//	subnav:	subnav section (about, home, episodes, etc.)
//	show_title:	the filename of the show title
//	image_on:	the filename of the subnav element when it is
//			highlighted
//	image_off:	the filename of the subnav element when it is
//			NOT highlighted
//	link:		where the subnav element links to
//    ************************************************************
function buildShowNavigation() {
	var i,j,showIcon,spacer,subSection,showTitle,args=buildShowNavigation.arguments;

	switch(args[0]) {
		case 1:	showIcon="/tvarts/catnav/movies_icon.gif";
				spacer="movies_space.gif";
				curve="movies_curve.gif";
				break;
		case 2:	showIcon="/tvarts/catnav/dramas_icon.gif";
				spacer="dramas_space.gif";
				curve="dramas_curve.gif";
				break;
		case 3:	showIcon="/tvarts/catnav/music_icon.gif";
				spacer="music_space.gif";
				curve="music_curve.gif";
				break;
		case 4:	showIcon="/tvarts/catnav/comedy_icon.gif";
				spacer="comedy_space.gif";
				curve="comedy_curve.gif";
				break;
		case 5:	showIcon="/tvarts/catnav/awards_icon.gif";
				spacer="awards_space.gif";
				curve="awards_curve.gif";
				break;
		case 6:	showIcon="/tvarts/catnav/arts_icon.gif";
				spacer="arts_space.gif";
				curve="arts_curve.gif";
				break;
		case 7:	showIcon="/tvarts/catnav/science_icon.gif";
				spacer="science_space.gif";
				curve="science_curve.gif";
				break;
		default:	showIcon="/tvarts/spacer/wht_space.gif";
				spacer="wht_space.gif";
				curve="default_curve.gif";
				break;
	}
	subSection = args[1];
	showTitle = args[2];
	document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("  <tr>");
	document.write("    <td width=\"30\" align=\"right\" height=\"25\" bgcolor=\"#333333\" border=\"0\" background=\"/tvarts/spacer/wht_space.gif\"><img src=\""+showIcon+"\" width=\"30\" height=\"25\"></td>");
//	document.write("    <td height=\"25\" bgcolor=\"white\" border=\"0\"><img src=\"/tvarts/spacer/wht_space.gif\" width=\"1\" height=\"25\"></td>");
	if (subSection!=0)
		document.write("    <td height=\"25\" bgcolor=\"white\" border=\"0\"><a href=\"index.html\" target=\"_self\" onmouseover=\"MM_swapImage('showTitle','show_titles/"+showTitle+".gif','show_titles/"+showTitle+"_on.gif')\" onmouseout=\"MM_swapImage('showTitle','show_titles/"+showTitle+"_on.gif','show_titles/"+showTitle+".gif')\"><img src=\"show_titles/"+showTitle+".gif\" name=\"showTitle\" border=0></a><img src=\"/tvarts/shownav/curve.gif\"></td>");
	else
		document.write("    <td height=\"25\" bgcolor=\"white\" border=\"0\"><img src=\"show_titles/"+showTitle+"_on.gif\" name=\"showTitle\" border=0><img src=\"/tvarts/shownav/curve.gif\"></td>");
	document.write("    <td height=\"25\" valign=\"middle\" bgcolor=\"#333333\" border=\"0\" background=\"/tvarts/spacer/wht_space.gif\">");
	document.write("    		<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">");
	document.write("    			<tr>");
	j=1;
	for (i=3;i<(args.length-2);i+=3) {
//		document.write("    				<td valign=\"top\" width=\"20\"><img src=\"/tvarts/spacer/wht_space.gif\" width=\"20\" height=\"1\"></td>");
		if (j==subSection)
			document.write("    				<td valign=\"middle\"><img src=\"show_titles/"+args[i]+"_in.gif\" name=\"showNavSub"+i+"\" border=\"0\"></td>");
		else
			document.write("    				<td valign=\"middle\"><a href=\""+args[i+1]+"\" target=\""+args[i+2]+"\" onmouseover=\"MM_swapImage('showNavSub"+i+"','show_titles/"+args[i]+".gif','show_titles/"+args[i]+"_on.gif')\" onmouseout=\"MM_swapImage('showNavSub"+i+"','show_titles/"+args[i]+".gif','show_titles/"+args[i]+".gif')\"><img src=\"show_titles/"+args[i]+".gif\" name=\"showNavSub"+i+"\" border=\"0\"></a></td>");
		document.write("    				<td valign=\"top\" width=\"25\"><img src=\"/tvarts/shownav/curve.gif\"></td>");
		j++;
	}
	document.write("    			</tr>");
	document.write("    		</table>");
	document.write("    </td>");
	document.write("  </tr>");
	document.write("</table>");
	document.write("<table width=\"760\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("  <tr>");
	document.write("    <td width=\"1\" height=\"1\"><img src=\"/tvarts/spacer/wht_space.gif\" width=\"1\" height=\"1\"></td><td height=\"1\" width=759 align=\"right\" border=\"0\" bgcolor=\"#999999\"><img src=\"/tvarts/spacer/wht_space.gif\" width=\"4\" height=\"1\"></td>");
	document.write("  </tr>");
	document.write("</table>");
}

function buildMainImage(type,sectionImg) {

	switch (currentSection) {
		case 1:	bgColour = moviesColourDark;
				imgType = "movies";
				break;
		case 2:	bgColour = dramasColourDark;
				imgType = "dramas";
				break;
		case 3:	bgColour = musicColourDark;
				imgType = "music";
				break;
		case 4:	bgColour = comedyColourDark;
				imgType = "comedy";
				break;
		case 5:	bgColour = awardsColourDark;
				imgType = "awards";
				break;
		case 6:	bgColour = artsColour;
				imgType = "arts";
				break;
		case 7:	bgColour = scienceColourDark;
				imgType = "science";
				break;
		default:	bgColour = "#666666";
				imgType = "movies";
				break;
	}				
	document.write("			<table cellpadding=0 cellspacing=0 border=0>");
	document.write("				<tr>");
	document.write("					<td valign=top width=550 height=4><img src=\"/tvarts/spacer/wht_space.gif\" height=3 width=550></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top width=550 height=6 bgcolor=white><img src=\"/tvarts/spacer/"+imgType+"_top.gif\" height=5 width=550></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top width=550 align=middle bgcolor=black>");
	if (type==0) {
		if(hasRightVersion)
			document.write(FlashVariable);
		else
			document.write(ImageVariable);
	}
	else
		document.write("<img src=\"images/"+sectionImg+"\">");
	document.write("</td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top width=550 height=6 bgcolor=\""+bgColour+"\"><img src=\"/tvarts/spacer/wht_space.gif\" height=1 width=550></td>");
	document.write("				</tr>");
	document.write("			</table>");
}

function buildTop(section,sectionImg) {

	switch(currentSection) {
		case 1:	bgColour=moviesColourDark;
				imgType="movies";
				break;
		case 2:	bgColour=dramasColourDark;
				imgType="dramas";
				break;
		case 3:	bgColour=musicColourDark;
				imgType="music";
				break;
		case 4:	bgColour=comedyColourDark;
				imgType="comedy";
				break;
		case 5:	bgColour=awardsColourDark;
				imgType="awards";
				break;
		case 6:	bgColour=artsColourDark;
				imgType="arts";
				break;
		case 7:	bgColour=scienceColourDark;
				imgType="science";
				break;
		default:	bgColour="#cccccc";
				break;
	}				
	buildTopBar();
	document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\" width=\"100%\" bgcolor=\""+bgColour+"\"><center>");

//	document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\" width=\"100%\" background=\"images/"+imgType+"_bg.gif\"><center>");
	document.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\" width=\"4\" bgcolor=\"white\"><img src=\"/tvarts/spacer/wht_space.gif\" height=\"1\" width=\"4\"></td><td valign=\"top\" bgcolor=\"white\">");
	buildShowNav(section);
	document.write("<table width=\"760\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("	<tr>");
	document.write("		<td width=\"550\" valign=\"top\" bgcolor=\"white\" border=\"0\">");
	if (section==0)
		buildMainImage(0,"");
	else
		buildMainImage(1,sectionImg);
	document.write("		</td>");
	document.write("		<td rowspan=\"2\" valign=\"top\" width=\"210\" border=\"0\" bgcolor=\"white\" bordercolor=\"#FFFFFF\">");
	buildFeaturesBox();
	document.write("		</td>");
	document.write("	</tr>");
	document.write("	<tr>");
}


// Parameters:	image, link, alt text
function buildCastBar() {
	var i,topImg,args=buildCastBar.arguments;

	switch(currentSection) {
		case 1:	bgColour=moviesColourDark;
				imgType="movies";
				break;
		case 2:	bgColour=dramasColourDark;
				imgType="dramas";
				break;
		case 3:	bgColour=musicColourDark;
				imgType="music";
				break;
		case 4:	bgColour=comedyColourDark;
				imgType="comedy";
				break;
		case 5:	bgColour=awardsColourDark;
				imgType="awards";
				break;
		case 6:	bgColour=artsColourDark;
				imgType="arts";
				break;
		case 7:	bgColour=scienceColourDark;
				imgType="science";
				break;
		default:	bgColour="#cccccc";
				break;
	}		
	topImg=args[0];
	buildTopBar();
	document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\" width=\"100%\" bgcolor=\""+bgColour+"\"><center>");

	document.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\" width=\"4\" bgcolor=\"white\"><img src=\"/tvarts/spacer/wht_space.gif\" height=\"1\" width=\"4\"></td><td valign=\"top\" bgcolor=\"white\">");
	buildShowNav(-1);
	document.write("<table width=\"760\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("	<tr>");
	document.write("		<td width=\"550\" valign=\"top\" bgcolor=\"white\" border=\"0\">");
	document.write("			<table cellpadding=0 cellspacing=0 border=0>");
	document.write("				<tr>");
	document.write("					<td valign=top width=550 height=4><img src=\"/tvarts/spacer/wht_space.gif\" height=3 width=550></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top width=550 height=6 bgcolor=white><img src=\"/tvarts/spacer/"+imgType+"_top.gif\" height=5 width=550></td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top align=middle width=550>");

	document.write("<table cellspacing=0 cellpadding=0 border=0>");
	document.write("	<tr>");
	for (i=1;i<(args.length-2);i+=3) {
		document.write("		<td width=60 valign=top align=middle><a href=\""+args[i+1]+"\"><img src=\"images/"+args[i]+"\" border=\"0\" alt=\""+args[i+2]+"\"></a></td>");
	}
	document.write("	</tr>");
	document.write("</table>");

	document.write("					</td>");
	document.write("				</tr>");
	document.write("				<tr>");
	document.write("					<td valign=top width=550 height=6 bgcolor=\""+bgColour+"\"><img src=\"/tvarts/spacer/wht_space.gif\" height=1 width=550></td>");
	document.write("				</tr>");
	if (topImg!="") {
		document.write("				<tr>");
		document.write("					<td valign=top width=550 align=middle bgcolor=black><img src=\"images/"+topImg+"\"></td>");
		document.write("				</tr>");
	}
	document.write("			</table>");
	document.write("		</td>");
	document.write("		<td rowspan=\"2\" valign=\"top\" width=\"210\" border=\"0\" bgcolor=\"white\" bordercolor=\"#FFFFFF\">");
	buildFeaturesBox();
	document.write("		</td>");
	document.write("	</tr>");
	document.write("	<tr>");
}

function buildBottom(section) {
	document.write("	</tr>");
	document.write("</table>");
	document.write("</td></tr></table></center>");
	document.write("</td></tr></table>");
	buildBottomBar(section);
}

function printablePopup(loc) {
	var screenW, screenH, posX, posY;
	if (parseInt(navigator.appVersion)>3) {
		screenW = screen.width;
		screenH = screen.height;
		posX=Math.floor((screenW-700)/2);
		posY=Math.floor((screenH-500)/2);
	}
	else {
		posX=0;
		posY=0;
	}
	configStr='width=700,height=500,screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',scrollbars=yes,resizable=yes,toolbar=no,menubar=no';
	window.open(loc,'printable',configStr);
}


