function date_complete() {
 var now = new Date(), hours = now.getHours(), minutes = now.getMinutes(), seconds = now.getSeconds(), month = now.getMonth(), date = now.getDate();
 if (month == 0) { month = "01"; }
 else if (month == 1) { month = "02"; }
 else if (month == 2) { month = "03"; }
 else if (month == 3) { month = "04"; }
 else if (month == 4) { month = "05"; }
 else if (month == 5) { month = "06"; }
 else if (month == 6) { month = "07"; }
 else if (month == 7) { month = "08"; }
 else if (month == 8) { month = "09"; }
 else if (month == 9) { month = "10"; }
 else if (month == 10) { month = "11"; }
 else { month = "12"; }
 if (date < 10) date = "0" + date;
 if (seconds < 10) seconds = "0" + seconds;
 if (minutes < 10) minutes = "0" + minutes;
 if (hours < 12) seconds = seconds + " AM";
 else if (hours >= 12) seconds = seconds + " PM";
 if (hours == 0) hours = hours + 12;
 else if (hours >12) hours = hours - 12;
 document.getElementById('time').innerHTML = ''+date+'/'+month+' '+hours+':'+minutes+':'+seconds+'';
}
window.setInterval('date_complete()',1000);
