var g_modulePopularListWidgetCurrList = 1; //!< modules are 1 indexed
var g_modulePopularListWidgetTotalLists = 0; //!< total number of lists items

/*--------------------------------------------------------------------------*/
/**
	@brief Displays next list.
 */
function PopularListWidgetNext() { /* <<<( */

	// check that there are lists to display
	if (0 < g_modulePopularListWidgetTotalLists) {

		// hide current list
		if (null != document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList)) {
			document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList).style.display = 'none';
		}

		// move to next list
		g_modulePopularListWidgetCurrList++;

		// determine if at end of list
		if (g_modulePopularListWidgetTotalLists < g_modulePopularListWidgetCurrList) {

			// reset to starting list
			g_modulePopularListWidgetCurrList = 1;
		}

		// display next list
		if (null != document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList)) {
			document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList).style.display = 'block';
		}
	}

	return;
} /* )>>> */

/*--------------------------------------------------------------------------*/
/**
	@brief Displays previous list.
 */
function PopularListWidgetPrev() { /* <<<( */

	// check that there are lists to display
	if (0 < g_modulePopularListWidgetTotalLists) {

		// hide current list
		if (null != document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList)) {
			document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList).style.display = 'none';
		}

		// move to previous list
		g_modulePopularListWidgetCurrList--;

		// determine if at end of list
		if (1 > g_modulePopularListWidgetCurrList) {

			// reset to starting list
			g_modulePopularListWidgetCurrList = g_modulePopularListWidgetTotalLists;
		}

		// display previous list
		if (null != document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList)) {
			document.getElementById('module-popular-list-container-' + g_modulePopularListWidgetCurrList).style.display = 'block';
		}
	}

	return;
} /* )>>> */


