doc=document;
obrazek=new Image();
otwarte=0

function zoom(load){
  var wid=260
  var hgt=260
  var posx = ((screen.width/2)-(wid/2));
  var posy =((screen.height/2)-(hgt/2));	
  var opt='scrollbars=0,status=0,width='+wid+',height='+hgt+',left='+posx+',top='+posy;
  if(otwarte)noweOkno.close();
  noweOkno=window.open('','',opt);
  noweOkno.resizeTo(wid,hgt);
  noweOkno.document.open()
  noweOkno.document.write('<html><head><title>Ogłoszenia</title><script>opener.otwarte=1</script></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table border=0 cellpadding=0 cellspacing=0 ><tr><td width=260 height=200 align="center" valign="middle" style="font:10px Verdana;color:rgb(51,102,204);">Proszę poczekać <br> trwa ładowanie obrazka ...</td></tr></table></body></html>');
  noweOkno.document.close()
  noweOkno.moveTo(posx,posy);
  obrazek.wWid=wid
  obrazek.wHgt=hgt
  obrazek.onload=cd;
  
  obrazek.src=load;
  function cd(){
    var imW=this.width;
    var imH=this.height;
    var posx = ((screen.width/2)-(imW/2));
    var posy =((screen.height/2)-(imH/2));
    var wid=this.wWid-(noweOkno.document.body.clientWidth-imW)
    var hgt=this.wHgt-(noweOkno.document.body.clientHeight-imH)
    if(!otwarte)noweOkno=window.open('','',opt);
    noweOkno.moveTo(posx,posy);
    (navigator.appName=="Netscape")?(noweOkno.innerWidth=imW,noweOkno.innerHeight=imH):(noweOkno.resizeTo(wid,hgt));
    noweOkno.document.open()
    noweOkno.document.write('<html><head><title>Ogłoszenia</title><script>opener.otwarte=1</script></head><body style="margin: 0;"><table border=0 cellpadding=0 cellspacing=0><tr><td><img src="'+obrazek.src+'" style="cursor:hand;cursor:pointer;" alt="zamknij" title="zamknij" onclick="self.close()"></td></tr></table></body></html>');
    noweOkno.document.close()
    noweOkno.onblur=function(){self.close()}
    noweOkno.focus()
    
  }
}

function show(co){ 
  window.open(co, "_blank", "width=450, HEIGHT=450,directories=no, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, toolbar=no"); 
}

