// r1 - rotace obrázků 2x blendtrans (1,1,4,1)
function rotate1(p01, p02, p03, p04) {

rot = p01;

while (rot == p01 || rot == p02) {
	rot = Math.floor(Math.random()*p03);
	if ( rot < p03)  rot++;}

img = "img/02" + rot + ".jpg";

if (window.document){
	if (p04 == 1){
		pc1.filters[0].apply();
		pc1.src = img;
		pc1.filters[0].play();}
	else {
		pc2.filters[0].apply();
		pc2.src = img;
		pc2.filters[0].play();}}
else {
	if (p04 == 1) document.getElementById("pc1").src = img;
	else document.getElementById("pc2").src = img;}

if ( p04 == 1){
	p01 = rot;
	p04 = 2;}
else{
	p02 = rot;
	p04 = 1;}

window.setTimeout("rotate1("+p01+","+p02+","+p03+","+p04+")",7000);
}


// r2 - rotace obrázků blendtrans (1,420,8)
function rotate2(p01, p02, p03) {

if ( p01 < p03)  p01++;
else p01 = 1;
rot = p01 + p02;
img = "img/" + rot + ".jpg";

if (window.document.pic){
	pic.filters[0].apply();
	pic.src = img;
	pic.filters[0].play();}
else document.getElementById("pic").src = img;

window.setTimeout("rotate2("+p01+","+p02+","+p03+")",7000);
}


// r3 - rotace obrázků revealtrans (1,520,8)
function rotate3(p01, p02, p03) {

rot = p01;

while (rot == p01) {
	rot = Math.floor(Math.random()*p03);
	if ( rot < p03)  rot++;
}

p01 = rot;
rot = p01 + p02;
img = "img/" + rot + ".gif";

if (window.document.pic){
	pic.filters[0].apply();
	pic.src = img;
	pic.filters[0].transition = rot;
	pic.filters[0].play();}
else document.getElementById("pic").src = img;

window.setTimeout("rotate3("+p01+","+p02+","+p03+")",5000);
}


// r4 - rotace obrázků blendtrans s textem (0,10,13)
function rotate4(p01, p02, p03, p04) {

if ( p01 < p03)  p01++;
else p01 = 1;
rot = p01 + p02;
if ( p02 == 10 ) img = "pro/";
else img = "";
img = img + "V-217_" + rot + ".jpg";
itx = "";

if		( p04 == "c" ) {
	if		( p01 == 1 ) itx = "Univerzální prádelenský kontejner V-217";
	else if	( p01 == 2 ) itx = "příslušenství – šatní tyč<br/>&nbsp;";
	else if	( p01 == 3 ) itx = "příslušenství – vkládací police (možnost 1 – 4 ks)";
	else if	( p01 > 3 && p01 < 7 ) itx = "příslušenství – sklopná police (možnost 1 – 2 ks)";
	else if	( p01 > 6 && p01 < 10) itx = "přední stěna – varianta I (horní a spodní dveře otevíratelné o 270°)";
	else if	( p01 > 9 && p01 < 13) itx = "přední stěna – varianta II (horní dveře sklopné)";
	else if	( p01 == 13) itx = "přední stěna (spodní dveře)<br/>&nbsp;";}
else if	( p04 == "s" ) {
	if		( p01 == 1 ) itx = "Universal contenedor de lavandería V-217<br/>&nbsp;";
	else if	( p01 == 2 ) itx = "accesorios - polo ropa<br/>&nbsp;<br/>&nbsp;";
	else if	( p01 == 3 ) itx = "accesorios – estantes extraíbles (opción 1 - 4 piezas)<br/>&nbsp;";
	else if	( p01 > 3 && p01 < 7 ) itx = "accesorios – estante plegable (opción 1 - 2 piezas)<br/>&nbsp;";
	else if	( p01 > 6 && p01 < 10) itx = "pared delantera – variante I (puerta superior e inferior se pueden abrir 270°)";
	else if	( p01 > 9 && p01 < 13) itx = "pared delantera – variante II (parte superior con bisagras)<br/>&nbsp;";
	else if	( p01 == 13) itx = "pared delantera (inferior de la puerta)<br/>&nbsp;";}

	
if (window.document.pic){
	pic.filters[0].apply();
	pic.src = img;
	pic.filters[0].play();}
else document.getElementById("pic").src = img;

if (window.document.txt) txt.innerHTML = itx;
else document.getElementById("txt").innerHTML = itx;

window.setTimeout("rotate4("+p01+","+p02+","+p03+",'"+p04+"')",4000);
}


// 1 - zoom obrázku produktu
function zoom(_p1,_p2)	{
	if (_p1 < "4") _04 = "pe1";
	else _04 = "pe2";

	_01 = document.getElementById(_04).src;
	_02 = _01.length;
	_03 = _01.substring(_02 - 10, _02);

	if (_03 == "none_2.bmp") _01 = "none_3.bmp";
	else if (_03 == "none_3.bmp") _01 = "none_2.bmp";
	else {;
		_03 = _p1 + _01.substring(_02 - 4, _02);
		_02 = _p2 + "_";
		_01 = _02 + _03;
		};
	_01 = "pro/" + _01;
	document.getElementById(_04).src = _01;
}

