var g_modulePromoCurrPromo = 1; //!< modules are 1 indexed
var g_modulePromoTotalPromos = 0; //!< total number of promo items

/*--------------------------------------------------------------------------*/
/**
	@brief Displays next promotional item.
 */
function PromoNext() { /* <<<( */

	// check that there are promos to display
	if (0 < g_modulePromoTotalPromos) {

		// hide current promo
		if (null != document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo)) {
			document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo).style.display = 'none';
		}

		// move to next promo
		g_modulePromoCurrPromo++;

		// determine if at end of promo list
		if (g_modulePromoTotalPromos < g_modulePromoCurrPromo) {

			// reset to starting promo
			g_modulePromoCurrPromo = 1;
		}

		// display next promo
		if (null != document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo)) {
			document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo).style.display = 'block';
		}
	}

	return;
} /* )>>> */

/*--------------------------------------------------------------------------*/
/**
	@brief Displays previous promotional item.
 */
function PromoPrev() { /* <<<( */

	// check that there are promos to display
	if (0 < g_modulePromoTotalPromos) {

		// hide current promo
		if (null != document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo)) {
			document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo).style.display = 'none';
		}

		// move to previous promo
		g_modulePromoCurrPromo--;

		// determine if at end of promo list
		if (1 > g_modulePromoCurrPromo) {

			// reset to starting promo
			g_modulePromoCurrPromo = g_modulePromoTotalPromos;
		}

		// display previous promo
		if (null != document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo)) {
			document.getElementById('module-promo-content-container-' + g_modulePromoCurrPromo).style.display = 'block';
		}
	}

	return;
} /* )>>> */


