function startTicker() {
  // Define run time values
  theCurrentStory     = -1;
  theCurrentLength    = 0;

  // Locate base objects
  if (document.getElementById) {	
    theAnchorObject     = document.getElementById("tickerAnchor");
    runTheTicker();   	
  } else {
    document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
    return true;
  }
}


// Ticker main run loop
function runTheTicker() {
  var myTimeout;  

  // Go for the next story data block
  if(theCurrentLength == 0) {
    theCurrentStory++;
    theCurrentStory      = theCurrentStory % theItemCount;
    theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');		
    theTargetLink        = theSiteLinks[theCurrentStory];
    theAnchorObject.href = theTargetLink;
    thePrefix 	     = "<span class=\"tickls\">" + theLeadString + "</span>";
  }

  // Stuff the current ticker text into the anchor
  theAnchorObject.innerHTML = thePrefix + 
    theStorySummary.substring(0,theCurrentLength) + whatWidget();
  
  // Modify the length for the substring and define the timer
  if(theCurrentLength != theStorySummary.length) {
    theCurrentLength++;
    myTimeout = theCharacterTimeout;
  } else {
    theCurrentLength = 0;
    myTimeout = theStoryTimeout;
  }

  // Call up the next cycle of the ticker
  setTimeout("runTheTicker()", myTimeout);
}

// Widget generator
function whatWidget() {
  if(theCurrentLength == theStorySummary.length) {
    return theWidgetNone;
  }

  if((theCurrentLength % 2) == 1) {
    return theWidgetOne;
  } else {
    return theWidgetTwo;
  }
}

var theCharacterTimeout = 30;
var theStoryTimeout     = 5000;
var theWidgetOne        = "_";
var theWidgetTwo        = "-";
var theWidgetNone       = "";
var theLeadString       = "&gt;&nbsp;";

var theSummaries = new Array();
var theSiteLinks = new Array();

var theItemCount = 7;
theSummaries[0] = "Discover the new album of «Vive La Fête!»: «Jour de Chance»... And the music video of «La Route».";
theSiteLinks[0] = "http://vivelafete.online.fr";

theSummaries[1] = "Help SaveNetRadio - artists, listeners, and Webcasters working together to save Internet radio as we know it.";
theSiteLinks[1] = "http://www.capwiz.com/saveinternetradio/alert_9738601.html";

theSummaries[2] = "“New Wave Classics.com” radio updated! <BR>Now 515 songs for almost 40 hours of total running time...";
theSiteLinks[2] = "http://www.newwaveclassics.com";

theSummaries[3] = "“Millennium - Sector One” radio updated including an exclusive Nu Skool Breakz mix from the german label Dominance Electricity...";
theSiteLinks[3] = "http://www.millennium-sectorone.com";

theSummaries[4] = "PROFONTS site updated... <BR>2 fonts available to download + samples + one demo coming soon!";
theSiteLinks[4] = "http://www.protypes.com/";

theSummaries[5] = "Be amazed by these all times records shattered by President G.W.Bush!!!!! (updated)";
theSiteLinks[5] = "http://www.tilenut.com/yo/no/BUSH_record.html";

theSummaries[6] = "You probably already know “IraqBodyCount.net”, “Coalition Casualty Count” have fast become the source of record on non-Iraqi military casualties, and doesn't omit “accidents”.";
theSiteLinks[6] = "http://icasualties.org/oif/";

theSummaries[7] = "Stay in touch!...";
theSiteLinks[7] = "http://www.sectorone.net";


startTicker();
