Go ahead and click me, I'll take you to the link that's showing on the button!


Put this part in the <head></head> part of your document.


<script language="JavaScript">
<!-- Hide from old browsers
// Copyright  1999 Doug Popeney
// Created by Doug Popeney (easyjava@easyjavascipt.com)
// JavaScript Made Easy!! - http://www.easyjavascript.com

// please help yourself to this code.
var startTime   =null;
var timerID     =null;
var initial     =new Date();
var pos         =0;
var menuItem    =null;

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

function parsemenuItem(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() {
   initial = new Date();
   startTime=initial.getTime();
   stopTimer();
   menuItem = new initArray("DESCRIPTION #1|LINK #1",
    "DESCRIPTION #2|LINK #2",
      "DESCRIPTION #3|LINK #3",
      "DESCRIPTION #4|LINK #4",
      "DESCRIPTION #5|LINK #5",
      "DESCRIPTION #6|LINK #6",
      "DESCRIPTION #7|LINK #7",
  "DESCRIPTION #8|LINK #1"
   );
   showTimer();
}

function stopTimer() {
   timerID=null;
   menuItem=null;
   //clearTimeout(timerID);
}

function showTimer() {
 pos= (pos == menuItem.length) ? 1 : pos + 1;
 document.forms[0].elements[0].value=parsemenuItem(menuItem[pos],0);

   timerID=window.setTimeout('showTimer()',1500);
}

function goToUrl()  {
   //parent.welcome.location=parsemenuItem(menuItem[pos],1);
   this.location=parsemenuItem(menuItem[pos],1);
   return (false);
}
// -->
</SCRIPT>


Now put this inside your body code. 

<body onLoad="window.startTimer()">

An example is:
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="window.startTimer()">
or 
<body onLoad="window.startTimer()"> 

Now put this wherever you want in your HTML document 

<FORM>
<INPUT TYPE="button" VALUE="  WHERE TO? "  NAME="goTo"
        onClick="window.goToUrl()">
</FORM>

You can increase or decrease the switching speed by playing with the numbers in the following line that goes in your head tag. 
   timerID=window.setTimeout('showTimer()',1500);
