
function getE(element) {
	return document.getElementById(element);
	}

var numer_boksu = -1;

function wlacz_boksy() {
	
	numer_boksu += 1;
	if (numer_boksu > boksow_b) {
		numer_boksu = 0;
		}
	
	ten_div = getE("tu_boks");
	ten_div.innerHTML = '<a href="' + linki[numer_boksu] + '"><img src="' + boksy[numer_boksu] + '" width="545" height="132" alt="" title=""></a>';
	
	ten_span = getE("banner_opisik");
	ten_span.innerHTML = opisiki[numer_boksu];
	
	for (i = 1; i <= boksow; ++i) {
		ten_obrazek = getE("ikoban_" + i);
		ten_obrazek.src = '/atm/grafiki/ikony/ban_' + i + '.gif';
		}
	var ikoban = numer_boksu+1;
	ten_obrazek = getE("ikoban_" + ikoban);
	ten_obrazek.src = '/atm/grafiki/ikony/ban_' + ikoban + 'u.gif';
	
	petla = setTimeout("wlacz_boksy()", boksowy_interwal);
	}

function ustaw_boks(numer) {
	clearTimeout(petla);
	numer_boksu = numer-1;
	wlacz_boksy();
	}
