/**
 * @author Luca
 */

function setuptime(){
              
              var t = new Date();
              var nowtime = t.getTime();	
              var diff = Math.floor(nowtime/1000)-beschwtime;
              nowDays = Math.floor(diff / 86400);
              resto = diff % 86400;
              nowHours = Math.floor(resto / 3600);
              resto = resto % 3600;
              nowMins = Math.floor(resto / 60);
              nowSecs = resto % 60;
            }
            function tickingTheTock(){
              if (nowSecs > 59){
                nowSecs = 0;
                nowMins++;
              }
              if (nowMins > 59){
                nowHours++;
                nowMins = 0;
              }
              if (nowHours > 23){
                nowDays++;
                nowHours = 0;
              }
              check = 0;
              testoclock = "";
              if (nowYears != 0 || check != 0){
                testoclock += "<span style='color: #900; font-weight: bold;'>"+nowYears+"</span>";
                if (nowYears == 1)
                  testoclock += syears;
                else
                  testoclock += syearp;
                testoclock += ", ";
                check = 1;
              }
              if (nowDays != 0 || check != 0){
                testoclock += "<span style='color: #900; font-weight: bold;'>"+nowDays+"</span>";
                if (nowDays == 1)
                  testoclock += sdays;
                else
                  testoclock += sdayp;
                testoclock += ", ";
                check = 1;
              }
              if (nowHours != 0 || check != 0){
                testoclock += "<span style='color: #900; font-weight: bold;'>"+nowHours+"</span>";
                if (nowHours == 1)
                  testoclock += shours;
                else
                  testoclock += shourp;
                testoclock += ", ";
                check = 1;
              }
              if (nowMins != 0 || check != 0){
                testoclock += "<span style='color: #900; font-weight: bold;'>"+nowMins+"</span>";
                if (nowMins == 1)
                  testoclock += smins;
                else
                  testoclock += sminp;
                testoclock += " und ";
              }
              testoclock += "<span style='color: #900; font-weight: bold;'>"+nowSecs+"</span>";
              if (nowSecs==1)
                testoclock += ssecs;
              else
                testoclock+=ssecp;
              testoclock += ".";
              document.getElementById("tempospan").innerHTML = testoclock;
              nowSecs++;
              tickTimer = setTimeout("tickingTheTock()",1000);
            }
