function makeNews(c,l,f,i){
      this.copy = c;
      this.link = l;
      this.follow = f;
      this.img = i;
      this.write = writeNews;
   }

function writeNews(){
      var str = '';
      str += '<a href="' + this.link + '">';
      str += '<img border="0" src="' + 
         this.img.src + '"></a><br>';
      str += this.copy + '<br>';
      str +=  '<a href="' + this.link + '">' + 
         this.follow + '</a>';
      return str;
   }

   var listImg = new Image();
   listImg.src = 'img/spacer.gif';
   var treeImg = new Image();
   treeImg.src = 'img/spacer.gif';
   var formImg = new Image();
   formImg.src = 'img/spacer.gif';
   var autoImg = new Image();
   autoImg.src = 'img/spacer.gif';


var newsArray = new Array();
   newsArray[0] = new makeNews(
      "After spending several months comparing vendors and numerous hours on the telephone with current Tk20 customers, UWF decided that Tk20 was the best solution for its comprehensive assessment and reporting needs. <br><em>Dr. Melanie DiLoreto, Director of Education Accreditation & Accountability, University of West Florida</em>",
       'http://www.tk20.com/company/testimonials.html',
       '<p style="margin-top:8px; margin-bottom: 10px;">Read more testimonials<img src="img/rarrow.gif" alt="Read More" width="11" height="10" border="0" /></p>',listImg).write();
   
   newsArray[1] = new makeNews(
      "We have been really excited about the implementation of Tk20’s CampusWide Assessment Management and Reporting system on our campus because it will streamline our assessment process so well. It has been virtually painless and very smooth. Everyone at Tk20 has been so helpful and patient with us, working through solutions as needed, so that we have everything we need in the manner that works best for us. <br><em>Evilu Pridgeon, Director of Institutional Effectiveness and Research, The Art Institute of Dallas</em>",
      'http://www.tk20.com/company/testimonials.html',
       '<p style="margin-top:8px; margin-bottom: 10px;">Read more testimonials<img src="img/rarrow.gif" alt="Read More" width="11" height="10" border="0" /></p>',treeImg).write();
   
   newsArray[2] = new makeNews(
      "We purchased Tk20’s assessment and reporting solution after using various software programs to aggregate and analyze data for several years – a time consuming and tedious undertaking. We needed a comprehensive solution that would simplify the process of collection, aggregation and analysis of data from all of our systems to be included in our Institutional Report.<br><em>Marilyn Hamilton, Technology Coordinator, University of the District of Columbia</em>",
      'http://www.tk20.com/company/testimonials.html',
       '<p style="margin-top:8px; margin-bottom: 10px;">Read more testimonials<img src="img/rarrow.gif" alt="Read More" width="11" height="10" border="0" /></p>',autoImg).write();
   

var nIndex = 0;
   var timerID = null;
   
   function rotateNews(){
      var len = newsArray.length;
      if(nIndex >= len)
         nIndex = 0;
      document.getElementById('stories').innerHTML = 
         newsArray[nIndex];
      nIndex++;
      timerID = setTimeout('rotateNews()',16000);
   }

function pauseNews() {
      if (timerID != null) {
         clearTimeout(timerID);
         timerID = null;
      }
   }
   
   function playNews() {
      if (timerID == null) {
         timerID = setTimeout('rotateNews()', 1000);
      }
   }
