

function __current_time_string () {
	
	var time_s = '';
	var now = new Date();
	var month = 1 + now.getMonth();
	time_s = /*'<div style="float:left;width:100px;">' + ( now.getDate() >= 10 ? now.getDate() : '0' + now.getDate() ) + 
	           '.' + ( month >= 10 ? month : '0' + month) + 
	           '.' + now.getFullYear() + '</div>*/'<div style="float:left;width:160px; text-align:center;font-size:12px;">' 
	            + 
			( now.getHours() >= 10 ? now.getHours() : '0' + now.getHours() ) + 
			':' + ( now.getMinutes() >= 10 ? now.getMinutes() : '0' + now.getMinutes() ) + 
			':' + ( now.getSeconds() >= 10 ? now.getSeconds() : '0' + now.getSeconds() ) + '</div>'
	;
	return time_s;
}


function show_time ( target_id, milliseconds ) {
	milliseconds = parseInt(milliseconds);	
	var timer;
	var time_s = __current_time_string();
	var id_input = document.getElementById('time')
	if ( !id_input || milliseconds <= 0 ) { return; }
	id_input.innerHTML = time_s;
	
	timer = setTimeout( function () { show_time( target_id, milliseconds ); }, milliseconds );
}
