
var y=0;

function show()
{
	document.getElementById('ims').style.filter='';
	document.getElementById('ims').style.border='1px solid black';
}

function hide()
{
	document.getElementById('ims').style.filter='Alpha(Opacity=50)';
	document.getElementById('ims').style.border='1px solid #808080';
}

function position(L, what)
{
	var str = document.getElementById('str').style.left;
	var tmp = new Array();
	tmp = str.split('px');
	str = tmp[0];
	if ((str<=-100 && what=="mol") || (str>=-15600 && what=="mor"))
	{
		str = eval(str-L)+"px";
		document.getElementById('str').style.left = str;
		if (y!=0) { move(what); }
		window.status=document.getElementById('str').style.left;
	}
}

function move(what)
{
	if (what=="mol")
	{
		if (y>-38)
		{
			y--;
			setTimeout("position(y, 'mol')", 20);
		}
		else { y = 0; }
	}
	if (what=="mor")
	{
		if (y<38)
		{
			y++;
			setTimeout("position(y, 'mor')", 20);
		}
		else { y = 0; }
	}
}

function wind(height, src)
{
	if (navigator.appName == "Microsoft Internet Explorer" && window.screen.height < height) { height-=150; }
	else { height+=52; }

	var open = window.open('', '', 'width=650, height='+height+', left=150, top=25, scrollbars=yes, resizable=no, menubar=no, toolbar=no, location=no, directories=no, status=no');
	open.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n');
	open.document.write('   "http://www.w3.org/TR/html4/loose.dtd">\n');
	open.document.write('<html>\n');
	open.document.write('<head>\n');
	open.document.write('<meta http-equiv="Content-type" content="text/html; charset=utf-8">\n');
	open.document.write('<meta http-equiv="Content-Language" content="pl">\n');
	open.document.write('<meta http-equiv="Expires" content="0">\n');
	open.document.write('<meta http-equiv="imagetoolbar" content="no">\n');
	open.document.write('<title> Galeria (kliknij na zdjęciu, aby zamknąć okno) </title>\n');
	open.document.write('<meta name="Author" content="Flatten Image">\n');
	open.document.write('<link rel="Stylesheet" href="style.css" type="text/css">\n');
	open.document.write('</head>\n');
	open.document.write('<body style="margin: 25px 0px 25px 0px; background-color: #FFFFFF; overflow: auto;">\n');
	open.document.write('<div id="gal"><a href="javascript:window.close()"><img src="'+src+'" alt=""></a></div>\n');
	open.document.write('</body>\n');
	open.document.write('</html>\n');
}

