

/**
 * This function makes it less verbose to get an element by its id.
 * @param {param} elementId HTML element supplied to function.
 * @return {object} Returns the object associated with the id submitted.
 */
function $(elementId) {
  return document.getElementById(elementId);
}


/**
 * This function toggles the promo layer on the home page.
 * @param {string} layer Users promo selection.
 */
function togglePromo(layer){
  var promoCount = $('promo-control').getElementsByTagName('li').length;

  for (var x = 1; x < promoCount + 1; x++) {
    $('ga-promo-' + x).style.display = 'none';
    $('ptb-' + x).style.color = '#0083c8';
    $('ptb-' + x).style.backgroundColor = '#fff';
  }

  gweb.fx.fadeIn($('ga-promo-' + layer), 100);
  $('ga-promo-' + layer).style.display = 'block'
  $('ptb-' + layer).style.color = '#fff';
  $('ptb-' + layer).style.backgroundColor = '#0083c8';
}


