
function popupMedia(url,width,height) {
	winheight = parseFloat(height) + 0;
	winwidth =  parseFloat(width) + 0;

	newWin=window.open('', 'popupwin','resizable=0,HEIGHT='+winheight+',WIDTH='+winwidth+', scrollbars=1', true);
	newWin.document.write('<html>\n');
	newWin.document.write('<head>\n');
	newWin.document.write('<title>Foto</title>');
	newWin.document.write('</script><script language="javascript" type="text/javascript">\n<!--\n');
	newWin.document.write('var arrTemp=self.location.href.split("?");\n');
	newWin.document.write('var picUrl = (arrTemp.length>1)?arrTemp[1]:"";\n');
	newWin.document.write('var NS = (navigator.appName=="Netscape")?true:false;\n');
	newWin.document.write('function fitMedia() {\n');
	newWin.document.write('	iWidth = (NS)?window.innerWidth:document.body.clientWidth;\n');
	newWin.document.write('	iHeight = (NS)?window.innerHeight:document.body.clientHeight;\n');
	newWin.document.write('	iWidth = '+winwidth+' - iWidth;\n');
	newWin.document.write('	iHeight = '+winheight+' - iHeight;\n');
	newWin.document.write('	window.resizeBy(iWidth, iHeight);\n');
	newWin.document.write('	var posLeft = (window.screen.width - '+winwidth+')/2;\n');
	newWin.document.write('	window.moveTo(posLeft,80);\n');

	newWin.document.write('}</script>;\n');
	newWin.document.write('-->\n</script>\n');
	newWin.document.write('<br><br><br><br><br>\n');	
	newWin.document.write('<iframe style="position:absolute; top:-40px; left:-5px; "  width="490" height="130" scrolling=no src="http://www.jusz.home.pl/popup/reklama.php?id=28"></iframe>\n');	
	newWin.document.write('<style>html,body{height:100%;padding:0px; margin:0px;}</style>\n');

	newWin.document.write('</head>\n');
	newWin.document.write('<body style="background-color:white; margin:0px; padding:0px;">\n');
	newWin.document.write('<table border=0 cellpadding=0 cellspacing=0 style="height:100%; width:100%; text-align:center;"><tr><td>\n');
	newWin.document.write('<a href="javascript:window.close()"><img border="0" src="'+url+'" width="'+width+'" height="'+height+'" alt="" /></a></script>');
	newWin.document.write('</td>\n</tr>\n</table>\n</body>\n<script language="javascript" type="text/javascript">\n<!--\n');
	newWin.document.write('fitMedia();\n');
	newWin.document.write('-->\n</script>\n');

	newWin.document.write('</html>');
	newWin.document.close()
	newWin.focus();
}


function popupMedia2(url,width,height,opis) {
	winheight = parseFloat(height) + 30;
	winwidth =  parseFloat(width) + 0;

	newWin=window.open('', 'popupwin','resizable=0,HEIGHT='+winheight+',WIDTH='+winwidth+', scrollbars=0', true);
	newWin.document.write('<html>\n');
	newWin.document.write('<head>\n');
	newWin.document.write('<title>IncludeGallery: '+opis+'</title>');
	newWin.document.write('<script language="javascript" type="text/javascript">\n<!--\n');
	newWin.document.write('var arrTemp=self.location.href.split("?");\n');
	newWin.document.write('var picUrl = (arrTemp.length>1)?arrTemp[1]:"";\n');
	newWin.document.write('var NS = (navigator.appName=="Netscape")?true:false;\n');
	newWin.document.write('function fitMedia() {\n');
	newWin.document.write('	iWidth = (NS)?window.innerWidth:document.body.clientWidth;\n');
	newWin.document.write('	iHeight = (NS)?window.innerHeight:document.body.clientHeight;\n');
	newWin.document.write('	iWidth = '+winwidth+' - iWidth;\n');
	newWin.document.write('	iHeight = '+winheight+' - iHeight;\n');
	newWin.document.write('	window.resizeBy(iWidth, iHeight);\n');
	newWin.document.write('	var posLeft = (window.screen.width - '+winwidth+')/2;\n');
	newWin.document.write('	window.moveTo(posLeft,80);\n');
	newWin.document.write('};\n');
	newWin.document.write('-->\n</script>\n');

	newWin.document.write('<style>html,body{height:100%;padding:0px; margin:0px;}</style>\n');
	newWin.document.write('</head>\n');
	newWin.document.write('<body valign=top style="background-color:#DFDFDF;  margin:0px; padding:0px;">\n');
	newWin.document.write('<table valign=top border=0 cellpadding=0 cellspacing=0 style="font-size: 16px; height:100%; width:100%; text-align:center;"><tr><td valign=top>\n');
	newWin.document.write('<a href="javascript:window.close()"><img border="0" src="'+url+'" width="'+width+'" height="'+height+'" alt="" /></a><br>');
	
	newWin.document.write('<table valign=middle border=1 cellpadding=0 cellspacing=0 style="font-size: 16px; height:30; width:100%; text-align:center;"><tr><td valign=middle>\n');
	newWin.document.write(opis+'</td>\n</tr>\n</table>');
	
	newWin.document.write('</td>\n</tr>\n</table>\n</body>\n<script language="javascript" type="text/javascript">\n<!--\n');
	newWin.document.write('fitMedia();\n');
	newWin.document.write('-->\n</script>\n');	
	newWin.document.write('</html>');
	newWin.document.close()
	newWin.focus();
}