// JavaScript Document

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

function writeNews(){
      var str = '';
      str += '<a href="' + this.link + '">';
      str += this.copy + '<br>';
     return str;
   }

 var newsArray = new Array();
   newsArray[0] = new makeNews(
      "At Prince George's Federal we do not sell your loan. We're here for you over the entire life of your loan.",
       'news.asp').write();
   
   newsArray[1] = new makeNews(
      "At Prince George's Federal we do not sell your loan. We're here for you over the entire life of your loan.",
      'news.asp').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()',6000);
   }

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