<!-- Rotate Banner /editByKennelly/05/22/06-->
var urlArray = new Array(5); //for URL's, increase size as necessary
var banArray = new Array(5); //for banners, increase size as necessary
var altArray = new Array(5);
var imageTag = new Array(5);
//var attributeArray = new Array(5);
var counter = 0;
//must assign the inicial value for preventing not to have undefined value when click on a refreshed page.
var url = "default.htm"; //initial URL

//add your necessary URL's
urlArray[0] = "AboutNINR/";
altArray[0] = "NINR Director Dr. Grady";

urlArray[1] = "ResearchAndFunding/";
altArray[1] = "Nurses Care for Pediatric Patient";

urlArray[2] = "NewsAndInformation/";
altArray[2] = "SGI Student in NINR Lab";
//urlArray[3] = "Training/";
//urlArray[4] = "ResearchAndFunding/";

if(document.images) //pre-load all banner images
{
  //for 5 picture i<=5
  for(i = 0; i <= 3; i++)
  {
	banArray[i] = new Image(185, 134);
    banArray[i].src = "/cms.ninr.nih.gov/Images/hp_photo" + (i+1) + ".jpg";         
  }
}

function changeBanner() //banner changer function
{
  //for 5 picture counter>4
  if(counter > 2)
   counter = 0;  
  

  document.banner.src = banArray[counter].src; //sets a new banner
  url = urlArray[counter]; //sets a new URL to the banner
  document.banner.alt = altArray[counter]; //sets text to alt-tag  
  //document.banner.alt = document.images[counter].alt; 	
  counter++; //increase the counter for the next banner
}

//calls the changeBanner() function every 3 seconds
//change the timer as necessary (minutes * 60000) or (seconds * 1000)
var timer = window.setInterval("changeBanner()", 3500)


//-->