<!--
/*
For this script, visit
http://java-scripts.net 
or http://wsabstract.com
*/

var WhereTo   = null;
var TimerID   = null;
var now       = new Date();
var pos       = 0;
var StartTime = null;
var PauseTime = 3000;

// Change the PauseTime value (in milliseconds) to
// change the speed at which the button URLs rotate.

function InitializeArray() {
 this.length = InitializeArray.arguments.length
   for (var i = 0; i < this.length; i++)
   {
    this[i+1] = InitializeArray.arguments[i]
   }
}

function ParseString(data,num) {
 for(var i=0;i<data.length;i++)
   {
   if(data.substring(i,i+1)=="|") break;
   }
   if (num==0) return(data.substring(0,i));
   else return(data.substring(i+1,data.length));
}

function StartTimer() {
   now = new Date();
   StartTime=now.getTime();
   StopTimer();
   WhereTo = new InitializeArray("Free Javascripts|http://www.free-javascripts.com/",
    "Enhance Your Site|http://www.javascriptkit.com/cutpastejava.shtml",
    "Dynamic HTML|http://www.dynamicdrive.com",
    "More Javascripts|http://www.java-scripts.net",
    "Cool Effects|http://www.javascriptcity.com/scripts",
    "Impress Your Friends|http://www.a1javascripts.com",
    "The Best Scripts|http://javascript.internet.com");
   ShowTimer();
}

function StopTimer() {
   TimerID = null;
   WhereTo = null;
}

function ShowTimer() {
 pos= (pos == WhereTo.length) ? 1 : pos + 1;
 document.forms[0].elements[0].value=ParseString(WhereTo[pos],0);
   TimerID=window.setTimeout('ShowTimer()',PauseTime);
}

function DestinationUrl()  {
   this.location=ParseString(WhereTo[pos],1);
   return (false);
}

window.onload=window.StartTimer
//-->