function boxRotator(id, active) {

				var id=id+'DD';

				var lastActive = active;

				var repeatTime = 0;

				var DDCount = 0;

				var DDaCount = 0;

				var ts = -1;



				//szukanie zakladek DD

				var tag = document.getElementsByTagName('div');

				for (i=0;i<tag.length;i++) {

					if (tag[i].id.indexOf(id)==0) {

						DDCount++;

					}

				}

				//szukanie zakladek DDa

				tag = document.getElementsByTagName('a');

				for (i=0;i<tag.length;i++) {

					if (tag[i].id.indexOf(id+'a')==0) {

						DDaCount++;

					}

				}

				//if (DDCount!=DDaCount) alert("Bląd ilości div'ów i zakladek: "+DDCount+":"+DDaCount);



				this.click = function (n) {

					try {

						document.getElementById(id+lastActive).style.display='none';

						document.getElementById(id+n).style.display='';

						document.getElementById(id+'a'+lastActive).className='';

						document.getElementById(id+'a'+n).className='on';

						lastActive=n;

					} catch (err) {}

				

				}

				this.next = function () {

					if (lastActive==DDCount) this.click(1); else this.click(lastActive+1);

				}

				

				this.previous = function () {

					if (lastActive>1) this.click(lastActive-1); else this.click(DDCount);	

				}

				this.click(active);

			}
/* KALENDARZ */

var toS;

var toH;

var nrPrev=1;

function show(nr) {

	clearTimeout(toS);

	toS = setTimeout("showD("+nr+");", 150);

}

function hide(nr) {

	clearTimeout(toH);

	toH = setTimeout("hideD("+nr+");", 150);

}

function showD(nr) {

	document.getElementById("l" + nrPrev).style.display = "none";

	document.getElementById("i" + nrPrev).style.zIndex = 5;

	document.getElementById("i" + nr).style.zIndex = 7;

	document.getElementById("l" + nr).style.zIndex = 6;

	document.getElementById("l" + nr).style.display = "";

	nrPrev = nr;

}

function hideD(nr) {

	document.getElementById("i" + nr).style.zIndex = 5;

	document.getElementById("l" + nr).style.display = "none";

}

//Zmiana rozmiaru czcionki w tresci artykulow
function setFontSize(fSize,src) {
    WP.$("span.f1").css("text-decoration","none");
    WP.$("span.f2").css("text-decoration","none");
    WP.$("span.f3").css("text-decoration","none");
    WP.$(src).css("text-decoration","underline");
	if (1 == WP.$("div.mainTxt").length) {
		WP.$("div.mainTxt").css("font-size",fSize+"px");
	} else if(1 == WP.$("#aTxt").length) {
		WP.$("#aTxt").css("font-size",fSize+"px");
	}
}

