// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com
// Modified substantially by Logical Expressions.

var offset = 0;
var sloganIx = 0;
var delay = 100;
var textWidth = 50;
var sloganCt = 15;
var typ = new initArray(sloganCt);
typ[0]=padLeft("Stomp - When you can’t afford to come up short.", textWidth);
typ[1]=padLeft("Somebody has to win.", textWidth);
typ[2]=padLeft("Put your Gold medal on at the start line.", textWidth);
typ[3]=padLeft("Wax so high tech you won’t need one.", textWidth);
typ[4]=padLeft("They clap - You smile - Podium.", textWidth);
typ[5]=padLeft("The wax tech around your neck.", textWidth);
typ[6]=padLeft("Its not cheating - it just feels like it.", textWidth);
typ[7]=padLeft("How does it know.", textWidth);
typ[8]=padLeft("The only time you miss the wax is when your buddy doesn’t return it..", textWidth);
typ[9]=padLeft("More amp off the ramp.", textWidth);
typ[10]=padLeft("Less time on the bench, less time on the course.", textWidth);
typ[11]=padLeft("Start with Podium - finish on the podium.", textWidth);
typ[12]=padLeft("Stomp - Amplitude by the ounce.", textWidth);
typ[13]=padLeft("If you don’t like the view, step up to Podium performance.", textWidth);
typ[14]=padLeft("We run the gas, you run the brakes.", textWidth);

function padLeft(value, count) {
  var i=0;
  while (i++ < count) {
    value = " " + value;
  }
  return value;
}

function scroller() {
  var sloganLen = typ[sloganIx].length;
  var newText = typ[sloganIx].substring(offset++, sloganLen);
  if (newText.length > textWidth)
    newText = newText.substring(0, textWidth);
  document.getElementById("sloganScroll").innerHTML = newText;

  if (offset == sloganLen)  {
    offset = 0;
    sloganIx++;
    if (sloganIx == sloganCt)
      sloganIx = 0;
  }
  setTimeout("scroller()", delay);
}

function initArray(n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' ';
  }
}

