
var panelOffset = 0;function HomePanels(offset)
{
if (offset != null)
{
panelOffset = offset;
}new Ajax.Request('/AJAX/HomePanels', {
method : 'get',
parameters : {
offset : panelOffset
},
onSuccess:function(transport)
{
$('HomePanelContent').innerHTML = transport.responseText;
}
});
}var sidebarOffset = 0;function fetchSidebar(Section_id, offset)
{
if (offset != null)
{
sidebarOffset = offset;
}new Ajax.Request('/AJAX/Sidebar', {
method : 'get',
parameters : {
section : Section_id,
offset : sidebarOffset
},
onSuccess:function(transport)
{
$('SidebarArticles').innerHTML = transport.responseText;
}
});
}function moveArchiveList(boxNo, arg)
{
var destDiv = $('feature' + boxNo);
$('articleArchive').style.display = 'none';if (destDiv)
{
destDiv.appendChild($('articleArchive'));
Effect.Appear('articleArchive', {duration:.33});if (arg != undefined)
{
articleList(arg, 'popup');
}
}
}function articleList(arg, mode)
{
new Ajax.Request('/AJAX/Articles', {
method : 'get',
parameters : {
sectionid_or_date : arg,
popup_or_page : mode
},
onCreate:showArchiveLoader(),
onComplete:function(transport)
{
if (transport.responseText.length > 2)
{
$('ArticleList').innerHTML = transport.responseText;
} else {
$('ArticleList').innerHTML = '<br />&nbsp;&nbsp;&nbsp;There are no articles to list in this section yet. Please check back again soon!<br /><br />';
}
}
});}function showArchiveLoader()
{
$('ArticleList').innerHTML = '<table cellspacing="0" cellpadding="7" border="0" width="100%"><tr><td align="center"><img src="/images/wait-round-gray.gif" alt="" width="31" height="31" border="0" /><br /></td></tr></table>';
}var lastAppendedTo = '';function moveCalendarPop(boxNo, date)
{
var destDiv = $('calcell' + boxNo);
lastAppendedTo = 'calcell' + boxNo;
$('calPopup').style.display = 'none';if (destDiv)
{
destDiv.appendChild($('calPopup'));
$('calPopup').style.top = '-50px';
Effect.Appear('calPopup', {duration:.33});if (date != undefined)
{
eventList(date); 
}
}
}function readCalFilters()
{
var calsList = '';
var calsColl = $$('input[id^=calendar_]');
if (calsColl.length > 0)
{
calsColl.each(function(o)
{
if (o.checked == true)
{
calsList += o.value + ',';
}
});
}return(calsList.substring(0, (calsList.length-1)));
}var showCalMonth = '02';
var showCalYear = '2012';function setCalMonthAndYear(month, year)
{
if (month == undefined)
{
showCalMonth =  '02';
} else {
showCalMonth = month;
}if (year == undefined)
{
showCalYear = '2012'
} else {
showCalYear = year;
}
}function loadCalendar(viaSearch)
{
new Ajax.Request('/AJAX/Calendar', {
method : 'get',
parameters : {
section_id : calSectionId,
group_id : showCalGroup,
month : showCalMonth,
year : showCalYear,
keyword : ($F('CalKeyword') ? $F('CalKeyword') : ''),
calIdList : (viaSearch ? readCalFilters() : null)
},
onCreate:calendarLoader(),
onComplete:function(transport)
{
$('CalendarBody').innerHTML = transport.responseText;
}
});}function calendarLoader()
{
$('CalendarBody').innerHTML = '<table cellspacing="0" cellpadding="7" border="0" width="100%"><tr><td align="center" valign="middle"><img src="/images/calendar_load.gif" alt="" width="32" height="32" border="0" /><br /></td></tr></table>';
}function eventList(date)
{new Ajax.Request('/AJAX/Calendar/Events', {
method : 'get',
parameters : {
date : date,
group_id : showCalGroup
},
onCreate:showEventLoader(),
onComplete:function(transport)
{
$('EventList').innerHTML = transport.responseText;
}
});
}function showEventLoader()
{
$('EventList').innerHTML = '<table cellspacing="0" cellpadding="7" border="0" width="100%"><tr><td align="center"><img src="/images/wait-roundmeter.gif" alt="" width="31" height="31" border="0" /><br /></td></tr></table>';
}var lastCalTab = '0';
var lastCalTabImg = '';function swapCalendarTab(tabId, sectionId, onImage, offImage)
{
document.getElementById('CalTab' + tabId + '_L').className = 'caltab_on_l';
document.getElementById('CalTab' + tabId).className = 'caltab_on';
document.getElementById('CalTab' + tabId + '_R').className = 'caltab_on_r';
document.getElementById('CalTab' + tabId + '_Img').src = onImage;if (lastCalTab != tabId)
{
document.getElementById('CalTab' + lastCalTab + '_L').className = 'caltab_off_l';
document.getElementById('CalTab' + lastCalTab).className = 'caltab_off';
document.getElementById('CalTab' + lastCalTab + '_R').className = 'caltab_off_r';
document.getElementById('CalTab' + lastCalTab + '_Img').src = lastCalTabImg;lastCalTab = tabId;
lastCalTabImg = offImage;
}}var lastExpand = '';function showSubSections(sectionId)
{
if (lastExpand != sectionId)
{
if ($('feature' + lastExpand))
{
Effect.BlindUp('feature' + lastExpand, {duration:.25});
}
lastExpand = sectionId;
}Effect.BlindDown('feature' + sectionId, {duration:.33});
}function eventDetailPop(eventId)
{
if (eventId)
{
var eventWin = window.open('/events/' + eventId, '_blank', 'width=450,height=450,scrollbars');
}
}var lastZoomed = 0;
var imageSlides = new Array();function setupImageSlides()
{
var imgColl = $$('div[id^=Image_]');
if (imgColl.length > 0)
{
imgColl.each(function(o){ imageSlides.push(o.id); } );if (imgColl.length > 1)
{
setTimeout("Effect.BlindDown('ImagesControls', {duration:.5});", 500);
updateSlideCounter();
}
}
}function cycleImageSlides(direction)
{
var newZoom = null;switch (direction)
{
case 'prev' :
if (imageSlides[(lastZoomed-1)] != undefined)
{
newZoom = (lastZoomed-1);
}
break;case 'next' :
if (imageSlides[(lastZoomed+1)] != undefined)
{
newZoom = (lastZoomed+1);
}
break;
}if (imageSlides[newZoom] != undefined)
{
$(imageSlides[lastZoomed]).style.display = 'none';
$(imageSlides[newZoom]).style.display = 'inline';
lastZoomed = newZoom;
updateSlideCounter();
}
}function updateSlideCounter()
{
$('SlideCounter').innerHTML = 'Photo <b>' + (lastZoomed + 1) + '</b> of <b>' + imageSlides.length + '</b>';
}function zoomImageSlide()
{}var lastTab = 'News';var News = new Array();
News['on'] = '/imgcache/fee426d2d684f64a1b10da6a012975d9.gif';
News['off'] = '/imgcache/2735db639224b82c718b9dd1ad1de7eb.gif';var Political = new Array();
Political['on'] = '/imgcache/b1210b4a21b3bd5ae7552d2fc53a1cdb.gif';
Political['off'] = '/imgcache/0ce4b24cc965e5dd8628a5c1d55509a7.gif';var Food = new Array();
Food['on'] = '/imgcache/856b332536a1bda7ae8c584fb6682a76.gif';
Food['off'] = '/imgcache/bd346aa122b037e359dbfbf67f121098.gif';var Arts = new Array();
Arts['on'] = '/imgcache/2e73d2fc5d4ded2dffbb349014eb5711.gif';
Arts['off'] = '/imgcache/b3cee0df526b722822251d501b296904.gif';var Music = new Array();
Music['on'] = '/imgcache/f0516a9de356c7d1ecee7e7a9f3cd5d1.gif';
Music['off'] = '/imgcache/62978617b167bd967a53ff8c1ebfdc30.gif';var Popular = new Array();
Popular['on'] = '/imgcache/65c97ab83c46de99e649847fb06aa5bd.gif';
Popular['off'] = '/imgcache/af34ddf73ef5de7a2e6592af17d0719c.gif';
var CultureIds = new Array();
CultureIds['News'] = 1;
CultureIds['Political'] = 34;
CultureIds['Food'] = 4;
CultureIds['Arts'] = 6;
CultureIds['Music'] = 5;
CultureIds['Popular'] = 3;var CultureKeys = new Array();
CultureKeys[0] = 'News';
CultureKeys[1] = 'Political';
CultureKeys[2] = 'Food';
CultureKeys[3] = 'Arts';
CultureKeys[4] = 'Music';
CultureKeys[5] = 'Popular';function CultureSwap(activate)
{
if (activate == '' || activate == undefined)
{
alert('Error! Invalid area passed in for activation.');
} else {
if (lastTab != activate)
{
swapStyle('Culture' + lastTab, 'navOFF');
$(lastTab + 'Btn').src = eval(lastTab + '[\'off\']');swapStyle('Culture' + activate, 'navON');
$(activate + 'Btn').src = eval(activate + '[\'on\']');lastTab = activate;
}CultureLoad(activate);
}
}function CultureLoad(section)
{if (section == '' || section == undefined)
{
alert('Error! Invalid section passed for loading.');
} else {
new Ajax.Updater('CultureContent', '/AJAX.php', {
method : 'post',
parameters : {
'query' : 'CultureContent',
'Section_id' : CultureIds[section]
}
});
}}function ToggleCultureWait(mode)
{
switch (mode)
{
case 'off' :
Effect.Fade('CultureWait', { duration : 0.25 });break;case 'on' :
Effect.Appear('CultureWait', { duration : 0.25 });break;
}
}var currCulTab = 0;
var cycleTimer = null;function InitCultureCycle()
{
cycleTimer = setInterval("CycleCultureTabs()", 5000);
}function StopCultureCycle()
{
clearInterval(cycleTimer);
}function CycleCultureTabs()
{
var nextTab = currCulTab + 1;
if (nextTab < CultureKeys.length)
{
currCulTab = nextTab;
} else {
currCulTab = 0;
}
 
CultureSwap(CultureKeys[currCulTab]);
}

