// JavaScript created by www.web-spiders.zagan.net
function popup_no_scrolls(url, name, width, height)
{
	var x = (screen.availWidth - width)/2;
	var y = (screen.availHeight - height)/2;

	win = window.open(url, name, 'width='+width+',height='+height+',left='+x+',top='+y+',toolbar=0,menubar=0,scrollbars=0,resizable=0');

	win.focus();
}

function popup_scrolls(url, name, width, height)
{
	var x = (screen.availWidth - width)/2;
	var y = (screen.availHeight - height)/2;

	win = window.open(url, name, 'width='+width+',height='+height+',left='+x+',top='+y+',toolbar=0,menubar=0,scrollbars=1,resizable=0');

	win.focus();
}

// Auto popup optymized by webszok.net
// Set the horizontal and vertical position for the popup

var speed = .20;
var timer=0;
var img = new Image();
var nW='';
var path='';

function resizeInit()
{
	clearTimeout(timer); //stop letters
	with(nW)if(closed||!E)return;
		else {
			l.innerHTML="Obrazek pobrany";
			focus();
		}
	timer=setTimeout(function() {
		nW.l.style.display='none';
		nW.b.style.backgroundImage="url('"+img.src+"')";
		timer = setInterval(resize,15);
	},400);
}
function resize(tH,tW,rs)
{
	with(nW)if(closed||!E)return;
	with(img) {
		rs=width/height*speed;
		tH=height-(nW.innerHeight||nW.E.clientHeight||nW.b.clientHeight);
		tW=width-(nW.innerWidth||nW.E.clientWidth||nW.b.clientWidth);
	}
	if(!(tH=Math.abs(tH)>5?tH*rs:0)&&!(tW=Math.abs(tW)>5?tW*rs:0))timer=clearInterval(timer);
	nW.moveBy(-tW/2,-tH/2);
	nW.resizeBy(tW,tH+3);
}
img.onload = resizeInit
img.onerror = function(){
	nW.l.innerHTML="Nastąpił błąd przy pobieraniu obrazka";
	timer=clearTimeout(timer); //stop letters
}

function windowOpen(l,n,w,h,ie){return window.open(l,n,'scrollbars=yes,height='+h+',width='+w+((ie=document.all)?',left=':',screenX=')+((screen.availWidth/2)-(w/2))+(ie?',top=':',screenY=')+((screen.availHeight/2)-(h/2))+',toolbar=no, menubar=no,location=no,scrollbars=no,personalbar=no,status=no,resizable=no');}

function popImage(o,name,d,E,b){
	d=document;E=d.documentElement;b=document.body;if(!E)return!0;
	timer=clearTimeout(timer);
	if(!window.opera&&nW) nW.close();
	with( (nW= windowOpen('',name,'560','50')).document ) {
		open();
		write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'+
			'<h'+'tml xmlns="http://www.w3.org/1999/xhtml">'+
			'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">'+
			'<title>Powiększenie obrazka</title>\n\n'+
			'<style type="text/css">body{margin:0;padding:0;background:#ffffff no-repeat;}\n#loading{text-align:center;color:#717171;background:#f5f5f5;font:bold 12px Verdana;width:100%;}</style>'+
			'</head><b'+'ody><br />'+
			'<div id="loading">Pobieranie obrazka proszę czekać...</div>'+
			'</bo'+'dy></ht'+'ml>');
		close();
	}
	nW.d=nW.document;nW.E=nW.d.documentElement;nW.b=nW.d.body;
	nW.l=nW.d.getElementById('loading');
	nW.inf=nW.l.innerHTML;
	img.src=path+o;
	if(img.complete)setTimeout(resizeInit,500);
	return!1;
}