var clockID = 0;
var focused='';
function aktywne(element)
{
	focused = element;
	element.style.background = '#FEEEEE';
}

function nieaktywne(element)
{
	focused = '';
	element.style.background = '#e6f2f5';
}

function aktywne2(element)
{
	element.style.background = '#FEEEEE';
}

function nieaktywne2(element)
{
	if (focused != element)
	element.style.background = '#e6f2f5';
}

window.addEvent('domready', function(){ new SmoothScroll({duration: 700, transition: Fx.Transitions.expoOut}); })
window.addEvent('domready', function(){
	if ($('godzina')) {
		StartClock();
	}
});

function UpdateClock() {
	if(clockID) {
		clearTimeout(clockID);
		clockID  = 0;
	}

	var tDate = new Date();

	$('godzina2').innerHTML = ""
	+ tDate.getHours() + ":"
	+ (tDate.getMinutes() < 10 ? '0' : '') + tDate.getMinutes() + ":"
	+ (tDate.getSeconds() < 10 ? '0' : '') + tDate.getSeconds();

	clockID = setTimeout("UpdateClock()", 1000);
}

function StartClock() {
	clockID = setTimeout("UpdateClock()", 500);
}
