function okno(url, title)
{
 with(open('','fotka','width=200,height=100,left=100,top=100'))
 {
  document.write('<html><head><title>'+title+'</title>'+
  '<script type="text/javascript">function L(I){'+
  'I.parentNode.style.visibility="visible";'+
  'focus();resizeTo(I.width+16,I.height+35)}<\/script></head>'+
  '<body style="background-color:white;'+
  'border:0px;font: bold 12px Verdana">'+
  '<p>Wczytuję zdjęcie</p><div style="overflow:hidden;'+
  'position:absolute;visibility:hidden;left:0;top:0">'+
  '<a href=\"javascript:close()\">'+
  '<img onerror="L=parentNode.previousSibling;L.innerHTML='+
  '\'nie ma takiego zdjęcia\';L.style.backgroundColor=\'red\';'+
  'window.focus()" onload="L(this)" src="'+url+'" border="0"></a></div></body></html>')
  document.close()
 }
}

function DocumentOnLoad() 
 {
  PreloadImages('gfx/p/p1h.gif', 'gfx/p/p2h.gif', 'gfx/p/p3h.gif');
 }

function PreloadImages() 
 {
  if (document.images)
   {
    var imgFiles = PreloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0;j < imgFiles.length;j++)
    if (imgFiles[j].charAt(0) != "#")
     {
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
     }
   }
 }