(top.location == self.location) || (top.location = self.location)

function nwin(page, x, y, scr)
{
 sx = screen.availWidth;
 sy = screen.availHeight;
 px = (sx/2)-(x/2);
 py = (sy/2)-(y/2);
 window.open(page,'','top='+py+',left='+px+',width='+x+',height='+y+'resizable=no,scrollbars='+scr+',status=yes');
 return;
}

function xwin(page, x, y, scr)
{
 sx = screen.availWidth;
 sy = screen.availHeight;
 wx = screen.availWidth-300;
 wy = screen.availHeight-200;
 px = (sx/2)-(wx/2);
 py = (sy/2)-(wy/2);
 window.open(page,'','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars='+scr+',resizable=yes,fullscreen=no,channelmode=no,width='+wx+',height='+wy+',left='+px+',top='+py);
 return;
}

function fakturka()
{
 if (document.getElementById) //IE5, FF, OPERA lub NN6
  {
   if(document.getElementById("fvat").checked)
   {
	document.getElementById("fvnip").style.height = 'auto';
	if(document.getElementById("dane_zam").checked) { document.getElementById("fvdane").style.height = '0px'; }
	 else { document.getElementById("fvdane").style.height = 'auto'; }
   }
    else { document.getElementById("fvnip").style.height = '0px'; document.getElementById("fvdane").style.height = '0px'; }
 }
  else if (document.layers) //NN4
 {
  if(document.layers["fvat"].checked)
   { document.layers["fvnip"].height = 'auto'; }
    else { document.layers["fvnip"].height = '0px'; document.layers["fvdane"].height = '0px'; }
 }
 return 0;
}

