 var activehighlight = '1';
 var funzt;
 var highlightlaeuft = 0;
 function changehighlight()
 {
 if(activehighlight == '4')
 { show('highlight1'); return;}
 if(activehighlight == '3')
 { show('highlight4'); return;}
 if(activehighlight == '2')
 { show('highlight3'); return;}
 if(activehighlight == '1')
 { show('highlight2'); return;}
 }
 function startinterval() {
 if(highlightlaeuft == 0){
 funzt = window.setInterval(changehighlight, 5000);
 highlightlaeuft = 1;
 }
 }
 function endinterval() {
 clearInterval(funzt);
 highlightlaeuft = 0;
 }
 function showtopnews(highlight) {
 switch(highlight) {
 case 'highlight1':
 document.getElementById('highlight_01').style.display = 'block';
 document.getElementById('highlight_02').style.display = 'none';
 document.getElementById('highlight_03').style.display = 'none';
 document.getElementById('highlight_04').style.display = 'none';
 activehighlight = '1';
 break;
 case 'highlight2':
 document.getElementById('highlight_01').style.display = 'none';
 document.getElementById('highlight_02').style.display = 'block';
 document.getElementById('highlight_03').style.display = 'none';
 document.getElementById('highlight_04').style.display = 'none';
 activehighlight = '2';
 break;
 case 'highlight3':
 document.getElementById('highlight_01').style.display = 'none';
 document.getElementById('highlight_02').style.display = 'none';
 document.getElementById('highlight_03').style.display = 'block';
 document.getElementById('highlight_04').style.display = 'none';
 activehighlight = '3';
 break;
 case 'highlight4':
 document.getElementById('highlight_01').style.display = 'none';
 document.getElementById('highlight_02').style.display = 'none';
 document.getElementById('highlight_03').style.display = 'none';
 document.getElementById('highlight_04').style.display = 'block';
 activehighlight = '4';
 break;
 }
 }
 
     function getMax(anumber, another) { 
        return((anumber> another) ? anumber : another);
    }

    function resizeTextArea(t, minRows, minCols) { 
        t.rows = minRows; 
        t.setAttribute("wrap", "off");
        t.style.overflow = "auto";
        
        lines = t.value.split("\n"); 
        
        if (arguments.length> 2) {
            t.cols = minCols;
            maxChars = lines[0].length;
            for(i = 1; i <lines.length; i++) {
                currentLength = lines[i].length;
                if (currentLength> maxChars) maxChars = currentLength;
            }
            t.cols = getMax(maxChars, minCols); 
        }
        t.rows = getMax(lines.length + 1, minRows); 
    } 
