/*<![CDATA[*/
/**
 * functions.js - Bibliothek mit uebergreifenden JavaScript Funktionen
 *
 * Copyright (c) 2009    die.interaktiven GmbH & Co. KG
 *                       Agentur für digitale Medien
 *                       Eisenmarkt 1
 *                       35578 Wetzlar
 *                       Germany
 *
 *                       Fon: +49 (0)64 41 / 39 86 19 - 0
 *                       Fax: +49 (0)64 41 / 39 86 19 - 9
 *                       Web: www.die-interaktiven.de
 *
 * Alle Rechte vorbehalten. Unberechtigte Kopie und Weiter-
 * verwendung nicht gestattet.
 *
 */

var DOCUMENT_ROOT = '/';

function doStart()
{
	setStatus('');

	clock.initClock();
}

var clock = {
	
	clockInterval: null,
	
	initClock: function()
	{
		var clock = jQuery('#date');
		var ticks = 0;
		
		var updateClock = function()
		{
			var time = new Date();
			
			var today = time.getDate() + '.' + (time.getMonth()+1) + '.' + time.getFullYear();
			var hour = (time.getHours() / 100).toFixed(2).substring(2);
			var minute = (time.getMinutes() / 100).toFixed(2).substring(2);
			
			clock.html(today + ' - ' + hour + ':' + minute + ' Uhr');
		}
		
		updateClock();
		
		this.clockInterval = setInterval(function () {
			if (ticks++ % 10 == 0) {
				updateClock();
			}
		}, 1000);
	}
};


window.onload = doStart;

/*]]>*/
