
   function myWindowX(sirka,vyska,obrazek,okraj,titul,popis){

      var myHeight,myWidth;
      var WinProps;
      var actWinHeight,actWinWidth;

      if (vyska<(screen.height-80))
         myHeight=vyska;
      else
         myHeight=screen.height-80;

      if (sirka<(screen.width-50))
         myWidth=sirka;
      else
         myWidth=screen.width-50;

      WinProps='left='+(screen.width-(myWidth+20))+',top=5,width='+myWidth+',height='+myHeight+',resizable,scrollbars';
      imagWindow=window.open('','MOJE_OKNO',WinProps);

      if (navigator.appName=="Netscape")
      {
         actWinHeight=imagWindow.innerHeight;
         actWinWidth=imagWindow.innerWidth;
      }
      else
      {
         actWinHeight=imagWindow.document.body.offsetHeight;
         actWinWidth=imagWindow.document.body.offsetWidth;
      }

      if ((actWinHeight>(myHeight+10)) || (actWinHeight<myHeight) || (actWinWidth>(myWidth+10)) || (actWinWidth<myWidth))
      {
         imagWindow.close();
         imagWindow=window.open('','MOJE_OKNO',WinProps);
      }

      with(imagWindow)
      {
         document.write('<html>\n<head><title>'+titul+'</title>\n<style>\nbody{background-color:#ffffff;font-family:Verdana,Arial;font-size=8pt}\np{font-family:Verdana,Arial;font-size:8pt}\nimg {border-color:#000000}\n</style>\n</head>\n<body marginheight=\'25\'topmargin=\'25\'>\n');
         document.write('<p align=center><a href=Javascript:window.close()><img src=\''+obrazek+'\' border=\''+okraj+'\' title=\'ZAVØÍT / CLOSE\'></a></p>\n');
				 if (popis != '')
           document.write('<p align=center>'+popis+'</p>\n');
//         document.write('<p align=center><a href=Javascript:window.close()><img src=\'pics/backx.gif\'border=\'0\'alt=\'CLOSE\'><br>ZAVØÍT</a></p>\n');
         document.write('</body>\n</html>\n');
         document.close();
		   focus();
		}
	}

