document.write(''); function getCurrentDate4() { objDate = new Date(); hours = objDate.getHours() < 10 ? '0' + objDate.getHours() : objDate.getHours(); minutes = objDate.getMinutes() < 10 ? '0' + objDate.getMinutes() : objDate.getMinutes(); seconds = objDate.getSeconds() < 10 ? '0' + objDate.getSeconds() : objDate.getSeconds(); hours = hours.toString(); minutes = minutes.toString(); seconds = seconds.toString(); html_h = ''; html_h = html_h + ''; html_m = ''; html_m = html_m + ''; html_s = ''; html_s = html_s + ''; s = ''; return currentDate = html_h + s + html_m + s + html_s; } function setCurrentDate4() { document.getElementById( 'date4' ).innerHTML = getCurrentDate4(); } setCurrentDate4(); setInterval( 'setCurrentDate4()', 1000 );