	// langu atidarymas pagal fiksuota arba skirtinga dydi:
	// ===============================
	
	function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); } 
    function naujaslangas(URLtoOpen, windowName, windowFeatures) {langas=window.open(URLtoOpen, windowName, 'width=500,height=700,toolbar=0,scrollbars=1,screenX=200,screenY=200,left=200,top=200');}
	
// nuotrauku atidarymas pagal dydi:
// ===============================
 
// Set the horizontal and vertical position for the popup
 
PositionX = 100;
PositionY = 50;
 
// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
 
defaultWidth  = 600;
defaultHeight = 480;
 
// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
 
var AutoClose = false;
 
// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
var isSafari=(navigator.userAgent.indexOf("Safari")!=-1)?1:0;}
var optNN='scrollbars=no,status=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,status=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function nuotrauka(imageURL,imageTitle){
var imgWin=window.open('www.plastikinestvoros.lt',imageTitle,optNN);
 
with (imgWin.document){
writeln('<html><head><title>www.plastikinestvoros.lt</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE,isSafari;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;');writeln('isSafari=(navigator.userAgent.indexOf("Safari")=-1)?1:0;}');
 
writeln('function reSizeToImage(){');
 
writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=250-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
 
writeln('if (isNN){');writeln('window.resizeTo(100,100);');
writeln('width=110-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
 
writeln('if (isSafari){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');

 
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
writeln('<html><head><title>www.plastikinestvoros.lt</title><body onload="window.reSizeToImage(this.width, this.height)" onblur="self.close()"><img name="George" src='+"http://www.plastikinestvoros.lt/"+escape(imageURL)+' style="display:block"></body></html>');
close();
}}
