


function akt_data_czas_daj()
{
 var czas  = new Date();
 rok   = czas.getYear();
 mies  = ( ( czas.getMonth() < 10 ) ? "0": "" ) + ( czas.getMonth() + 1 );
 dzien = ( ( czas.getDate()  < 10 ) ? "0": "" ) + ( czas.getDate() );
 godz  = ( ( czas.getHours() < 10 ) ? "0": "" ) + ( czas.getHours() );
 min   = ( ( czas.getMinutes() < 10 ) ? "0": "" ) + ( czas.getMinutes() );
 sek   = ( ( czas.getSeconds() < 10 ) ? "0": "" ) + ( czas.getSeconds() );
 
 return dzien+"_"+mies+"_"+rok+"_"+godz+"_"+min+"_"+sek;
}






function peok(url, width, height, params)
{ 
 aktdata=akt_data_czas_daj();
 maxszer=window.screen.width;
 maxwys=window.screen.height;
 polx=Math.round( (maxszer-width)/2);
 poly=Math.round( (maxwys-height)/2)-20;
 
 if (params=='') params="toolbar=no, scrollbars=auto, directories=no, menubar=no, resizable=no,";
 
 window.open(url,aktdata,params+", top="+poly+", left="+polx+", width="+ width +",height="+ height);
}






function peokn(a, b, c)
{
 //pliki/File/BiskupD_3.jpg
 aktdata=akt_data_czas_daj();
 params="toolbar=no, scrollbars=auto, directories=no, menubar=no, resizable=no";
 window.open('obrazek.php?f='+a,aktdata,params);
}






function pisz_div(gdzie, co)
 {
  var d=window.parent.document;
  if (d.layers)with(d.layers[""+gdzie].document)
    {
     write(co);close();
     return
    }
  if (d.getElementById)
    {
     d.getElementById(""+gdzie).innerHTML=co;
     return
    }
  if (d.all) d.all[""+gdzie].innerHTML=co;
}






function setWindSizPos(w, h)
{
 maxszer=window.screen.width;
 maxwys=window.screen.height;
 polx=Math.round( (maxszer-w)/2);
 poly=Math.round( (maxwys-h)/2)-20;
 
 window.resizeTo(w, h);
 window.moveTo(polx, poly);
}




   var arrTemp=self.location.href.split("?"); 
   var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
   var NS = (navigator.appName=="Netscape")?true:false; 


function adjust_popup(w, h)
{
 maxszer=window.screen.width;
 maxwys=window.screen.height;
 
 iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
 iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
 iWidth = document.images[0].width - iWidth; 
 iHeight = document.images[0].height - iHeight; 
 window.resizeBy(iWidth, iHeight+20); 
 self.focus(); 
 
 polx=Math.round( (maxszer-w)/2);
 poly=Math.round( (maxwys-h)/2)-20;
 
 window.moveTo(polx, poly);
}



