<!--

// funkcja otwierająca nowe okno do wybierania lub wprowadzania danych 
function okno_dodaj(strona, szerokosc){
	window.open(strona,'','width='+szerokosc+',toolbar=no,directories=no,menubar=no,locations=no,status=no,scrollbars=yes,resizable=yes,fullscreen=no');
}

a1x = new Array(10,10,10,10,40,70,70,70,70,70,70,70,70);
a1y = new Array(50,33,17,0,0,0,17,33,42,46,48,49,50);
a2x = new Array(70,70,70,70,70,70,70,70,70,70,70,70,70);
a2y = new Array(50,67,83,100,100,100,113,127,134,137,138,139,140);
a3x = new Array(70,70,70,70,40,10,10,10,10,10,10,10,10);
a3y = new Array(140,157,173,190,190,190,173,157,148,144,142,141,140);
a4x = new Array(10,10,10,10,10,10,10,10,10,10,10,10,10);
a4y = new Array(140,127,113,100,100,100,83,67,58,54,52,51,50);
var krok = null;
var w_ruchu = 0;
var cien;
var swiatlo;
function animuj() {
	if ( w_ruchu == 1 )
		return;
	cien = '#000000';
	swiatlo = '#ffffff';
	window.document.images.a1.style.borderLeftColor = swiatlo;
	window.document.images.a1.style.borderRightColor = cien;
	window.document.images.a1.style.borderTopColor = swiatlo;
	window.document.images.a1.style.borderBottomColor = cien;
	window.document.images.a2.style.borderLeftColor = swiatlo;
	window.document.images.a2.style.borderRightColor = cien;
	window.document.images.a2.style.borderTopColor = swiatlo;
	window.document.images.a2.style.borderBottomColor = cien;
	window.document.images.a3.style.borderLeftColor = swiatlo;
	window.document.images.a3.style.borderRightColor = cien;
	window.document.images.a3.style.borderTopColor = swiatlo;
	window.document.images.a3.style.borderBottomColor = cien;
	window.document.images.a4.style.borderLeftColor = swiatlo;
	window.document.images.a4.style.borderRightColor = cien;
	window.document.images.a4.style.borderTopColor = swiatlo;
	window.document.images.a4.style.borderBottomColor = cien;
	
	//document.writeln('w:'+cien);
	krok = 0;
	w_ruchu = 1;
	//animuj_wykonaj();
	setTimeout ('animuj_wykonaj()',300);
}

function animuj_wykonaj() {
	if (  krok > 12 ){
		tx = a4x; ty = a4y;a4x = a1x; a4y = a1y;	a1x = a2x; 	a1y = a2y; a2x = a3x; 	a2y = a3y; a3x = tx; a3y = ty;
		w_ruchu = 0;
		window.document.images.a1.style.borderLeftColor = cien;
		window.document.images.a1.style.borderRightColor = swiatlo;
		window.document.images.a1.style.borderTopColor = cien;
		window.document.images.a1.style.borderBottomColor = swiatlo;
		window.document.images.a2.style.borderLeftColor = cien;
		window.document.images.a2.style.borderRightColor = swiatlo;
		window.document.images.a2.style.borderTopColor = cien;
		window.document.images.a2.style.borderBottomColor = swiatlo;
		window.document.images.a3.style.borderLeftColor = cien;
		window.document.images.a3.style.borderRightColor = swiatlo;
		window.document.images.a3.style.borderTopColor = cien;
		window.document.images.a3.style.borderBottomColor = swiatlo;
		window.document.images.a4.style.borderLeftColor = cien;
		window.document.images.a4.style.borderRightColor = swiatlo;
		window.document.images.a4.style.borderTopColor = cien;
		window.document.images.a4.style.borderBottomColor = swiatlo;
		return;
	}
	object = document.getElementById( 'a1' );
	object.style.left = a1x[krok] +'px';
	object.style.top = a1y[krok] +'px';
	object = document.getElementById( 'a2' );
	object.style.left = a2x[krok] +'px';
	object.style.top = a2y[krok] +'px';
	object = document.getElementById( 'a3' );
	object.style.left = a3x[krok] +'px';
	object.style.top = a3y[krok] +'px';
	object = document.getElementById( 'a4' );
	object.style.left = a4x[krok] +'px';
	object.style.top = a4y[krok] +'px';
	++krok;
	setTimeout ('animuj_wykonaj()',100);
}
//-->


