function countdown(endtime)
{
  var end = endtime;

  var jetzt = new Date();
  var now = jetzt.getTime() / 1000;
  if(Math.floor(end - now) > 259200) return;

 document.write('<span id="c2"></span>');

 counter(end);

 function counter(end)
 {
  var jetzt = new Date();
  var now = jetzt.getTime() / 1000;

  count = Math.floor(end - now);
  if(count > 0) {
    var seconds = count%60; count = Math.floor(count/60);
    var minutes = count%60; count = Math.floor(count/60);
    var hours = count; count = Math.floor(count/24);
//    var hours = count%24; count = Math.floor(count/24);
//    var days = count;
        if(minutes<10) minutes = "0" + minutes;
        if(hours<10) hours = "0" + hours;
        if(seconds<10) seconds = "0" + seconds;
    document.getElementById('c2').innerHTML = '&nbsp;- noch ' + hours + ':' + minutes + ':' + seconds + ' Std.';
    setTimeout(function(){counter(end);}, 1000);
   }
 }

}