// JavaScript Document
 function makeNews(h,c,l,f){
	  this.headline = h;
      this.copy = c;
      this.link = l;
      this.follow = f;
      this.write = writeNews;
   }
   
   function writeNews(){
      var str = '';
	  str += '<h3>' + '<a href="' + this.link + '">' + this.headline + '</a></h3><br>';
      str += '<p>' + this.copy + '<br />';
      str +=  '<strong><a href="' + this.link + '">' + 
         this.follow + '</a></strong></p>';
      return str;
   }
   
   var newsArray = new Array();
   
   newsArray[0] = new makeNews(
      "Autonomy Cardiff Intelligent Documents Offer Dynamic Approach to BPM",
	  "This IDC Opinion White Paper provides an in-depth look at Intelligent Documents, a unique solution that brings together the best of document capture, process automation and information management technologies in a single integrated platform.<br /><br />",
      'http://campaign.autonomy.com/cdc_idc_wp',
      'Download Now!').write();
   newsArray[1] = new makeNews(
      "A Breakthrough in Information-Driven Process Automation, Featuring Research from Gartner",
	  "This newsletter highlights a breakthrough in automating one of the most challenging aspects of your business processes, the human element. Expert analysis is provided by Gartner on the value of Business Process Platforms within the enterprise.<br /><br />",
      'http://campaign.autonomy.com/cardiff_07172008_gartner_information-driven_process_automation_newsletter',
      'View Report!').write();
   newsArray[2] = new makeNews(
      "Gartner Names Autonomy Cardiff as Cool Vendor in BPM",
	  "This complete report names Autonomy Cardiff among the Cool Vendors in BPM 2008<br /><br />",
      'http://campaign.autonomy.com/gartner_names_autonomy_cardiff_as_cool_vendor_in_bpm--9-22-2008----download',
      'View Report!').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()', 2000);
      }
   }
