nRow = 1; pRow = 1; function getElementsByClass(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp('(^|\\\\s)'+searchClass+'(\\\\s|$)'); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } function hidePromo() { var c = 0; var array1 = getElementsByClass('promo'); while(c < array1.length){ array1[c].style.display='none'; c++; } } function showPromo(myDiv) { var mx = 'promo'+myDiv; document.getElementById(mx).style.display=''; } function startPClock() { showPHeadlines(pRow); var t=setTimeout("startPClock()",10000); } function showPHeadlines() { pRow = pRow + 1; if (pRow > pTot) { pRow = 1; } hidePromo(); showPromo(pRow); } function xhideNewslines() { var c = 0; var array1 = getElementsByClass('ndiv'); while(c < array1.length){ array1[c].style.display='none'; c++; } } function hideNewslines(myDiv) { var c = 0; var mx = 'ndiv'+myDiv; var array1 = getElementsByClass(mx); while(c < array1.length){ array1[c].style.display='none'; c++; } } function showNewslines(myDiv) { var c = 0; var mx = 'ndiv'+myDiv; var array1 = getElementsByClass(mx); while(c < array1.length){ array1[c].style.display=''; c++; } } function startNClock() { showNHeadlines(nRow); var t=setTimeout("startNClock()",8000); } function showNHeadlines() { hideNewslines(nRow); nRow = nRow + 1; if (nRow > nTot) { nRow = 1; } showNewslines(nRow); }