img1 = new Image();
img1.src = "/jsimages/img1.jpg";

img2 = new Image();
img2.src = "/jsimages/img2.jpg";

img3 = new Image();
img3.src = "/jsimages/img3.jpg";

img4 = new Image();
img4.src = "/jsimages/img4.jpg";

btn1 = new Image();
btn1.src = "/jsimages/btn1_dn.gif";

btn2 = new Image();
btn2.src = "/jsimages/btn2_dn.gif";

btn3 = new Image();
btn3.src = "/jsimages/btn3_dn.gif";

images = new Array(img2.src,img3.src,img4.src,img1.src);
var btnsover = new Array(btn1.src,btn2.src,btn3.src);
var btnsoff = new Array("/jsimages/btn1_up.gif","/jsimages/btn2_up.gif","/jsimages/btn3_up.gif","/jsimages/btn4_up.gif");
var started=false;
var num=images.length;
var cur=0;

function rotate()
{ if(started)
  { if(cur==num)
    { cur=0; }
  
    document.banner.src=images[cur];
    cur++;
    setTimeout("rotate()", 2500); }
}

function stoprotate()
{ if(started) 
  { started=false; }
  else 
  { started=true;
    setTimeout("rotate()", 1000); }
}

function flipon(image)
{ key=parseInt(image.substring(3)) - 1;
  document[image].src=btnsover[key]; }    

function flipoff(image)
{ key=parseInt(image.substring(3)) - 1;
   document[image].src=btnsoff[key]; }