//Time between pics switching in secs
var HowLongBetweenPic=2;

// image, link, alternate text
var ad_list = [
               ["scms450.gif","http://www.scmsinc.com","SCMS"],
	       ["DMEng450.jpg","http://www.dmengineering.com","DM Engineering"],  	
               ["Nott450.jpg","http://www,nottltd.com","Not Limited"],
	       ["mv.jpg","http://www.theBDR.net/articles/myview.html","editorial link"]
               ];

// nothing below this line should be messed with -- john

// This code was obtained from http://www.draac.com/picture-roll.html 
//Start at the what pic:
var PicNumber=0;
//Number of pics:
var NumberOfPictures = ad_list.length;

//SwitchPic Function
function SwitchPic(counter){
   if(counter < HowLongBetweenPic){
      counter++;
      //DEBUG in the status bar at the bottom of the screen
      window.status="Switch picture at 5 : "+counter+" PicNumber: "+PicNumber+" ";
		
      //Display pic in what <IMG> tag roll is what I called the image
      document.roll.src = "/gfx/" + ad_list[PicNumber][0];
      document.getElementById("rollurl").href = ad_list[PicNumber][1];
      document.roll.alt = ad_list[PicNumber][2];
		
      //function calls itself
      CallSwitchPic=window.setTimeout("SwitchPic("+counter+")",1500); 
		
   } else {
      PicNumber++;
      if(PicNumber == NumberOfPictures) PicNumber=0;
      SwitchPic(0);
   }
}

