var dlr_uhr_s;
var dlr_uhr_h;
var dlr_uhr_m;
var dlr_uhr_zz;
var dlr_uhr_count = 0;

function dlr_uhr_show() {

	if ( ( dlr_uhr_s == 0 ) || ( dlr_uhr_count == 0 ) ) {
		output = "<span class=\"dradio_uhrzeit_zz\">"+dlr_uhr_zz+" </span>";
		output +=  (dlr_uhr_h < 10) ? "0" + dlr_uhr_h : dlr_uhr_h;
		output += ":";
		output += (dlr_uhr_m < 10) ? "0" + dlr_uhr_m : dlr_uhr_m;
		// output += ":";
		// output += (dlr_uhr_s < 10) ? "0" + dlr_uhr_s : dlr_uhr_s;
		output += " Uhr";

		element = document.getElementById("dradio_uhrzeit");
		if(element){
			element.innerHTML = output;
		}
		dlr_uhr_count = 1;
	}
}

function dlr_uhr_update() {
	dlr_uhr_s++; if ( dlr_uhr_s > 59 ) { dlr_uhr_s = 0; dlr_uhr_m++; if ( dlr_uhr_m > 59 ) { dlr_uhr_m = 0; dlr_uhr_h++; if ( dlr_uhr_h > 23 ) { dlr_uhr_h = 0; } } }
	dlr_uhr_show();
}

function dlr_uhr_set(hours,minutes,seconds,zeitzone) {
	dlr_uhr_count = 0;
	dlr_uhr_h = hours;
	dlr_uhr_m = minutes;
	dlr_uhr_s = seconds;
	dlr_uhr_zz = zeitzone;
	dlr_uhr_show();
	window.setInterval("dlr_uhr_update()",1000);
}


