function powieksz(co)
{
   var px = screen.availWidth  /2 - 200;
   var py = screen.availHeight /2 - 200;
   fota = window.open('','fota','width=400, height=400, left='+px+' , top='+py+' ');
   fota.document.write('<center><img src="../files/'+co+'"></center>');
   fota.document.close();

}
function ctrlCV(co,e)
{
   var k = e.which || e.keyCode;
   var klawisz = String.fromCharCode(k).toLowerCase();
   if (e.ctrlKey && (klawisz == "c" || klawisz == "v"))
   {
      e.preventDefault?e.preventDefault():(e.returnValue = false);
      co.value=zaw;
   }
   zaw = co.value;
}

function zaawansowane(id)
{
   if(document.getElementById('ukryty_'+id+'').style.visibility=='hidden')
   {
      document.getElementById('ukryty_'+id+'').style.visibility='visible';
      document.getElementById('ukryty_'+id+'').style.position='relative';
      document.getElementById('przycisk_'+id+'').value='schowaj';
   }
   else
   {
      document.getElementById('ukryty_'+id+'').style.visibility='hidden';
      document.getElementById('ukryty_'+id+'').style.position='absolute';
      document.getElementById('przycisk_'+id+'').value='pokaż';
   }
}

function wszystkie(zaznacz)
{
   for (var d=0; d<document.forms.length; d++)
   {
      for (var s in document.forms[d])
      {
         if(s.indexOf('zaznaczony')>=0)
         {
            document.forms[d].zaznaczony.checked=zaznacz
         }
      }
   }
}

function zaznaczone(aktywuj)
{
  var tab_zaz = new Array();
  for (var c=0; c<document.forms.length; c++)
  {
     for (var p in document.forms[c])
     {
        if(p.indexOf('zaznaczony')>=0 && document.forms[c].zaznaczony.checked==true) tab_zaz.push(document.forms[c].zaznaczony.value)
     }
  }
  document.getElementById("formularz_akt").ktore.value=tab_zaz.join(',');
  document.getElementById("formularz_akt").akcja.value=aktywuj;
  document.getElementById("formularz_akt").submit();
}
