function kursor (ob) {
  	ob.style.cursor = "pointer";
}

function btnZmOver (nazwa, plik) {
	document.getElementById(nazwa).src=plik;
}

function btnZmOut (nazwa, plik) {
	document.getElementById(nazwa).src=plik;
}

function btnZmOverPNG (id) {
	document.getElementById(id+"_over").className="pokaz png";
	document.getElementById(id).className="ukryj png";
}

function btnZmOutPNG (id) {
	document.getElementById(id).className="pokaz png";
	document.getElementById(id+"_over").className="ukryj png";
}


function of_btn_activ (nr) {
  	document.getElementById("Pw"+nr).className = "Pwiersz_over";
  	document.getElementById("Pa"+nr).className = "Pa_over";
  	
}
function of_btn (nr) {
  	document.getElementById("Pw"+nr).className = "Pwiersz";
	document.getElementById("Pa"+nr).className = "Pa";
}

function of_btnkat_activ (nr) {
  	document.getElementById("w"+nr).className = "wiersz_over";
  	document.getElementById("s"+nr).className = "strzalka2_over";
  	document.getElementById("a"+nr).className = "a_over";
  
}
function of_btnkat (nr) {
  	document.getElementById("w"+nr).className = "wiersz";
  	document.getElementById("s"+nr).className = "strzalka2";
	document.getElementById("a"+nr).className = "a";
}



//animacja dla boxy - realizacje ===============================================
var B_ile = 0;
var akt_B = 1;
var nr_krok = 1;
var petla = 1;
var ost = 0;
var blokuj = false;
function animuj_boxy () {

  	if (blokuj) {
  	  	akt_B = ost;
  	  	blokuj = false;
 		przenikanie_boxow ();
     
   	} else {
		if ((akt_B+1) <= B_ile) B_akt_next = akt_B+1; else B_akt_next = 1; 	
 		if (B_akt_next != akt_B) przenikanie_boxow ();
	}	 	
}

function przenikanie_boxow () {
  	var css1 = '';
  	var css2 = '';
  	ost = B_akt_next;

  	switch (nr_krok) {
    	case 1: css1 = 'box_pokaz'; css2 = 'box_ukryj'; break;
    	case 2: css1 = 'box_pokaz80'; css2 = 'box_pokaz20'; break;
    	case 3: css1 = 'box_pokaz60'; css2 = 'box_pokaz40'; break;
    	case 4: css1 = 'box_pokaz40'; css2 = 'box_pokaz60'; break;
    	case 5: css1 = 'box_pokaz20'; css2 = 'box_pokaz80'; break;
    	case 6: css1 = 'box_ukryj'; css2 = 'box_pokaz'; break;
	}
  	document.getElementById("BS_"+akt_B).className = css1; 
  	document.getElementById("BS_"+B_akt_next).className = css2;  
  	
  	nr_krok += 1;
	if (nr_krok == 7) {
	  	akt_B = B_akt_next;
	  	nr_krok = 1;
	  	kolejny_box();
	} else
	  	setTimeout("przenikanie_boxow()",50);
}

function kolejny_box () {
  	petla++;
  	if (petla >= 300) {
  	  	petla = 0;
 		setTimeout("animuj_boxy()",10);
 	} else
	 	setTimeout("kolejny_box()",10);	
}

function kolejny_box_nr (nr) {
  	if (nr == ost) return;
  	blokuj = true;
  	B_akt_next = nr;  	
  	petla = 300;
}

function liczba_boxow (b1) {
  	B_ile = b1;
  	setTimeout("animuj_boxy ()",1000);
}

