/** By Gary Bushman
** Copyright Bushman Web Services 
** All rights reserved
** Random Image Rotator version 1
*/
var sponsor = 1;
var dir = 1;
function changeDir()
{
number = Math.floor(Math.random()*4)
if (number==0)
dir=1
if (number==1)
dir=2
if (number==2)
dir=3
if (number==4)
dir=4
}
function surfToSponsor()
{
// Within the quotation marks below, enter
// the URLs to which your three respective 
// banners will link.
   if (sponsor==1) window.location.href="http://www.piute.org";
   if (sponsor==2) window.location.href="http://www.piute.org";
   if (sponsor==3) window.location.href="http://www.piute.org";
   if (sponsor==4) window.location.href="http://www.piute.org";
   if (sponsor==5) window.location.href="http://www.piute.org";
   if (sponsor==6) window.location.href="http://www.piute.org";
   if (sponsor==7) window.location.href="http://www.piute.org";
   if (sponsor==8) window.location.href="http://www.piute.org";
   if (sponsor==9) window.location.href="http://www.piute.org";
   if (sponsor==10) window.location.href="http://www.piute.org";
   if (sponsor==11) window.location.href="http://www.piute.org";
   if (sponsor==12) window.location.href="http://www.piute.org";
   if (sponsor==13) window.location.href="http://www.piute.org";
   if (sponsor==14) window.location.href="http://www.piute.org";
   if (sponsor==15) window.location.href="http://www.piute.org";
   if (sponsor==16) window.location.href="http://www.piute.org";
   if (sponsor==17) window.location.href="http://www.piute.org";
   if (sponsor==18) window.location.href="http://www.piute.org";
   if (sponsor==19) window.location.href="http://www.piute.org";
   if (sponsor==20) window.location.href="http://www.piute.org";
   if (sponsor==21) window.location.href="http://www.piute.org";
   if (sponsor==22) window.location.href="http://www.piute.org";
   if (sponsor==23) window.location.href="http://www.piute.org";
   if (sponsor==24) window.location.href="http://www.piute.org";
   if (sponsor==25) window.location.href="http://www.piute.org";
}
function changeSponsor()
{ 
{changeDir()}
// Set the first value to the number of
// images (you can have as many banners as you want).
   if (++sponsor > 24)  sponsor = 1;
   document.images[0].src = "images/banner" + dir + "/image" + sponsor + ".jpg";
// Set this value to the time between 
// rotations (1500 = 1.5 seconds)
   window.setTimeout('changeSponsor();',3500);
}

