var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(document.all)?1:0;
var isOP=(window.opera)?1:0;
var AutoClose = true;

function popImage(imageURL,imageTitle, wi, he )
{
	w = wi ? wi : 300;
	h = he ? he : 300;

	/*alert( screen.width );*/

	imgWin=window.open('about:blank','','scrollbars=no,width='+w+',height='+h+',left='+(screen.width/2-(w/2))+',top='+(screen.height/2-(isOP?h+50:h/2)));
	with (imgWin.document){
	writeln('<html><head><title>£adowanie obrazka...</title><style>html,body{height:100%}body{margin:0px;padding:0;border:0;background-color:#000000;}.max{height:100%;width:100%}</style>');
	writeln('<sc'+'ript>');
	if( !wi || !he  )
	{
		writeln('var isNN='+isNN+',isIE='+isIE+',isOP='+isOP+';');
		writeln('function reSizeToImage(){');
		writeln('g=document.images[0],gW=g.width,gH=g.height;');
		writeln('if(isIE){');
		writeln('window.resizeTo(100,100);');
		writeln('width=100-(document.body.clientWidth-gW)'+(isOP?'+10':'')+';');
		writeln('height=100-(document.body.clientHeight-gH)'+(isOP?'-16':'')+';');
		writeln('window.resizeTo(width,height);}');
		writeln('if(isNN){');
		writeln('window.innerWidth=gW+20;window.innerHeight=gH+60;');
		writeln('window.innerWidth=gW;window.innerHeight=gH;');
		writeln('}window,moveBy(-gW/2+150,-gH/2+150);waits=document.getElementById("wait").style;waits.display="none";waits.visibility="hidden"}');
	}
	writeln('function doTitle(){document.title="'+imageTitle+'";}');
	writeln('</sc'+'ript>');
	writeln('</head><body style="cursor:wait" bgcolor=000000 scroll="no" onclick="window.close()" onload="'+( (!wi || !he) ? 'reSizeToImage();' : '' )+'doTitle();this.window.focus();"'+(!AutoClose?'':' onblur="this.window.close()"')+'>');
	if( !wi || !he  ){ writeln('<table id=wait style="position:absolute;" class=max><tr><td align=center><div style="color:#ffffff;border:1px solid silver;background-color:black;font-family:verdana,sans-serif;font-size:10px;padding:3px;width:100px">momencik...<br></div></td></tr></table>'); }
	writeln('<table class=max cellpadding=0 cellspacing=0 border=0><tr><td align=center><a href="javascript:self.close();" title="kliknij aby zamkn±æ"><img src='+imageURL+' border="0" style="display:block;border:0;margin:auto;"></a></td></tr></table></body></html>');
	close();		
	}
}

function nityangi()
{
	if( document.all && !window.opera )
	{
		document.write( 
			'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '+
			'WIDTH="219" HEIGHT="347"><PARAM NAME=movie VALUE="img/nityangi.swf"><PARAM NAME=wmode VALUE=transparent></OBJECT>' );
	}
}

function print_r(obj)
{
	var result = "", o, html;
	for (var i in obj)
	{
		result += ".<b>" + i + "</b> = <font color=red>" + obj[i] + "</font><br>\n";
	}

	o = window.open('','_blank','toolbar=0, location=0, maximize=1, directories=0, status=0, menubar=0, scrollbars=1, resizable=1, width=300, height=300');

	html+= "<html>\n\t<head>\n\r<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\">\n\t<title>print_r</title>\n</head>\n<body style=\"font-family: Tahoma, Arial; font-size:7pt\">\n"+result+"</body>\n</html>";

	o.document.write( html );
}