﻿function halten() {
    window.clearInterval(ref);
}
function weiter() {
    ref = setInterval(toggleDisplay, 3000);
}
 function toggleDisplay() 
  {     
         for (i=1; i<anzahl; i += 1) {

             divid = "AdverS" + i;
             document.getElementById(divid).style.display = "none";
             
         }
         divid1 = "AdverS" + zaehler;
         document.getElementById(divid1).style.display = "block";
         zaehler += 1;
         if (zaehler == anzahl) zaehler = 1;
     }

     function advcounter() {
         var advdiv = "NewsBox";
         anzahl = document.getElementById(advdiv).getElementsByTagName("div").length;
         anzahl += 1;
     }
     

