function tick() {
  var hours, minutes, seconds, ap;
  var intHours, intMinutes, intSeconds;
  var today;

  var intDay, intMonth, intYear;
  var Day, Month, Year;
  var dateString;

  today = new Date();

  intHours = today.getHours();
  intMinutes = today.getMinutes();
  intSeconds = today.getSeconds();
  
  if (intHours == 0) {
     hours = "24:";
     ap = "  ";
  } else if (intHours < 10) { 
     hours = "0"+intHours+":";
     ap = " ";     
  } else if (intHours < 24) { 
     hours = intHours+":";
     ap = " ";
  } else if (intHours == 24) {
     hours = "24:";
     ap = " ";
  } else {
     intHours = intHours - 24
     hours = intHours + ":";
     ap = " ";
  }

  if (intMinutes < 10) {
     minutes = "0"+intMinutes+":";
  } else {
     minutes = intMinutes+":";
  }

  if (intSeconds < 10) {
     seconds = "0"+intSeconds+" ";
  } else {
     seconds = intSeconds+" ";
  } 

  timeString = hours+minutes+seconds+ap;

  intDay = today.getDate();
  intMonth = today.getMonth();
  intYear = today.getYear();
  intMonth += 1;
  
  if (intDay < 10) { 
    Day = "0"+intDay+"-";
  } else { 
    Day = intDay+"-";
  }
  
  if (intMonth < 10) { 
    Month = "0"+intMonth+"-";
  } else { 
    Month = intMonth+"-";
  }
  
  Year = intYear;
  
  dateString = Day+Month+Year

  document.getElementById("Clock").innerHTML = dateString + '&nbsp;&nbsp;' + timeString;
//document.getElementById("Clock").innerHTML ="asdfasdfasdf sdf sad asd hej";
  window.setTimeout("tick();", 500);
}


