obecne=0;
liczbamin=0;

function pokaz_blende(adres)
{

	document.getElementById('blenda').style.display='block';
	var blenda = new SWFObject("swf/okno.swf", "flash", "100%", "100%", "6", "#ffffff");
blenda.addVariable("linkFoto",adres);
blenda.addParam("wmode", "transparent");
blenda.write("blenda");
}

function schowanie_blendy()
{
	document.getElementById('blenda').style.display='none';
}

function zamknij_blende()
{
	document.getElementById('blenda').style.display='none';

}

function podmien_obraz(adres)
{
		document.getElementById('main-foto').style.background='url(images.php?picture='+adres+'&height=450) center no-repeat';
		document.getElementById('main-foto').onclick = function(){
	 // Note: onclick, not onClick
    pokaz_blende(adres);
	};
}

function fokus(numer)
{
	
	div='z'+numer;
	if(numer!=obecne)
	{
		
		
    mint.fx.Style(div, "opacity", null, "100", 20, 500);
	}
}

function nofokus(numer)
{
	div='z'+numer;
	if(numer!=obecne)
	{
	
    mint.fx.Style(div, "opacity", null, "30", 20, 500);
	}
}

function rozwin(id,ilosc)
{	
	for($i=1;$i<ilosc+1;$i++)
	{
		var str=$i/1000;
		str=str.toString();
		//alert(id+str.substr(2));
	if(document.getElementById(id+'.'+str.substr(2))!=null)
		{
			document.getElementById(id+'.'+str.substr(2)).style.display='block';
		 mint.fx.Style(id+'.'+str.substr(2), "height", null, "12", 6, 20);
		}
	}
}
