var categoriesToFix = new Array();
var subcategoriesToFix = new Array();
function setupAll()
{
	setupFavorites();
	setupLotteries();
	tpRenderZipLookup('tx', 'tpTopixZipLookup');
	var user = getRealCookie('oolsub');
	if(user != null)
	{
		var categoryHoldersToFix = new Array();
		if(categoriesToFix.length > 0)
		{
			categoryHoldersToFix[0] = document.getElementById('category_id_' + categoriesToFix[0]).parentNode.parentNode;
		}
		for(var i=0; i<subcategoriesToFix.length; i++)
		{
			var obj = document.getElementById('category_id_' + subcategoriesToFix[i]).parentNode.parentNode;
			if(categoryHoldersToFix[categoryHoldersToFix.length - 1] != obj)
			{
				categoryHoldersToFix[categoryHoldersToFix.length] = obj;
			}
		}
		for(var i=0; i<categoryHoldersToFix.length; i++)
		{
			setupMoveUpDown(categoryHoldersToFix[i]);
		}
	}
}

var setupFavoritesDone = false;
function setupFavorites()
{
	var table = document.getElementById('FavoritesTable');
	var its = false;
	if(table==null)
	{
		table = document.getElementById('FavoritesTableIts');
		its = true;
	}
	if(its && setupFavoritesDone)
	{
		table = document.getElementById('FavoritesTableItsFull');
	}
	var cookie = getRealCookie('pznfavorites');
	var empty = true;
	if(table!=null)
	{
		table.deleteRow(0); //safari hack
		if(cookie != null)
		{
			var moreDiv = '';
			var nr = 0;
			while(cookie.length > 0)
			{
				var value = '';
				var ind = cookie.indexOf('|');
				if(ind >= 0)
				{
					value = cookie.substring(0, ind);
					cookie = cookie.substring(ind + 1);
				}
				else
				{
					value = cookie;
					cookie = '';
				}
				ind = value.indexOf(',');
				if(ind >= 0)
				{
					var name = value.substring(ind + 1);
					var url = value.substring(0, ind);
					if(!url.toLowerCase().match('^http'))
					{
						url = 'http://' + url;
					}
					if(name=="null")
					{
						name = url;
						if(name.length>35) name=name.substring(0,35);
					}
					nr++;
					if(its && nr>12 && !setupFavoritesDone)
					{
						moreDiv += '<div align="right" style="padding:3px 6px 0px 0px;">';
						moreDiv += '<a class="blueStrong" href="javascript:void(0)" onclick="hscShowFullView(this, \'top.setupFavorites();\', true); return false;">';
						moreDiv += 'View All My Favorites <img src="/images/common/arrow_blue.gif" border="0" />';
						moreDiv += '</a>';
						moreDiv += '</div>';
						break;
					}
					if(nr%(setupFavoritesDone?2:3)==1)
					{
						table.insertRow(table.rows.length);
					}
					var row = table.rows[table.rows.length - 1];
					var cell = row.insertCell(row.cells.length);
					cell.className = "imagesOff";
					if(its)
					{
						cell.style.backgroundColor = '#ffffff';
					}
					if(nr%(setupFavoritesDone?2:3)!=0)
					{
						cell.width = (setupFavoritesDone?"50%":"33%");
					}
					//cell.onmouseover = function() { chgBg(this,'over'); }
					if(its)
					{
						cell.onmouseover = function() { chgItsBg(this,'over'); }
						cell.onmouseout = function() { chgItsBg(this,'out'); }
						//cell.onmouseout = function() { this.style.backgroundColor = '#ffffff'; }
					}
					else
					{
						cell.onmouseover = function() { chgBg(this,'over'); }
						cell.onmouseout = function() { chgBg(this,'out'); }
					}
					cell.innerHTML = '<a href="' + url + '">' + name + '</a>';
					empty = false;
				}
			}
			if(table.rows.length > 0)
			{
				var row = table.rows[table.rows.length - 1];
				while(row.cells.length < (setupFavoritesDone?2:3))
				{
	
					var cell = row.insertCell(row.cells.length);
					if(its)
					{
						cell.style.backgroundColor = '#ffffff';
					}
				}
			}
			if(its && moreDiv != '')
			{
				var div = document.createElement('div');
				div.innerHTML = moreDiv;
				table.parentNode.appendChild(div);
			}
			else if(its && nr<12 && !setupFavoritesDone)
			{
				var div = document.createElement('div');
				moreDiv = '<div align="right" style="padding:3px 6px 0px 0px;">';
				moreDiv += '<a class="blueStrong" href="/Personalization/Edit?category=fs">';
				moreDiv += 'Add More Favorites <img src="/images/common/arrow_blue.gif" border="0" />';
				moreDiv += '</a>';
				moreDiv += '</div>';
				div.innerHTML = moreDiv;
				table.parentNode.appendChild(div);
			}
		}
		if(empty)
		{
			var row = table.insertRow(0);
			var cell = row.insertCell(0);
			cell.innerHTML = '<a href=\"/Personalization/Edit?category=fs\">Click here to personalize.</a>';
			if (its){
				cell.style.backgroundColor='#ffffff';
				cell.onmouseover = function() { chgItsBg(this,'over'); }
				cell.onmouseout = function() { chgItsBg(this,'out'); }
			}
		}
	}
	setupFavoritesDone = true;
}

var setupLotteriesDone = false;
function setupLotteries()
{
	var table = document.getElementById('LotteryTable');
	var its = false;
	var fullView = false;
	if(table == null)
	{
		table = document.getElementById('LotteryTableIts');
		its = true;
	}
	if(its && setupLotteriesDone)
	{
		fullView = true;
		table = document.getElementById('LotteryTableItsFull');
	}
	if(table==null)
	{
		return;
	}
	table.deleteRow(0); //safari hack
	
	if(!its)
	{
		var tr = table.insertRow(0);
		var td = tr.insertCell(0);
		td.innerHTML = '<div id="tpLotteryZipLookup"></div>';
		tpRenderZipLookup('ly', 'tpLotteryZipLookup');
	}
	
	//sort lotteries, lotteryStates, lotteriesSort
	if(!fullView)
	{
		lotteriesSort.sort();
		var newLotteryStates = new Array();
		var newLotteries = new Array();
		for(var i=0; i<lotteriesSort.length; i++)
		{
			var text = lotteriesSort[i];
			var ind = text.lastIndexOf(':');
			text = text.substring(ind + 1);
			var j = parseInt(text);
			newLotteryStates[i] = lotteryStates[j];
			newLotteries[i] = lotteries[j];
		}
		lotteries = newLotteries;
		lotteryStates = newLotteryStates;
	}
	
	var previousState = '';
	var allmoreLottery = 'viewAllLottery';
	for(var i=0; i<lotteryStates.length; i++)
	{
		var state = lotteryStates[i];
		if(state != previousState)
		{
			if(previousState!='' && its && !fullView)
			{
				allmoreLottery = 'addMoreLottery';
				break;
			}
			var row = table.insertRow(table.rows.length);
			var td = row.insertCell(row.cells.length);
			td.valign = 'top';		
				
			if (its){			
			td.innerHTML = ' <table width="100%" cellpadding="3" cellspacing="2" border="0">'
			+ ' <tr>'
			+ ' <td colspan="2" style="padding:0px 0px 0px 4px;">'
			+ ' <span class="blueStrong">' + state + '</span>'
			+ ' </td>'
			+ ' </tr>'
			+ ' <tr>'
			+ ' <td id="LotteryDetails' + fullView + state + '" width="50%" valign="top" bgcolor="ffffff" onmouseover="chgItsBg(this,\'over\');" onmouseout="chgItsBg(this,\'out\');"> </td>'
			+ ' <td id="LotteryDetails2' + fullView + state + '" width="50%" valign="top" bgcolor="ffffff" onmouseover="chgItsBg(this,\'over\');" onmouseout="chgItsBg(this,\'out\');"> </td>'
			+ ' </tr>'
			+ ' </table>';
			}else{
			td.className = 'imagesOff';			
			td.onmouseover = function() { chgBg(this,'over'); };
			td.onmouseout = function() { chgBg(this,'out'); };
			td.onclick = function() { location.href='/News/Lottery#' + state; };			
			td.setAttribute("onMouseOver", "chgBg(this,'over');");
			td.setAttribute("onMouseOut", "chgBg(this,'out');");
			td.setAttribute("onClick", "location.href='/News/Lottery#" + state + "'");
			td.innerHTML = ' <table width="100%" cellpadding="5" cellspacing="2" border="0">'
			+ ' <tr>'
			+ ' <td colspan="2">'
			+ ' <a href="/News/Lottery#' + state + '" class="dotted">'
			+ ' <span class="title">' + state + '</span>'
			+ ' </a>'
			+ ' </td>'
			+ ' </tr>'
			+ ' <tr>'
			+ ' <td id="LotteryDetails' + fullView + state + '" width="50%" valign="top"> </td>'
			+ ' <td id="LotteryDetails2' + fullView + state + '" width="50%" valign="top"> </td>'
			+ ' </tr>'
			+ ' </table>';
			}
		}
		previousState = state;
		var stateLotteriesNum = 0;
		var stateLotteriesCurNum = 0;
		for(var j=0; j<lotteryStates.length; j++)
		{
			if(i==j)
			{
				stateLotteriesCurNum = stateLotteriesNum;
			}
			if(lotteryStates[j] == state)
			{
				stateLotteriesNum++;
			}
		}
		if(stateLotteriesNum%2==0)
		{
			stateLotteriesNum--;
		}
		var lotTd = null;
		if(stateLotteriesCurNum > (stateLotteriesNum-1)/2)
		{
			lotTd = document.getElementById('LotteryDetails2' + fullView + state);
		}
		else
		{
			lotTd = document.getElementById('LotteryDetails' + fullView + state);
		}
		lotTd.innerHTML += lotteries[i];
	}
	if(its && !fullView)
	{
		document.getElementById(allmoreLottery).style.display = 'block';
	}
	setupLotteriesDone = true;
}
function removeFirstSeparator(id)
{
	var catTable = document.getElementById('category_id_' + id);
	if(catTable != null)
	{
		var tr = catTable.parentNode;
		var holder = tr.parentNode;
		for(var i=0; i<holder.childNodes.length; i++)
		{
			var tri = holder.childNodes[i];
			if(tri.className == 'movableCategory')
			{
				if(tri == tr && i > 0)
				{
					for(var j=i-1; j>=0; j--)
					{
						var ob = holder.childNodes[j];
						if(ob.className == 'tpSeparator')
						{
							holder.removeChild(ob);
						}
					}
				}
				break;
			}
		}
	}
}
function setupMoveUpDown(holderObj)
{
	var first = true;
	var lastDownDiv = null;
	var obj2move = new Array();
	for(var i=0; i<holderObj.childNodes.length; i++)
	{
		var tri = holderObj.childNodes[i];
		if(tri.className == 'movableCategory')
		{
			var id = findCategoryId(tri);
			var module = document.getElementById('moduleEdit' + id);
			if(module != null)
			{
				obj2move[obj2move.length] = module;
			}
			var downDiv = document.getElementById('MoveDownDiv_' + id);
			var upDiv = document.getElementById('MoveUpDiv_' + id);
			downDiv.style.display = 'block';
			lastDownDiv = downDiv;
			if(first)
			{
				first = false;
				upDiv.style.display = 'none';
			}
			else
			{
				upDiv.style.display = 'block';
			}
		}
	}
	lastDownDiv.style.display = 'none';
	for(var i=0; i<obj2move.length; i++)
	{
		var obj = obj2move[i];
		obj.parentNode.removeChild(obj);
		document.body.insertBefore(obj, document.body.childNodes[0]);
	}
}

function setupMyTeams()
{
	var mt = document.getElementById('tpMtDataTable');
	var oft = document.getElementById('tpOffseazonTable');
	var oftd = document.getElementById('tpOffseazonDataTable');
	if(mt!=null && oft!=null && oftd!=null)
	{
		for(var i=1;i<mt.rows.length; i++)
		{
			var tr = mt.rows[i];
			if(tr.className=='tBgGrey') //offseason
			{
				oft.style.display='block';
				var ntr = oftd.insertRow(oftd.rows.length);
				ntr.id = tr.id;
				ntr.setAttribute("id", tr.getAttribute("id"));
				ntr.className = tr.className;
				for(var j=0; j<tr.cells.length; j++)
				{
					var td = tr.cells[j];
					var ntd = ntr.insertCell(j);
					ntd.innerHTML = td.innerHTML;
					ntd.valign = td.valign;
					ntd.align = td.align;
					ntd.colSpan = td.colSpan;
					ntd.setAttribute("colspan", td.getAttribute("colspan"));
				}
				mt.deleteRow(i);
				i--;
				if(mt.rows.length<=1)
				{
					mt.style.display='none';
				}
			}
		}
	}
}
function myTeamsReady()
{
	var tab = document.getElementById('MyTeamsAjaxHiddenDivTable');
	updateMyTeamsTable(document.getElementById('tpMtDataTableIts'), tab);
	updateMyTeamsTable(document.getElementById('tpMtDataTable'), tab);
	updateMyTeamsTable(document.getElementById('tpOffseazonDataTable'), tab);
	if(myTeamsTimer != null)
	{
		clearTimeout(myTeamsTimer);
	}
	myTeamsTimer = setTimeout('top.launchMyTeamsRequest()', 60000);
}
function updateMyTeamsTable(tab, tabAjax)
{
	if(tab==null || tabAjax==null) return;
	var i=1;
	var j=0;
	for(;i<tab.rows.length;i++)
	{
		for(;j<tabAjax.rows.length;j++)
		{
			var tr = tab.rows[i];
			var trAjax = tabAjax.rows[j];
			if(tr.id==trAjax.id)
			{
				while(tr.cells.length > 0)
				{
					tr.deleteCell(0);
				}
				for(var k=0; k<trAjax.cells.length; k++)
				{
					var tdAjax = trAjax.cells[k];
					var ntd = tr.insertCell(k);
					ntd.innerHTML = tdAjax.innerHTML;
					ntd.valign = tdAjax.valign;
					ntd.align = tdAjax.align;
					ntd.colSpan = tdAjax.colSpan;
					ntd.setAttribute("colspan", tdAjax.getAttribute("colspan"));
				}
				break;
			}
		}
	}
}

var renderDetailed=true;
var cityIndex=0;

function getCities(){
  //example:
  //var cookieValue="Accord, NY&Alfred Station, NY&Philadelphia, NY&Hawaii Volcanoe, HI&Standard City, IL&";
  var cookieValue=getRealCookie("pznws");
//  alert("cookie value: "+cookieValue+"\n"+document.cookie);
  if (cookieValue==null) return null;
  var cities=new Array();
  var currentIndex=0;
  var cityIndex=0;
  while(cookieValue!=null && currentIndex<cookieValue.length){
     var ampIndex=cookieValue.indexOf("&",currentIndex);
     if (ampIndex==-1) break;
     var city=cookieValue.substring(currentIndex,ampIndex);
     cities[cityIndex]=city;
     currentIndex=ampIndex;
     cityIndex++
     currentIndex++;
     
  }
  if (currentIndex<cookieValue.length){
      var city=cookieValue.substring(currentIndex);
      cities[cityIndex]=city;
  }
  //alert("final cities: "+cities);
  return cities;
}
var cities=getCities();

function renderWeather(station, location, overlook, sky, currentTemp, highTemp, lowTemp,asof,wind,humidity,pressure,weatherImage,weatherImageSmall, defaultWeather){
  weatherImageSmall=weatherImage;
  try{ 
    
    if (cities) location=cities[cityIndex];
//    alert("cities: "+cities+"\n"+cityIndex+"\n,location after: "+location);
    if (location=="Central Park, NJ") location="New York, NY";
    
  }catch(x){}
  if (renderDetailed){
      renderHomeWeatherDetail(station, location, overlook, sky, currentTemp, highTemp, lowTemp,asof,wind,humidity,pressure,weatherImage,defaultWeather);
      //alterWeatherSectionLink(station,location);
  }    
  else {
    renderHomeWeatherShort(station, location, overlook, sky, currentTemp, highTemp, lowTemp,asof,wind,humidity,pressure,weatherImage,weatherImageSmall);
  }  

}

function alterWeatherSectionLink(station,location){
  try{
    var aSectionTable = document.getElementById('category_id_ns/wr');
    allLinks = aSectionTable.getElementsByTagName('a');
    for (var i = 0; i < allLinks.length; i++) {
      thisLink = allLinks[i];
      if (thisLink.href=="/News/Weather") thisLink.href="/News/Weather?station="+station+"&location="+escape(location);
    }
  }catch(x){ }
}

var tp_weatherTable_num = 0;
function renderHomeWeatherShort(station, location, overlook, sky, currentTemp, highTemp, lowTemp,asof,wind,humidity,pressure,weatherImage,weatherImageSmall){
	var table = document.getElementById('tp_weatherTable');
	if(table != null)
	{
		tp_weatherTable_num++;
		if(tp_weatherTable_num==1)
		{
			var div = document.getElementById('tpDefaultWeatherDiv2');
			if(div!=null) div.style.display='none';
		}
		if(tp_weatherTable_num==2)
		{
			var tpNews12image = document.getElementById('tpNews12image');
			if(tpNews12image!=null)
			{
				tpNews12image.src = '/images/News12/logo_news12_index.gif';
			}
		}
		var row = null;
		if(tp_weatherTable_num <= 2)
		{
			row = table.insertRow(table.rows.length);
			row.valign = 'middle';
			for(var i=0;i<2;i++)
			{
				var cell = row.insertCell(row.cells.length);
				cell.height = '30px';
				cell.valign = 'middle';
				cell.width = '50%';
				cell.innerHTML = '&nbsp;';
				if(table.rows.length==1)
				{
					cell.className = 'topBorderLight bottomBorderLight';
				}
				else
				{
					cell.className = 'bottomBorderLight';
				}
			}
		}
		row = table.rows[parseInt((tp_weatherTable_num-1)/2)];
		var cell = row.cells[1-tp_weatherTable_num%2];
		if(tp_weatherTable_num==2 || tp_weatherTable_num==4) cell.className = cell.className + ' leftBorderLight';
		cell.innerHTML = '<table width="100%"><tr><td width="60%"><span class="title">&nbsp;<a href="/News/Weather?station='+escape(station)+'&location='+escape(location)+'">'+location+'<\/a><\/span><\/td><td width="20%"><img src="http:\/\/img.optimum.net\/images\/weather\/icons_small\/'+weatherImageSmall+'" border="0" width="21" height="21"\/><\/td><td width="25%"><span class="highTemp">' + currentTemp + '&deg;F<\/span><\/td><\/tr><\/table>';
		
		if(tp_weatherTable_num < 4)
		{
			var cell2 = table.rows[parseInt(tp_weatherTable_num/2)].cells[tp_weatherTable_num%2];
			var html = '&nbsp;&nbsp;';
			if(tp_weatherTable_num!=2) html += '&nbsp;&nbsp;&nbsp;';
			html += '<a class="blueStrong" href="/Personalization/Edit?category=ns#Weather">';
			if(tp_weatherTable_num==3) html += 'Add another city';
			else html += 'Add More Cities';
			html += ' <img src="/images/common/arrow_blue.gif" border="0"/></a>'
			cell2.innerHTML = html;
		}
	}
}

function renderPrefix(){
  var str='';
  str+='<table width="100%" cellpadding="2" cellspacing="0" border="0" bgcolor="#e5e5e5">';
  str+='<tr>';
  str+='	<td style="padding-top:0px;">			';
  str+='		<table width="100%" cellpadding="5" cellspacing="2" border="0">';
  document.write(str);
}

function renderPostifx(){
  var str='';
  str+='		<\/table>';
  str+='	<\/td>';
  str+='<\/tr>';
  str+='<\/table>';
  document.write(str);
}

function renderHomeWeatherDetail(station, location, overlook, sky, currentTemp, highTemp, lowTemp,asof,wind,humidity,pressure,weatherImage,defaultWeather){
  if(defaultWeather)
  {
	  var div = document.getElementById('tpDefaultWeatherDiv');
	  if(div!=null) div.style.display='block';
  }
  else
  {
 	  var div = document.getElementById('tpDefaultWeatherDiv2');
	  if(div!=null) div.style.display='block';
  }
  var obj = document.getElementById('tp_weather1_city');
  if(obj != null) obj.innerHTML = '<a href="/News/Weather?station='+escape(station)+'&location='+escape(location)+'">'+location+'<\/a>';
  obj = document.getElementById('tp_weather1_asof');
  if(obj != null) obj.innerHTML = asof;
  obj = document.getElementById('tp_weather1_overlook');
  if(obj != null) obj.innerHTML = overlook;
  obj = document.getElementById('tp_weather1_seasonalLink1');
  if(obj != null) obj.innerHTML = '<a href="'+getSeasonalLinks()[0][0]+'" class="blue">'+getSeasonalLinks()[0][1]+'<\/a>'
  obj = document.getElementById('tp_weather1_seasonalLink2');
  if(obj != null) obj.innerHTML = '<a href="'+getSeasonalLinks()[1][0]+'" class="blue">'+getSeasonalLinks()[1][1]+'<\/a>'
  obj = document.getElementById('tp_weather1_temp');
  if(obj != null) obj.innerHTML = currentTemp + '&deg;F';
  obj = document.getElementById('tp_weather1_tempImg');
  if(obj != null) obj.src = 'http:\/\/img.optimum.net\/images\/weather\/icons_large\/'+weatherImage;
}

var seasonalLinks=new Array(5);
seasonalLinks[0]=new Array(['http:\/\/cablevision.weather.com\/golf?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=Golf','Golf Outlook'],['http:\/\/cablevision.weather.com\/boatandbeach?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=BoatBeach','Boating Forecast']);
//seasonalLinks[1]=new Array(['http:\/\/cablevision.weather.com\/vacation?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=VacationPlanner','Summer Travel'],['http:\/\/cablevision.weather.com\/skin?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=SkinProtection','Sun Safety Tips']);
seasonalLinks[1]=new Array(['http:\/\/cablevision.weather.com\/hurricanecentral?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=Tropical','Hurricane Central'],['http:\/\/cablevision.weather.com\/vacation?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=VacationPlanner','Summer Travel']);
seasonalLinks[2]=new Array(['http:\/\/cablevision.weather.com\/fallfoliage?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=FallFoliage','Fall Leaf Color'],['http:\/\/cablevision.weather.com\/schoolday?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=Schoolday','Bus Stop Forecast']);
seasonalLinks[3]=new Array(['http:\/\/cablevision.weather.com\/ski?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=Ski','Local Ski Resorts'],['http:\/\/forgetaway.weather.com\/?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=VacationRentals','Find a Vacation Rental']);
seasonalLinks[4]=new Array(['http:\/\/cablevision.weather.com\/flights?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=BusinessTraveler','Flight Arrivals'],['http:\/\/cablevision.weather.com\/vacation?par=cablevision&site=optonline.net&cm_ven=Cablevision&cm_cat=www.optonline.net&cm_pla=WxPage&cm_ite=VacationPlanner','Vacation Planner']);

function getSeasonalLinks(){
    var d=new Date();
	var month = d.getMonth() + 1;
	var date = d.getDate();
	if ((month == 3 && date >= 22) || month == 4 || month == 5 || (month == 6 && date < 15))
	{ 
		return seasonalLinks[0];
	}
	else if ((month == 6 && date >= 15) || month == 7 || month == 8 || (month == 9 && date < 15))
	{
		return seasonalLinks[1];
	}
	else if ((month == 9 && date >= 15) || month == 10)
	{
		return seasonalLinks[2];
	}
	else if (month >= 10 || month <= 2 || (month == 3 && date < 22))
	{
		return seasonalLinks[3];
	}
	else
	{
		return seasonalLinks[4];
	}
  }
//
