var adImages = new Array();
  // Enter the names of the images below
  // REMEMBER TO CHANGE THE CODE ON INDEX.SHTML TO REFLECT IMAGE 0 HERE
  adImages[0]="http://www.umsystem.edu/images/features/091118_habits.jpg";
  adImages[1]="http://www.umsystem.edu/images/features/091112_icecream.jpg";
  adImages[2]="http://www.umsystem.edu/images/features/091106_wheelchair.jpg";
  adImages[3]="http://www.umsystem.edu/images/features/091118_winery.jpg";
  adImages[4]="http://www.umsystem.edu/images/features/091105_tree.jpg";
  adImages[5]="http://www.umsystem.edu/images/features/091105_rls.jpg";
  adImages[6]="http://www.umsystem.edu/images/features/091112_soup.jpg";
  
var adBackground = new Array();
//Enter the corresponding background colors
  adBackground[0]="url(/images/highlightsarrow.gif) no-repeat transparent left center";
  adBackground[1]="url(/images/highlightsarrow.gif) no-repeat transparent left center";
  adBackground[2]="url(/images/highlightsarrow.gif) no-repeat transparent left center";
  adBackground[3]="url(/images/highlightsarrow.gif) no-repeat transparent left center";
  adBackground[4]="url(/images/highlightsarrow.gif) no-repeat transparent left center";
  adBackground[5]="url(/images/highlightsarrow.gif) no-repeat transparent left center";
  adBackground[6]="url(/images/highlightsarrow.gif) no-repeat transparent left center";
  
var adText = new Array();
//Enter the descriptive title
   adText[0] = "Law school habits";
   adText[1] = "Healthy ice cream";
   adText[2] = "Pledge history";
   adText[3] = "Experimental winery";
   adText[4] = "Champion tree";
   adText[5] = "Restless legs";
   adText[6] = "Genetic soup";

var adLink = new Array();
//Enter the URL to the full story
   adLink[0] = "/ums/news/features/link.php?goto=http://www.umkc.edu/news/feature.asp?id=108";
   adLink[1] = "/ums/news/features/link.php?goto=http://cafnr.missouri.edu/news/stories2009/healthy-ice-cream.php";
   adLink[2] = "/ums/news/features/link.php?goto=http://www.columbiamissourian.com/stories/2009/11/05/woman-wheelchair-enjoys-life-sorority-new-member/";
   adLink[3] = "/ums/news/features/link.php?goto=http://www.youtube.com/watch?v=LQKKKHgsiPw";
   adLink[4] = "/ums/news/features/link.php?goto=http://www.umsl.edu/services/media/newsrel/oct27tree.html";
   adLink[5] = "/ums/news/features/link.php?goto=http://www.kansascity.com/115/story/1545868.html";
   adLink[6] = "/ums/news/features/link.php?goto=http://www.umkc.edu/news/feature.asp?id=102";
  
   
var thisAd = 0;
var imgCt = adImages.length;

function rotate() {
 if(document.images) {
 

   if (thisAd == imgCt) {
      thisAd = 0;
   }

   document.getElementById('adBanner').src=adImages[thisAd];


 featureTitle(thisAd)
  thisAd++;
  
	  setTimeout("rotate()", 9 * 1000)

 }
 


}


function featureTitle(thisAd)  {

   var totalArray = "<br />";
   var newValue = "";
   var newHref = "";

   for (i=0;i<adText.length;i++)
   {
   
      if (i == thisAd)
      {
      
         newValue = "<strong><a style=\"color: #fff;_margin-left:-15px;background: " + adBackground[i] + ";\" href=\"" + adLink[i] + "\">" + adText[i] + "</a></strong><br /><br /><script language=\"javascript\" type=\"text/javascript\">document.getElementById('newBg').href=adLink[" + i + "];</script>";
      
      } else {      
      
         newValue = "<a onMouseOver=\"document.getElementById('adBanner').src=adImages[" + i + "]; document.getElementById('newBg').href=adLink[" + i + "]; featureTitle(" + i + ");\" href=\"#\">" + adText[i] + "</a><br /><br />";
           
      }

      
      totalArray = totalArray + newValue;
   }

   var newVar = totalArray;
   document.getElementById('adText').innerHTML = newVar;
   
}



