//otwórz stronę
function loaddoc(link) {
var link;
window.location.href=link;
}

//otwarcie zdjęcia w nowym oknie
function new_img(link, width, height) {
var link;
var width;
var height;
window.open('window.php?bimage='+link+'', 'foto' ,'left=20,top=20, width='+width+' , height='+height+', menubar=0, resizable=1, scrollbars=1');
}

//otwarcie strony w nowym oknie
function new_win(link, width, height) {
var link;
var width;
var height;
window.open(link, 'noweokno' ,'left=20,top=20, width='+width+' , height='+height+', menubar=0, resizable=1, scrollbars=1');
}

//w zależnosci od wybranej wartosci pola select 1 pokaz odpowiedni select 2
function subsel(sel1)
{
	if (!subtab)
	{
		alert ('Nie ma tablicy subtab ! Wstaw do index.php $tab[3]');
	}
	else
	{
		ma = document.getElementById(sel1).value; //glowny select
		for (i=0; i<subtab.length; i++) //w petli sprawdz wszystkie divy z selectami - pokaz jeden wlasciwy
		{
			sub = "sub"+subtab[i];
			p = document.getElementById(sub);

			if (ma == subtab[i])
			p.style.display="inline";
			else
			p.style.display="none";
		}
	}
}

// pokazuje i chowa boczny pasek z partnerami
function show_hide(id)
{
	e = document.getElementById(id);
	a = document.getElementById('ar');
	s = document.getElementById('arrow');
	if (a.value==1)
	{
		e.style.display = "block";
		a.value = 2;
		s.src = "images/arrow_right.gif";
	}
	else
	{
		e.style.display = "none";
		a.value = 1;
		s.src = "images/arrow_left.gif";
	}
}

