 var end = new Date();
 var now = new Date();
 var year = now.getYear();



function toSt2(n) {
  s = "";
  if (n < 10) s += "0";
  return (s + n).toString();
}
function toSt3(n) {
  s = "";
  if (n < 10) s += "00";
  else if (n < 100) s += "0";
  return (s + n).toString();
}
function mycountdown() {
  d = new Date();
  count = Math.floor(end.getTime() - d.getTime());
  if(count > 0) {
    miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
    seconds = toSt2(count%60); count = Math.floor(count/60);
    minutes = toSt2(count%60); count = Math.floor(count/60);
    hours = toSt2(count%24); count = Math.floor(count/24);
    days = count;
    if (days == 0) daytext = 'Tage';
    if (days == 1) daytext = 'Tag'; 
    if (days >1)   daytext = 'Tagen'; 
    if (hours > 1) {} else {}
    
    document.getElementById('c1').innerHTML = days + daytext;
    document.getElementById('c2').innerHTML = hours + ':' + minutes + ':' + seconds;
    setTimeout("mycountdown()", 50);
  }
}

function countdownb(mydate) {
  //var end = new Date(month+' '+day+' '+year+' '+hour+':'+minute+':'+second);
  end = new Date(mydate);

  if (year < 1900) { year += 1900; }


document.write('<div style="text-align: center">');
document.write('<span id="c1" style="FONT: bold 25px arial; COLOR: black"></span><br />');
document.write('<span id="c2" style="font: bold 15px arial; color: blue">;</span><br />');
document.write('</div>');

  mycountdown();
}




