/*
Channels_l	= new Array("New", "Fashion", "Chic News", "Lifestyle", "Dining", "Home", "NYC Guide");
Channels_m	= new Array("Appetizers", "Entrée", "Dessert", "Wine", "Cocktails", "Cook Book", "Autos", "Hotels");
Channels_s	= new Array("Fashion Week", "Models", "Accessories", "Beauty", "Men", "Art", "Books", "Dancing");
Channel_l_HREFs	= new Array(400, 77, 213, 57, 16, 362, 0);
Channel_m_HREFs	= new Array(2, 1, 3, 10, 4, 0, 173, 32);
Channel_s_HREFs	= new Array(145, 62, 89, 78, 87, 54, 23, 207);
*/

Channels_l	= new Array("New", "Fashion", "Beauty", "FashionWeek", "Models", "Dining");
Channels_m	= new Array("Lifestyle", "Home", "Accessories", "Men", "Art", "Autos", "Hotels", "Dancing");
Channels_s	= new Array("Appetizers", "Entrée", "Dessert", "Wine", "Cocktails", "Archive");
Channel_l_HREFs	= new Array(400, 77, 78, 145, 62, 16);
Channel_m_HREFs	= new Array(57, 362, 89, 87, 54, 173, 32, 207);
Channel_s_HREFs	= new Array(2, 1, 3, 10, 4, 213);

if (navigator.appVersion.indexOf("MSIE") == -1) {height_adjust = ' style="margin-top: 2px"';} else {height_adjust = ' style="margin-top: 3px"';}

function display_channels(v)
{
	SelectedChannel	= ChannelNames[v - 1];
	TitleName	= TitleNames[v - 1];
	PictureName	= PictureNames[v - 1];
	Participant	= Participants[v - 1];
	Restaurant	= Restaurants[v - 1];

	Channels_l_list = '<ul class="channels_l">';
	for (j = 0; j < Channels_l.length; j++)
	{
		ChannelName = Channels_l[j];
		if (ChannelName != 'NYC Guide')
		{ChannelLink = '<a href="JavaScript:;" onClick="JavaScript: browse_channels(' + Channel_l_HREFs[j] + ', ' + v + '); initScrollLayer();">';}
		else
		{ChannelLink = '<a href="/restaurants">';}

		if (SelectedChannel != ChannelName)
		{Channels_l_list += '<li>' + ChannelLink + ChannelName.toUpperCase() + '</a></li>';}
		else
		{Channels_l_list += '<li class="active_channel">' + ChannelName.toUpperCase() + '</a></li>';}
	}
	Channels_l_list += '</ul>';

	Channels_m_list = '<ul class="channels_m"' + height_adjust + '>';
	for (j = 0; j < Channels_m.length; j++)
	{
		ChannelName = Channels_m[j];
		switch (ChannelName)
		{
			case "Cook Book": ChannelLink = '<a href="/books">'; break;
			//case "iPod": ChannelLink = '<a href="/ipod">'; break;
			default: ChannelLink = '<a href="JavaScript:;" onClick="JavaScript: browse_channels(' + Channel_m_HREFs[j] + ', ' + v + '); initScrollLayer();">';
		}

		if (SelectedChannel != ChannelName)
		{Channels_m_list += '<li>' + ChannelLink + ChannelName.toUpperCase() + '</a></li>';}
		else
		{Channels_m_list += '<li class="active_channel">' + ChannelName.toUpperCase() + '</a></li>';}
	}
	Channels_m_list += '</ul>';

	Channels_s_list = '<ul class="channels_s"' + height_adjust + '>';
	for (j = 0; j < Channels_s.length; j++)
	{
		ChannelName = Channels_s[j];
		if (SelectedChannel != ChannelName)
		{Channels_s_list += '<li><a href="JavaScript:;" onClick="JavaScript: browse_channels(' + Channel_s_HREFs[j] + ', ' + v + '); initScrollLayer();">' + ChannelName.toUpperCase() + '</a></li>';}
		else
		{Channels_s_list += '<li class="active_channel">' + ChannelName.toUpperCase() + '</a></li>';}
	}
	Channels_s_list += '</ul>';

	document.getElementById("channels").innerHTML = Channels_l_list + Channels_m_list + Channels_s_list;

	ClipsList = "\n\r" + '<div style="clear: both; height: 75px"><div style="height: 72px; border: 1px solid #000000; background-color: #B1B1B1"><div style="float: left; width: 136px"><img src="images/video/icon_play_clip.png" width="128" height="72" border="0" style="background-image: url(\'images/video/thumbnails/' + PictureName + '\'); behavior: url(\'styles/pngbehavior.htc\');" alt="' + TitleName + '" title="' + TitleName + '"></div><div class="clipThumb && arial" style="float: left; width: 226px"><h3>' + TitleName + '</h3>' + Participant + ' -- ' + Restaurant + '</div></div></div>' + "\n\r";
	for (i = ChannelNames.length; i >= 0; i--)
	{
		if (ChannelNames[i] == SelectedChannel)
		{
			VideoClipID	= VideoClipIDs[i];
			if (VideoClipID != v)
			{
				TitleName	= TitleNames[i];
				PictureName	= PictureNames[i];
				Participant	= Participants[i];
				Restaurant	= Restaurants[i];
				ClipsList += '<div style="clear: both; height: 75px"><div class="hand" style="height: 72px; border: 1px solid #000000" onMouseOver="javascript:this.style.backgroundColor=\'#CCCCCC\'" onMouseOut="javascript:this.style.backgroundColor=\'\'" onClick="javascript:location.href=\'?v=' + VideoClipID + '\';"><div style="float: left; width: 136px"><img src="images/video/icon_play_clip.png" width="128" height="72" border="0" style="background-image: url(\'images/video/thumbnails/' + PictureName + '\'); behavior: url(\'styles/pngbehavior.htc\');" alt="' + TitleName + '" title="' + TitleName + '"></div><div class="clipThumb && arial" style="float: left; width: 226px"><h3>' + TitleName + '</h3>' + Participant + ' -- ' + Restaurant + '</div></div></div>' + "\n\r";
			}
		}
	}
	document.getElementById("lyr1").innerHTML = ClipsList;
}

function browse_channels(vv, v)
{
	SelectedChannel	= ChannelNames[vv - 1];
	TitleName	= TitleNames[vv - 1];
	PictureName	= PictureNames[vv - 1];
	Participant	= Participants[vv - 1];
	Restaurant	= Restaurants[vv - 1];

	Channels_l_list = '<ul class="channels_l">';
	for (j = 0; j < Channels_l.length; j++)
	{
		ChannelName = Channels_l[j];
		if (ChannelName != 'NYC Guide')
		{ChannelLink = '<a href="JavaScript:;" onClick="JavaScript: browse_channels(' + Channel_l_HREFs[j] + ', ' + v + '); initScrollLayer();">';}
		else
		{ChannelLink = '<a href="/restaurants">';}

		if (SelectedChannel != ChannelName)
		{Channels_l_list += '<li>' + ChannelLink + ChannelName.toUpperCase() + '</a></li>';}
		else
		{Channels_l_list += '<li class="active_channel">' + ChannelName.toUpperCase() + '</a></li>';}
	}
	Channels_l_list += '</ul>';

	Channels_m_list = '<ul class="channels_m"' + height_adjust + '>';
	for (j = 0; j < Channels_m.length; j++)
	{
		ChannelName = Channels_m[j];
		switch (ChannelName)
		{
			case "Cook Book": ChannelLink = '<a href="/books">'; break;
			case "iPod": ChannelLink = '<a href="/ipod">'; break;
			default: ChannelLink = '<a href="JavaScript:;" onClick="JavaScript: browse_channels(' + Channel_m_HREFs[j] + ', ' + v + '); initScrollLayer();">';
		}

		if (SelectedChannel != ChannelName)
		{Channels_m_list += '<li>' + ChannelLink + ChannelName.toUpperCase() + '</a></li>';}
		else
		{Channels_m_list += '<li class="active_channel">' + ChannelName.toUpperCase() + '</a></li>';}
	}
	Channels_m_list += '</ul>';

	Channels_s_list = '<ul class="channels_s"' + height_adjust + '>';
	for (j = 0; j < Channels_s.length; j++)
	{
		ChannelName = Channels_s[j];
		if (SelectedChannel != ChannelName)
		{Channels_s_list += '<li><a href="JavaScript:;" onClick="JavaScript: browse_channels(' + Channel_s_HREFs[j] + ', ' + v + '); initScrollLayer();">' + ChannelName.toUpperCase() + '</a></li>';}
		else
		{Channels_s_list += '<li class="active_channel">' + ChannelName.toUpperCase() + '</a></li>';}
	}
	Channels_s_list += '</ul>';

	document.getElementById("channels").innerHTML = Channels_l_list + Channels_m_list + Channels_s_list;

	ClipsList = '';
	for (i = ChannelNames.length; i >= 0; i--)
	{
		if (ChannelNames[i] == SelectedChannel)
		{
			VideoClipID	= VideoClipIDs[i];
			TitleName	= TitleNames[i];
			PictureName	= PictureNames[i];
			Participant	= Participants[i];
			Restaurant	= Restaurants[i];

			if (VideoClipID != v)
			{ClipsList += '<div style="clear: both; height: 75px"><div class="hand" style="height: 72px; border: 1px solid #000000" onMouseOver="javascript:this.style.backgroundColor=\'#CCCCCC\'" onMouseOut="javascript:this.style.backgroundColor=\'\'" onClick="javascript:location.href=\'?v=' + VideoClipID + '\';"><div style="float: left; width: 136px"><img src="images/video/icon_play_clip.png" width="128" height="72" border="0" style="background-image: url(\'images/video/thumbnails/' + PictureName + '\'); behavior: url(\'styles/pngbehavior.htc\');" alt="' + TitleName + '" title="' + TitleName + '"></div><div class="clipThumb && arial" style="float: left; width: 226px"><h3>' + TitleName + '</h3>' + Participant + ' -- ' + Restaurant + '</div></div></div>' + "\n\r";}
			else
			{ClipsList += "\n\r" + '<div style="clear: both; height: 75px"><div style="height: 72px; border: 1px solid #000000; background-color: #B1B1B1"><div style="float: left; width: 136px"><img src="images/video/icon_play_clip.png" width="128" height="72" border="0" style="background-image: url(\'images/video/thumbnails/' + PictureName + '\'); behavior: url(\'styles/pngbehavior.htc\');" alt="' + TitleName + '" title="' + TitleName + '"></div><div class="clipThumb && arial" style="float: left; width: 226px"><h3>' + TitleName + '</h3>' + Participant + ' -- ' + Restaurant + '</div></div></div>' + "\n\r";}
		}
	}
	document.getElementById("lyr1").innerHTML = ClipsList;
}
