var indexToShow = 0;
var challenges = new Array();

challenges[0] = new Array('<img src="img/WorldSeries.jpg" alt="World Series" />', "<p>Most concierges would shudder at the call that came to us last year, a whopping 12 hours before the World Series opener. The request: two tickets, preferably lower level. The caller: A CEO trying to surprise his daughter. No pressure, right? No problem for Snap.</p>", "Take me out to the World Series, Game 1");

challenges[1] = new Array('<img src="img/MelGibson.jpg" alt="Mel Gibson" />', "<p>It’s a great feeling to see a wish granted. That’s what it was like when we recently helped the aunt of a young cancer patient. The patient was a huge Mel Gibson fan, and her aunt wanted to give her an autographed Mel Gibson picture. Two days later, after numerous phone calls, emails and overall persistence, Snap came through. Mel may not have realized it, but we made him a real hero that day.</p>", "An actor and an autograph");

challenges[2] = new Array('<img src="img/Paris.jpg" alt="Paris, France" />', "<p>Zut alors! How do you help an 80-year old and her granddaughter make the most of a week in Paris? All they had to do was Snap. Our native French speaker jumped in, advising them on everything from the Louvre to some quaint (yet very hip) hangouts around the Sorbonne. In the words of the grandmother after the trip: \“It was the experience of a lifetime for both of us, thanks to your help.\”</p>", "A Paris itinerary for two generations");

function showChallenge() {
  theTarget = document.getElementById('challenge');
  var theChallenge = challenges[indexToShow][0] + "\n<p><strong>" + challenges[indexToShow][2] + "</strong></p>\n" + challenges[indexToShow][1] + "\n<p><a href=\"javascript:nextChallenge();\">Next Story &gt;</a></p>";

  theTarget.innerHTML = theChallenge;
  Effect.BlindDown('challenge');
}

function nextChallenge() {
  var numChallenges = challenges.length;
  indexToShow++;

  if(indexToShow >= numChallenges) {
    indexToShow = 0;
  }

  Effect.BlindUp('challenge');
  setTimeout('showChallenge()', 1500);
}

window.onload = showChallenge;