// Script Source: CodeLifter.com

// Set the horizontal and vertical position for the popup
    PositionX = 100;
    PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
    defaultWidth  = 500;
    defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
    var AutoClose = true;

// Do not edit below this line...
// ================================
    var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

    function popImage(imageURL,imageTitle,imageAuthor) {
	    imgWin=window.open('about:blank','',optIE);
	    with (imgWin.document) {
		    writeln('<html><head><title>Loading...</title><meta http-equiv="content-type" content="text/html;charset=ISO-8859-2"><style>body{margin:0px;}</style>');
		    writeln('<script>');
    
		    writeln('function reSizeToImage(){');
    			    writeln('window.resizeTo(100,100);');
			    writeln('width=100+100-(document.body.clientWidth-document.images[0].width);');
			    writeln('height=100+100-(document.body.clientHeight-document.images[0].height);');
			    writeln('window.resizeTo(width,height);}');
    
		    writeln('function doTitle(){document.title="'+imageTitle+'";}');
		    writeln('</sc'+'ript>');
    
		    if (!AutoClose) writeln('</head><body bgcolor=#ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
		    else writeln('</head><body bgcolor=#ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
    		    writeln('<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle">');
    		    writeln('<table border="0" cellspacing="1" cellpadding="0"><tr><td align="right" valign="bottom">');
		    writeln('<table border="0" cellspacing="1" cellpadding="0" bgcolor="#000000"><tr><td>');
		    writeln('<img name="LoadedImage" src='+imageURL+' style="display:block">');
		    writeln('</td></tr></table><span class="srtext"><font face="Verdana" font size="1">Copyright &copy; ZITAVA.SK, 2005-2011</font>'+imageAuthor+'</span></td></tr></table></td></tr></table></body></html>');
		    close();
	}
   }

