/*
takes a number indicating which set is to show (1-4)
sets display for that set to block
& calls the date function 

this would be called on page load, but the js error from the ads prevents that from working. instead its called right below the html chunk inline.
*/
function tarotDivSpot(activeNum)
{
  var activeSet = "tarotSpotSet" + activeNum;
  tarotDivPrintDate(activeNum);
  document.getElementById(activeSet).style.display = "block";
}

// prints today's date to the active date div
// each set has its own date div
// called by tarotDivSpot function above
function tarotDivPrintDate(activeNum)
{
  var activeDateElem = "spotlightDate" + activeNum;
  var today = new Date();
  var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
  var dateString = "";
  dateString += dayNames[today.getDay()] + ", ";
  dateString += monthNames[today.getMonth()] + " ";
  dateString += today.getDate() + ", ";
  dateString += today.getFullYear();
  document.getElementById(activeDateElem).innerHTML = dateString;
}

// called by clicking on the tab links
// activeTab is the tab that should be revealed
// activeSet is the set of tabs appearing on this page
// both are numbers, 1-3 for tab & 1-4 for set 
function tarotDivSwitcher(activeTab, activeSet)
{
  // hide all tabs - there's 3
  var hideTab;
  for (var i=1; i<=3; i++)
  {
    hideTab = "set" + activeSet + "tab" + i;
    //alert(hideTab);
    document.getElementById(hideTab).style.display = "none";
  }
  
  // show the one that needs to be on
  var showTab = "set" + activeSet + "tab" + activeTab;
  document.getElementById(showTab).style.display = "block";
}